/*
 * Cart page.
 * From Code Snippets #12 "Cart Summary" (shortcode on the cart page).
 * Moved unchanged on 2026-10-14 (P04).
 */

/* --- 12-cart-summary.php --- */
@media (min-width: 1025px) {
    .woocommerce-cart-form {
        flex: 1;
        margin-right: 30px;
    }
    .cart-collaterals {
        flex: 0 0 380px;
    }
    .woocommerce .kadence-woo-cart-form-wrap {
        display: flex;
        align-items: flex-start;
    }
}

/* Pozadie pod tabuľkou produktov */
.woocommerce-cart-form {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.shop_table.cart thead th {
    border-bottom: 2px solid #e2e8f0 !important;
    text-transform: uppercase;
    font-size: 13px;
}

/* Miniatúra produktu */
.product-thumbnail img {
    border-radius: 4px;
    max-width: 80px !important;
    height: auto;
}

/* Názov produktu a variácie */
.product-name a {
    font-weight: bold;
    color: #000;
}

.variation dt {
    font-weight: 600;
    font-size: 12px;
    color: #666;
}

.cart_totals {
    background: rgba(255, 255, 255, 0.5) !important;
    border: 1px solid #e2e8f0 !important;
    padding: 25px !important;
    border-radius: 4px;
}

.cart_totals h2 {
    font-size: 20px !important;
    text-transform: uppercase;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}



/* Tabuľka súčtov */
.cart_totals table {
    width: 100% !important;
    margin-bottom: 20px !important;
}

.cart-subtotal th, .order-total th {
    text-align: left;
    font-weight: 500;
}

.order-total {
    font-size: 1.2em;
    color: #000;
}

/* Kupón box */
.coupon {
    display: flex;
    gap: 10px;
}

.coupon input#coupon_code {
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 4px !important;
    max-width: 150px;
}

/* Hlavné tlačidlo "Skontrolovať a objednať" */
.checkout-button {
    display: block !important;
    width: 100% !important;
    text-align: center;
    padding: 18px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-transform: uppercase;
}

/* Sekundárne tlačidlá (Aktualizovať košík, Použiť kupón) */
.woocommerce-cart-form .button {
    background: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 12px !important;
}

@media (max-width: 719px) {
    /* 1. JEDNOTNÉ POZADIE - Finálny agresívny reset */
    .woocommerce-cart-form__cart-item,
    .shop_table.cart tbody tr,
    .shop_table.cart tbody tr:nth-child(even),
    .shop_table.cart tbody tr:nth-child(odd) {
        background: rgba(255, 255, 255, 0.5) !important;
        display: block !important;
        position: relative !important;
        padding: 45px 15px 15px 120px !important;
        margin-bottom: 20px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
    }

    /* 2. KRÍŽIK (Odobrať) - Perfektné vycentrovanie v kruhu */
    td.product-remove {
        position: absolute !important;
        top: 0px !important;
        right: 10px !important;
        padding: 0 !important;
    }

    /* 3. OBRÁZOK */
    td.product-thumbnail {
        position: absolute !important;
        left: 15px !important;
        top: 45px !important;
        width: 90px !important;
        display: block !important;
        padding: 0 !important;
    }

    /* 4. TEXTY (Názov a Atribúty) */
    td.product-name {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }

    td.product-name a {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #000 !important;
        display: block;
    }

    /* 5. KUPÓNY NA CELÚ ŠÍRKU */
    .actions {
        background: transparent !important;
        border: none !important;
        padding: 10px 0 !important;
    }

    .coupon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .coupon input#coupon_code {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .coupon button, 
    button[name="update_cart"],
    .checkout-button {
        width: 100% !important;
        display: block !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 6. OSTATNÉ POLIA (Cena, Počet...) */
    td.product-price, 
    td.product-quantity, 
    td.product-subtotal {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border-top: 1px solid rgba(0,0,0,0.05) !important;
    }
    
@media (max-width: 719px) {
    /* 1. JEDNOTNÉ POZADIE - Zacielime priamo na riadky tabuľky */
    .woocommerce-cart-form .shop_table.cart tbody tr.cart_item {
        background: rgba(255, 255, 255, 0.5) !important;
        display: block !important;
        position: relative !important;
        padding: 45px 15px 15px 120px !important;
        margin-bottom: 20px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
    }

    /* Vypneme zebra pruhy od témy */
    .shop_table.cart tbody tr:nth-child(even),
    .shop_table.cart tbody tr:nth-child(odd),
    .shop_table.cart tbody tr td {
			
        background: transparent !important;
    }
	.woocommerce table.shop_table td {
		border: 0px;
	}
    /* 2. KRÍŽIK - Fix polohy a centrovania */
    td.product-remove {
        position: absolute !important;
        top: 10px !important;
        right: 15px !important;
        padding: 0 !important;
        display: block !important;
        z-index: 10;
        width: 30px !important;
        height: 30px !important;
    }

    /* 3. OBRÁZOK */
    td.product-thumbnail {
        position: absolute !important;
        left: 15px !important;
        top: 45px !important;
        width: 90px !important;
        display: block !important;
        padding: 0 !important;
        border: none !important;
    }

    /* 4. TEXTY (Názov a Atribúty) */
    td.product-name {
        display: block !important;
        width: 100% !important;

        border: none !important;
        text-align: left !important;
    }

    /* 5. FIX PRE KUPÓNY A AKCIE (Spodná časť tabuľky) */
    .woocommerce-cart-form .shop_table.cart tr td.actions {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
    }

    .coupon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
        padding: 10px 0 !important;
    }

    .coupon input#coupon_code {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    /* Tlačidlá na celú šírku */
    .coupon button, 
    button[name="update_cart"],
    .checkout-button {
        width: 100% !important;
        display: block !important;
        margin: 10px 0 0 0 !important;
    }

    /* Skryjeme nadbytočné labely v sekcii actions */
    td.actions::before {
        display: none !important;
    }

    /* 6. OSTATNÉ POLIA (Cena, Počet...) */
    td.product-price, 
    td.product-quantity, 
    td.product-subtotal {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border-top: 1px solid rgba(0,0,0,0.05) !important;
    }
}
