/* Product Detail Page Styles */
:root {
  /* Keep only the variables that aren't in style.css */
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Container and Layout */
.product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 15px;
}

/* Product Gallery - Optimized */
.product-gallery {
  flex: 1;
  min-width: 400px;
  max-width: 700px;
  margin: 0 auto;
}


.main-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 700px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 15px;
}

.thumbnail-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}


.thumbnail {
  width: 80px;
  height: 80px;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--primary-color);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product-info {
  flex: 1;
  min-width: 300px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
}


.product-vendor {
  font-size: 14px;
  color: #474344;
  margin-bottom: 10px;
}

.product-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-color);
}

.product-rating {
  margin-bottom: 20px;
}

.rating {
  color: #e18e96;
  font-size: 16px;
}

.rating span {
  color: #666;
  font-size: 14px;
  margin-left: 8px;
}

.product-price {
  margin: 20px 0;
}

.current-price {
  font-size: 23px;
  font-weight: 700;
  color: #333;
}

.original-price {
  font-size: 20px;
  color: #999;
  text-decoration: line-through;
  margin-left: 10px;
}

.product-sku {
  color: #474344;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Variants */
.product-variant {
  margin-bottom: 20px;
}

.product-variant h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}


/* Variant Options */
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0 25px;
}

.color-options,
.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.color-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.color-option.selected {
  box-shadow: 0 0 0 2px #e18e96;
}

.color-option.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #0c0c0c;
  font-size: 14px;
  font-weight: bold;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.384);
}

.size-option {
  min-width: 40px !important;
  height: 40px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  background: #fff !important;
}

.size-option.selected,
.size-option:hover {
  background-color: #e18e96 !important;
  color: #fff !important;
  border-color: #e18e96 !important;
}

.size-option.unavailable {
  position: relative;
  cursor: not-allowed;
}

.size-option.unavailable::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #e18e96;
  transform: rotate(135deg);
}

/* Size Chart */
.size-chart {
  margin: 15px 0 25px;
}

.size-chart a {
  color: #333;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.size-chart a:hover {
  color: #e18e96;
  text-decoration: underline;
}


/* Quantity and Add to Cart */
.product-quantity {
  margin: 25px 0;
  font-size: small;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.quantity-btn {
  width: 35px;
  height: 35px;
  border: 1px solid var(--border-color);
  background: #f9f9f9;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.quantity-btn:hover {
  background: #eee;
}

#quantity {
  width: 60px;
  height: 35px;
  text-align: center;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  -moz-appearance: textfield;
  appearance: textfield;
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.add-to-cart-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin: 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-to-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  background-color: var(--primary-color);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
  background-color: #d17b83;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.add-to-cart-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.add-to-cart-btn i {
  font-size: 14px;
}

/* Product Description */
.product-description {
  margin: 40px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.product-description h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: var(--text-color);
}

.description-content {
  line-height: 1.6;
  color: #555;
}

/* Additional Info */
.collapsible-section {
  margin-bottom: 20px;
}

.section-header {
  cursor: pointer;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}


.section-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Stock Status */
.stock-status {
  margin: 15px 0;
  padding: 10px;
  border-radius: 4px;
  font-weight: 500;
}

.in-stock {
  background: #e8f5e9;
  color: var(--success-color);
}

.low-stock {
  background: #fff8e1;
  color: #ff8f00;
}

.out-of-stock {
  background: #ffebee;
  color: var(--error-color);
}

/* Size Chart Table Styles */
.size-chart-table {
  width: 100%;
  overflow-x: auto;
  margin: 15px 0;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.size-chart-table table {
  width: 100%;
  border-collapse: collapse;
}

.size-chart-table th,
.size-chart-table td {
  padding: 10px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.size-chart-table th {
  background-color: #f8f9fa;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.size-chart-table th:first-child {
  position: sticky;
  left: 0;
  z-index: 15;
  background-color: #f8f9fa;
}

.size-chart-table tr:hover td {
  background-color: #f1f1f1;
}

.size-chart-table tr:hover td:first-child {
  background-color: #f1f1f1;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Image Gallery Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.gallery-slider {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slider .slide {
  display: none;
  width: 100%;
  height: 100%;
  text-align: center;
}

.gallery-slider .slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-slider .slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: #e18e96;
}

.prev-slide,
.next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(225, 142, 150, 0.8);
  color: white;
  border: none;
  font-size: 24px;
  padding: 15px 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  z-index: 10000;
}

.prev-slide:hover,
.next-slide:hover {
  background: rgba(225, 142, 150, 1);
  transform: translateY(-50%) scale(1.1);
}

.prev-slide {
  left: 30px;
}

.next-slide {
  right: 30px;
}

/* Size Chart Modal Styles */
.size-chart-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  max-height: 80vh;
  overflow-y: auto;
  color: #333;
}

.size-chart-content h2 {
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
}

.size-chart-content .close-modal {
  color: #333;
  font-size: 30px;
  top: 10px;
  right: 20px;
}

.size-chart-content .close-modal:hover {
  color: var(--primary-color);
}


/* Modal Gallery */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ff88bf;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1010;
}

.product-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  height: 80%;
  margin: 5% auto;
  background-color: #eee;
}

.gallery-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}

.slide.active {
  display: flex;
}

.prev-slide,
.next-slide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 15px;
  cursor: pointer;
  font-size: 24px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prev-slide {
  left: 20px;
}

.next-slide {
  right: 20px;
}



/* Mobile Modal Styles */
@media (max-width: 768px) {
  .product-modal-content {
    margin: 10% auto;
    width: 95%;
    height: 70vh;
  }
  
  .prev-slide,
  .next-slide {
    font-size: 18px;
    padding: 10px 15px;
  }
  
  .prev-slide {
    left: 15px;
  }
  
  .next-slide {
    right: 15px;
  }
  
  .close-modal {
    font-size: 30px;
    top: 15px;
    right: 20px;
  }
  
  .size-chart-content {
    padding: 20px;
    margin: 5% auto;
    width: 95%;
    max-height: 85vh;
  }
}


/* Mobile Modal Styles */
@media (max-width: 768px) {
  .product-modal-content {
    margin: 10% auto;
    width: 95%;
    height: 70vh;
  }
  
  .prev-slide,
  .next-slide {
    font-size: 18px;
    padding: 10px 15px;
  }
  
  .prev-slide {
    left: 15px;
  }
  
  .next-slide {
    right: 15px;
  }
  
  .close-modal {
    font-size: 30px;
    top: 15px;
    right: 20px;
  }
}

/* Utility Classes */
.mb-0 {
  margin-bottom: 0 !important;
}

.mt-0 {
  margin-top: 0 !important;
}

.mb-10 {
  margin-bottom: 10px !important;
}

.mt-10 {
  margin-top: 10px !important;
}

/* Product Reviews Section */
.product-reviews-section {
  margin-top: 40px;
  padding: 30px 0;
  background: #f8f9fa;
  border-radius: 12px;
}

.reviews-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.reviews-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 768px) {
  .reviews-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* Reviews List */
.reviews-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
  border-bottom: 2px solid #e18e96;
  padding-bottom: 10px;
}

.review-count {
  color: #666;
  font-weight: 400;
  font-size: 18px;
}

.reviews-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.single-review {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 15px;
}

.review-avatar {
  flex-shrink: 0;
}

.avatar-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e18e96;
}

.review-content {
  flex: 1;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.reviewer-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.review-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.review-rating i {
  color: #ffc107;
  font-size: 14px;
}

.rating-number {
  font-size: 14px;
  color: #666;
  margin-left: 5px;
}

.review-date {
  font-size: 12px;
  color: #999;
  margin-left: auto;
}

.review-text {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.review-images {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.review-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
}

.review-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.review-img:hover {
  transform: scale(1.05);
}

.no-reviews {
  text-align: center;
  padding: 40px 20px;
  background: white;
  border-radius: 8px;
  color: #666;
}

.reviews-pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* Write Review Section */
.write-review-section {
  background: white;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 20px;
}

.write-review-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
  border-bottom: 2px solid #e18e96;
  padding-bottom: 8px;
}

.review-form .form-group {
  margin-bottom: 20px;
}

.review-form label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
}

.review-form .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.review-form .form-control:focus {
  outline: none;
  border-color: #e18e96;
  box-shadow: 0 0 0 2px rgba(225, 142, 150, 0.2);
}

.review-form textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.form-text {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}

.submit-review-btn {
  background: #e18e96;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.submit-review-btn:hover {
  background: #d17a87;
}

.submit-review-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 992px) {
  .product-reviews-section {
    margin-top: 30px;
    padding: 20px 0;
  }

  .reviews-container {
    padding: 0 15px;
  }

  .single-review {
    padding: 15px;
  }

  .write-review-section {
    position: static;
    margin-top: 20px;
  }
}

@media (max-width: 576px) {
  .reviews-title {
    font-size: 20px;
  }

  .single-review {
    flex-direction: column;
    text-align: center;
  }

  .review-header {
    justify-content: center;
    text-align: center;
  }

  .review-date {
    margin-left: 0;
  }

  .review-images {
    justify-content: center;
  }
}

/* 
Avatar placeholder for users without profile images */
.avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e18e96;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  border: 2px solid #e18e96;
}

.avatar-placeholder i {
  color: white;
}

/* Popular Products Slider Styles */
.slider-container {
  position: relative;
  margin: 20px 0;
  clear: both;
  /* Clear any floated elements above */
}

/* Section Header Fixes for Mobile */
#popular-products .wsus__section_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

#popular-products .wsus__section_header h3 {
  margin: 0;
  flex: 1;
}

#popular-products .see_btn {
  white-space: nowrap;
  margin-left: 15px;
}

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.slider-btn {
  width: 45px;
  height: 45px;
  border: 2px solid #e18e96;
  background: white;
  color: #e18e96;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slider-btn:hover {
  background: #e18e96;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(225, 142, 150, 0.3);
}

.slider-btn:active {
  transform: translateY(0);
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 15px 0;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
  background: #e18e96;
  transform: scale(1.2);
}

/* Mobile Responsive Styles for Slider */
@media (max-width: 768px) {
  .slider-controls {
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
  }

  .slider-btn {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .slider-dots {
    margin: 20px 0;
  }

  .dot {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .slider-controls {
    gap: 25px;
    margin: 30px 0;
  }

  .slider-btn {
    width: 55px;
    height: 55px;
    font-size: 22px;
    border-width: 3px;
  }
}