/**
 * ÉTHÉRÉ — Single product page brand styling.
 * Uses :root variables from ethere-shop-brand.css
 */

/* ==========================================================================
   Page wrapper
   ========================================================================== */

body.single-product {
  color: var(--ethere-text);
  font-family: var(--ethere-font-body);
}

/* ==========================================================================
   Category link
   ========================================================================== */

body.single-product div.product .posted_in,
body.single-product div.product .posted_in a,
body.single-product div.product .product_meta .posted_in a {
  color: var(--ethere-green) !important;
  text-decoration: none;
}

body.single-product div.product .posted_in a:hover {
  color: var(--ethere-green-dark) !important;
}

/* ==========================================================================
   Product gallery
   ========================================================================== */

body.single-product div.product div.images {
  border: 1px solid var(--ethere-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
}

body.single-product div.product div.images .woocommerce-product-gallery__image img {
  border-radius: 0;
}

body.single-product div.product div.images .flex-control-thumbs {
  margin-top: 0.75rem;
  gap: 0.5rem;
  display: flex;
  padding: 0 0.5rem 0.5rem;
}

body.single-product div.product div.images .flex-control-thumbs li {
  border: 1px solid var(--ethere-border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s;
}

body.single-product div.product div.images .flex-control-thumbs li:hover,
body.single-product div.product div.images .flex-control-thumbs li .flex-active {
  border-color: var(--ethere-green);
}

/* Sale badge */
body.single-product span.onsale {
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  font-family: var(--ethere-font-body);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  min-height: auto;
  line-height: 1;
  padding: 0.5rem 0.75rem;
}

/* ==========================================================================
   Product title
   ========================================================================== */

body.single-product div.product .product_title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: clamp(1.4rem, 3.5vw, 1.85rem);
  color: var(--ethere-text);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

/* ==========================================================================
   Price
   ========================================================================== */

body.single-product div.product p.price,
body.single-product div.product span.price {
  font-family: var(--ethere-font-heading);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ethere-green-dark);
  margin-bottom: 1.25rem;
}

body.single-product div.product p.price del {
  color: var(--ethere-text-muted);
  opacity: 0.6;
  font-size: 1.1rem;
}

body.single-product div.product p.price ins {
  text-decoration: none;
  color: var(--ethere-green-dark);
}

/* ==========================================================================
   Short description
   ========================================================================== */

body.single-product div.product .woocommerce-product-details__short-description {
  font-family: var(--ethere-font-body);
  font-size: 0.95rem;
  color: var(--ethere-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--ethere-border);
}

/* ==========================================================================
   Add to Cart
   ========================================================================== */

body.single-product div.product form.cart {
  margin-bottom: 0.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--ethere-border);
}

body.single-product div.product form.cart .quantity .qty {
  border: 1px solid var(--ethere-border);
  border-radius: 4px;
  padding: 0.5rem 0.6rem;
  font-family: var(--ethere-font-body);
  width: 70px;
  text-align: center;
  font-size: 1rem;
}

body.single-product div.product form.cart .quantity .qty:focus {
  border-color: var(--ethere-green);
  outline: none;
  box-shadow: 0 0 0 2px var(--ethere-green-soft);
}

body.single-product div.product form.cart .single_add_to_cart_button {
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  border: 1px solid var(--ethere-green) !important;
  border-radius: 0 !important;
  font-family: var(--ethere-font-body) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 0.85rem 2rem !important;
  transition: background 0.2s, border-color 0.2s;
}

body.single-product div.product form.cart .single_add_to_cart_button:hover {
  background: var(--ethere-green-dark) !important;
  border-color: var(--ethere-green-dark) !important;
}

/* ==========================================================================
   Product meta (SKU, Category, Tags)
   ========================================================================== */

body.single-product div.product .product_meta {
  font-family: var(--ethere-font-body);
  font-size: 0.85rem;
  color: var(--ethere-text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--ethere-border);
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

body.single-product div.product .product_meta > span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

body.single-product div.product .product_meta a {
  color: var(--ethere-green);
  text-decoration: none;
}

body.single-product div.product .product_meta a:hover {
  color: var(--ethere-green-dark);
}

/* ==========================================================================
   Tabs
   ========================================================================== */

body.single-product div.product .woocommerce-tabs {
  margin-top: 2.5rem;
}

body.single-product div.product .woocommerce-tabs ul.tabs {
  padding: 0 !important;
  margin: 0 0 0 0 !important;
  list-style: none;
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--ethere-border);
}

body.single-product div.product .woocommerce-tabs ul.tabs::before {
  display: none !important;
}

body.single-product div.product .woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-product div.product .woocommerce-tabs ul.tabs li::before,
body.single-product div.product .woocommerce-tabs ul.tabs li::after {
  display: none !important;
}

body.single-product div.product .woocommerce-tabs ul.tabs li a {
  font-family: var(--ethere-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ethere-text-muted);
  padding: 0.9rem 1.5rem;
  display: block;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  font-weight: 500;
}

body.single-product div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--ethere-text);
}

body.single-product div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--ethere-text);
  border-bottom-color: var(--ethere-green);
}

body.single-product div.product .woocommerce-tabs .panel {
  padding: 2rem 0;
  font-family: var(--ethere-font-body);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ethere-text);
}

body.single-product div.product .woocommerce-tabs .panel h2 {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--ethere-text);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Product Details — card grid (inside tab)
   ========================================================================== */

.ethere-product-details {
  padding: 0;
}

.ethere-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.ethere-detail-card {
  background: var(--ethere-white);
  border: 1px solid var(--ethere-border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ethere-detail-card:hover {
  border-color: rgba(148, 197, 115, 0.4);
  box-shadow: 0 4px 16px rgba(148, 197, 115, 0.08);
}

.ethere-detail-card__label {
  font-family: var(--ethere-font-body);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ethere-text-muted);
}

.ethere-detail-card__value {
  font-family: var(--ethere-font-heading);
  font-size: 1rem;
  color: var(--ethere-text);
  font-weight: 400;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .ethere-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Default attribute table — fallback styling
   ========================================================================== */

body.single-product table.woocommerce-product-attributes {
  border: none;
  border-collapse: separate;
  border-spacing: 0;
}

body.single-product table.woocommerce-product-attributes tr {
  border-bottom: 1px solid var(--ethere-border);
}

body.single-product table.woocommerce-product-attributes tr:last-child {
  border-bottom: none;
}

body.single-product table.woocommerce-product-attributes th {
  font-family: var(--ethere-font-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ethere-text-muted);
  font-weight: 500;
  padding: 0.75rem 1rem 0.75rem 0;
  background: transparent;
  border: none;
  vertical-align: top;
  width: 35%;
}

body.single-product table.woocommerce-product-attributes td {
  font-family: var(--ethere-font-body);
  color: var(--ethere-text);
  padding: 0.75rem 0;
  border: none;
}

body.single-product table.woocommerce-product-attributes td p {
  margin: 0;
}

/* ==========================================================================
   Related / upsell products
   ========================================================================== */

body.single-product section.related.products,
body.single-product section.up-sells.upsells {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--ethere-border);
}

body.single-product section.related.products > h2,
body.single-product section.up-sells.upsells > h2 {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--ethere-text);
  text-align: center;
  margin-bottom: 1.75rem;
}

/* ==========================================================================
   Notices
   ========================================================================== */

body.single-product .woocommerce-message {
  border-top-color: var(--ethere-green);
  font-family: var(--ethere-font-body);
}

body.single-product .woocommerce-message .button {
  background: var(--ethere-green) !important;
  color: var(--ethere-white) !important;
  border: 1px solid var(--ethere-green) !important;
  border-radius: 0 !important;
  font-family: var(--ethere-font-body) !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

body.single-product .woocommerce-message .button:hover {
  background: var(--ethere-green-dark) !important;
  border-color: var(--ethere-green-dark) !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
  body.single-product div.product .product_meta {
    flex-direction: column;
    gap: 0.4rem;
  }

  body.single-product div.product .woocommerce-tabs ul.tabs li a {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   US Size Guide — trigger link (sits below the US Size dropdown)
   ========================================================================== */

.ethere-size-guide-link-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: -1.55rem;
  margin-bottom: 1.45rem;
}

.ethere-size-guide-link,
body.single-product div.product form.cart .ethere-size-guide-link,
body.single-product div.product form.variations_form .ethere-size-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--ethere-font-body) !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
  text-transform: none !important;
  color: var(--ethere-green-dark) !important;
  cursor: pointer;
  text-decoration: none !important;
  line-height: 1.3;
  transition: color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.ethere-size-guide-link span {
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.ethere-size-guide-link span:hover {
    border-bottom: 1px solid currentColor;
}

.ethere-size-guide-link:hover,
.ethere-size-guide-link:focus,
.ethere-size-guide-link:focus-visible,
.ethere-size-guide-link:active,
body.single-product div.product form.cart .ethere-size-guide-link:hover,
body.single-product div.product form.cart .ethere-size-guide-link:focus,
body.single-product div.product form.cart .ethere-size-guide-link:focus-visible,
body.single-product div.product form.cart .ethere-size-guide-link:active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  /*color: var(--ethere-text) !important;*/
  box-shadow: none !important;
  outline: none;
}

.ethere-size-guide-link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ==========================================================================
   US Size Guide — modal
   ========================================================================== */

.ethere-size-guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 18, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ethere-size-guide-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.ethere-size-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.ethere-size-guide-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ethere-size-guide__inner {
  position: relative;
  background: var(--ethere-white, #fff);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 5rem);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ethere-size-guide-modal.is-open .ethere-size-guide__inner {
  transform: translateY(0);
}

body.ethere-size-guide-open {
  overflow: hidden;
}

/* --- Header --- */

.ethere-size-guide__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ethere-border, #e8e8e8);
  background: var(--ethere-white, #fff);
  flex-shrink: 0;
}

.ethere-size-guide__title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  letter-spacing: 0.04em;
  color: var(--ethere-text, #1a1a1a);
  margin: 0;
  line-height: 1.3;
}

.ethere-size-guide__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ethere-text-muted, #5c5c5c);
  transition: background 0.2s ease, color 0.2s ease;
}

.ethere-size-guide__close:hover,
.ethere-size-guide__close:focus-visible {
  background: var(--ethere-green-soft, rgba(148, 197, 115, 0.12));
  color: var(--ethere-text, #1a1a1a);
  outline: none;
}

.ethere-size-guide__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
}

/* --- Body (scroll area) --- */

.ethere-size-guide__body {
  padding: 1.5rem 1.75rem 2rem;
  overflow-y: auto;
  font-family: var(--ethere-font-body);
  color: var(--ethere-text, #1a1a1a);
  line-height: 1.7;
  font-size: 0.95rem;
}

.ethere-size-guide__intro {
  margin: 0 0 1.5rem;
  color: var(--ethere-text-muted, #5c5c5c);
}

/* --- Option section --- */

.ethere-size-guide__section + .ethere-size-guide__section {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--ethere-border, #e8e8e8);
}

.ethere-size-guide__option-title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
  color: var(--ethere-text, #1a1a1a);
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.ethere-size-guide__option-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ethere-green-soft, rgba(148, 197, 115, 0.12));
  color: var(--ethere-green-dark, #7aad5a);
  font-family: var(--ethere-font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0;
  flex-shrink: 0;
}

.ethere-size-guide__steps {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
  color: var(--ethere-text, #1a1a1a);
}

.ethere-size-guide__steps li {
  margin-bottom: 0.4rem;
}

.ethere-size-guide__tip-inline {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--ethere-text-muted, #5c5c5c);
  font-style: italic;
}

/* --- Calibration ruler --- */

.ethere-size-guide__ruler {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  margin: 0.5rem 0 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--ethere-green-soft, rgba(148, 197, 115, 0.12));
  border-radius: 8px;
}

.ethere-size-guide__ruler-bar {
  width: 50mm;
  max-width: 100%;
  height: 6px;
  background: var(--ethere-green, #94c573);
  border-radius: 3px;
  position: relative;
}

.ethere-size-guide__ruler-bar::before,
.ethere-size-guide__ruler-bar::after {
  content: "";
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--ethere-green-dark, #7aad5a);
}

.ethere-size-guide__ruler-bar::before {
  left: 0;
}

.ethere-size-guide__ruler-bar::after {
  right: 0;
}

.ethere-size-guide__ruler-label {
  font-family: var(--ethere-font-body);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ethere-text-muted, #5c5c5c);
}

/* --- Printable circles --- */

.ethere-size-guide__circles {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.5rem;
  justify-content: center;
  padding: 1.25rem 0.5rem;
  background: #fafafa;
  border: 1px dashed var(--ethere-border, #e8e8e8);
  border-radius: 10px;
}

.ethere-size-guide__circle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.ethere-size-guide__circle {
  border: 1.5px solid var(--ethere-text, #1a1a1a);
  border-radius: 50%;
  background: var(--ethere-white, #fff);
  box-sizing: content-box;
  flex-shrink: 0;
}

.ethere-size-guide__circle-label {
  font-family: var(--ethere-font-body);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--ethere-text, #1a1a1a);
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.ethere-size-guide__circle-label small {
  font-size: 0.7rem;
  color: var(--ethere-text-muted, #5c5c5c);
  letter-spacing: 0;
}

/* --- Chart table --- */

.ethere-size-guide__table-wrap {
  margin-top: 0.5rem;
  overflow-x: auto;
  border: 1px solid var(--ethere-border, #e8e8e8);
  border-radius: 10px;
}

.ethere-size-guide__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ethere-font-body);
  font-size: 0.9rem;
}

.ethere-size-guide__table th,
.ethere-size-guide__table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--ethere-border, #e8e8e8);
}

.ethere-size-guide__table thead th {
  background: var(--ethere-green-soft, rgba(148, 197, 115, 0.12));
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ethere-text, #1a1a1a);
  font-weight: 600;
}

.ethere-size-guide__table tbody tr:last-child td {
  border-bottom: none;
}

.ethere-size-guide__table tbody tr:hover {
  background: rgba(148, 197, 115, 0.06);
}

/* --- Callouts (tip + "not sure") --- */

.ethere-size-guide__callout {
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--ethere-green, #94c573);
  background: var(--ethere-green-soft, rgba(148, 197, 115, 0.1));
  border-radius: 0 8px 8px 0;
}

.ethere-size-guide__callout--soft {
  border-left-color: var(--ethere-text-muted, #5c5c5c);
  background: #f7f7f6;
}

.ethere-size-guide__callout-title {
  font-family: var(--ethere-font-heading);
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--ethere-text, #1a1a1a);
  margin: 0 0 0.35rem;
}

.ethere-size-guide__callout p {
  margin: 0;
  color: var(--ethere-text, #1a1a1a);
  font-size: 0.92rem;
}

/* --- Responsive modal --- */

@media (max-width: 600px) {
  .ethere-size-guide-modal {
    padding: 1rem 0.5rem;
  }

  .ethere-size-guide__inner {
    max-height: calc(100vh - 2rem);
    border-radius: 12px;
  }

  .ethere-size-guide__body {
    padding: 1.25rem 1.1rem 1.75rem;
    font-size: 0.92rem;
  }

  .ethere-size-guide__header {
    padding: 1rem 1.1rem;
  }

  .ethere-size-guide__circles {
    gap: 1rem;
    padding: 1rem 0.5rem;
  }
}

/* --- Print: keep circles + chart, hide chrome --- */

@media print {
  .ethere-size-guide-overlay {
    display: none !important;
  }

  .ethere-size-guide-modal {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0 !important;
  }

  .ethere-size-guide__inner {
    box-shadow: none !important;
    max-height: none !important;
    border-radius: 0 !important;
  }

  .ethere-size-guide__close {
    display: none !important;
  }

  .ethere-size-guide__circles {
    background: transparent !important;
    border-color: transparent !important;
    page-break-inside: avoid;
  }

  .ethere-size-guide__circle {
    border-color: #000 !important;
  }
}
