/**
 * File Path: assets/css/front/mbs-front-woocommerce.css
 * S15-4: WooCommerce Add-to-Cart section
 * Component of mbs-front.css — extracted Session 94.
 * Enqueued by MBS_Front_Assets with dep: mbs-front.
 */
/* ==========================================================================
   S15-4: WooCommerce Add-to-Cart section
   ========================================================================== */

.mbs-wc-add-to-cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--mbs-border);
    border-radius: 6px;
    background: var(--mbs-card-bg);

    .mbs-wc-stock-status {
        font-size: 0.875rem;
        font-weight: 600;

        &.mbs-wc-in-stock {
            color: var(--mbs-accent);
        }

        &.mbs-wc-out-of-stock {
            color: var(--mbs-text-light);
        }
    }

    .mbs-wc-product-price {
        font-size: 1rem;
        font-weight: 600;
        color: var(--mbs-text);
    }

    /* Style the WC add-to-cart button to match MBS — no WC .button override. */
    .button.add_to_cart_button,
    .single_add_to_cart_button {
        padding: 0.5rem 1.25rem;
        border: none;
        border-radius: 4px;
        background: var(--mbs-button-bg);
        color: var(--mbs-button-text);
        font-size: 0.9rem;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        transition: background 0.2s ease;

        &:hover,
        &:focus-visible {
            background: var(--mbs-button-hover);
            color: var(--mbs-button-text);
        }
    }

}


/* ── Single-book Hero Layout (COVER-001) ────────────────────────────────
   Flat rules outside .mbs-wrapper nesting so they compile as standard
   descendant selectors regardless of CSS-nesting parser support.
   DOM structure: div.mbs-wrapper > div.mbs-single-book > div.mbs-book-hero
   ─────────────────────────────────────────────────────────────────────── */

.mbs-wrapper .mbs-single-book .mbs-book-hero {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.mbs-wrapper .mbs-single-book .mbs-book-hero-cover {
    flex: 0 0 auto;
    width: 260px;
}

.mbs-wrapper .mbs-single-book .mbs-book-hero-cover img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.mbs-wrapper .mbs-single-book .mbs-book-hero-details {
    flex: 1 1 auto;
    min-width: 0;
}

.mbs-wrapper .mbs-single-book .mbs-book-title {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--mbs-heading, inherit);
}

.mbs-wrapper .mbs-single-book .mbs-book-author {
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--mbs-slate, var(--mbs-slate));
    font-style: italic;
}

@media (max-width: 640px) {
    .mbs-wrapper .mbs-single-book .mbs-book-hero {
        flex-direction: column;
        align-items: center;
    }

    .mbs-wrapper .mbs-single-book .mbs-book-hero-cover {
        width: 200px;
    }

    .mbs-wrapper .mbs-single-book .mbs-book-hero-details {
        width: 100%;
    }
}
