/* ================================================================
   SHOP PAGE + PRODUCT DETAIL — Complete Redesign
   ================================================================ */

/* ================================================================
   SHOP ARCHIVE
   ================================================================ */

/* ── Banner ──────────────────────────────────────────────────── */
.sp-banner {
  background: linear-gradient(135deg, var(--primary-pale) 0%, var(--smoke) 100%);
  padding: 56px 0 52px;
  border-bottom: 1px solid var(--sand);
  position: relative;
  overflow: hidden;
}

.sp-banner::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(107,61,94,0.06);
  pointer-events: none;
}

.sp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sp-breadcrumb a {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  color: var(--muted) !important;
  transition: color 0.25s;
}

.sp-breadcrumb a:hover { color: var(--primary) !important; }

.sp-breadcrumb i { font-size: 10px; color: var(--stone); }

.sp-breadcrumb span {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
}

.sp-banner__title {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 500;
  color: var(--heading);
  line-height: 1.1;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.sp-banner__desc {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
}

/* ── Layout ──────────────────────────────────────────────────── */
.sp-layout { padding: 48px 0 100px; }

.sp-layout__row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
  position: relative;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sp-sidebar {
  position: sticky;
  top: 100px;
}

.sp-sidebar__inner {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 12px;
  overflow: hidden;
}

.sp-sidebar__close {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  background: var(--primary);
  border: none;
  color: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.sp-sidebar__block {
  padding: 24px 20px;
  border-bottom: 1px solid var(--smoke);
}

.sp-sidebar__block:last-child { border-bottom: none; }

.sp-sidebar__title {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  width: fit-content;
}

/* Sidebar search */
.sp-sidebar__search { position: relative; }
.sp-sidebar__search input,
.sp-sidebar__search .search-field {
  width: 100%;
  height: 40px;
  border: 1.5px solid var(--sand);
  border-radius: 6px;
  padding: 0 40px 0 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--heading);
  background: var(--off-white);
  outline: none;
  transition: border-color 0.3s;
  display: block;
}
.sp-sidebar__search input:focus,
.sp-sidebar__search .search-field:focus {
  border-color: var(--primary-light);
  background: var(--white);
}
.sp-sidebar__search button[type="submit"] {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
  cursor: pointer;
  color: var(--primary-light);
  font-size: 14px;
  transition: color 0.3s;
  font-size: 0;
}
.sp-sidebar__search button[type="submit"]::before {
  content: "\f002";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 14px;
}
.sp-sidebar__search button[type="submit"]:hover { color: var(--primary); }

/* Category list */
.sp-sidebar__cats { margin: 0; }

.sp-sidebar__cats li {
  border-bottom: 1px solid var(--smoke);
}

.sp-sidebar__cats li:last-child { border-bottom: none; }

.sp-sidebar__cats li a {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 300;
  color: var(--body-txt) !important;
  transition: all 0.25s;
}

.sp-sidebar__cats li a span {
  background: var(--smoke);
  color: var(--muted);
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.25s;
}

.sp-sidebar__cats li a:hover { color: var(--primary) !important; padding-left: 4px; }
.sp-sidebar__cats li a:hover span { background: var(--primary-pale); color: var(--primary); }
.sp-sidebar__cats li.is-active a { color: var(--primary) !important; font-weight: 600; }
.sp-sidebar__cats li.is-active a span { background: var(--primary); color: var(--white); }

/* WC widget overrides inside sidebar */
.sp-sidebar__block--widgets .woocommerce-widget-layered-nav-list__item a,
.sp-sidebar__block--widgets .wc-block-product-categories-list li a {
  color: var(--body-txt) !important;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 300;
  display: block !important;
  padding: 8px 0;
  border-bottom: 1px solid var(--smoke);
  transition: all 0.25s;
}

.sp-sidebar__block--widgets .woocommerce-widget-layered-nav-list__item a:hover,
.sp-sidebar__block--widgets .wc-block-product-categories-list li a:hover {
  color: var(--primary) !important;
  padding-left: 5px;
}

/* Sidebar overlay (mobile) */
.sp-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 399;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.sp-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.sp-toolbar__filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1.5px solid var(--sand);
  background: var(--white);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--heading);
  cursor: pointer;
  transition: all 0.25s;
}

.sp-toolbar__filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sp-toolbar__result-count {
  flex: 1;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sp-toolbar__result-count p.woocommerce-result-count {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 300;
}

.sp-toolbar__result-count .woocommerce-ordering {
  margin: 0;
}

.sp-toolbar__result-count select {
  border: 1.5px solid var(--sand);
  padding: 7px 12px;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--heading);
  outline: none;
  background: var(--off-white);
  cursor: pointer;
  transition: border-color 0.25s;
}

.sp-toolbar__result-count select:focus { border-color: var(--primary-light); }

.sp-toolbar__view { display: flex; gap: 6px; }

.sp-view-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1.5px solid var(--sand);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
}

.sp-view-btn.is-active, .sp-view-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ── Product Grid ─────────────────────────────────────────────── */
.shop-product-main ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 !important;
  padding: 0 !important;
}

.shop-product-main ul.products::before,
.shop-product-main ul.products::after { display: none; }

.shop-product-main ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

/* List view */
.shop-product-main.list-view ul.products {
  grid-template-columns: 1fr;
  gap: 14px;
}

/* ── Product Card ─────────────────────────────────────────────── */
.sp-card {
  background: var(--white);
  border: 1px solid var(--smoke);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s;
  position: relative;
}

.sp-card:hover {
  box-shadow: 0 12px 40px rgba(107,61,94,0.14);
  transform: translateY(-5px);
  border-color: rgba(107,61,94,0.12);
}

.sp-card__inner { height: 100%; display: flex; flex-direction: column; }

/* Image */
.sp-card__img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--off-white);
  aspect-ratio: 1 / 1;
}

.sp-card__img-link { display: block !important; width: 100%; height: 100%; }

.sp-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
  display: block;
}

.sp-card:hover .sp-card__img { transform: scale(1.07); }

/* Badges */
.sp-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 3;
}

.sp-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 30px;
}

.sp-badge--sale { background: var(--primary); color: var(--white); }
.sp-badge--new  { background: #2a7a5a; color: var(--white); }

/* Quick actions */
.sp-card__actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 3;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.sp-card:hover .sp-card__actions { opacity: 1; transform: translateX(0); }

.sp-card__action-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--sand);
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--heading) !important;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sp-card__action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white) !important;
}

/* Body */
.sp-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sp-card__cat {
  display: inline-block !important;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-light) !important;
  margin-bottom: 6px;
  transition: color 0.25s;
}

.sp-card__cat:hover { color: var(--primary) !important; }

.sp-card__title {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  margin: 0 0 8px;
  flex: 1;
}

.sp-card__title a {
  color: var(--heading) !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s;
}

.sp-card__title a:hover { color: var(--primary) !important; }

/* Rating */
.sp-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.sp-stars { display: flex; gap: 2px; }

.sp-stars i { font-size: 10px; color: #f59e0b; }

.sp-card__rating-count {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
}

/* Footer: price stacked above full-width ATC */
.sp-card__footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: auto;
  gap: 10px;
}

.sp-card__price .price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.sp-card__price .price del {
  font-size: 12px !important;
  color: var(--stone) !important;
  font-weight: 400 !important;
}

.sp-card__price .price ins {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
}

.pdp-summary__price del,.pdp-summary__price ins {
    text-decoration: none;
}

.pdp-summary__price del span {
    text-decoration: line-through;
}

.sp-card__price .woocommerce-Price-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--sans);
}

/* ATC button */
.sp-card__atc {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  background: var(--primary);
  color: var(--white) !important;
  border: none;
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-align: center;
  width: 100%;
}

.sp-card__atc:hover {
  background: var(--primary-dark) !important;
  color: var(--white) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(107,61,94,0.3);
}

.sp-card__atc span { display: inline; }

/* Suppress WooCommerce default loading::before spinner on our button */
.sp-card__atc.loading::before { display: none !important; }

/* Loading / added states (WooCommerce + custom) */
.sp-card__atc.loading,
.sp-card__atc.is-loading {
  opacity: 0.85;
  pointer-events: none;
  color: transparent !important;
  position: relative;
}
.sp-card__atc.loading i,
.sp-card__atc.is-loading i { visibility: hidden; }
.sp-card__atc.loading::after,
.sp-card__atc.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sp-card-spin 0.7s linear infinite;
}
@keyframes sp-card-spin { to { transform: rotate(360deg); } }
.sp-card__atc.added,
.sp-card__atc.is-added { background: var(--primary-dark) !important; }

/* List view extra */
.sp-card__list-extra { display: none; }

/* ── List View ─────────────────────────────────────────────────── */
.shop-product-main.list-view .sp-card__inner {
  flex-direction: row;
}

.shop-product-main.list-view .sp-card__img-wrap {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: auto;
  height: 220px;
}

.shop-product-main.list-view .sp-card__body {
  padding: 20px 24px;
}

.shop-product-main.list-view .sp-card__title { font-size: 16px; }
.shop-product-main.list-view .sp-card__title a { -webkit-line-clamp: 1; }

.shop-product-main.list-view .sp-card__footer {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 12px;
}

.shop-product-main.list-view .sp-card__atc {
  width: auto;
  flex-shrink: 0;
  padding: 10px 22px;
}

.shop-product-main.list-view .sp-card__list-extra {
  display: block;
  margin: 10px 0;
}

.shop-product-main.list-view .sp-card__list-extra p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.sp-list-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary) !important;
  transition: gap 0.25s;
}

.sp-list-link:hover { gap: 10px; }

/* ── Pagination ──────────────────────────────────────────────── */
.woocommerce-pagination { margin-top: 52px; }

.woocommerce-pagination ul {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--sand);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--body-txt) !important;
  transition: all 0.25s;
  background: var(--white);
}

.woocommerce-pagination ul li a:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  background: var(--primary-pale);
}

.woocommerce-pagination ul li span.current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white) !important;
  font-weight: 600;
}

/* ── No products ─────────────────────────────────────────────── */
.woocommerce-info {
  border-top: 3px solid var(--primary);
  font-family: var(--sans);
  font-size: 15px;
  border-radius: 0 0 8px 8px;
}

.woocommerce-info::before { color: var(--primary); }


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

/* ── Breadcrumb ──────────────────────────────────────────────── */
.pdp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.pdp-breadcrumb a {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted) !important;
  font-weight: 400;
  transition: color 0.25s;
}

.pdp-breadcrumb a:hover { color: var(--primary) !important; }
.pdp-breadcrumb i { font-size: 10px; color: var(--stone); }
.pdp-breadcrumb span { font-family: var(--sans); font-size: 12px; color: var(--body-txt); font-weight: 500; }

/* ── Main grid ───────────────────────────────────────────────── */
.pdp-main { padding: 0 0 80px; }

.pdp-main__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ── Gallery ─────────────────────────────────────────────────── */
.pdp-gallery {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  position: sticky;
  top: 96px;
}

/* Thumbnails */
.pdp-gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
}

.pdp-gallery__thumbs::-webkit-scrollbar { width: 3px; }
.pdp-gallery__thumbs::-webkit-scrollbar-thumb { background: var(--sand); border-radius: 2px; }

.pdp-gallery__thumb {
  width: 80px;
  height: 80px;
  border: 2px solid var(--sand);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--off-white);
  transition: border-color 0.25s;
  flex-shrink: 0;
}

.pdp-gallery__thumb.is-active { border-color: var(--primary); }
.pdp-gallery__thumb:hover { border-color: var(--primary-light); }

.pdp-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Main image */
.pdp-gallery__main {
  position: relative;
  background: var(--off-white);
  border-radius: 16px;
  overflow: hidden;
}

.pdp-gallery__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  background: var(--primary);
  color: var(--white);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 5px 14px;
  border-radius: 30px;
}

.pdp-gallery__img-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  border-radius: 12px;
}

.pdp-gallery__img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease), opacity 0.18s ease;
}

.pdp-gallery__img-wrap:hover .pdp-gallery__img { transform: scale(1.05); }

.pdp-gallery__zoom-hint {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.3s;
}

.pdp-gallery__img-wrap:hover .pdp-gallery__zoom-hint { opacity: 1; }

/* Mobile nav arrows */
.pdp-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--sand);
  color: var(--heading);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.pdp-gallery__nav:hover { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pdp-gallery__nav--prev { left: 14px; }
.pdp-gallery__nav--next { right: 14px; }

/* No thumbnails: full-width gallery */
.pdp-gallery:not(:has(.pdp-gallery__thumbs)) {
  grid-template-columns: 1fr;
}

/* ── Summary ─────────────────────────────────────────────────── */
.pdp-summary { padding: 16px 0; }

.pdp-summary__meta-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pdp-summary__cat {
  display: inline-block !important;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--primary) !important;
  background: var(--primary-pale);
  padding: 4px 14px;
  border-radius: 30px;
  transition: all 0.25s;
}

.pdp-summary__cat:hover { background: var(--primary); color: var(--white) !important; }

.pdp-summary__sku {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--stone);
  font-weight: 400;
  letter-spacing: 0.06em;
}

.pdp-summary__title {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

/* Rating row */
.pdp-summary__rating-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.pdp-stars { display: flex; gap: 3px; }
.pdp-stars i { font-size: 13px; color: #f59e0b; }

.pdp-summary__rating-val {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.pdp-summary__review-link {
  display: inline-block !important;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--primary) !important;
  text-decoration: underline !important;
  font-weight: 400;
  transition: opacity 0.25s;
}

.pdp-summary__review-link:hover { opacity: 0.7; }

.pdp-summary__stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 30px;
}

.pdp-summary__stock--in { background: #e8f7f0; color: #1a7a4a; }
.pdp-summary__stock--in i { color: #1a7a4a; }
.pdp-summary__stock--out { background: #fdecea; color: #c0392b; }
.pdp-summary__stock--out i { color: #c0392b; }

/* Price */
.pdp-summary__price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pdp-summary__price .price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.pdp-summary__price .price del {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 400;
  color: var(--stone) !important;
  text-decoration: none !important;
}
.pdp-summary__price .price del .woocommerce-Price-amount,
.pdp-summary__price .price del bdi {
  font-family: var(--sans) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  color: var(--stone) !important;
  text-decoration: underline !important;
}

.pdp-summary__price .price ins {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary) !important;
  text-decoration: none !important;
}
.pdp-summary__price .price ins .woocommerce-Price-amount,
.pdp-summary__price .price ins bdi {
  font-family: var(--sans) !important;
  font-size: 32px !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  text-decoration: none !important;
}

.pdp-summary__price .woocommerce-Price-amount {
  font-family: var(--sans);
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.pdp-summary__save-tag {
  display: inline-block;
  background: #fef3e9;
  color: #c25f1a;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 30px;
  letter-spacing: 0.04em;
}

/* Divider */
.pdp-summary__divider {
  height: 1px;
  background: var(--sand);
  margin: 20px 0;
}

/* Excerpt */
.pdp-summary__excerpt {
  margin-bottom: 24px;
}

.pdp-summary__excerpt p {
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--body-txt);
}

.pdp-summary__excerpt ul { padding-left: 18px; margin: 8px 0; }
.pdp-summary__excerpt ul li { font-size: 14px; color: var(--body-txt); margin-bottom: 6px; list-style: disc; }

/* ATC Form */
.pdp-summary__form .form-row { margin-bottom: 14px; }

/* Override WC quantity */
.pdp-summary__form .quantity {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--sand);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
  background: var(--white);
}

.pdp-summary__form .quantity input.qty {
  width: 52px;
  height: 52px;
  border: none !important;
  border-left: 1.5px solid var(--sand) !important;
  border-right: 1.5px solid var(--sand) !important;
  text-align: center;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--heading);
  background: transparent;
  outline: none;
}

/* Outer form: stack variations above qty+button */
.pdp-summary__form .cart {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

/* ATC row — qty + button side by side (variable & simple products) */
.pdp-summary__form .woocommerce-variation-add-to-cart,
.pdp-summary__form.cart-simple {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 12px !important;
}

/* Simple product: cart IS the row (no variation wrapper) */
body.single-product:not(.product-type-variable) .pdp-summary__form .cart {
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 12px !important;
  flex-wrap: wrap;
}

/* Quantity +/− injected buttons */
.pdp-qty-btn {
  width: 42px;
  height: 100%;
  background: var(--off-white);
  border: none;
  color: var(--heading);
  font-size: 22px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
  line-height: 1;
  user-select: none;
}
.pdp-qty-btn:hover { background: var(--smoke); }
.pdp-qty-btn:active { background: var(--sand); }

/* ATC button override — grows to fill remaining space */
.pdp-summary__form button.single_add_to_cart_button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex: 1 !important;
  width: auto !important;
  height: 54px !important;
  padding: 0 28px !important;
  margin-left: 0 !important;
  font-family: var(--sans) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  background: var(--primary) !important;
  border: 2px solid var(--primary) !important;
  color: var(--white) !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.35s var(--ease) !important;
  opacity: 1 !important;
  position: relative !important;
}

.pdp-summary__form button.single_add_to_cart_button:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(107,61,94,0.3) !important;
}

/* Loading state — spinner overlay */
.pdp-summary__form button.single_add_to_cart_button.loading {
  color: transparent !important;
  pointer-events: none !important;
}
.pdp-summary__form button.single_add_to_cart_button.loading i { visibility: hidden !important; }
.pdp-summary__form button.single_add_to_cart_button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pdp-btn-spin 0.7s linear infinite;
}
@keyframes pdp-btn-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Variation swatches */
.pdp-summary__form table.variations th.label {
  padding-right: 16px;
  padding-bottom: 10px;
}

.pdp-summary__form table.variations th.label label {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--heading);
  letter-spacing: 0.06em;
}

.pdp-summary__form table.variations li.button-variable-item {
  font-family: var(--sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--body-txt) !important;
  background: var(--smoke) !important;
  border: 1.5px solid var(--sand) !important;
  border-radius: 6px !important;
  padding: 7px 14px !important;
  transition: all 0.25s !important;
  cursor: pointer;
}

.pdp-summary__form table.variations li.button-variable-item:hover,
.pdp-summary__form table.variations li.button-variable-item.selected {
  background: var(--primary-pale) !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}

/* Trust badges */
.pdp-summary__trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 28px 0 20px;
  border: 1px solid var(--sand);
  border-radius: 10px;
  overflow: hidden;
}

.pdp-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 10px;
  text-align: center;
  border-right: 1px solid var(--sand);
  transition: background 0.25s;
}

.pdp-trust-item:last-child { border-right: none; }
.pdp-trust-item:hover { background: var(--primary-pale); }

.pdp-trust-item i {
  font-size: 20px;
  color: var(--primary);
}

.pdp-trust-item span {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  color: var(--body-txt);
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* Share */
.pdp-summary__share {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pdp-summary__share > span {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pdp-summary__share a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--sand);
  color: var(--body-txt) !important;
  font-size: 13px;
  transition: all 0.25s;
}

.pdp-summary__share a:hover { background: var(--primary); border-color: var(--primary); color: var(--white) !important; }

/* ── Tabs ────────────────────────────────────────────────────── */
.pdp-tabs-section {
  padding: 0 0 80px;
  background: var(--white);
}

.pdp-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--sand);
  margin-bottom: 40px;
}

.pdp-tab {
  padding: 14px 28px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1.5px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pdp-tab em {
  background: var(--smoke);
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 20px;
}

.pdp-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.pdp-tab.is-active em {
  background: var(--primary);
  color: var(--white);
}

.pdp-tab:hover:not(.is-active) { color: var(--primary); }

/* WC tabs body override */
.pdp-tabs__body .woocommerce-tabs { margin: 0; }
.pdp-tabs__body .woocommerce-tabs .panel { margin: 0; }

/* Hide WC's own tabs nav since we rebuilt it */
.pdp-tabs__body .woocommerce-tabs ul.tabs { display: none !important; }

.pdp-tabs__body .woocommerce-Tabs-panel { padding: 0; }
.pdp-tabs__body .woocommerce-Tabs-panel p { font-size: 15px; line-height: 1.8; color: var(--body-txt); margin-bottom: 14px; }
.pdp-tabs__body .woocommerce-Tabs-panel ul li { font-size: 14.5px; list-style: disc; margin-bottom: 8px; color: var(--body-txt); }
.pdp-tabs__body .woocommerce-Tabs-panel h2 { font-family: var(--serif); font-size: 26px; color: var(--heading); margin-bottom: 20px; font-weight: 500; }

/* Product attributes table */
.pdp-tabs__body table.woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
}

.pdp-tabs__body table.woocommerce-product-attributes th,
.pdp-tabs__body table.woocommerce-product-attributes td {
  padding: 14px 18px;
  font-family: var(--sans);
  font-size: 14px;
  border-bottom: 1px solid var(--smoke);
  text-align: left;
  vertical-align: top;
  color: var(--body-txt);
}

.pdp-tabs__body table.woocommerce-product-attributes th {
  font-weight: 600;
  color: var(--heading);
  background: var(--off-white);
  width: 180px;
}

/* Review form */
.pdp-tabs__body .woocommerce-Reviews input[type="text"],
.pdp-tabs__body .woocommerce-Reviews input[type="email"],
.pdp-tabs__body .woocommerce-Reviews textarea {
  border: 1.5px solid var(--sand) !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.25s;
}

.pdp-tabs__body .woocommerce-Reviews input:focus,
.pdp-tabs__body .woocommerce-Reviews textarea:focus {
  border-color: var(--primary-light) !important;
}

.pdp-tabs__body .woocommerce-Reviews input#submit {
  background: var(--primary) !important;
  border: 2px solid var(--primary) !important;
  color: var(--white) !important;
  font-family: var(--sans) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  padding: 13px 32px !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all 0.3s !important;
}

.pdp-tabs__body .woocommerce-Reviews input#submit:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.pdp-tabs__body .comment-form-rating { margin-bottom: 16px; }
.pdp-tabs__body .comment-form-rating .stars a { color: #f59e0b; font-size: 20px; }

/* Review list */
.pdp-tabs__body .woocommerce-Reviews ol.commentlist li {
  padding: 24px 0;
  border-bottom: 1px solid var(--smoke);
  list-style: none;
}

.pdp-tabs__body .woocommerce-Reviews .comment-text { border: none !important; padding: 0 !important; }
.pdp-tabs__body .star-rating { color: #f59e0b; }

/* ── Related Products ────────────────────────────────────────── */
.pdp-related {
  padding: 80px 0 100px;
  background: var(--off-white);
  border-top: 1px solid var(--sand);
}

.pdp-related__head { margin-bottom: 40px; }

.pdp-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pdp-related__grid ul.products { display: contents; }
.pdp-related__grid ul.products::before,
.pdp-related__grid ul.products::after { display: none; }

/* Override WC related block if it renders directly */
section.related.products { display: none; } /* hide WC default, we use custom */


/* ================================================================
   RESPONSIVE — Shop + PDP
   ================================================================ */

/* 1199px */
@media (max-width: 1199px) {
  .sp-layout__row { grid-template-columns: 220px 1fr; gap: 28px; }
  .pdp-main__grid { grid-template-columns: 1fr 1fr; gap: 44px; }
  .pdp-gallery { grid-template-columns: 68px 1fr; gap: 10px; }
  .pdp-gallery__thumb { width: 68px; height: 68px; }
  .shop-product-main ul.products { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .pdp-related__grid { grid-template-columns: repeat(4, 1fr); }
  .pdp-summary__trust { grid-template-columns: repeat(2, 1fr); }
  .pdp-trust-item:nth-child(2) { border-right: none; }
  .pdp-trust-item:nth-child(3),
  .pdp-trust-item:nth-child(4) { border-top: 1px solid var(--sand); }
}

/* 991px */
@media (max-width: 991px) {
  /* Sidebar becomes off-canvas */
  .sp-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    height: 100vh;
    width: 300px;
    z-index: 400;
    transition: left 0.4s var(--ease);
    overflow-y: auto;
    background: var(--white);
    box-shadow: none;
  }

  .sp-sidebar.is-open { left: 0; box-shadow: 4px 0 30px rgba(0,0,0,0.12); }

  .sp-sidebar-overlay.is-open { display: block; }

  .sp-sidebar__close { display: flex; }

  .sp-layout__row { grid-template-columns: 1fr; }

  .sp-toolbar__filter-btn { display: flex; }

  .shop-product-main ul.products { grid-template-columns: repeat(3, 1fr); }

  /* PDP: stack */
  .pdp-main__grid { grid-template-columns: 1fr; gap: 40px; }
  .pdp-gallery { position: static; }
  .pdp-related__grid { grid-template-columns: repeat(3, 1fr); }
}

/* 767px */
@media (max-width: 767px) {
  .shop-product-main ul.products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .shop-product-main.list-view .sp-card__img-wrap { width: 130px; height: 150px; }

  .pdp-gallery { grid-template-columns: 1fr; }
  .pdp-gallery__thumbs { flex-direction: row; max-height: none; overflow-x: auto; overflow-y: visible; padding-bottom: 4px; }
  .pdp-gallery__thumb { width: 60px; height: 60px; flex-shrink: 0; }

  .pdp-related__grid { grid-template-columns: repeat(2, 1fr); }
  .pdp-summary__price .price ins, .pdp-summary__price .woocommerce-Price-amount { font-size: 26px; }
  .pdp-summary__trust { grid-template-columns: repeat(2, 1fr); }
}

/* 575px */
@media (max-width: 575px) {
  .sp-banner { padding: 40px 0 36px; }
  .sp-banner__title { font-size: 26px; }
  .sp-toolbar { flex-wrap: wrap; gap: 10px; }
  .sp-toolbar__result-count { order: 3; width: 100%; }

  .shop-product-main ul.products { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sp-card__body { padding: 12px; }
  .sp-card__title { font-size: 12.5px; }
  .sp-card__footer { gap: 8px; }

  .pdp-related__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .pdp-summary__form button.single_add_to_cart_button { font-size: 13px !important; width: 100% !important; flex: unset !important; }
  .pdp-summary__form .woocommerce-variation-add-to-cart,
  body.single-product:not(.product-type-variable) .pdp-summary__form .cart { flex-direction: column !important; }
  .pdp-summary__form .quantity { width: 100% !important; }
  .pdp-qty-btn { width: 48px !important; }
  .pdp-tabs__nav { flex-wrap: wrap; }
  .pdp-tab { padding: 10px 16px; font-size: 11px; }
  .pdp-trust-item span { font-size: 10px; }
}
