/* Woo Product Carousel - Theme-Compatible Styles */
.pcarousel-wrapper {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  background: none;
  border-radius: 0;
  position: relative;
}

.pcarousel-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8em;
  font-weight: 600;
  color: inherit;
  line-height: 1.3;
}

.pcarousel-category-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8em;
  font-weight: 600;
  color: inherit;
  line-height: 1.3;
}

.pcarousel-category-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.pcarousel-category-link:hover {
  color: #0073aa;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  text-decoration: none;
}

.pcarousel-swiper {
  position: relative;
  padding: 0 50px;
  margin: 0 auto;
}

.pcarousel-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  background: none;
  border: none;
  padding: 10px;
  min-height: 320px; /* Increased height to accommodate description */
}

.pcarousel-product-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  text-decoration: none;
  background: none;
  transition: transform 0.2s ease;
}

.pcarousel-product-link:hover {
  transform: translateY(-2px);
}

.pcarousel-product-img {
  text-align: center;
  margin-bottom: 12px;
  width: 100%;
  height: 200px; /* Fixed height for uniform images */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: #fafbfc;
  border: 1px solid #e0e0e0;
}

.pcarousel-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures uniform size while maintaining aspect ratio */
  object-position: center;
  border-radius: 6px;
  border: none; /* Remove border since container has it */
  background: transparent;
  transition: transform 0.2s ease;
}

.pcarousel-product-link:hover .pcarousel-product-img {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.pcarousel-product-link:hover .pcarousel-product-img img {
  transform: scale(1.05);
}

.pcarousel-product-title {
  margin-top: 8px;
  font-size: 1em;
  text-align: center;
  color: inherit;
  font-weight: 500;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
}

.pcarousel-product-description {
  margin-top: 6px;
  font-size: 0.85em;
  text-align: center;
  color: #2b2b2b;
  line-height: 1.3;
  font-weight: bold;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
  opacity: 0.8;
}

.pcarousel-product-price {
  margin-top: 6px;
  font-size: 0.9em;
  text-align: center;
  color: inherit;
  font-weight: 600;
  line-height: 1.2;
}

.pcarousel-product-price .woocommerce-Price-amount {
  font-weight: 700;
}

.pcarousel-product-price del {
  opacity: 0.7;
  font-size: 0.85em;
}

.pcarousel-product-price ins {
  text-decoration: none;
  color: #e74c3c;
}

/* Arrow positioning - Left and Right */
.pcarousel-swiper .swiper-button-prev,
.pcarousel-swiper .swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border-radius: 50%;
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  z-index: 10;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pcarousel-swiper:hover .swiper-button-prev,
.pcarousel-swiper:hover .swiper-button-next {
  opacity: 1;
  visibility: visible;
}

.pcarousel-swiper .swiper-button-prev {
  left: 10px;
}

.pcarousel-swiper .swiper-button-next {
  right: 10px;
}

.pcarousel-swiper .swiper-button-prev:after,
.pcarousel-swiper .swiper-button-next:after {
  font-size: 16px;
  font-weight: 600;
}

.pcarousel-swiper .swiper-button-prev:hover,
.pcarousel-swiper .swiper-button-next:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-50%) scale(1.1);
}

.pcarousel-swiper .swiper-button-prev:focus,
.pcarousel-swiper .swiper-button-next:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

.pcarousel-swiper .swiper-button-disabled {
  opacity: 0.3 !important;
  background: #f5f5f5 !important;
  color: #999 !important;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 900px) {
  .pcarousel-wrapper { 
    padding: 0 15px; 
  }
  .pcarousel-swiper { 
    padding: 0 40px; 
  }
  .pcarousel-swiper .swiper-button-prev,
  .pcarousel-swiper .swiper-button-next { 
    width: 36px; 
    height: 36px; 
    font-size: 16px; 
  }
  .pcarousel-swiper .swiper-button-prev {
    left: 5px;
  }
  .pcarousel-swiper .swiper-button-next {
    right: 5px;
  }
}

@media (max-width: 600px) {
  .pcarousel-wrapper { 
    padding: 0 10px; 
  }
  .pcarousel-swiper { 
    padding: 0 35px; 
  }
  .pcarousel-swiper .swiper-button-prev,
  .pcarousel-swiper .swiper-button-next { 
    width: 32px; 
    height: 32px; 
    font-size: 14px; 
  }
  .pcarousel-product-title { 
    font-size: 0.9em; 
  }
  .pcarousel-slide { 
    padding: 5px; 
  }
}

/* Theme compatibility - ensure proper inheritance */
.pcarousel-wrapper * {
  box-sizing: border-box;
}

.pcarousel-product-title,
.pcarousel-title {
  font-family: inherit;
}

/* Ensure proper contrast in different themes */
.pcarousel-product-title {
  color: #2b2b2b;
}

/* Remove any conflicting styles from themes */
.pcarousel-wrapper .swiper-wrapper {
  align-items: stretch;
}

.pcarousel-slide {
  height: auto;
}
