/* =============================================================
   Pure of Morocco — Premium Product Page
   Scoped to .single-product. Native WooCommerce markup preserved.
   ============================================================= */

.single-product {
  --pom-olive: #4D5A26;
  --pom-olive-d: #3C471E;
  --pom-gold: #A9832F;
  --pom-espresso: #2A2717;
  --pom-muted: #6F6A55;
  --pom-cream: #FAF4EC;
  --pom-tint: #F3EAD9;
  --pom-border: #E0DACB;
  --pom-serif: Georgia, "Times New Roman", serif;
}

.single-product .site-content { background: var(--pom-cream); }
.single-product .ast-container { max-width: 1240px; }

/* ---------- Layout: gallery + sticky summary ----------
   The .pom-pdp-top wrapper bounds the sticky column to its own row, so it
   unpins when the tabs / story / related sections begin. Without it the
   summary stays pinned over the rest of the page.                        */
/* Astra ships #primary { margin: 4em 0 } — 64px of dead space under the header */
.single-product #primary {
  margin-top: 24px;
  margin-bottom: 48px;
}
.single-product .ast-woocommerce-container { padding-top: 0; }
.single-product div.product {
  padding-top: 0;
}
.single-product div.product::after {
  content: "";
  display: table;
  clear: both;
}
.single-product .pom-pdp-top {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  width: 100%;
}

/* Sale badge: anchored over the gallery, not floating over the breadcrumb */
.single-product .pom-pdp-top > .onsale {
  position: absolute;
  top: 16px;
  left: 16px;
  right: auto;
  z-index: 5;
  margin: 0;
  min-height: 0;
  min-width: 0;
  width: auto;
  height: auto;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--pom-gold);
  color: #23200F;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(60,55,25,.18);
}
@media (max-width: 921px) {
  .single-product .pom-pdp-top > .onsale { top: 12px; left: 12px; }
}
.single-product .pom-pdp-top .woocommerce-product-gallery {
  width: 56%;
  padding-right: 56px;
  float: none !important;
  margin-bottom: 0;
}
.single-product .pom-pdp-top .summary.entry-summary {
  width: 44%;
  float: none !important;
  margin-bottom: 0;
  align-self: flex-start;
  position: sticky;
  top: 100px;
}
@media (max-width: 921px) {
  .single-product .pom-pdp-top .woocommerce-product-gallery,
  .single-product .pom-pdp-top .summary.entry-summary {
    width: 100%;
    padding-right: 0;
    position: static;
  }
  .single-product .pom-pdp-top .summary.entry-summary { padding-top: 26px; }
}

/* ---------- Breadcrumb ---------- */
.pom-pdp-crumbs {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  font-size: 13px;
  color: var(--pom-muted);
}
.pom-pdp-crumbs a {
  color: var(--pom-muted);
  text-decoration: none;
  transition: color .18s ease;
}
.pom-pdp-crumbs a:hover { color: var(--pom-olive); }
.pom-pdp-crumbs__sep { color: var(--pom-border); }
.pom-pdp-crumbs span[aria-current] { color: var(--pom-espresso); }

/* ---------- Gallery ---------- */
.single-product .woocommerce-product-gallery__image img {
  border-radius: 14px;
  border: 1px solid var(--pom-border);
}
.single-product .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
}
.single-product .flex-control-thumbs li {
  width: calc(25% - 8px);
  margin: 0;
  list-style: none;
}
.single-product .flex-control-thumbs img {
  border-radius: 8px;
  border: 1px solid var(--pom-border);
  opacity: .72;
  transition: opacity .2s ease, border-color .2s ease;
  cursor: pointer;
}
.single-product .flex-control-thumbs img:hover,
.single-product .flex-control-thumbs img.flex-active {
  opacity: 1;
  border-color: var(--pom-olive);
}

/* ---------- Title / origin / price ---------- */
.single-product .product_title {
  font-family: var(--pom-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.5px;
  color: var(--pom-espresso);
  margin: 0 0 6px;
}
.pom-pdp-origin {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--pom-gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.pom-pdp-origin__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.single-product .summary .price,
.single-product .summary .price .amount {
  color: var(--pom-espresso);
  font-family: var(--pom-serif);
  font-size: 1.6rem;
  font-weight: 400;
}
.single-product .summary .price del { opacity: .5; font-size: 1.1rem; }
.single-product .summary .price ins { text-decoration: none; }
.single-product .summary .woocommerce-product-details__short-description {
  color: var(--pom-muted);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 16px 0 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--pom-border);
}

/* ---------- Rating ---------- */
.single-product .summary .woocommerce-product-rating { margin-bottom: 12px; }
.single-product .star-rating span::before,
.single-product .star-rating::before { color: var(--pom-gold); }

/* ---------- Variations / swatches ---------- */
.single-product .variations th.label label {
  color: var(--pom-espresso);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.single-product .variations select {
  background: #fff;
  border: 1px solid var(--pom-border);
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--pom-espresso);
  min-height: 46px;
}
.single-product .variations select:focus {
  border-color: var(--pom-olive);
  outline: none;
  box-shadow: 0 0 0 3px rgba(77,90,38,.14);
}
.single-product .cfvsw-swatches-option {
  border-radius: 8px !important;
  border-color: var(--pom-border) !important;
}
.single-product .cfvsw-swatches-option.cfvsw-selected-swatch,
.single-product .cfvsw-swatches-option:hover {
  border-color: var(--pom-olive) !important;
  box-shadow: 0 0 0 2px rgba(77,90,38,.18) !important;
}
.single-product .reset_variations {
  color: var(--pom-muted);
  font-size: 13px;
}

/* ---------- Quantity + add to cart ---------- */
.single-product form.cart { margin-top: 6px; }

/* Row: quantity (fixed) + add-to-cart (fills the rest).
   Variable products put these inside .woocommerce-variation-add-to-cart,
   simple products directly inside form.cart. */
.single-product .woocommerce-variation-add-to-cart,
.single-product form.cart:not(.variations_form) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
.single-product .woocommerce-variation-add-to-cart .quantity,
.single-product form.cart:not(.variations_form) .quantity {
  flex: 0 0 auto;
  margin: 0;
}
.single-product .quantity .qty {
  border: 1px solid var(--pom-border);
  border-radius: 8px;
  height: 62px;
  min-height: 62px;
  width: 90px;
  background: #fff;
  color: var(--pom-espresso);
  font-size: 16px;
  text-align: center;
}
.single-product .single_add_to_cart_button.button {
  flex: 1 1 260px;
  background: var(--pom-olive);
  color: #F3ECD9;
  border: 0;
  border-radius: 8px;
  height: 62px;
  min-height: 62px;
  padding: 0 44px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: .3px;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
@media (max-width: 480px) {
  .single-product .single_add_to_cart_button.button {
    flex: 1 1 100%;
    padding: 0 24px;
  }
}
.single-product .single_add_to_cart_button.button:hover {
  background: var(--pom-olive-d);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(60,55,25,.20);
}
.single-product .single_add_to_cart_button.button:focus-visible {
  outline: 2px solid var(--pom-gold);
  outline-offset: 3px;
}

/* ---------- Trust badges ---------- */
.pom-pdp-trust {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--pom-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pom-pdp-trust__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--pom-muted);
  font-size: 14px;
}
.pom-pdp-trust__icon { color: var(--pom-gold); flex: none; }

/* ---------- Product meta ---------- */
.single-product .product_meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--pom-border);
  color: var(--pom-muted);
  font-size: 13.5px;
}
.single-product .product_meta a { color: var(--pom-olive); }
.single-product .product_meta a:hover { color: var(--pom-gold); }

/* ---------- Tabs ----------
   WooCommerce and Astra both paint the tab strip: ul.tabs gets a background
   and each li draws rounded "folder" shoulders with ::before/::after +
   box-shadow. Left unreset those render as solid coloured blocks above the
   panel. Everything below is a deliberate, total reset.                    */
.single-product .woocommerce-tabs {
  width: 100%;
  margin-top: 64px;
  padding-top: 8px;
  background: none;
}
.single-product .woocommerce-tabs ul.tabs,
.single-product .woocommerce-tabs ul.tabs.wc-tabs {
  padding: 0;
  margin: 0 0 28px;
  list-style: none;
  background: none !important;
  background-color: transparent !important;
  border: 0;
  border-bottom: 1px solid var(--pom-border);
  box-shadow: none !important;
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  overflow: visible;
}
.single-product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce-tabs ul.tabs::after {
  content: none !important;
  display: none !important;
}
.single-product .woocommerce-tabs ul.tabs li,
.single-product .woocommerce-tabs ul.tabs li.active {
  background: none !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.single-product .woocommerce-tabs ul.tabs li::before,
.single-product .woocommerce-tabs ul.tabs li::after,
.single-product .woocommerce-tabs ul.tabs li.active::before,
.single-product .woocommerce-tabs ul.tabs li.active::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  box-shadow: none !important;
  background: none !important;
}
.single-product .woocommerce-Tabs-panel {
  background: none;
  border: 0;
}
.single-product .woocommerce-tabs ul.tabs li a {
  padding: 0 0 14px;
  color: var(--pom-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--pom-espresso);
  border-bottom-color: var(--pom-gold);
}
.single-product .woocommerce-Tabs-panel {
  color: var(--pom-muted);
  font-size: 16px;
  line-height: 1.75;
  max-width: 820px;
}
.single-product .woocommerce-Tabs-panel h2 { display: none; }
.single-product .woocommerce-Tabs-panel h3 {
  font-family: var(--pom-serif);
  font-weight: 400;
  color: var(--pom-espresso);
  font-size: 1.35rem;
  margin: 28px 0 10px;
}
.single-product .shop_attributes th { color: var(--pom-espresso); }
.single-product .shop_attributes td { color: var(--pom-muted); }

/* ---------- Care / Shipping accordion ---------- */
.pom-pdp-accordion {
  width: 100%;
  max-width: 820px;
  margin: 8px 0 0;
}
.pom-pdp-accordion__item { border-bottom: 1px solid var(--pom-border); }
.pom-pdp-accordion__h { margin: 0; font-size: inherit; font-weight: inherit; }
.pom-pdp-accordion__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: var(--pom-espresso);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-family: inherit;
}
.pom-pdp-accordion__q:hover { color: var(--pom-olive); }
.pom-pdp-accordion__q:focus-visible {
  outline: 2px solid var(--pom-olive);
  outline-offset: 2px;
}
.pom-pdp-accordion__chev { color: var(--pom-gold); flex: none; transition: transform .2s ease; }
.pom-pdp-accordion__q[aria-expanded="true"] .pom-pdp-accordion__chev { transform: rotate(180deg); }
.pom-pdp-accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
}
.pom-pdp-accordion__panel.is-open { grid-template-rows: 1fr; }
.pom-pdp-accordion__inner { overflow: hidden; }
.pom-pdp-accordion__inner p {
  color: var(--pom-muted);
  font-size: 15.5px;
  line-height: 1.7;
  padding: 0 0 20px;
  margin: 0;
}

/* ---------- Behind the Craftsmanship ---------- */
.pom-pdp-craft {
  width: 100%;
  background: var(--pom-tint);
  margin: 72px 0 0;
  padding: 64px 0;
}
.pom-pdp-craft__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
}
.pom-pdp-craft__media { flex: 1 1 320px; }
.pom-pdp-craft__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(60,55,25,.18);
  display: block;
}
.pom-pdp-craft__text { flex: 1 1 340px; }
.pom-pdp-craft__eyebrow {
  color: var(--pom-gold);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 12px;
}
.pom-pdp-craft__title {
  font-family: var(--pom-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  color: var(--pom-espresso);
  margin: 0 0 18px;
}
.pom-pdp-craft__text p {
  color: var(--pom-muted);
  font-size: 16px;
  line-height: 1.75;
  margin: 0 0 14px;
}

/* ---------- Related products ---------- */
.single-product .related.products,
.single-product .up-sells.products {
  width: 100%;
  margin-top: 72px;
}
.single-product .related.products > h2,
.single-product .up-sells.products > h2 {
  font-family: var(--pom-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--pom-espresso);
  text-align: center;
  margin-bottom: 34px;
}
.single-product .related.products ul.products li.product,
.single-product .up-sells.products ul.products li.product {
  background: #fff;
  border: 1px solid var(--pom-border);
  border-radius: 14px;
  overflow: hidden;
  padding-bottom: 18px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.single-product .related.products ul.products li.product:hover,
.single-product .up-sells.products ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(60,55,25,.14);
  border-color: var(--pom-olive);
}
.single-product .related.products li.product img,
.single-product .up-sells.products li.product img {
  border-radius: 0;
  margin-bottom: 14px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .45s ease;
}
.single-product .related.products li.product:hover img,
.single-product .up-sells.products li.product:hover img { transform: scale(1.06); }
.single-product .related.products li.product .woocommerce-loop-product__title,
.single-product .up-sells.products li.product .woocommerce-loop-product__title {
  font-family: var(--pom-serif);
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--pom-espresso);
  padding: 0 14px;
}
.single-product .related.products li.product .price,
.single-product .up-sells.products li.product .price {
  color: var(--pom-olive);
  font-weight: 700;
  padding: 0 14px;
}
.single-product .related.products li.product .button,
.single-product .up-sells.products li.product .button {
  background: transparent;
  color: var(--pom-olive);
  border: 1px solid var(--pom-olive);
  border-radius: 6px;
  margin: 10px 14px 0;
  transition: background-color .18s ease, color .18s ease;
}
.single-product .related.products li.product .button:hover,
.single-product .up-sells.products li.product .button:hover {
  background: var(--pom-olive);
  color: #F3ECD9;
}

/* ---------- Reviews: list ---------- */
.single-product #reviews .woocommerce-Reviews-title {
  font-family: var(--pom-serif);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--pom-espresso);
  margin: 0 0 26px;
}
.single-product #reviews ol.commentlist {
  list-style: none;
  margin: 0 0 40px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.single-product #reviews ol.commentlist li.review,
.single-product #reviews ol.commentlist li.comment {
  background: #fff;
  border: 1px solid var(--pom-border);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 0;
}
.single-product #reviews .comment_container {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.single-product #reviews .commentlist img.avatar {
  position: static;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--pom-border);
  padding: 0;
  margin: 0;
  flex: none;
  background: var(--pom-tint);
}
.single-product #reviews .comment-text {
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  width: 100%;
}
.single-product #reviews .comment-text .star-rating {
  float: none;
  margin: 0 0 8px;
  font-size: 13px;
}
.single-product #reviews .comment-text .meta {
  color: var(--pom-muted);
  font-size: 13.5px;
  margin: 0 0 10px;
}
.single-product #reviews .comment-text .meta strong {
  color: var(--pom-espresso);
  font-weight: 700;
}
.single-product #reviews .woocommerce-review__verified {
  color: var(--pom-olive);
  font-style: normal;
  font-weight: 600;
}
.single-product #reviews .comment-text .description p {
  color: var(--pom-muted);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0;
}
.single-product #reviews .woocommerce-Reviews .form-submit { margin-top: 12px; }

/* ---------- Reviews: form ---------- */
.single-product #reviews .comment-reply-title {
  font-family: var(--pom-serif);
  font-size: 1.25rem;
  color: var(--pom-espresso);
}
.single-product #reviews .comment-form input[type=text],
.single-product #reviews .comment-form input[type=email],
.single-product #reviews .comment-form textarea {
  border: 1px solid var(--pom-border);
  border-radius: 8px;
  padding: 11px 13px;
  background: #fff;
}
.single-product #reviews .comment-form input:focus,
.single-product #reviews .comment-form textarea:focus {
  border-color: var(--pom-olive);
  outline: none;
  box-shadow: 0 0 0 3px rgba(77,90,38,.14);
}
.single-product #reviews .submit {
  background: var(--pom-olive);
  color: #F3ECD9;
  border-radius: 6px;
  border: 0;
  padding: 12px 26px;
  font-weight: 600;
}
.single-product #reviews .submit:hover { background: var(--pom-olive-d); }
.single-product .woocommerce-noreviews {
  background: var(--pom-tint);
  border: 1px solid var(--pom-border);
  border-left: 4px solid var(--pom-gold);
  border-radius: 8px;
  padding: 16px 18px;
  color: var(--pom-muted);
}

/* ---------- Sticky add-to-cart bar (Astra) ---------- */
.single-product .ast-sticky-add-to-cart {
  background: rgba(250,244,236,.97);
  border-top: 1px solid var(--pom-border);
  backdrop-filter: blur(8px);
}
.single-product .ast-sticky-add-to-cart .button {
  background: var(--pom-olive);
  color: #F3ECD9;
  border-radius: 6px;
}
.single-product .ast-sticky-add-to-cart .button:hover { background: var(--pom-olive-d); }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  .single-product *,
  .pom-pdp-accordion__panel { transition: none !important; }
}
