/* ==========================================================================
   Product Detail Page Styles - UGREEN Nepal
   ========================================================================== */

/* ---- Product Detail Layout ---- */
.product-detail {
  padding: 24px 0 60px;
}

.product-detail__grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .product-detail__grid {
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: flex-start;
  }
}

/* ---- Product Gallery ---- */
.product-gallery {
  position: relative;
  min-width: 0;
}

.product-gallery__main {
  position: relative;
  width: 100%;
  min-width: 0;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product-gallery__main .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.product-gallery__main .swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-gallery__main .swiper-slide:hover img {
  transform: scale(1.05);
}

/* Gallery navigation */
.product-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e5e5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
  color: #333;
}

.product-gallery__nav:hover {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-gallery__nav--prev {
  left: 12px;
}

.product-gallery__nav--next {
  right: 12px;
}

.product-gallery__nav svg {
  width: 16px;
  height: 16px;
}

/* Thumbnails */
.product-gallery__thumbs {
  margin-top: 16px;
  position: relative;
}

.product-gallery__thumbs .swiper-slide {
  width: 80px !important;
  height: 80px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s;
  background: #f5f5f5;
}

.product-gallery__thumbs .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-gallery__thumbs .swiper-slide-thumb-active {
  border-color: #0A4F38;
  opacity: 1;
}

.product-gallery__thumbs .swiper-slide:hover {
  opacity: 0.85;
}

/* Discount flag */
.product-gallery__discount {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  background: #0A4F38;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

/* ---- Product Info ---- */
.product-info {
  position: sticky;
  top: 100px;
}

.product-info__category {
  font-size: 12px;
  font-weight: 500;
  color: #0A4F38;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.product-info h1 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: #1a1a1a;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .product-info h1 {
    font-size: 28px;
  }
}

/* Reviews link */
.product-info__reviews {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #666;
}

.product-info__stars {
  color: #FFB800;
  font-size: 16px;
  letter-spacing: 2px;
}

/* Price */
.product-info__price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.product-info__price-current {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
}

.product-info__price-compare {
  font-size: 18px;
  color: #999;
  text-decoration: line-through;
}

.product-info__price-save {
  font-size: 13px;
  font-weight: 600;
  color: #d32f2f;
  background: #ffebee;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Summary / Description */
.product-info__summary {
  font-size: 15px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

/* Badges */
.product-info__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  list-style: none;
  padding: 0;
}

.product-info__badges li {
  font-size: 12px;
  font-weight: 500;
  color: #0A4F38;
  background: #e8f5e9;
  padding: 4px 10px;
  border-radius: 20px;
}

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

.product-info__variant-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.product-info__variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-info__variant-option {
  padding: 8px 16px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  background: #fff;
  transition: all 0.2s;
  color: #333;
}

.product-info__variant-option:hover {
  border-color: #0A4F38;
}

.product-info__variant-option.is-active {
  border-color: #0A4F38;
  background: #0A4F38;
  color: #fff;
}

/* Quantity + ATC */
.product-info__actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.product-info__qty {
  display: flex;
  align-items: center;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  height: 48px;
}

.product-info__qty button {
  width: 40px;
  height: 100%;
  border: none;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 18px;
  color: #333;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info__qty button:hover {
  background: #eee;
}

.product-info__qty input {
  width: 50px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: #333;
  -moz-appearance: textfield;
}

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

/* ATC button uses shared Button component (variant=primary size=lg).
 * Only layout-level overrides needed here. */
.product-info__atc {
  flex: 1;
  min-width: 160px;
}

/* Trust badges */
.product-info__trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: #f8f8f8;
  border-radius: 8px;
  margin-bottom: 20px;
}

.product-info__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #555;
}

.product-info__trust-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #0A4F38;
}

/* Highlights */
.product-info__highlights {
  margin-bottom: 20px;
}

.product-info__highlights h3 {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.product-info__highlights ul {
  list-style: none;
  padding: 0;
}

.product-info__highlights li {
  padding: 4px 0;
  font-size: 14px;
  color: #555;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.product-info__highlights li::before {
  content: "✓";
  color: #0A4F38;
  font-weight: bold;
  flex-shrink: 0;
}

/* ---- Product Tabs ---- */
.product-tabs {
  margin-top: 60px;
  border-top: 1px solid #e5e5e5;
  padding-top: 0;
}

.product-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 60px;
  background: #fff;
  z-index: 50;
}

.product-tabs__nav button {
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.product-tabs__nav button:hover {
  color: #333;
}

.product-tabs__nav button.is-active {
  color: #0A4F38;
  border-bottom-color: #0A4F38;
  font-weight: 600;
}

.product-tabs__panel {
  padding: 40px 0;
}

.product-tabs__panel.is-hidden {
  display: none;
}

/* ---- Product Overview Section ---- */
.product-overview {
  max-width: 1200px;
  margin: 0 auto;
}

.product-overview img {
  max-width: 100%;
  height: auto;
  display: block;
}

.product-overview .aplus-carousel-container {
  position: relative;
  margin: 24px 0;
}

.product-overview .a-carousel-row-inner {
  position: relative;
}

.product-overview .a-carousel-center {
  min-width: 0;
}

.product-overview .a-carousel-viewport.swiper {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.product-overview .a-carousel.swiper-wrapper {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-overview .a-carousel-card.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.product-overview .a-carousel-card img {
  width: 100%;
  height: auto;
}

.product-overview .a-carousel-col {
  position: static;
}

.product-overview .a-carousel-goto-prevpage,
.product-overview .a-carousel-goto-nextpage {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2933;
  transform: translateY(-50%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.product-overview .a-carousel-goto-prevpage {
  left: 14px;
}

.product-overview .a-carousel-goto-nextpage {
  right: 14px;
}

.product-overview .a-carousel-goto-prevpage::before,
.product-overview .a-carousel-goto-nextpage::before {
  font-size: 24px;
  line-height: 1;
}

.product-overview .a-carousel-goto-prevpage::before {
  content: "‹";
}

.product-overview .a-carousel-goto-nextpage::before {
  content: "›";
}

.product-overview .a-icon-alt {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.product-overview .aplus-pagination-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.product-overview .carousel-slider-circle {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
}

.product-overview .carousel-slider-circle.aplus-carousel-active,
.product-overview .carousel-slider-circle[aria-selected="true"] {
  background: #0A4F38;
}

/* ---- Product Specs Section ---- */
.product-specs__title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  padding: 16px 24px;
  background: #f5f5f5;
  border-radius: 8px 8px 0 0;
  margin: 0;
}

.product-specs__table {
  width: 100%;
  border-collapse: collapse;
}

.product-specs__table tr:nth-child(odd) {
  background: #fafafa;
}

.product-specs__table tr:nth-child(even) {
  background: #fff;
}

.product-specs__table th,
.product-specs__table td {
  padding: 14px 24px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

.product-specs__table th {
  font-weight: 600;
  color: #333;
  width: 35%;
}

.product-specs__table td {
  color: #555;
}

@media (min-width: 768px) {
  .product-specs__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
}

/* ---- Product Compare Section ---- */
.product-compare {
  margin-bottom: 40px;
}

.product-compare__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

/* ---- Recommended Products ---- */
.product-recommended {
  padding: 40px 0;
}

.product-recommended__title {
  font-size: 22px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
}

/* ---- Lightbox ---- */
.product-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.product-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.product-lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.product-lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.product-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---- Sticky ATC Bar (mobile) ---- */
.sticky-atc {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 100;
  transform: translateY(100%);
  transition: transform 0.3s;
}

.sticky-atc.is-visible {
  transform: translateY(0);
}

.sticky-atc__price {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
}

/* sticky-atc button uses shared Button (variant=primary size=md);
 * layout overrides only. */
.sticky-atc__btn {
  flex: 1;
}

@media (min-width: 1024px) {
  .sticky-atc {
    display: none;
  }
}

/* ---- Breadcrumb ---- */
.product-breadcrumb {
  padding: 16px 0;
  font-size: 13px;
  color: #666;
}

.product-breadcrumb a {
  color: #666;
  text-decoration: none;
}

.product-breadcrumb a:hover {
  color: #0A4F38;
}

.product-breadcrumb span {
  color: #999;
}

/* ---- Container ---- */
.product-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .product-container {
    padding: 0 40px;
  }
}
