/* =========================================================
   AMAZING MEXICAN CRAVINGS
   CART & CHECKOUT DESIGN
   ========================================================= */

:root {
    --amz-flow-red: #e60012;
    --amz-flow-red-dark: #b9000e;
    --amz-flow-yellow: #ffd21f;
    --amz-flow-black: #090909;
    --amz-flow-soft-black: #151515;
    --amz-flow-text: #202020;
    --amz-flow-muted: #6d6d6d;
    --amz-flow-border: #e6e6e6;
    --amz-flow-bg: #f7f7f7;
    --amz-flow-card: #ffffff;
    --amz-flow-container: 1180px;
}

/* Ocultar header/footer default de Astra solo aquí */
body.amz-woo-flow #masthead,
body.amz-woo-flow .site-header,
body.amz-woo-flow .ast-mobile-header-wrap,
body.amz-woo-flow .ast-desktop-header-content,
body.amz-woo-flow .ast-above-header-wrap,
body.amz-woo-flow .ast-main-header-wrap,
body.amz-woo-flow .ast-primary-header-bar,
body.amz-woo-flow .ast-below-header-wrap,
body.amz-woo-flow #colophon,
body.amz-woo-flow .site-footer,
body.amz-woo-flow .site-above-footer-wrap,
body.amz-woo-flow .site-primary-footer-wrap,
body.amz-woo-flow .site-below-footer-wrap {
    display: none !important;
}

body.amz-woo-flow {
    margin: 0 !important;
    background:
        radial-gradient(circle at top right, rgba(230, 0, 18, 0.08), transparent 30%),
        var(--amz-flow-bg) !important;
    color: var(--amz-flow-text);
}

body.amz-woo-flow #page,
body.amz-woo-flow .site,
body.amz-woo-flow #content,
body.amz-woo-flow .site-content {
    background: transparent !important;
}

body.amz-woo-flow .site-content > .ast-container {
    width: min(calc(100% - 34px), var(--amz-flow-container)) !important;
    max-width: var(--amz-flow-container) !important;
    margin-inline: auto !important;
    padding: 52px 0 72px !important;
}

body.amz-woo-flow #primary {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* =========================================================
   HEADER
   ========================================================= */

.amz-flow-container {
    width: min(calc(100% - 34px), var(--amz-flow-container));
    margin-inline: auto;
}

.amz-flow-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 9, 9, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.admin-bar .amz-flow-header {
    top: 32px;
}

.amz-flow-header-inner {
    min-height: 94px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;
}

.amz-flow-logo {
    display: inline-flex;
    align-items: center;
}

.amz-flow-logo img {
    display: block;
    width: 82px;
    height: 82px;
    object-fit: contain;
}

.amz-flow-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.amz-flow-nav a {
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.amz-flow-nav a:hover {
    color: var(--amz-flow-yellow);
}

.amz-flow-main-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amz-flow-red), #ff2b2b);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 12px 26px rgba(230, 0, 18, 0.28);
}

.amz-flow-main-button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amz-flow-red-dark), var(--amz-flow-red));
    text-decoration: none;
}

/* =========================================================
   TITULOS
   ========================================================= */

body.amz-woo-flow .entry-title,
body.amz-woo-flow h1 {
    margin: 0 0 28px !important;
    color: #111111 !important;
    font-size: clamp(34px, 5vw, 54px) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    text-transform: uppercase;
    letter-spacing: -0.04em;
}

/* =========================================================
   CART / CHECKOUT BASE
   ========================================================= */

body.amz-woo-flow .entry-content {
    padding: 0 !important;
}

body.amz-woo-flow .woocommerce,
body.amz-woo-flow .wp-block-woocommerce-cart,
body.amz-woo-flow .wp-block-woocommerce-checkout {
    background: transparent !important;
}

/* WooCommerce Blocks */
body.amz-woo-flow .wc-block-cart,
body.amz-woo-flow .wc-block-checkout {
    gap: 32px;
}

/* Tarjetas principales */
body.amz-woo-flow .wc-block-cart-items,
body.amz-woo-flow .wc-block-components-sidebar,
body.amz-woo-flow .wc-block-checkout__main,
body.amz-woo-flow .wc-block-checkout__sidebar,
body.amz-woo-flow .woocommerce-cart-form,
body.amz-woo-flow .cart-collaterals,
body.amz-woo-flow form.checkout {
    background: #ffffff !important;
    border: 1px solid var(--amz-flow-border) !important;
    border-radius: 24px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.06) !important;
}

/* Bloques internos */
body.amz-woo-flow .wc-block-components-sidebar,
body.amz-woo-flow .wc-block-checkout__sidebar,
body.amz-woo-flow .cart-collaterals {
    padding: 24px !important;
}

body.amz-woo-flow .wc-block-cart-items {
    overflow: hidden;
}

/* Encabezados pequeños */
body.amz-woo-flow .wc-block-components-title,
body.amz-woo-flow .wc-block-cart__totals-title,
body.amz-woo-flow .wc-block-components-checkout-step__title,
body.amz-woo-flow .cart_totals h2 {
    color: #111111 !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
}

/* =========================================================
   PRODUCTOS DEL CARRITO
   ========================================================= */

body.amz-woo-flow .wc-block-cart-items__row,
body.amz-woo-flow .cart_item {
    border-bottom: 1px solid #eeeeee !important;
}

body.amz-woo-flow .wc-block-cart-item__image img,
body.amz-woo-flow .woocommerce-cart-form .product-thumbnail img {
    width: 86px !important;
    height: 86px !important;
    object-fit: cover !important;
    border-radius: 16px !important;
    background: #eeeeee;
}

body.amz-woo-flow .wc-block-cart-item__product,
body.amz-woo-flow .product-name {
    color: #111111 !important;
    font-weight: 800 !important;
}

body.amz-woo-flow .wc-block-cart-item__product a,
body.amz-woo-flow .product-name a {
    color: #111111 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

body.amz-woo-flow .wc-block-cart-item__product a:hover,
body.amz-woo-flow .product-name a:hover {
    color: var(--amz-flow-red) !important;
}

body.amz-woo-flow .wc-block-cart-item__prices,
body.amz-woo-flow .wc-block-components-product-price,
body.amz-woo-flow .product-price,
body.amz-woo-flow .product-subtotal {
    color: #111111 !important;
    font-weight: 700 !important;
}

/* Cantidad */
body.amz-woo-flow .wc-block-components-quantity-selector,
body.amz-woo-flow .quantity {
    border-radius: 14px !important;
}

body.amz-woo-flow .wc-block-components-quantity-selector {
    border: 1px solid #d8d8d8 !important;
}

body.amz-woo-flow .wc-block-components-quantity-selector__button,
body.amz-woo-flow .wc-block-components-quantity-selector__input {
    color: #111111 !important;
}

/* =========================================================
   FORMULARIOS CHECKOUT
   ========================================================= */

body.amz-woo-flow .wc-block-components-text-input input,
body.amz-woo-flow .wc-block-components-address-form input,
body.amz-woo-flow .wc-block-components-combobox input,
body.amz-woo-flow .woocommerce form .form-row input.input-text,
body.amz-woo-flow .woocommerce form .form-row textarea,
body.amz-woo-flow .woocommerce form .form-row select {
    min-height: 52px !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: none !important;
}

body.amz-woo-flow .wc-block-components-text-input input:focus,
body.amz-woo-flow .wc-block-components-address-form input:focus,
body.amz-woo-flow .woocommerce form .form-row input.input-text:focus,
body.amz-woo-flow .woocommerce form .form-row textarea:focus {
    border-color: var(--amz-flow-red) !important;
    box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1) !important;
}

body.amz-woo-flow label {
    color: #111111 !important;
    font-weight: 700 !important;
}

/* Métodos de pago/envío */
body.amz-woo-flow .wc-block-components-radio-control,
body.amz-woo-flow .wc-block-components-radio-control__option,
body.amz-woo-flow .woocommerce-checkout-payment {
    border-radius: 18px !important;
}

body.amz-woo-flow .wc-block-components-radio-control__option {
    background: #ffffff !important;
}

/* =========================================================
   BOTONES
   ========================================================= */

body.amz-woo-flow .wc-block-components-button,
body.amz-woo-flow .wc-block-cart__submit-button,
body.amz-woo-flow .wc-block-components-checkout-place-order-button,
body.amz-woo-flow .checkout-button,
body.amz-woo-flow button.button,
body.amz-woo-flow a.button,
body.amz-woo-flow input.button {
    min-height: 56px !important;
    border: 0 !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--amz-flow-red), #ff2b2b) !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    text-decoration: none !important;
    box-shadow: 0 14px 28px rgba(230, 0, 18, 0.22) !important;
}

body.amz-woo-flow .wc-block-components-button:hover,
body.amz-woo-flow .checkout-button:hover,
body.amz-woo-flow button.button:hover,
body.amz-woo-flow a.button:hover,
body.amz-woo-flow input.button:hover {
    background: linear-gradient(135deg, var(--amz-flow-red-dark), var(--amz-flow-red)) !important;
    color: #ffffff !important;
}

/* Botón de cupón o secundarios */
body.amz-woo-flow .wc-block-components-totals-coupon__button,
body.amz-woo-flow .coupon button.button {
    min-height: 48px !important;
    background: #111111 !important;
    box-shadow: none !important;
}

/* =========================================================
   TOTALES
   ========================================================= */

body.amz-woo-flow .wc-block-components-totals-wrapper,
body.amz-woo-flow .cart_totals {
    border-color: #eeeeee !important;
}

body.amz-woo-flow .wc-block-components-totals-item__label,
body.amz-woo-flow .wc-block-components-totals-item__value,
body.amz-woo-flow .order-total,
body.amz-woo-flow .cart-subtotal {
    color: #111111 !important;
}

body.amz-woo-flow .wc-block-components-totals-footer-item,
body.amz-woo-flow .order-total {
    font-size: 20px !important;
    font-weight: 900 !important;
}

/* =========================================================
   EMPTY CART
   ========================================================= */

body.amz-woo-flow .wc-block-cart__empty-cart__title,
body.amz-woo-flow .cart-empty {
    color: #111111 !important;
    font-size: 30px !important;
    font-weight: 900 !important;
    text-align: center;
}

body.amz-woo-flow .return-to-shop {
    text-align: center;
}

/* =========================================================
   FOOTER
   ========================================================= */

.amz-flow-footer {
    margin: 0;
    padding: 62px 0 0;
    color: #d6d6d6;
    background:
        radial-gradient(circle at top right, rgba(230, 0, 18, 0.16), transparent 28%),
        #090909;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.amz-flow-footer-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    padding-bottom: 42px;
}

.amz-flow-footer-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.amz-flow-footer-brand img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.amz-flow-footer-brand p {
    max-width: 520px;
    margin: 0;
    color: #cfcfcf;
    font-size: 15px;
    line-height: 1.7;
}

.amz-flow-footer-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 13px 24px;
    border-radius: 999px;
    color: #111111;
    background: var(--amz-flow-yellow);
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
}

.amz-flow-footer-bottom {
    padding: 18px 20px;
    color: #8f8f8f;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 13px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {
    .amz-flow-header-inner {
        grid-template-columns: auto 1fr;
        gap: 18px;
        padding: 12px 0;
    }

    .amz-flow-logo img {
        width: 68px;
        height: 68px;
    }

    .amz-flow-nav {
        justify-content: flex-end;
        gap: 18px;
    }

    .amz-flow-nav a {
        font-size: 12px;
    }

    .amz-flow-main-button {
        grid-column: 1 / -1;
        width: 100%;
    }

    body.amz-woo-flow .site-content > .ast-container {
        width: min(calc(100% - 24px), var(--amz-flow-container)) !important;
        padding-top: 34px !important;
    }

    .amz-flow-footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .amz-flow-footer-brand {
        flex-direction: column;
    }

    .amz-flow-footer-actions a {
        width: min(100%, 320px);
    }
}

@media (max-width: 600px) {
    .admin-bar .amz-flow-header {
        top: 46px;
    }

    .amz-flow-header-inner {
        min-height: 0;
    }

    .amz-flow-nav {
        flex-wrap: wrap;
    }

    body.amz-woo-flow .entry-title,
    body.amz-woo-flow h1 {
        font-size: 36px !important;
    }

    body.amz-woo-flow .wc-block-components-sidebar,
    body.amz-woo-flow .wc-block-checkout__sidebar,
    body.amz-woo-flow .cart-collaterals,
    body.amz-woo-flow form.checkout {
        padding: 18px !important;
        border-radius: 20px !important;
    }

    body.amz-woo-flow .wc-block-cart-item__image img,
    body.amz-woo-flow .woocommerce-cart-form .product-thumbnail img {
        width: 74px !important;
        height: 74px !important;
        border-radius: 14px !important;
    }

    .amz-flow-footer {
        padding-top: 48px;
    }

    .amz-flow-footer-brand img {
        width: 76px;
        height: 76px;
    }
}