/* =========================================================
   RESET
========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* =========================================================
   TOKENS — LIGHT (DEFAULT)
========================================================= */
:root {
  /* SYSTEM BASE COLOR (LIGHT MODE DEFAULT) */
  --system-color: #000000;

  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --bg-soft: #f3f4f6;

  --text-primary: #111111;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;

  --border: #e5e7eb;

  /* USE SYSTEM COLOR */
  --primary: var(--system-color);

  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;

  --radius-lg: 22px;
  --radius-md: 14px;

  --shadow-card: 0 18px 45px rgba(0,0,0,0.08);
  --shadow-hover: 0 28px 65px rgba(0,0,0,0.14);
}


/* =========================================================
   SYSTEM DARK MODE
========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    /* SYSTEM BASE COLOR (DARK MODE) */
    --system-color: #ffffff;

    --bg-page: #0b0b0b;
    --bg-card: #151515;
    --bg-soft: #1d1d1d;

    --text-primary: #ffffff;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    --border: rgba(255,255,255,0.14);

    /* PRIMARY AUTO SWITCHES TO WHITE */
    --primary: var(--system-color);

    --shadow-card: 0 22px 60px rgba(0,0,0,0.9);
    --shadow-hover: 0 34px 80px rgba(0,0,0,0.95);
  }
}


/* =========================================================
   PAGE
========================================================= */
body {
  background: var(--bg-page);
  color: var(--text-primary);
}

.product-page {
  max-width: 1200px;
  margin: auto;
  padding: 32px 16px 110px;
  color: var(--text-primary);
}

/* =========================================================
   CARD
========================================================= */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}

/* IMAGE CARD FIX */
.image-card {
  padding: 22px;
}

/* =========================================================
   IMAGE
========================================================= */
.image-frame {
  background: linear-gradient(135deg, var(--bg-soft), var(--bg-card));
  border-radius: var(--radius-lg);
  height: 520px; 
   aspect-ratio:1/1; 
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;    
}

.product-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;     /* ⭐ fill frame */
}

.product-main-img:hover {
  transform: scale(1.06);
}

/* Thumbnails */
.thumb-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.product-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: contain;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .25s ease;
}

.product-thumb:hover,
.product-thumb.active {
  border-color: var(--primary);
  transform: scale(1.08);
}

/* =========================================================
   INFO
========================================================= */
.brand {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-info h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 8px 0 6px;
}

.price-box {
  font-size: 26px;
  font-weight: 700;
  margin: 14px 0 18px;
}

/* =========================================================
   DESCRIPTION
========================================================= */
.description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
}

/* =========================================================
   VARIANTS
========================================================= */
.variant {
  margin-bottom: 22px;
}

.variant p {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ---------- SIZE ---------- */
.size-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.size-pill input {
  display: none;
}

.size-pill span {
  min-width: 46px;
  height: 46px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
}

.size-pill input:checked + span {
  background: var(--primary);
  color: var(--bg-card);
  border-color: var(--primary);
}

/* ---------- COLOR ---------- */
.color-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.color-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.color-tile input {
  display: none;
}

.color-circle {
  position: relative;   /* 👈 THIS FIXES IT */
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-block;
  border: 2px solid var(--bg-card);
  box-shadow:
    inset 0 -4px 6px rgba(0,0,0,0.25),
    0 6px 14px rgba(0,0,0,0.25);
  transition: transform .25s ease;
}


.color-tile:hover .color-circle {
  transform: scale(1.15);
}

.color-tile input:checked + .color-circle {
  box-shadow: 0 0 0 2px var(--primary);
}

.color-tile input:checked + .color-circle::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}

.color-name {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.description {
  padding-left: 18px;
  color: #444;
  line-height: 1.7;
}
/* =========================================================
   STOCK MESSAGE
========================================================= */
.stock-message {
  margin-bottom: 10px;
  font-weight: 600;
}

.stock-message.in { color: var(--success); }
.stock-message.low { color: var(--warning); }
.stock-message.out { color: var(--danger); }

/* =========================================================
   CART ACTIONS
========================================================= */
.cart-form {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
}

.qty-box {
  display: flex;
  align-items: center;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-soft);
  box-shadow: inset 0 0 0 1px var(--border);
}

.qty-box button {
  width: 44px;
  height: 48px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-primary);
}

.qty-box input {
  width: 46px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 600;
}

/* ---------- ADD TO CART ---------- */
.add-to-cart-btn {
  height: 48px;
  padding: 0 34px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  background: var(--primary);
  color: var(--bg-card);
  cursor: pointer;
  transition: all .3s ease;
  box-shadow: 0 14px 32px rgba(0,0,0,0.3);
}

.add-to-cart-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.add-to-cart-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.4);
}

/* =========================================================
   HELPER TEXT
========================================================= */
#variantHelper {
  margin-top: 12px;
  font-size: 14px;
  color: var(--danger);
  font-weight: 600;
}

/* =========================================================
   WISHLIST
========================================================= */
.wishlist-btn {
  margin-top: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text-muted);
}

.wishlist-btn:hover {
  color: var(--danger);
}

/* =========================================================
   TOAST
========================================================= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(-6px);
}

/* =========================================================
   MOBILE STICKY BAR
========================================================= */
@media (max-width: 768px) {
  .cart-form {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    padding: 14px;
    box-shadow: 0 -12px 40px rgba(0,0,0,0.35);
    z-index: 999;
  }

  body {
    padding-bottom: 120px;
  }

  .add-to-cart-btn {
    flex: 1;
  }
}
/* =========================================================
   YOU MAY ALSO LIKE — PREMIUM PRODUCT CARDS
========================================================= */

.you-may-like {
  margin-top: 10px;
  margin-bottom: 5px; 
}
.you-may-like-title {
  margin-bottom: 18px;
}


/* GRID */
.you-may-like-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}

@media (max-width: 1400px) {
  .you-may-like-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
  .you-may-like-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 576px) {
  .you-may-like-grid { grid-template-columns: repeat(2, 1fr); }
}

/* CARD */
.you-may-like .product-box {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  transition: transform .4s ease, box-shadow .4s ease;
}

.you-may-like .product-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

/* IMAGE WRAPPER */
.product-img-wrapper {
  position: relative;
  height: 260px;
  background: linear-gradient(135deg, #f4f4f4, #fafafa);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* SLIDER */
.product-img-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.product-img-slide {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity .8s ease, transform .8s ease;
}
.wishlist-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.wishlist-btn.active {
  color: red;
}

.product-img-slide.active {
  opacity: 1;
}

/* IMAGE HOVER EFFECT */
.you-may-like .product-box:hover .product-img-slide.active {
  transform: scale(1.08);
}

/* INFO */
.you-may-like .product-info {
  padding: 12px 14px 6px;
  text-align: center;
}

.you-may-like .product-info h6 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.you-may-like .product-info p {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0;
}

/* CTA */
.you-may-like .quick-view {
  margin-top: auto;
  padding: 12px 14px 16px;
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: all .4s ease;
}

.you-may-like .product-box:hover .quick-view {
  opacity: 1;
  transform: translateY(0);
}

.you-may-like .quick-view a {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 7px 22px;
  border-radius: 999px;
  transition: background .3s ease, color .3s ease;
}

.you-may-like .quick-view a:hover {
  background: var(--primary);
  color: var(--bg-card);
}
/* =========================================================
   SHIMMER SKELETON LOADER
========================================================= */

.shimmer {
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
}

/* moving shine */
.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.6),
    transparent
  );
  animation: shimmerMove 1.4s infinite;
}

@keyframes shimmerMove {
  100% {
    transform: translateX(100%);
  }
}

/* IMAGE SHIMMER */
.product-img-wrapper.shimmer {
  border-radius: 18px;
}

/* TEXT SHIMMERS (optional but premium) */
.shimmer-text {
  height: 12px;
  border-radius: 6px;
  margin: 6px auto;
  width: 60%;
}

.shimmer-price {
  height: 14px;
  width: 40%;
}
/* =========================================================
   FULLSCREEN IMAGE VIEWER — ZOOM + PAN
========================================================= */
/* FULLSCREEN VIEWER */

.image-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.96);

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  opacity: 0;
  visibility: hidden;
  transition: .25s;
}

.image-viewer.show {
  opacity: 1;
  visibility: visible;
}

.viewer-swiper {
  width: 100%;
  height: 100%;
}

.viewer-swiper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.viewer-close {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}

/* Counter */
.viewer-counter {
  position: absolute;
  top: 20px;
  left: 20px;

  color: #fff;
  font-size: 16px;
  font-weight: 600;
  z-index: 10000;
}
/* =========================================================
   MOBILE — FLIPKART STYLE
========================================================= */
@media (max-width: 768px) {

  .product-page {
    padding: 0 0 0px;
  }

  /* REMOVE HEAVY CARD LOOK */
  .product-card {
    padding: 0px 12px;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .image-frame {
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 0;
  }

  .product-main-img {
    object-fit: contain;
  }

  .thumb-row {
    padding: 0px 0;
    gap: 0px;
  }

  .product-thumb {
    width: 48px;
    height: 48px;
  }

  .product-info h1 {
    font-size: 18px;
    margin-top: 6px;
  }

  .price-box {
    font-size: 20px;
    margin: 6px 0 10px;
  }

  .description {
    font-size: 13px;
  }

  .size-pill span {
    min-width: 40px;
    height: 40px;
    font-size: 13px;
  }

  .color-circle {
    width: 36px;
    height: 36px;
  }

  /* STICKY BUY BAR */
  .cart-form {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;

    background: var(--bg-card);
    padding: 10px;
    box-shadow: 0 -8px 20px rgba(0,0,0,.25);
    z-index: 1000;
  }

  .qty-box {
    height: 44px;
  }

  .qty-box button {
    width: 40px;
  }

  .add-to-cart-btn {
    flex: 1;
    height: 44px;
    font-size: 14px;
  }

  body {
    padding-bottom: 120px;
  }
}