/* ── FLORE MAR — Página de Producto Individual ── */

/* Full-width override: anula el layout right-sidebar de Storefront */
body.fm-full-width #primary,
body.fm-full-width .content-area,
body.right-sidebar.fm-full-width #primary,
body.right-sidebar.fm-full-width .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
body.fm-full-width #secondary,
body.right-sidebar.fm-full-width #secondary { display: none !important; }
body.fm-full-width .col-full,
body.right-sidebar.fm-full-width .col-full { max-width: 100% !important; padding: 0; }
body.fm-full-width .fm-footer,
body.fm-full-width footer.site-footer,
body.right-sidebar.fm-full-width .fm-footer,
body.right-sidebar.fm-full-width footer.site-footer { clear: both; width: 100%; }

/* Variables de respaldo (definidas en style.css del tema) */
.fm-sp-wrap {
    --sage:         #6B8F71;
    --sage-dark:    #4A6B50;
    --sage-light:   #A8C5AD;
    --sage-pale:    #E8F0EA;
    --blush:        #D4A5A5;
    --blush-light:  #F0E0E0;
    --cream:        #FAF7F2;
    --cream-dark:   #F0EBE3;
    --cream-mid:    #E8E2D9;
    --text:         #2C2C2C;
    --text-light:   #6B6B6B;
    --text-lighter: #999;
    --white:        #fff;
    --radius:       12px;
    --shadow:       0 4px 28px rgba(0,0,0,0.08);
    --font-d:       'Cormorant Garamond', serif;
    --font-b:       'Jost', sans-serif;
}

.fm-sp-wrap {
    background: var(--cream);
    font-family: var(--font-b);
    color: var(--text);
}

/* ── BREADCRUMB ── */
.fm-sp-breadcrumb {
    padding: 1rem 5%;
    font-size: 0.78rem;
    color: var(--text-lighter);
}
.fm-sp-breadcrumb .woocommerce-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-size: inherit;
    color: var(--text-lighter);
}
.fm-sp-breadcrumb .woocommerce-breadcrumb a { color: var(--sage); text-decoration: none; }
.fm-sp-breadcrumb .woocommerce-breadcrumb a:hover { text-decoration: underline; }

/* ── LAYOUT 2 COLUMNAS ── */
.fm-sp-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 0 5% 4rem;
    max-width: 1300px;
    margin: 0 auto;
    align-items: start;
}

/* ── GALERÍA ── */
.fm-sp-gallery-col {
    position: sticky;
    top: 90px;
    align-self: start;
}
.fm-sp-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    background: var(--sage);
    color: var(--white);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-family: var(--font-b);
    pointer-events: none;
}
.fm-gallery { position: relative; }
.fm-gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream-dark);
    aspect-ratio: 1 / 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}
.fm-gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s, transform 0.3s;
}
.fm-gallery-main:hover .fm-gallery-main-img { transform: scale(1.02); }

.fm-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}
.fm-gallery-thumb {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--cream-dark);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.fm-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fm-gallery-thumb.active,
.fm-gallery-thumb:hover { border-color: var(--sage); }

/* ── INFO COLUMNA ── */
.fm-sp-info-col { padding-top: 0.5rem; }

.fm-sp-cat {
    display: inline-block;
    background: var(--sage-pale);
    color: var(--sage-dark);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1rem;
    font-family: var(--font-b);
}

.fm-sp-title {
    font-family: var(--font-d);
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5rem;
    color: var(--text);
    padding: 0;
    border: none;
    text-transform: none;
    letter-spacing: normal;
}

.fm-sp-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 1.2rem;
    font-weight: 300;
    line-height: 1.5;
    font-family: var(--font-b);
}

/* WC rating */
.fm-sp-rating { margin-bottom: 1.5rem; }
.fm-sp-rating .woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-lighter);
    line-height: 1;
}
.fm-sp-rating .star-rating { font-size: 1rem; color: #E8A87C; letter-spacing: 2px; }
.fm-sp-rating .woocommerce-review-link { color: var(--sage); text-decoration: underline; }

/* Precio */
.fm-sp-price-block { margin-bottom: 1.5rem; }
.fm-sp-price-block .price {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0 0 0.4rem;
    color: var(--text);
    font-family: var(--font-d);
}
.fm-sp-price-block .price ins { text-decoration: none; }
.fm-sp-price-block .price ins .woocommerce-Price-amount,
.fm-sp-price-block .price > .woocommerce-Price-amount {
    font-family: var(--font-d);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
}
.fm-sp-price-block .price del .woocommerce-Price-amount {
    font-size: 0.9rem;
    color: var(--text-lighter);
    font-weight: 400;
    font-family: var(--font-b);
}
.fm-sp-savings {
    display: inline-block;
    background: var(--blush-light);
    color: #9B5555;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-family: var(--font-b);
    margin-top: 0.3rem;
}

/* Lista de beneficios */
.fm-sp-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 1.8rem;
}
.fm-sp-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.88rem;
    color: var(--text-light);
    padding: 0.4rem 0;
    font-family: var(--font-b);
    line-height: 1.5;
}
.fm-sp-benefits li::before {
    content: '✦';
    color: var(--sage);
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

/* ── FORMULARIO DE CARRITO (WooCommerce) ── */
.fm-sp-cart-wrap { margin-bottom: 0.5rem; }

/* Variaciones: tabla → pills de select */
.fm-sp-cart-wrap .variations {
    width: 100%;
    border: none;
    border-spacing: 0;
    margin-bottom: 1rem;
}
.fm-sp-cart-wrap .variations td,
.fm-sp-cart-wrap .variations th {
    padding: 0.3rem 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
    font-family: var(--font-b);
    border: none;
    background: none;
}
.fm-sp-cart-wrap .variations td.value select {
    -webkit-appearance: none;
    appearance: none;
    border: 1.5px solid var(--cream-mid);
    border-radius: 100px;
    padding: 0.45rem 2rem 0.45rem 1rem;
    font-size: 0.82rem;
    font-family: var(--font-b);
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B6B6B'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.2s;
    width: 100%;
    max-width: 280px;
}
.fm-sp-cart-wrap .variations td.value select:focus {
    outline: none;
    border-color: var(--sage);
    box-shadow: 0 0 0 3px rgba(107,143,113,0.15);
}

/* Fila: cantidad + botón — simple products */
.fm-sp-cart-wrap form.cart:not(.variations_form) {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.8rem;
}
/* Fila: cantidad + botón — variable products */
.fm-sp-cart-wrap .woocommerce-variation-add-to-cart {
    display: flex;
    align-items: stretch;
    gap: 0.8rem;
}

/* Input cantidad */
.fm-sp-cart-wrap .quantity {
    flex-shrink: 0;
}
.fm-sp-cart-wrap input[type="number"].qty {
    width: 70px;
    height: 44px;
    border: 1.5px solid var(--cream-mid);
    border-radius: 100px;
    text-align: center;
    font-size: 0.95rem;
    font-family: var(--font-b);
    font-weight: 500;
    background: var(--white);
    color: var(--text);
    -moz-appearance: textfield;
    transition: border-color 0.2s;
}
.fm-sp-cart-wrap input[type="number"].qty:focus {
    outline: none;
    border-color: var(--sage);
}
.fm-sp-cart-wrap input[type="number"].qty::-webkit-outer-spin-button,
.fm-sp-cart-wrap input[type="number"].qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* Botón Agregar al carrito */
.fm-sp-cart-wrap .single_add_to_cart_button.button {
    flex: 1;
    background: var(--sage) !important;
    color: var(--white) !important;
    border-radius: 100px !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.8rem 1.5rem;
    border: none !important;
    cursor: pointer;
    font-family: var(--font-b) !important;
    transition: background 0.2s, transform 0.15s;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    line-height: 1;
}
.fm-sp-cart-wrap .single_add_to_cart_button.button:hover {
    background: var(--sage-dark) !important;
    transform: translateY(-1px);
    color: var(--white) !important;
}
.fm-sp-cart-wrap .single_add_to_cart_button.button.loading {
    opacity: 0.7;
    transform: none;
}

/* Botón Comprar ahora (inyectado por JS) */
.fm-btn-buy-now {
    width: 100%;
    background: var(--cream-dark);
    color: var(--text);
    border-radius: 100px;
    font-size: 0.88rem;
    padding: 0.75rem;
    border: 1.5px solid var(--cream-mid);
    cursor: pointer;
    font-family: var(--font-b);
    transition: background 0.2s, border-color 0.2s;
    margin-top: 0.6rem;
    display: block;
    text-align: center;
}
.fm-btn-buy-now:hover {
    background: var(--cream-mid);
    border-color: #d4cec5;
}
.fm-btn-buy-now:disabled { opacity: 0.6; cursor: not-allowed; }

/* Trust badges */
.fm-sp-trust {
    display: flex;
    gap: 0.8rem 1.5rem;
    flex-wrap: wrap;
    padding: 1.2rem 0;
    border-top: 1px solid var(--cream-mid);
    border-bottom: 1px solid var(--cream-mid);
    font-size: 0.78rem;
    color: var(--text-light);
    font-family: var(--font-b);
    margin-top: 1rem;
}

/* ── TABS ── */
.fm-sp-tabs-section {
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 5%;
}
.fm-sp-tabs-nav {
    display: flex;
    border-bottom: 1.5px solid var(--cream-mid);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.fm-sp-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    padding: 0.8rem 1.5rem;
    font-size: 0.83rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-lighter);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    font-family: var(--font-b);
}
.fm-sp-tab-btn.active {
    color: var(--sage-dark);
    border-bottom-color: var(--sage);
}
.fm-sp-tab-btn:hover { color: var(--text); }

.fm-sp-tab-pane { display: none; }
.fm-sp-tab-pane.active { display: block; }

.fm-tab-inner {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.8;
    max-width: 800px;
}
.fm-tab-inner p { margin-bottom: 1rem; }
.fm-tab-inner h2,
.fm-tab-inner h3 {
    font-family: var(--font-d);
    font-weight: 600;
    color: var(--text);
    margin: 1.5rem 0 0.7rem;
}
.fm-tab-inner h2 { font-size: 1.6rem; }
.fm-tab-inner h3 { font-size: 1.3rem; color: var(--sage-dark); }

/* Tab reseñas — estilos WC */
#fm-tab-reviews .woocommerce-Reviews-title {
    font-family: var(--font-d);
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
#fm-tab-reviews .comment-respond {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--cream-dark);
    border-radius: var(--radius);
}
#fm-tab-reviews .comment-respond .comment-reply-title {
    font-family: var(--font-d);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
#fm-tab-reviews #comment-form-rating .stars a {
    color: #E8A87C;
    font-size: 1.2rem;
}
#fm-tab-reviews textarea,
#fm-tab-reviews input[type="text"],
#fm-tab-reviews input[type="email"] {
    border: 1.5px solid var(--cream-mid);
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    font-family: var(--font-b);
    font-size: 0.88rem;
    transition: border-color 0.2s;
    background: var(--white);
}
#fm-tab-reviews textarea:focus,
#fm-tab-reviews input:focus {
    outline: none;
    border-color: var(--sage);
}
#fm-tab-reviews .submit {
    background: var(--sage);
    color: var(--white);
    border-radius: 100px;
    font-size: 0.85rem;
    font-family: var(--font-b);
    padding: 0.6rem 1.5rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
#fm-tab-reviews .submit:hover { background: var(--sage-dark); }

/* ── PRODUCTOS RELACIONADOS ── */
.fm-sp-related-wrap {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 5% 5rem;
}
.fm-sp-related-wrap .related.products > h2 {
    font-family: var(--font-d);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text);
    font-style: italic;
    border: none;
    padding: 0;
    text-transform: none;
}
.fm-sp-related-wrap ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.fm-sp-related-wrap ul.products li.product { margin: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .fm-sp-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .fm-sp-gallery-col { position: static; }
    .fm-sp-related-wrap ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 640px) {
    .fm-sp-section { padding: 0 1.2rem 3rem; }
    .fm-sp-title { font-size: 2rem; }
    .fm-sp-tabs-section { padding: 0 1.2rem; }
    .fm-sp-tab-btn { padding: 0.6rem 0.8rem; font-size: 0.75rem; letter-spacing: 0.04em; }
    .fm-sp-related-wrap { padding: 0 1.2rem 3rem; }
    .fm-sp-related-wrap ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .fm-sp-trust { gap: 0.6rem; font-size: 0.74rem; }
}
