/*
 * Cart Page Styles
 * File: /css/pages/cart.css
 * Loaded only on cart page
 * Dependencies: style.css (global styles)
 * Version: 1.0
 */

/* ============================================
   CART LAYOUT & GRID
   ============================================ */

/** cart **/
#cart-outline {
    display: grid;
}

.cart-product-grid {
    display: grid;
    grid-template-columns: 6fr 2fr 2fr 2fr;
    padding: 25px 0px 25px 0px;
    border-bottom: 1px solid #000;
    align-items: center;
}

.cart-product-grid .pic-name-group {
    display: grid;
    grid-template-columns: 1fr 3fr;
    align-items: center;
    position: relative;
}

.cart-product-details {
    display: grid;
    grid-gap: 5px;
}

.cart-grid-titles {
    display: grid;
}

/* ============================================
   CART REMOVE BUTTON
   ============================================ */

.cart-product-grid .product-remove {
    position: absolute;
    top: -5px;
    left: -5px;
    z-index: 10;
}

.cart-product-grid .product-remove .remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    color: #333;
    text-decoration: none;
    font-size: 20px;
    line-height: 1;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0px 1px 3px rgba(0,0,0,0.2);
}

.cart-product-grid .product-remove .remove:hover {
    background: #db3600;
    color: #fff;
    border-color: #db3600;
    box-shadow: 0px 2px 4px rgba(0,0,0,0.3);
}

/* ============================================
   CART PRODUCT DETAILS
   ============================================ */

.woocommerce .product-thumbnail img {
    width: 100px;
    height: auto;
    border: 1px solid #3d3d3d;
    max-width: 100%;
}

dl.variation {
    display: grid;
    grid-template-columns: 1fr 3fr;
    grid-gap: 2px;
    padding: 10px;
}

dl.variation dd p {
    padding: 0px;
    margin: 0px;
}

dl dt, dl dd p, dl.variation dd p {
    font-size: 15px;
    padding: 0px !important;
    margin: 0px !important;
}

dl.variation dt {
    color: #000;
    font-weight: bold;
}

/* ============================================
   CART COLLATERALS & TOTALS
   ============================================ */

.cart-collaterals .shop_table tbody tr th {
    background: unset;
}

.upsell-cart {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 3fr 2fr;
}

.cart-collaterals {
    /* Styles from parent */
}

/* ============================================
   CROSS-SELLS IN CART
   ============================================ */

.cross-sells ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, 200px);
    list-style: none;
    max-width: 100%;
    grid-gap: 20px;
    justify-items: center;
    margin-bottom: 10px;
    justify-content: center;
    width: 100%;
    padding: 0px;
}

.cross-sells .shop-thumb img {
    width: 125px;
    height: auto;
}

.cross-sells .product-title {
    min-height: 75px;
}

.cross-sells .product-title h2 a {
    font-size: 17px;
}

.cross-sells .products .button {
    font-size: 17px;
}

/* ============================================
   CART ACTIONS & BUTTONS
   ============================================ */

.cart {
    padding: 20px 0px;
}

.quantity {
    padding: 10px 0px;
}

.quantity .screen-reader-text {
    font-size: 22px;
}

.quantity input.qty {
    font-size: 22px;
    padding: 5px;
    width: 100px;
}

.cart-options-area {
    display: grid;
    grid-gap: 20px;
}

.coupon-section {
    display: grid;
    align-items: center;
}

.update-cart {
    /* Update cart button styles */
}

/* Checkout button in cart */
.checkout-button {
    background: #e0a20f;
    color: #000;
    text-transform: uppercase;
    transition: background .15s, box-shadow .15s;
    padding: 15px 50px;
    cursor: pointer;
    border: 1px solid #575757;
    border-radius: 4px;
    width: 100%;
    font-size: 22px;
    font-weight: bold;
    display: block;
    text-align: center;
    max-width: 100%;
    text-decoration: none;
}

.checkout-button:hover {
    background: #ecab0f;
    box-shadow: 0px 6px 8px rgba(0,0,0,.4);
    text-decoration: none;
}

/* ============================================
   CART MESSAGES
   ============================================ */

.woocommerce-notices-wrapper {
    background: #f3f3f3;
}

.woocommerce-notices-wrapper .button {
    padding: 5px 10px;
    display: inline-block;
    background-color: #14a025;
    font-size: 15px;
    color: #000;
    width: auto;
}

a.wc-forward {
    padding: 20px;
}

.woocommerce-message {
    font-size: 25px;
    padding: 10px;
    background-color: #fffbd8;
}

/* ============================================
   CART QUANTITY INPUTS
   ============================================ */

.quantity-checkout-mix {
    display: grid;
    grid-template-columns: 1fr 2fr;
}

/* ============================================
   RESPONSIVE STYLES - TABLET
   ============================================ */

@media screen and (max-width: 960px) {
    .z-cart-area {
        display: flex;
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 865px) {
    .upsell-cart {
        grid-template-columns: 1fr;
    }

    .cart-box {
        width: 47%;
    }
}

/* ============================================
   RESPONSIVE STYLES - MOBILE
   ============================================ */

@media screen and (max-width: 768px) {
    /* Cart Remove Button Mobile */
    .cart-product-grid .product-remove {
        top: 0px;
        left: 0px;
    }

    .cart-product-grid .product-remove .remove {
        width: 20px;
        height: 20px;
        font-size: 16px;
    }

    /* Cart Grid Mobile Layout */
    .cart-grid-titles {
        display: none !important;
    }

    .cart-product-grid {
        display: grid;
        grid-template-columns: 1fr 2fr;
        padding: 25px 0px 25px 0px;
        border-bottom: 1px solid #000;
        align-items: center;
        grid-gap: 10px;
    }

    .cart-product-grid .pic-name-group {
        display: grid;
        grid-template-columns: 1fr 2fr;
        align-items: center;
        grid-column: 1 / -1;
        grid-gap: 20px;
    }

    .cart-product-grid .pic-name-group .product-thumbnail {
        width: 100px !important;
    }

    .cart-product-grid .product-price {
        grid-column: 2;
        grid-row: 2;
        text-align: center;
    }

    .checkout-button {
        padding: 15px;
    }

    .cross-sells ul.products {
        grid-template-columns: repeat(auto-fit, 150px);
        grid-gap: 10px;
        justify-items: center;
        justify-content: center;
        width: 100%;
    }
}

@media screen and (max-width: 660px) {
    .cart-box {
        width: 95%;
    }

    /* Make checkout button sticky on mobile for better conversion */
    .wc-proceed-to-checkout {
        position: fixed;
        bottom: 0px;
        left: 0px;
        z-index: 10;
        width: 100%;
        padding: 20px 0px;
        background: #1F2222;
    }

    a.wc-forward {
        margin: 10px auto 0px auto;
        width: 95%;
    }
}

/* ============================================
   CART SPECIFIC WOOCOMMERCE OVERRIDES
   ============================================ */

.woocommerce-cart .woocommerce-cart-form {
    /* Override default WooCommerce cart form styles if needed */
}

.woocommerce-cart table.shop_table {
    /* Override default WooCommerce table styles if needed */
}

/* Hide mini cart on cart page if needed */
.woocommerce-cart #the-cart {
    /* Adjust if needed */
}

/* ============================================
   CART PAGE UTILITIES
   ============================================ */

.full-grid {
    grid-column: 1 / -1;
}

/* Cart area specific container */

/* Special styling for variable products in cart */
.var-margin {
    margin-bottom: 20px;
}

/* Tupac class from original CSS */
.tupac {
    padding: 10px;
    text-align: center;
    background: #f4f4ca;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
}