/* --- 🛠️ BASE LAYOUT: SPLIT SCREEN (DESKTOP) --- */

.e-cart__container {
    display: flex !important;
    grid-column-gap: 0 !important;
    grid-row-gap: 0 !important;
    flex-direction: row; /* Horizontal split */
    width: 100%;
    min-height: 100vh;
}

/* Form width inside the left column */
.woocommerce-cart-form {
    width: 80%;
}

/* Force 50/50 Desktop Columns */
.e-cart__column {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    align-items: center;
}

.e-cart__column-start, 
.woocommerce-cart-form__contents {
    background-color: #ECECEC;
}

.e-cart__column-start, 
.e-cart__column-end {
    display: flex;
}

/* Left Column Alignment */
.e-cart__column-start {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Right Column Alignment */
.e-cart__column-end {
    padding-top: 160px;
    justify-content: center;
    align-items: flex-start;
}

div.e-cart__column-end > div.e-cart__column-inner {
    width: 80%;
}

/* --- 🛒 TABLE RECONSTRUCTION (GRID) --- */

.woocommerce-cart-form__contents tr {
        display: grid;
        /* Use 'fr' units so columns can shrink, and 'minmax' to prevent total collapse */
        grid-template-columns: 130px 1.6fr minmax(60px, 1fr) 130px minmax(90px, 1fr) 40px;
        align-items: center;
        gap: 5px;
        border-bottom: 1px solid #eee; /* Optional: separates items */
    }

.woocommerce-cart-form__contents thead {
    display: none; /* Hides table headers for a cleaner look */
}

.woocommerce-cart-form__contents td {
    display: block;
    padding: 50px 0 0 0; /* Note: Corrected '100' to '100px' */
    margin: 0;
}

/* Visual Styling for Products */
.product-thumbnail { width: 130px; order: 1; }
.product-name      { order: 2; }
.product-price     { order: 3; }
.product-quantity  { order: 4; }
.product-subtotal  { order: 5; }
.product-remove    { order: 6; }

.product-thumbnail img {
    width: 100% !important;
    height: auto;
}
.product-name{
 	padding-left: 10px;
}
.product-name a {
    font-family: "Italiana", Sans-serif;
    font-size: 18px;
    font-weight: 300;
    text-transform: uppercase;
}
.cart-back{
	font-family: "Sofia Pro", Sans-serif;
	font-weight: 200;
	font-size: 18px;
}
.product-name a:hover, 
.cart-back:hover {
    color: #A5A5A5 !important;
}
.product-subtotal, .product-price{
	display: flex !important;
	justify-content: center;
	align-items: center;
}
.woocommerce-Price-amount bdi {
    font-weight: 200;
}

/* Custom SVG Trash Icon */
.product-remove a.remove {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    font-size: 0 !important;
    border: none !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'%3E%3C/polyline%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3C/svg%3E") !important;
}

.cart-bottom, .cart-top{
	padding:20px 0 20px 0;
}

/* This uses our arrow system from yesterday */
.my-empty-cart .cta-link {
    font-size: 1.2vw;
    font-weight: 600;
}



/* --- 📱 MOBILE CART FIXES --- */
@media (max-width: 767px) {
    /* Stack main columns vertically */
    .e-cart__container {
        flex-direction: column !important;
        min-height: auto;
        gap: 0; /* Removing gap to keep background seamless */
    }
	.e-cart__column-end, .cart-collaterals{
		background-color: #ECECEC;
	}
    .woocommerce-cart-form__contents thead {
        display: none;
    }

    .e-cart__column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0;
    }

    /* Make cart form take full width */
    .woocommerce-cart-form {
        width: 100% !important;
    }

    div.e-cart__column-end > div.e-cart__column-inner {
        width: 90% !important; /* Slightly narrower for summary comfort */
    }

    /* --- CENTERED VERTICAL STACK --- */
    .woocommerce-cart-form__contents tr {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important; /* Horizontal center */
        justify-content: center !important;
        gap: 12px;
        border-bottom: 1px solid #ddd;
        padding: 30px 0 !important;
    }

    .woocommerce-cart-form__contents td {
        display: flex !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        justify-content: center !important; /* Centers content of TD */
        text-align: center !important;
        border: none !important;
    }

    /* 🚫 DISABLE "BEFORE" LABELS */
    .woocommerce-cart-form__contents td::before {
        content: "" !important;
        display: none !important;
    }

    /* Product image - larger and centered */
    .product-thumbnail {
        width: 120px !important;
        margin-bottom: 5px;
    }

    .product-thumbnail img {
        width: 100%;
        height: auto;
    }
	.product-name{
		padding-left: 0;
	}
    .product-name a {
        font-size: 20px; /* Slightly larger for the title */
        display: block;
    }
	
    /* Center the Quantity Wrapper */
    .product-quantity .wc-qty__wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 5px auto;
    }

    /* Center the Trash Icon Row */
    .product-remove {
        margin-top: 5px;
    }

    .product-remove a.remove {
        margin: 0 auto !important; /* Force center */
    }

    /* Summary Column Adjustments */
    .e-cart__column-end {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    /* Hide the Update Cart button and its row */
    .woocommerce-cart-form__contents tr:has(.actions),
    .woocommerce-cart-form__contents .actions {
        display: none !important;
    }
	.cart-bottom{
	padding-top: 0;
	}
}