/**
 * TAULA — Block PP-2: Product Section
 *
 * 2-column layout: Left (single image) ~55% | Right (info) ~45%
 * Stacks vertically on mobile.
 * Product info: name, tagline, serving, price, qty+ATC, distribution CTA.
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */

.taula-pp-product {
    padding: 80px 40px;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif;
}

/* ── 2-column layout ─────────────────────────────────────────────────────── */

.taula-pp-product__layout {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* ── Gallery (left column) ───────────────────────────────────────────────── */

.taula-pp-product__gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.taula-pp-product__primary-wrap {
    border: 1px solid #d9d9d9;
    overflow: hidden;
    background: #fafafa;
    aspect-ratio: 4 / 5;
    max-height: 650px;
}

.taula-pp-product__primary-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.25s ease;
}

/* ── Product info (right column) ─────────────────────────────────────────── */

.taula-pp-product__info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 8px;
}

/* Product name */
.taula-pp-product__name {
    font-family: 'Staatliches', cursive;
    font-size: 64px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #000;
    margin: 0;
}

/* Serving / flavour line */
.taula-pp-product__serving {
    font-family: 'DM Sans', sans-serif;
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000;
    margin: 0;
    line-height: 1.3;
}

/* Product tagline */
.taula-pp-product__tagline {
    font-family: 'Geist', sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.4;
    color: #000;
    margin: 0;
}

/* WC price */
.taula-pp-product__price {
    font-family: 'DM Sans', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.taula-pp-product__price .woocommerce-Price-amount {
    font-size: inherit;
}

/* ── Qty + Add to Cart row ───────────────────────────────────────────────── */

.taula-pp-product__atc-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

/* Qty control */
.taula-pp-product__qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #000;
    height: 56px;
    flex-shrink: 0;
}

.taula-pp-product__qty-btn {
    width: 44px;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    font-family: 'Staatliches', sans-serif;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.taula-pp-product__qty-btn:hover {
    background: #f0f0f0;
}

.taula-pp-product__qty-value {
    min-width: 36px;
    text-align: center;
    font-family: 'Staatliches', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #000;
    border-left: 1px solid #000;
    border-right: 1px solid #000;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

/* Add to Cart button — higher specificity beats WC's .add_to_cart_button rules */
.taula-pp-product .taula-pp-product__atc-btn {
    flex: 1;
    height: 56px;
    background: #000;
    color: #fff;
    border: none;
    font-family: 'Staatliches', sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

.taula-pp-product .taula-pp-product__atc-btn:hover {
    background: #222;
}

.taula-pp-product .taula-pp-product__atc-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* WC-injected "View Cart" link — style to match distribution CTA */
.taula-pp-product .taula-pp-product__atc-row a.added_to_cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
    padding: 0 24px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    font-family: 'Staatliches', sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
    margin-top: 0;
}

.taula-pp-product .taula-pp-product__atc-row a.added_to_cart:hover {
    background: #000;
    color: #fff;
}

/* ── Distribution CTA ────────────────────────────────────────────────────── */

.taula-pp-product__distrib-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    font-family: 'Staatliches', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
}

.taula-pp-product__distrib-btn:hover {
    background: #000;
    color: #fff;
}

/* ── Language spans ──────────────────────────────────────────────────────── */

.taula-pp-product__lang { display: none; }

html[data-taula-lang="CA"] .taula-pp-product__lang[data-lang="CA"],
html[data-taula-lang="ES"] .taula-pp-product__lang[data-lang="ES"],
html[data-taula-lang="EN"] .taula-pp-product__lang[data-lang="EN"] {
    display: inline;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .taula-pp-product {
        padding: 60px 24px;
    }

    .taula-pp-product__layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .taula-pp-product__name {
        font-size: 52px;
    }
}

@media (max-width: 600px) {
    .taula-pp-product {
        padding: 40px 16px;
    }

    .taula-pp-product__name {
        font-size: 44px;
    }

    .taula-pp-product__atc-row {
        flex-direction: column;
    }

    .taula-pp-product__qty-control {
        width: 100%;
        justify-content: center;
    }

    .taula-pp-product__atc-btn {
        width: 100%;
    }
}
