/* =====================================================
   PAGINA COȘ — BunDeTot Theme
===================================================== */

.cos-page {
    padding: 48px 0 72px;
    min-height: 60vh;
}

.cos-page__heading {
    margin-bottom: 36px;
    padding-bottom: 16px;
    border-bottom: 2px solid #eee;
}

.cos-page__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =====================================================
   TABEL COȘ
===================================================== */
.cos-page .shop_table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    border-radius: 8px;
    overflow: hidden;
}

.cos-page .shop_table th {
    background: var(--bdt-brand, #9a0019);
    color: #fff;
    padding: 14px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
}

.cos-page .shop_table td {
    padding: 18px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 0.92rem;
    color: #333;
}

.cos-page .shop_table tr:last-child td {
    border-bottom: none;
}

.cos-page .shop_table tr:hover td {
    background: #fafafa;
}

/* Imaginea produsului */
.cos-page .product-thumbnail img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

/* Numele produsului */
.cos-page .product-name a {
    color: #222;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}
.cos-page .product-name a:hover {
    color: var(--bdt-brand, #9a0019);
}

/* Prețuri */
.cos-page .product-price .amount,
.cos-page .product-subtotal .amount {
    font-weight: 700;
    color: var(--bdt-brand, #9a0019);
    font-size: 1rem;
}
.cos-page .cart-subtotal .amount,
.cos-page .order-total .amount {
    font-weight: 700;
    color: var(--bdt-brand, #9a0019);
}

/* Buton stergere */
.cos-page .product-remove a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f5f5f5;
    color: #999 !important;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none !important;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}
.cos-page .product-remove a:hover {
    background: var(--bdt-brand, #9a0019);
    color: #fff !important;
}

/* Input cantitate */
.cos-page .quantity .qty {
    width: 64px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    text-align: center;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}
.cos-page .quantity .qty:focus {
    outline: none;
    border-color: var(--bdt-brand, #9a0019);
    box-shadow: 0 0 0 2px rgba(154,0,25,0.12);
}

/* Buton actualizare cos */
.cos-page .actions .button[name="update_cart"] {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.cos-page .actions .button[name="update_cart"]:hover {
    background: #e8e8e8;
    color: #222;
}

/* Cupon */
.cos-page .coupon {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cos-page .coupon #coupon_code {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    width: 200px;
    transition: border-color 0.2s;
}
.cos-page .coupon #coupon_code:focus {
    outline: none;
    border-color: var(--bdt-brand, #9a0019);
    box-shadow: 0 0 0 2px rgba(154,0,25,0.12);
}

.cos-page .coupon .button {
    background: #fff;
    color: var(--bdt-brand, #9a0019);
    border: 1.5px solid var(--bdt-brand, #9a0019);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.cos-page .coupon .button:hover {
    background: var(--bdt-brand, #9a0019);
    color: #fff;
}

/* =====================================================
   TOTALURI COȘ
===================================================== */
.cos-page .cart-collaterals {
    margin-top: 40px;
    display: flex;
    justify-content: flex-end;
}

.cos-page .cart_totals {
    width: 380px;
    max-width: 100%;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    border-radius: 8px;
    overflow: hidden;
}

.cos-page .cart_totals h2 {
    background: var(--bdt-brand, #9a0019);
    color: #fff;
    padding: 14px 22px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.cos-page .cart_totals table {
    width: 100%;
    border-collapse: collapse;
}

.cos-page .cart_totals table th,
.cos-page .cart_totals table td {
    padding: 14px 22px;
    font-size: 0.92rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.cos-page .cart_totals table th {
    background: transparent;
    color: #555;
    font-weight: 600;
    width: 45%;
}

.cos-page .cart_totals table .order-total th,
.cos-page .cart_totals table .order-total td {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    border-bottom: none;
}

/* Buton checkout */
.cos-page .wc-proceed-to-checkout {
    padding: 18px 22px;
    background: #fafafa;
}

.cos-page .wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    background: var(--bdt-brand, #9a0019);
    color: #fff !important;
    text-align: center;
    padding: 14px 22px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none !important;
    letter-spacing: 0.05em;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.cos-page .wc-proceed-to-checkout .checkout-button:hover {
    background: #7a0014;
    transform: translateY(-1px);
}

/* =====================================================
   COS GOL
===================================================== */
.cos-page .woocommerce-cart-form ~ .cart-empty,
.cos-page p.cart-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 1.1rem;
    color: #888;
}

.cos-page .return-to-shop .button {
    display: inline-block;
    background: var(--bdt-brand, #9a0019);
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none !important;
    font-size: 0.9rem;
    margin-top: 14px;
    transition: background 0.2s;
}
.cos-page .return-to-shop .button:hover {
    background: #7a0014;
}

/* =====================================================
   MESAJE WOOCOMMERCE
===================================================== */
.cos-page .woocommerce-message,
.cos-page .woocommerce-info {
    border-top: 3px solid var(--bdt-brand, #9a0019);
    background: #fff8f8;
    color: #444;
    padding: 14px 18px 14px 52px;
    border-radius: 0 0 6px 6px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    position: relative;
}

/* Icon pozitionat absolut ca sa nu se suprapuna cu textul */
.cos-page .woocommerce-message::before,
.cos-page .woocommerce-info::before {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.cos-page .woocommerce-error {
    border-top: 3px solid #c0392b;
    background: #fff5f5;
    color: #c0392b;
    padding: 14px 18px;
    border-radius: 0 0 6px 6px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    list-style: none;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 768px) {
    .cos-page {
        padding: 32px 0 48px;
    }

    .cos-page .shop_table thead {
        display: none;
    }

    .cos-page .shop_table,
    .cos-page .shop_table tbody,
    .cos-page .shop_table tr,
    .cos-page .shop_table td {
        display: block;
        width: 100%;
    }

    .cos-page .shop_table td {
        padding: 10px 14px;
        text-align: right;
    }

    .cos-page .shop_table td::before {
        content: attr(data-title) ": ";
        float: left;
        font-weight: 600;
        color: #555;
        font-size: 0.82rem;
    }

    .cos-page .product-thumbnail {
        display: none;
    }

    .cos-page .cart-collaterals {
        justify-content: stretch;
    }

    .cos-page .cart_totals {
        width: 100%;
    }
}
