/* ================================================================
   El Gringo – Cart page (template-cart.php)
   ================================================================ */

/* ── Hero ────────────────────────────────────────────────────── */
.eg-cart-hero {
    background-color: #1a1a1a;
    padding: 56px 32px 48px;
    text-align: center;
    border-bottom: 3px solid #c8a141;
}

.eg-cart-hero-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px;
}

.eg-cart-hero-sub {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* ── Delivery notice ────────────────────────────────────────── */
.eg-cart-delivery-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fffbf0;
    border-left: 4px solid #c8a141;
    border-radius: 8px;
    color: #5a4508;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 16px 24px;
    margin: 0 auto 36px;
    max-width: 680px;
    box-shadow: 0 2px 12px rgba(200,161,65,.12);
}
.eg-cart-delivery-notice svg {
    flex-shrink: 0;
    color: #c8a141;
}
.eg-cart-delivery-notice strong {
    font-weight: 700;
    color: #3a2c04;
}
.eg-cart-delivery-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.eg-cart-delivery-label {
    font-weight: 600;
    color: #5a4508;
}
.eg-cart-delivery-cities {
    color: #3a2c04;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.eg-cart-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 32px 80px;
}

/* ── WooCommerce cart overrides ──────────────────────────────── */

/* Table */
.eg-cart-wrapper .woocommerce-cart-form table.shop_table {
    border: none;
    border-collapse: collapse;
    width: 100%;
}

.eg-cart-wrapper .woocommerce-cart-form table.shop_table thead th {
    background: #1a1a1a;
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 14px 16px;
    border: none;
}

.eg-cart-wrapper .woocommerce-cart-form table.shop_table tbody tr {
    border-bottom: 1px solid #eee;
}

.eg-cart-wrapper .woocommerce-cart-form table.shop_table tbody td {
    padding: 20px 16px;
    vertical-align: middle;
    border: none;
}

/* Coloana combinată remove + thumbnail + titlu */
.eg-cart-wrapper .woocommerce-cart-form table.shop_table th.product-remove-thumb,
.eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-remove-thumb {
    width: 50%;
    padding: 16px 12px 16px 16px;
    vertical-align: middle;
}
/* Header "PRODUS" aliniat deasupra numelui produsului (× ~20px + gap 14px + imagine 150px + gap 14px) */
.eg-cart-wrapper .woocommerce-cart-form table.shop_table th.product-remove-thumb {
    padding-left: 214px;
}

.eg-cart-cell-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Buton × */
.eg-cart-cell-wrap a.remove {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #bbb !important;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s;
    text-decoration: none;
}
.eg-cart-cell-wrap a.remove:hover {
    color: #c0392b !important;
    background: none;
}

/* Imagine */
.eg-cart-thumb {
    flex-shrink: 0;
}
.eg-cart-thumb img {
    width: 100px !important;
    height: 100px !important;
    max-width: none !important;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,.10);
    display: block;
}

/* Titlu produs */
.eg-cart-item-title {
    flex: 1;
    min-width: 0;
}
.eg-cart-item-title a {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.95rem;
    text-decoration: none;
    display: block;
}
.eg-cart-item-title a:hover {
    color: #c8a141;
}
.eg-cart-item-title .variation {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* Coloana name ascunsă (rămâne pentru WC compat) */
.eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-name[style*="display:none"] {
    display: none !important;
    padding: 0 !important;
    width: 0 !important;
}

/* Product name */
.eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-name a {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 0.95rem;
}
.eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-name a:hover {
    color: #c8a141;
}

/* Price */
.eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-price,
.eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-subtotal {
    font-weight: 700;
    color: #1a1a1a;
}

/* Qty input */
.eg-cart-wrapper .woocommerce-cart-form .quantity .qty {
    width: 64px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
}
.eg-cart-wrapper .woocommerce-cart-form .quantity .qty:focus {
    outline: none;
    border-color: #c8a141;
}

/* Remove button */
.eg-cart-wrapper .woocommerce-cart-form a.remove {
    color: #999 !important;
    font-size: 1.4rem;
    line-height: 1;
    transition: color 0.2s;
}
.eg-cart-wrapper .woocommerce-cart-form a.remove:hover {
    color: #c0392b !important;
    background: none;
}

/* Coupon + update row */
.eg-cart-wrapper .woocommerce-cart-form .actions {
    padding: 16px;
    border-top: 2px solid #f0f0f0;
}
.eg-cart-wrapper .woocommerce-cart-form .eg-actions-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.eg-cart-wrapper .woocommerce-cart-form .coupon {
    display: flex;
    gap: 8px;
    align-items: center;
}

.eg-cart-wrapper .woocommerce-cart-form .coupon input#coupon_code {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.88rem;
    width: 200px;
}
.eg-cart-wrapper .woocommerce-cart-form .coupon input#coupon_code:focus {
    outline: none;
    border-color: #c8a141;
}

/* Buton Aplică Cuponul */
.eg-cart-wrapper .woocommerce-cart-form button[name="apply_coupon"] {
    white-space: nowrap !important;
    font-size: 0.72rem !important;
    padding: 10px 14px !important;
    letter-spacing: 0.4px !important;
}

/* Buton Actualizează coșul – mutat la dreapta, stil outline */
.eg-cart-wrapper .woocommerce-cart-form button[name="update_cart"] {
    flex-shrink: 0;
    margin-left: auto;
    background: transparent !important;
    color: #1a1a1a !important;
    border: 2px solid #1a1a1a !important;
    padding: 9px 22px !important;
}
.eg-cart-wrapper .woocommerce-cart-form button[name="update_cart"]:hover {
    background: #1a1a1a !important;
    color: #fff !important;
}

/* ── Butoane ─────────────────────────────────────────────────── */
.eg-cart-wrapper .woocommerce input.button,
.eg-cart-wrapper .woocommerce button.button,
.eg-cart-wrapper .woocommerce a.button {
    background: #1a1a1a;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 11px 22px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.eg-cart-wrapper .woocommerce input.button:hover,
.eg-cart-wrapper .woocommerce button.button:hover,
.eg-cart-wrapper .woocommerce a.button:hover {
    background: #c8a141;
    color: #111;
}

/* Buton principal (Finalizează comanda) */
.eg-cart-wrapper .woocommerce .checkout-button,
.eg-cart-wrapper .woocommerce a.checkout-button {
    background: #c8a141 !important;
    color: #111 !important;
    font-size: 0.9rem !important;
    padding: 14px 32px !important;
    border-radius: 8px !important;
    display: block;
    text-align: center;
    margin-top: 12px;
}
.eg-cart-wrapper .woocommerce .checkout-button:hover,
.eg-cart-wrapper .woocommerce a.checkout-button:hover {
    background: #a8832f !important;
    color: #fff !important;
}

/* ── Cart totals ─────────────────────────────────────────────── */
.eg-cart-wrapper .cart_totals {
    background: #f8f7f5;
    border-radius: 12px;
    padding: 28px 28px 24px;
    margin-top: 8px;
}

.eg-cart-wrapper .cart_totals h2 {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #1a1a1a;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #c8a141;
}

.eg-cart-wrapper .cart_totals table.shop_table {
    width: 100%;
    border: none;
    border-collapse: collapse;
    background: transparent;
}

.eg-cart-wrapper .cart_totals table.shop_table th,
.eg-cart-wrapper .cart_totals table.shop_table td {
    padding: 10px 0;
    border-top: 1px solid #e8e8e8;
    font-size: 0.9rem;
}

.eg-cart-wrapper .cart_totals table.shop_table .order-total th,
.eg-cart-wrapper .cart_totals table.shop_table .order-total td {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1a1a1a;
    border-top: 2px solid #c8a141;
    padding-top: 14px;
}

/* Total amount */
.eg-cart-wrapper .cart_totals .woocommerce-Price-amount {
    font-weight: 800;
    color: #c8a141;
}

/* ── Coș gol ─────────────────────────────────────────────────── */
.eg-cart-wrapper .woocommerce-cart .cart-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.05rem;
    color: #666;
}

.eg-cart-wrapper .woocommerce-cart .return-to-shop {
    text-align: center;
    margin-top: 16px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .eg-cart-hero { padding: 36px 16px 28px; }
    .eg-cart-hero-title { font-size: 1.5rem; }
    .eg-cart-delivery-notice { padding: 12px 16px; font-size: 0.82rem; margin-bottom: 24px; }
    .eg-cart-wrapper { padding: 24px 16px 60px; }

    /* Table → block cards */
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table thead { display: none; }
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table tbody,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table tr,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table tbody tr {
        border: 1px solid #eee;
        border-radius: 10px;
        margin-bottom: 14px;
        padding: 14px;
        background: #fff;
    }
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table tbody td {
        padding: 0;
        border: none;
    }

    /* Suprima WC ::before pe celula imagine+titlu */
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-remove-thumb::before {
        display: none !important;
    }

    /* Celula imagine + titlu */
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-remove-thumb {
        width: 100% !important;
        padding: 0 0 12px !important;
    }
    .eg-cart-cell-wrap {
        align-items: flex-start;
        gap: 12px;
    }
    .eg-cart-cell-wrap a.remove {
        margin-top: 2px;
        width: 22px;
        height: 22px;
        font-size: 1.1rem;
    }
    .eg-cart-thumb img {
        width: 72px !important;
        height: 72px !important;
        border-radius: 8px;
    }
    .eg-cart-item-title a {
        font-size: 0.9rem;
    }
    .eg-cart-item-title .variation {
        font-size: 0.75rem;
    }

    /* Rândurile preț / cantitate / sub-total cu label–valoare pe aceeași linie */
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-price,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-quantity,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-subtotal {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 7px 0 !important;
        border-top: 1px solid #f0f0f0 !important;
        font-size: 0.9rem;
    }
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-price::before,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-quantity::before,
    .eg-cart-wrapper .woocommerce-cart-form table.shop_table td.product-subtotal::before {
        content: attr(data-title);
        font-weight: 600;
        color: #666;
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        float: none;
    }
    .eg-cart-wrapper .woocommerce-cart-form .quantity .qty {
        width: 54px;
        padding: 6px 8px;
    }

    /* Coupon + update */
    .eg-cart-wrapper .woocommerce-cart-form .actions {
        padding: 12px 0 0;
    }
    .eg-cart-wrapper .woocommerce-cart-form .eg-actions-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .eg-cart-wrapper .woocommerce-cart-form .coupon {
        flex-direction: column;
        gap: 8px;
    }
    .eg-cart-wrapper .woocommerce-cart-form .coupon input#coupon_code {
        width: 100%;
    }
    .eg-cart-wrapper .woocommerce-cart-form button[name="update_cart"] {
        width: 100%;
        text-align: center;
    }
    .eg-cart-wrapper .cart_totals {
        padding: 20px 16px;
    }
}
