/* ==========================================================
   LA FEMEIA — SINGLE PRODUCT POLISH (v3)
   Matches current working PHP:
   inc/woocommerce-single-product.php
   inc/product-skincare-metabox.php
   No new template or JavaScript required.
   Loaded AFTER the main single-product stylesheet.
   ========================================================== */

body.single-product {
    --sp-ink: #1A1A1A;
    --sp-muted: #746A60;
    --sp-rose: #C9A46A;
    --sp-deep: #9A784A;
    --sp-bg: #F8F4EE;
    --sp-tint: #F3ECE3;
    --sp-line: rgba(154,120,74,.18);
    --sp-serif: 'Cormorant Garamond', Georgia, serif;
    --sp-sans: 'DM Sans', Arial, sans-serif;
    background: #F8F4EE;
}
body.single-product #main-container { background: #F8F4EE; }
body.single-product .bb-sp-title,
body.single-product .bb-sp-eyebrow,
body.single-product .bb-related-title,
body.single-product .bb-related-item-title { font-family: var(--sp-serif); }
body.single-product .bb-sp-price { color: #9A784A; }
body.single-product .bb-sp-divider,
body.single-product .bb-related-title::after { background: #C9A46A; }

/* ----------------------------------------------------------
   A. THE FORMULA — small, calm, editorial
   ---------------------------------------------------------- */
body.single-product .lf-sp-highlights {
    --lf-hi-ink: #1A1A1A;
    --lf-hi-muted: #746A60;
    --lf-hi-gold: #9A784A;
    --lf-hi-line: rgba(154,120,74,.17);
    --lf-hi-serif: 'Cormorant Garamond', Georgia, serif;
    --lf-hi-sans: 'DM Sans', Arial, sans-serif;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--lf-hi-line);
    border-radius: 14px;
    background: linear-gradient(150deg, #FFFEFC, #FAF6F0);
    box-shadow: 0 12px 30px -28px rgba(50,35,20,.22);
    color: var(--lf-hi-ink);
    font-family: var(--lf-hi-sans);
}
body.single-product .lf-sp-highlights *,
body.single-product .lf-sp-highlights *::before,
body.single-product .lf-sp-highlights *::after { box-sizing: border-box; }

/* Intro */
body.single-product .lf-sp-highlights__intro { margin: 0 0 13px; }
body.single-product .lf-sp-highlights__eyebrow {
    display: block; margin: 0 0 5px;
    font: 600 9px/1.35 var(--lf-hi-sans);
    letter-spacing: .13em; text-transform: uppercase; color: var(--lf-hi-gold);
}
body.single-product .lf-sp-highlights__intro h2 {
    margin: 0 0 4px;
    font: 500 clamp(25px,2.25vw,31px)/1.02 var(--lf-hi-serif);
    letter-spacing: -.025em; color: var(--lf-hi-ink);
}
body.single-product .lf-sp-highlights__intro h2 em { font-style: italic; color: #9A784A; }
body.single-product .lf-sp-highlights__intro p {
    margin: 0; font: 400 11px/1.5 var(--lf-hi-sans); color: var(--lf-hi-muted);
}

/* Group headings */
body.single-product .lf-sp-highlights__group + .lf-sp-highlights__group {
    margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--lf-hi-line);
}
body.single-product .lf-sp-highlights__group-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 10px; margin: 0 0 9px;
}
body.single-product .lf-sp-highlights__group-head h3 {
    order: 1; margin: 0;
    font: 600 19px/1.1 var(--lf-hi-serif); color: var(--lf-hi-ink);
}
body.single-product .lf-sp-highlights__label {
    order: 2; display: block; flex: 0 0 auto;
    font: 500 8px/1.4 var(--lf-hi-sans);
    letter-spacing: .09em; text-transform: uppercase; color: var(--lf-hi-gold);
}

/* Benefits — intentionally 2 columns even on standard phones */
body.single-product .lf-sp-highlights__benefits {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;
}
body.single-product .lf-sp-benefit-card {
    position: relative; min-width: 0; min-height: 0;
    padding: 10px 11px;
    border: 1px solid var(--lf-hi-line); border-radius: 9px;
    background: rgba(255,255,255,.88);
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
body.single-product .lf-sp-benefit-card__num {
    display: block; margin: 0 0 4px;
    font: 600 9px/1 var(--lf-hi-sans); letter-spacing: .08em; color: var(--lf-hi-gold);
}
body.single-product .lf-sp-benefit-card h4 {
    margin: 0 0 3px; overflow-wrap: anywhere;
    font: 600 17px/1.12 var(--lf-hi-serif); color: var(--lf-hi-ink);
}
body.single-product .lf-sp-benefit-card p {
    margin: 0; overflow-wrap: anywhere;
    font: 400 10.5px/1.43 var(--lf-hi-sans); color: var(--lf-hi-muted);
}
@media (hover:hover) and (pointer:fine) {
    body.single-product .lf-sp-benefit-card:hover {
        transform: translateY(-2px); border-color: rgba(154,120,74,.36);
        box-shadow: 0 10px 24px -20px rgba(45,30,20,.22);
    }
}

/* Ingredients — compact editorial list */
body.single-product .lf-sp-highlights__ingredients { display: grid; grid-template-columns: 1fr; }
body.single-product .lf-sp-ingredient-row {
    display: grid; grid-template-columns: 19px minmax(0,1fr) 13px;
    gap: 8px; align-items: start;
    min-width: 0; padding: 7px 0;
    border-bottom: 1px solid var(--lf-hi-line);
}
body.single-product .lf-sp-ingredient-row:last-child { padding-bottom: 0; border-bottom: 0; }
body.single-product .lf-sp-ingredient-row__index {
    font: 600 9px/1.6 var(--lf-hi-sans); color: var(--lf-hi-gold);
}
body.single-product .lf-sp-ingredient-row__copy { min-width: 0; }
body.single-product .lf-sp-ingredient-row h4 {
    margin: 0 0 2px; overflow-wrap: anywhere;
    font: 600 16px/1.1 var(--lf-hi-serif); color: var(--lf-hi-ink);
}
body.single-product .lf-sp-ingredient-row p {
    margin: 0; overflow-wrap: anywhere;
    font: 400 10.5px/1.4 var(--lf-hi-sans); color: var(--lf-hi-muted);
}
body.single-product .lf-sp-ingredient-row__icon {
    color: #C9A46A; font-size: 15px; line-height: 1; text-align: right;
}

/* ----------------------------------------------------------
   B. PURCHASE CONTROLS — align to EXISTING bb-sp-form
   ---------------------------------------------------------- */
body.single-product .bb-sp-form { margin-top: 0; }
body.single-product .bb-sp-form form.cart:not(.variations_form),
body.single-product .bb-sp-form .woocommerce-variation-add-to-cart { gap: 8px; }
body.single-product .bb-sp-form .quantity {
    height: 49px; border-radius: 9px !important;
    border-color: rgba(154,120,74,.22) !important;
}
body.single-product .bb-sp-form .quantity .bb-q-btn { width: 36px; }
body.single-product .bb-sp-form .quantity input.qty { width: 37px !important; }
body.single-product .bb-sp-form .single_add_to_cart_button {
    min-width: 160px; min-height: 49px; height: 49px;
    border: 1px solid #C9A46A !important;
    border-radius: 9px !important;
    background: #C9A46A !important; color: #1A1A1A !important;
    font: 600 13px/1.2 var(--sp-sans) !important; letter-spacing: .015em !important;
    box-shadow: none !important;
}
body.single-product .bb-sp-form .single_add_to_cart_button:hover:not(:disabled) {
    background: #A88652 !important; border-color: #A88652 !important; color: #FFFFFF !important;
}
body.single-product .bb-sp-form .bb-sp-buynow {
    min-height: 49px; height: 49px;
    border: 1px solid #1A1A1A !important; border-radius: 9px !important;
    background: #1A1A1A !important; color: #FFFFFF !important;
    font: 600 13px/1.2 var(--sp-sans) !important; letter-spacing: .015em !important;
}
body.single-product .bb-sp-form .bb-sp-buynow:hover:not(:disabled) {
    background: #9A784A !important; border-color: #9A784A !important;
}
body.single-product .bb-sp-form .single_add_to_cart_button:focus-visible,
body.single-product .bb-sp-form .bb-sp-buynow:focus-visible { outline: 2px solid #9A784A; outline-offset: 3px; }

/* ----------------------------------------------------------
   C. TRUST STRIP — three concise factual signals
   ---------------------------------------------------------- */
body.single-product .bb-sp-assurance {
    display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
    margin: 15px 0 0; padding: 0;
    border: 1px solid rgba(154,120,74,.18);
    border-radius: 10px; background: rgba(255,255,255,.7);
    list-style: none;
}
body.single-product .bb-sp-assurance li {
    display: flex; flex-direction: row; align-items: center; justify-content: center;
    gap: 7px; min-width: 0; padding: 10px 6px;
    border-top: 0; border-left: 1px solid rgba(154,120,74,.18);
    font: 500 10px/1.25 var(--sp-sans); color: #1A1A1A; text-align: left;
}
body.single-product .bb-sp-assurance li:first-child { border-left: 0; }
body.single-product .bb-assure-icon {
    display: flex; flex: 0 0 24px; width: 24px; height: 24px;
    align-items: center; justify-content: center;
    border-radius: 50%; color: #9A784A;
}
body.single-product .bb-assure-icon svg { width: 13px; height: 13px; }
body.single-product .bb-assure-text {
    font: 500 10px/1.25 var(--sp-sans); color: #1A1A1A; overflow-wrap: anywhere;
}

/* ----------------------------------------------------------
   D. RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 900px) {
    body.single-product .lf-sp-highlights { padding: 17px; }
}
@media (max-width: 640px) {
    body.single-product .lf-sp-highlights { margin-bottom: 15px; padding: 13px; border-radius: 12px; }
    body.single-product .lf-sp-highlights__intro { margin-bottom: 11px; }
    body.single-product .lf-sp-highlights__intro h2 { font-size: 26px; }
    body.single-product .lf-sp-highlights__group-head { align-items: baseline; gap: 7px; }
    body.single-product .lf-sp-highlights__group-head h3 { font-size: 18px; }
    body.single-product .lf-sp-highlights__label { font-size: 7px; }
    body.single-product .lf-sp-highlights__benefits { gap: 7px; }
    body.single-product .lf-sp-benefit-card { padding: 9px; }
    body.single-product .lf-sp-benefit-card h4 { font-size: 16px; }
    body.single-product .lf-sp-benefit-card p { font-size: 10px; }
    body.single-product .bb-sp-assurance { grid-template-columns: repeat(3,minmax(0,1fr)); }
    body.single-product .bb-sp-assurance li {
        flex-direction: column; gap: 5px; padding: 9px 4px; text-align: center;
    }
    body.single-product .bb-assure-text { text-align: center; font-size: 9px; }
    body.single-product .bb-sp-form .single_add_to_cart_button,
    body.single-product .bb-sp-form .bb-sp-buynow { width: 100%; }
}
@media (max-width: 360px) {
    body.single-product .lf-sp-highlights__benefits { grid-template-columns: 1fr; }
    body.single-product .lf-sp-highlights__group-head { flex-wrap: wrap; }
    body.single-product .bb-assure-text { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    body.single-product .lf-sp-benefit-card,
    body.single-product .bb-sp-form .single_add_to_cart_button,
    body.single-product .bb-sp-form .bb-sp-buynow { transition: none !important; }
}

/* ==========================================================
   LA FEMEIA V4 — COMPACT PRODUCT FORMULA TABS
   Scoped to the working inline repeater renderer.
   ========================================================== */
body.single-product .lf-sp-highlights--tabs {
    margin-bottom: 12px;
    padding: 13px 14px 14px;
    border-radius: 12px;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__intro {
    margin-bottom: 11px;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__intro h2 {
    margin: 0;
    font-size: clamp(23px, 2vw, 28px);
}
body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__eyebrow {
    margin-bottom: 4px;
}
body.single-product .lf-skin-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    margin-bottom: 11px;
    border: 1px solid rgba(154,120,74,.14);
    border-radius: 9px;
    background: #f4ede3;
}
body.single-product .lf-skin-tabs__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 35px;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: #746A60;
    font: 600 12px/1.2 'DM Sans', Arial, sans-serif;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
body.single-product .lf-skin-tabs__button span {
    font-size: 10px;
    opacity: .75;
}
body.single-product .lf-skin-tabs__button[aria-selected="true"] {
    background: #fffdf9;
    color: #1a1a1a;
    box-shadow: 0 2px 7px rgba(60,41,21,.07);
}
body.single-product .lf-skin-tabs__button:hover { color: #9A784A; }
body.single-product .lf-skin-tabs__button:focus-visible {
    outline: 2px solid #9A784A;
    outline-offset: 2px;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__group,
body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__group + .lf-sp-highlights__group {
    margin: 0;
    padding: 0;
    border: 0;
}
body.single-product .lf-sp-highlights--tabs.is-enhanced [role="tabpanel"][hidden] {
    display: none !important;
}
body.single-product .lf-sp-highlights--tabs:not(.is-enhanced) .lf-skin-tabs__panel + .lf-skin-tabs__panel {
    border-top: 1px solid rgba(154,120,74,.18);
    padding-top: 10px;
    margin-top: 10px;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__benefits {
    gap: 7px;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-benefit-card {
    padding: 9px 10px;
    border-radius: 8px;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-benefit-card h4 {
    margin: 0 0 3px;
    font-size: 16px;
    line-height: 1.15;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-benefit-card p {
    font-size: 10.5px;
    line-height: 1.35;
}
body.single-product .lf-sp-highlights--tabs .lf-sp-ingredient-row {
    padding: 8px 0;
    grid-template-columns: 22px minmax(0,1fr);
}
body.single-product .lf-sp-highlights--tabs .lf-sp-ingredient-row h4 { font-size: 16px; }
body.single-product .lf-sp-highlights--tabs .lf-sp-ingredient-row p { font-size: 10.5px; line-height: 1.35; }
/* Trust signals remain real text, just less vertical space. */
body.single-product .bb-sp-assurance {
    margin-top: 10px;
    border-radius: 9px;
}
body.single-product .bb-sp-assurance li {
    padding: 8px 5px;
    gap: 5px;
}
body.single-product .bb-assure-icon {
    width: 20px;
    height: 20px;
    flex-basis: 20px;
}
body.single-product .bb-assure-icon svg { width: 12px; height: 12px; }
@media(max-width: 640px) {
    body.single-product .lf-sp-highlights--tabs { padding: 12px; }
    body.single-product .lf-sp-highlights--tabs .lf-sp-benefit-card { padding: 9px; }
    body.single-product .lf-sp-highlights--tabs .lf-sp-benefit-card h4 { font-size: 15px; }
    body.single-product .lf-sp-highlights--tabs .lf-skin-tabs__button { font-size: 11px; }
}
@media(max-width: 360px) {
    body.single-product .lf-sp-highlights--tabs .lf-sp-highlights__benefits { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media(prefers-reduced-motion: reduce) {
    body.single-product .lf-skin-tabs__button { transition: none; }
}

/* ==========================================================
   D. PRODUCT TITLE / REVIEW STARS — prevent global SVG expansion
   ========================================================== */
body.single-product .bb-sp-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
body.single-product .bb-sp-title-row .bb-sp-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}
body.single-product .bb-sp-review-link {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    width: auto;
    margin-top: 7px;
    color: #9A784A !important;
    text-decoration: none !important;
}
body.single-product .bb-sp-review-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    width: auto;
    line-height: 1;
    color: #C9A46A;
}
body.single-product .bb-sp-review-stars svg {
    display: block;
    width: 15px !important;
    height: 15px !important;
    min-width: 15px;
    min-height: 15px;
    max-width: 15px;
    max-height: 15px;
    flex: 0 0 15px;
    fill: #C9A46A !important;
    stroke: #C9A46A !important;
    stroke-width: 1.2;
}
body.single-product .bb-sp-review-link-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font: 500 11px/1.4 'DM Sans', Arial, sans-serif;
    white-space: nowrap;
    color: #9A784A !important;
    text-decoration: underline;
    text-underline-offset: 4px;
}
body.single-product .bb-sp-review-link-text svg {
    display: block;
    width: 12px !important;
    height: 12px !important;
    min-width: 12px;
    min-height: 12px;
    max-width: 12px;
    max-height: 12px;
    flex: 0 0 12px;
    fill: none !important;
    stroke: currentColor !important;
}
body.single-product .bb-sp-review-link:hover .bb-sp-review-link-text {
    color: #1A1A1A !important;
}
body.single-product .bb-sp-review-link:focus-visible {
    outline: 2px solid #9A784A;
    outline-offset: 4px;
}
@media (max-width: 767px) {
    body.single-product .bb-sp-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 9px;
    }
    body.single-product .bb-sp-review-link {
        flex-direction: row;
        align-items: center;
        margin-top: 0;
        gap: 10px;
    }
}
