/* ============================================================
   PRODUCT DETAIL PAGE — product.css
   ============================================================ */

/* ---- Body override for product page ---- */
.product-page-body {
  padding-bottom: 0;
  background: #F7F7F7;
}

/* ---- Product-specific header additions ---- */
.product-header .header-top {
  border-bottom: 1px solid var(--line);
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  font-size: 0.75rem;
  color: var(--ink-soft);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}
.breadcrumb-bar::-webkit-scrollbar { display: none; }
.breadcrumb-bar .bc-sep { width: 14px; height: 14px; fill: var(--ink-light); flex-shrink: 0; }
.bc-link { color: var(--ink-soft); transition: color 0.2s; cursor: pointer; flex-shrink: 0; }
.bc-link:hover { color: var(--ink); }
.bc-current { color: var(--ink); font-weight: 500; flex-shrink: 0; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* ---- Product main layout ---- */
.product-main {
  padding: 0 0 80px;
}

.product-layout {
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

/* ============================================================
   IMAGE GALLERY
   ============================================================ */
.product-gallery {
  position: relative;
  width: 100%;
  user-select: none;
}

.gallery-main-wrap {
  position: relative;
  width: 100%;
  background: #F8F8F8;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  position: relative;
}

.gallery-main-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  background: #F8F8F8;
}

.gallery-zoom-icon {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.gallery-zoom-icon svg { width: 20px; height: 20px; fill: var(--ink-soft); }

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: grid;
  place-items: center;
  transition: all 0.2s;
}
.gallery-nav svg { width: 22px; height: 22px; fill: var(--ink); }
.gallery-nav:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.18); }
.gallery-nav:active { transform: translateY(-50%) scale(0.94); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.gallery-counter {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

/* Thumbnails */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--surface);
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex: 0 0 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  background: #F8F8F8;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.is-active {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}
.gallery-thumb:hover { border-color: var(--ink-soft); }

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 500;
  background: rgba(0,0,0,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.gallery-lightbox.is-open { opacity: 1; visibility: visible; }

.gallery-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: zoomIn 0.3s ease;
}
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 501;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-close svg { width: 24px; height: 24px; fill: #fff; }

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 501;
  transition: background 0.2s;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav svg { width: 28px; height: 28px; fill: #fff; }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }

/* ============================================================
   PRODUCT INFO PANEL
   ============================================================ */
.product-info-panel {
  padding: 20px 16px 24px;
  background: var(--surface);
}

.product-brand-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin: 0 0 12px;
}

/* Rating row */
.product-rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.rating-stars { display: flex; gap: 2px; }
.rating-stars svg { width: 14px; height: 14px; }
.rating-stars svg.filled { fill: #FFB800; }
.rating-stars svg.empty { fill: var(--line); }
.rating-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
}
.review-count-link {
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--line);
}
.review-count-link:hover { color: var(--accent); }
.sold-count {
  font-size: 0.75rem;
  color: var(--ink-light);
  padding-left: 6px;
  border-left: 1px solid var(--line);
}

/* Price block */
.price-block {
  background: #FFF8F8;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.price-current {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.price-original {
  font-size: 0.9rem;
  color: var(--ink-light);
  text-decoration: line-through;
}
.price-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.price-note {
  font-size: 0.72rem;
  color: var(--ink-soft);
}

/* Stock */
.stock-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 0.8rem;
}
.stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(34,197,94,0); }
}
.stock-label { font-weight: 600; color: #22C55E; }
.stock-count { color: var(--ink-soft); }

/* ---- Variant Groups ---- */
.variant-group {
  margin-bottom: 18px;
}
.variant-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.variant-selected-label {
  font-weight: 400;
  color: var(--ink-soft);
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Color variant buttons */
.color-swatch {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.is-active {
  box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink);
}
.color-swatch::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: inherit;
}

/* Storage chip buttons */
.storage-chip {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
}
.storage-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.storage-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* Quantity row */
.quantity-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.quantity-label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #FAFAFA;
  transition: background 0.2s;
}
.qty-btn:hover { background: var(--line-light); }
.qty-btn svg { width: 18px; height: 18px; fill: var(--ink); }
.qty-input {
  width: 52px;
  height: 38px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  outline: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-max-note { font-size: 0.72rem; color: var(--ink-light); }

/* CTA buttons */
.product-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.btn-add-cart, .btn-buy-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: all 0.2s;
}
.btn-add-cart svg, .btn-buy-now svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-add-cart {
  background: #FFF0F0;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-add-cart svg { fill: var(--accent); }
.btn-add-cart:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(230,69,69,0.3);
}
.btn-add-cart:hover svg { fill: #fff; }

.btn-buy-now {
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--accent);
}
.btn-buy-now svg { fill: #fff; }
.btn-buy-now:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 4px 16px rgba(230,69,69,0.35);
}
.btn-add-cart:active, .btn-buy-now:active { transform: scale(0.97); }

/* Secondary actions */
.secondary-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.btn-wishlist, .btn-share {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.btn-wishlist svg, .btn-share svg { width: 16px; height: 16px; fill: var(--ink-soft); transition: fill 0.2s; }
.btn-wishlist:hover, .btn-share:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-wishlist:hover svg, .btn-share:hover svg { fill: var(--ink); }
.btn-wishlist.is-liked { color: var(--accent); border-color: var(--accent); }
.btn-wishlist.is-liked svg { fill: var(--accent); }

/* Trust badges */
.trust-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line-light);
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.trust-badge svg { width: 18px; height: 18px; fill: #3B82F6; flex-shrink: 0; }

/* ============================================================
   PRODUCT DETAILS SECTION (Tabs + Accordions)
   ============================================================ */
.product-details-section {
  background: var(--surface);
  margin-top: 8px;
}

/* Desktop tabs (hidden on mobile) */
.details-tabs {
  display: none;
  border-bottom: 1px solid var(--line);
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.details-tabs::-webkit-scrollbar { display: none; }

.details-tab {
  flex: 0 0 auto;
  padding: 14px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  white-space: nowrap;
}
.details-tab.is-active {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--accent);
}
.details-tab:hover { color: var(--ink); }

/* Panels */
.details-panels { padding: 0; }
.details-panel { display: none; }
.details-panel.is-active { display: block; }

/* Mobile accordion */
.mobile-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-light);
  cursor: pointer;
  transition: background 0.2s;
}
.mobile-accordion-header:hover { background: var(--line-light); }
.accordion-icon { width: 20px; height: 20px; fill: var(--ink-soft); transition: transform 0.3s; flex-shrink: 0; }
.details-panel.accordion-open .accordion-icon { transform: rotate(180deg); }
.details-panel.accordion-open .mobile-accordion-header { color: var(--accent); }

/* Panel content */
.panel-content {
  display: none;
  padding: 16px;
}
.details-panel.accordion-open .panel-content { display: block; }

/* On mobile, all panels are visible as accordions (override the active/display logic) */

/* Description */
.product-description p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 12px;
}

/* Specifications table */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.specs-table tr:nth-child(even) td { background: var(--line-light); }
.specs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
}
.specs-table td:first-child {
  font-weight: 600;
  color: var(--ink);
  width: 40%;
  white-space: nowrap;
}
.specs-table td:last-child { color: var(--ink-soft); }

/* Features list */
.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.5;
}
.feature-icon {
  width: 20px;
  height: 20px;
  background: #E8F5E9;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-icon svg { width: 12px; height: 12px; fill: #22C55E; }

/* Shipping table */
.shipping-table { margin-bottom: 12px; }
.shipping-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.83rem;
  align-items: center;
}
.shipping-method { font-weight: 600; color: var(--ink); }
.shipping-time { color: var(--ink-soft); }
.shipping-cost { font-weight: 600; }
.free-chip { color: #22C55E; }
.shipping-note { font-size: 0.78rem; color: var(--ink-soft); background: var(--line-light); padding: 10px 12px; border-radius: var(--radius-sm); }

/* Returns list */
.returns-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.returns-list li {
  font-size: 0.84rem;
  color: #444;
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--line-light);
  border-radius: var(--radius-sm);
}

/* ============================================================
   REVIEWS
   ============================================================ */
.reviews-overview {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--line-light);
  border-radius: var(--radius-lg);
}

.reviews-score-big {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  flex-shrink: 0;
  text-align: center;
}

.reviews-breakdown {
  flex: 1;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}
.breakdown-label { width: 30px; color: var(--ink-soft); flex-shrink: 0; text-align: right; }
.breakdown-bar-wrap { flex: 1; height: 6px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.breakdown-bar { height: 100%; background: #FFB800; border-radius: var(--radius-pill); transition: width 0.6s ease; }
.breakdown-count { width: 28px; color: var(--ink-soft); flex-shrink: 0; }

.reviews-summary-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.total-reviews-label { font-size: 0.8rem; color: var(--ink-soft); text-align: center; }
.stars-big { display: flex; gap: 3px; }
.stars-big svg { width: 20px; height: 20px; fill: #FFB800; }

.btn-write-review {
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  white-space: nowrap;
}
.btn-write-review:hover { background: var(--ink); color: #fff; }

/* Individual reviews */
.review-list { display: flex; flex-direction: column; gap: 0; }
.review-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line-light);
}
.review-item:last-child { border-bottom: none; }

.review-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
  flex-shrink: 0;
}
.reviewer-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6C5CE7, #A29BFE);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}
.reviewer-info { flex: 1; }
.reviewer-name { font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.reviewer-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-stars { display: flex; gap: 1px; }
.review-stars svg { width: 12px; height: 12px; }
.review-stars svg.filled { fill: #FFB800; }
.review-stars svg.empty { fill: var(--line); }
.review-date { font-size: 0.72rem; color: var(--ink-light); }
.verified-badge {
  font-size: 0.68rem;
  color: #22C55E;
  background: #E8F5E9;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.review-text {
  font-size: 0.83rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 8px;
}
.review-img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  margin-top: 8px;
  border: 1px solid var(--line-light);
}

/* ============================================================
   RELATED PRODUCTS
   ============================================================ */
.related-section, .recently-viewed-section {
  background: var(--surface);
  margin-top: 8px;
  padding: 0 0 12px;
}

/* ============================================================
   STICKY MOBILE CTA BAR
   ============================================================ */
.sticky-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: var(--surface);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}
.sticky-wishlist-btn {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
  background: var(--surface);
  transition: all 0.2s;
}
.sticky-wishlist-btn svg { width: 22px; height: 22px; fill: var(--ink-soft); transition: fill 0.2s; }
.sticky-wishlist-btn:hover svg, .sticky-wishlist-btn.is-liked svg { fill: var(--accent); }
.sticky-wishlist-btn.is-liked { border-color: var(--accent); }

.sticky-cart-btn, .sticky-buy-btn {
  flex: 1;
  height: 46px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.sticky-cart-btn {
  background: #FFF0F0;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.sticky-cart-btn:hover { background: var(--accent); color: #fff; }

.sticky-buy-btn {
  background: var(--accent);
  color: #fff;
}
.sticky-buy-btn:hover { background: var(--accent-dark); }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1A1A1A;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  animation: toastIn 0.3s ease;
  pointer-events: auto;
  white-space: nowrap;
}
.toast.success { background: #22C55E; }
.toast.error { background: var(--accent); }
.toast svg { width: 18px; height: 18px; fill: #fff; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 350;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.cart-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 90vw;
  background: var(--surface);
  z-index: 351;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.cart-drawer-header h3 { font-size: 1rem; font-weight: 700; }
.cart-drawer-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--line-light);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.cart-drawer-close:hover { background: var(--line); }
.cart-drawer-close svg { width: 18px; height: 18px; fill: var(--ink); }

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.cart-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-soft);
}
.cart-empty-state svg { width: 56px; height: 56px; fill: var(--line); margin: 0 auto 12px; }
.cart-empty-state p { font-size: 0.9rem; }

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-light);
}
.cart-item-img {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--line-light);
  flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.cart-item-variant { font-size: 0.72rem; color: var(--ink-light); margin-bottom: 6px; }
.cart-item-price-row { display: flex; align-items: center; justify-content: space-between; }
.cart-item-price { font-size: 0.88rem; font-weight: 700; color: var(--accent); }
.cart-item-remove {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--line-light);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s;
}
.cart-item-remove:hover { background: #FFE0E0; }
.cart-item-remove svg { width: 14px; height: 14px; fill: var(--ink-soft); }

.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.btn-checkout {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.2s;
}
.btn-checkout:hover { background: var(--accent-dark); }

/* ============================================================
   REVIEW WRITE MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.review-modal {
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--line-light);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.modal-close svg { width: 18px; height: 18px; fill: var(--ink); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: var(--font);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--ink); }
.form-group textarea { resize: vertical; min-height: 100px; }

.star-picker { display: flex; gap: 4px; margin-bottom: 4px; }
.star-picker button {
  font-size: 1.8rem;
  color: var(--line);
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
}
.star-picker button:hover, .star-picker button.is-lit { color: #FFB800; }
.star-picker button:hover { transform: scale(1.2); }

.btn-submit-review {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s;
}
.btn-submit-review:hover { background: var(--accent-dark); }

/* ============================================================
   RESPONSIVE: TABLET
   ============================================================ */
@media (min-width: 700px) {
  .product-main { padding-bottom: 0; }
  .sticky-cta-bar { display: none; }

  .gallery-main-wrap { aspect-ratio: 4/3; }
  .product-title { font-size: 1.25rem; }
  .price-current { font-size: 2rem; }

  .product-details-section { padding: 0 28px; }
  .details-tabs { display: flex; }
  .details-panels { padding: 20px 0; }

  /* Hide mobile accordion headers on tablet+ */
  .mobile-accordion-header { display: none; }
  /* Show all panels as regular panels, controlled by tab clicks */
  .details-panel { display: none; }
  .details-panel.is-active { display: block; }
  .panel-content { display: block; }

  .reviews-overview { flex-wrap: nowrap; }
  .review-modal { border-radius: var(--radius-lg); align-self: center; }

  .related-section, .recently-viewed-section { padding: 0 28px 16px; }
}

/* ============================================================
   RESPONSIVE: DESKTOP (Two-column layout)
   ============================================================ */
@media (min-width: 1024px) {
  .product-page-body { padding-bottom: 0; }
  .sticky-cta-bar { display: none; }

  .product-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    max-width: 1200px;
    margin: 24px auto 0;
    padding: 0 24px;
    gap: 32px;
    background: transparent;
  }

  .product-gallery {
    flex: 0 0 480px;
    position: sticky;
    top: 130px;
    align-self: flex-start;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line-light);
  }

  .gallery-main-wrap { aspect-ratio: 1/1; }

  .product-info-panel {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line-light);
  }

  .product-title { font-size: 1.35rem; }
  .price-current { font-size: 2.2rem; }

  .product-ctas { grid-template-columns: 1fr 1fr; }

  .product-details-section {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 24px;
    background: transparent;
  }

  .product-details-section > * {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-light);
    overflow: hidden;
  }

  .details-tabs {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0 24px;
  }
  .details-panels { padding: 24px; }
  .panel-content { padding: 0; }

  .related-section, .recently-viewed-section {
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 0 24px 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-light);
  }

  .breadcrumb-bar { padding: 10px 24px; max-width: 1200px; margin: 0 auto; }
}

@media (min-width: 1280px) {
  .product-layout { max-width: 1400px; }
  .product-gallery { flex: 0 0 560px; }
  .product-details-section { max-width: 1400px; }
  .related-section, .recently-viewed-section { max-width: 1400px; }
}

/* Mobile: show panels as accordions (all visible) */
@media (max-width: 699px) {
  .details-tabs { display: none; }
  .details-panel { display: block; }
  .details-panel .panel-content { display: none; }
  .details-panel.accordion-open .panel-content { display: block; }
  .mobile-accordion-header { display: flex; }
}
