/* ========================================
   PRODUCT DETAIL PAGE STYLES
   ======================================== */

.breadcrumb-nav {
  background: var(--bg-light);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-light);
  margin-top: 72px;
}

.breadcrumb {
  margin: 0;
  background: none;
  padding: 0;
}

.breadcrumb-item {
  font-size: 0.9rem;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: var(--secondary-color);
}

.breadcrumb-item.active {
  color: var(--text-muted);
}

.product-detail-section {
  padding: calc(var(--spacing-xxl) + 8px) 0;
  background: var(--bg-white);
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.product-main-swiper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-lg);
}

.main-image-container {
  position: relative;
  height: 560px;
  overflow: hidden;
}

.main-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.00));
  transition: transform 0.3s ease;
}

.no-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.no-image-placeholder i {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
  opacity: 0.5;
}

.discount-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--danger-color);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}

.product-thumbs-swiper {
  height: 84px;
  padding-left: 8px; /* fallback padding to create slight left offset */
}

.thumbnail-item {
  height: 84px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.8;
}

.thumbnail-item:hover,
.thumbnail-item.swiper-slide-thumb-active {
  border-color: var(--primary-color);
  opacity: 1;
  transform: scale(1.05);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-white);
}

.product-info {
  padding-left: calc(var(--spacing-xl) + 4px);
}

.product-header {
  margin-bottom: calc(var(--spacing-xl) + 6px);
}

.product-badges {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.badge {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.badge-discount {
  background: var(--danger-color);
  color: white;
}

.badge-category {
  background: var(--primary-color);
  color: white;
}

.badge-collection {
  background: var(--secondary-color);
  color: white;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.25;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
}

.stars {
  color: #ffc107;
  font-size: 1.1rem;
}

.rating-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-pricing {
  margin-bottom: calc(var(--spacing-xl) + 4px);
  padding: var(--spacing-md) var(--spacing-lg);
  background: linear-gradient(135deg, var(--bg-light), rgba(255, 255, 255, 0.8));
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--primary-color);
}

.price-container {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.current-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.original-price {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.savings {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--success-color);
  font-weight: 600;
}

.product-description {
  margin-bottom: var(--spacing-xl);
}

.product-description h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.description-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.product-features {
  margin-bottom: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: var(--bg-light);
  border-radius: var(--radius-lg);
}

.product-features h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.feature-item i {
  color: var(--success-color);
  font-size: 1.05rem;
}

.stock-status {
  margin-bottom: var(--spacing-xl);
}

.stock-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  font-size: 1rem;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  background: var(--bg-light);
}

.stock-indicator.in-stock {
  color: var(--success-color);
  background: rgba(40, 167, 69, 0.1);
}

.stock-indicator.out-of-stock {
  color: var(--danger-color);
  background: rgba(220, 53, 69, 0.1);
}

.stock-indicator i {
  font-size: 1.1rem;
}

.product-actions {
  margin-bottom: calc(var(--spacing-xl) + 4px);
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.quantity-counter {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    width: fit-content;
}

.quantity-btn {
    background-color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.quantity-btn:hover {
    background-color: #f1f1f1;
}

.quantity-counter .form-group {
    margin: 0;
    display: flex;
    align-items: center;
}

.quantity-input {
    width: 60px;
    height: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    outline: none;
    background-color: #fff;
    appearance: textfield;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

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


.action-buttons {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.btn-add-to-cart {
  height: 50px;
  padding: 0 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 5px;
  background-color: #10b981;
  border: none;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-add-to-cart:hover {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  color: white;
}

.btn-add-to-cart:active {
  transform: translateY(0);
}

.btn-check {
  position: absolute;
  clip: rect(0,0,0,0);
  pointer-events: none;
}

.btn-check + label {
  display: inline-block;
  padding: 10px 20px;
  margin: 0 8px 8px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  background-color: white;
  border: 2px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  user-select: none;
}

.btn-check + label:hover {
  border-color: #10b981;
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.btn-check:checked + label {
  background-color: #10b981;
  border-color: #10b981;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-check:checked + label:hover {
  background-color: #059669;
  border-color: #059669;
}

.btn-wishlist {
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.btn-wishlist:hover {
  background: var(--danger-color);
  border-color: var(--danger-color);
  color: white;
}

.out-of-stock-actions {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.product-specs {
  padding: var(--spacing-lg);
  background: var(--bg-light);
  border-radius: var(--radius-lg);
}

.product-specs h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.specs-table {
  display: grid;
  gap: var(--spacing-sm);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.spec-label {
  font-weight: 600;
  color: var(--text-dark);
}

.spec-value {
  color: var(--text-muted);
}

.related-products-section {
  padding: var(--spacing-xxl) 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xxl);
}

.section-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.related-products-swiper {
  padding: var(--spacing-md) 0;
  margin: 0 40px;
  overflow: visible;
}

.related-products-swiper .swiper-slide {
  height: auto;
}

.swiper-button-next,
.swiper-button-prev {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50%;
  color: #fff;
  /*background: linear-gradient(135deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));*/
  background: linear-gradient(324deg, #10b981, rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.swiper-button-next::before,
.swiper-button-prev::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), transparent);
  pointer-events: none;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.70), rgba(0, 0, 0, 0.45));
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 14px;
  color: #fff;
}

/* Position arrows slightly outside the main image for elegance */
.product-main-swiper .swiper-button-prev { left: 10px; }
.product-main-swiper .swiper-button-next { right: 10px; }

.related-products-swiper .swiper-button-prev { left: -20px; }
.related-products-swiper .swiper-button-next { right: -20px; }

@media (max-width: 991.98px) {
  .product-info {
    padding-left: 0;
    margin-top: var(--spacing-xl);
  }
  
  .product-gallery {
    position: static;
  }
  
  .product-title {
    font-size: 1.6rem;
  }
  
  .current-price {
    font-size: 1.5rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn-add-to-cart,
  .btn-wishlist {
    width: 100%;
  }
  
  .related-products-swiper {
    margin: 0 30px;
  }
  
  .related-products-swiper .swiper-button-prev { left: -10px; }
  .related-products-swiper .swiper-button-next { right: -10px; }
}

@media (max-width: 767.98px) {
  .breadcrumb-nav {
    margin-top: 70px;
  }
  
  .product-detail-section {
    padding: var(--spacing-lg) 0;
  }
  
  .product-title {
    font-size: 1.8rem;
  }
  
  .main-image-container {
    height: 360px;
  }
  
  .no-image-placeholder {
    height: 360px;
  }
  
  .product-thumbs-swiper {
    height: 68px;
  }
  
  .thumbnail-item {
    height: 68px;
  }
  
  .current-price {
    font-size: 1.6rem;
  }
  
  .section-header h2 {
    font-size: 1.8rem;
  }
  
  .related-products-swiper {
    margin: 0 20px;
  }
  
  .related-products-swiper .swiper-button-prev { left: -5px; }
  .related-products-swiper .swiper-button-next { right: -5px; }
}