﻿
.cart-layout {
    display: grid;
    gap: 3rem;
}

/* Cart Section */
.cart-section {
    background-color: white;
    border-radius: 1rem;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.cart-title {
    font-size: 2rem;
    font-weight: bold;
    color: #093F0B;
}

.product-count {
    font-size: 1.125rem;
    color: #111827;
    font-weight: 500;
}

/* Table Headers */
.table-headers {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #888888;
    text-transform: uppercase;
    font-size: 0.875rem;
    display: none;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    display: grid;
    gap: 1rem;
    /* padding-bottom: 1.5rem; */
    /* border-bottom: 1px solid #e5e7eb; */
}

.cart-item-product-info {
    display: flex;
    gap: 1rem;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.product-details h3 {
    font-size: clamp(1rem, 4vw +1rem, 1.125rem);
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.product-size {
    font-size: 0.9rem;
    color: #000;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    width: fit-content;
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background-color: white;
    cursor: pointer;
    font-size: 1.125rem;
    color: #093F0B;
    transition: background-color 0.3s;
}

    .qty-btn:hover {
        background-color: #f0f9f1;
    }

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 600;
}

.item-price,
.item-total {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.mobile-label {
    font-size: 0.875rem;
    color: #888888;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* Continue Shopping */
.continue-shopping {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #093F0B;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-size: 14px;
}

/* Order Summary */
.order-summary {
    background-color: #f5f5f0;
    padding: 2rem;
    border-radius: 1rem;
    height: fit-content;
}

.summary-title {
    font-size: 1.75rem;
    font-weight: bold;
    color: #093F0B;
    margin-bottom: 2rem;
}

.shipping-section,
.promo-section {
    margin-bottom: 1.25rem;
}

.section-label {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.75rem;
    display: block;
}

.shipping-select {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.promo-input {
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.apply-btn {
    width: 112px;
    padding: 0.75rem 1rem;
    background-color: #5BA15D;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

    .apply-btn:hover {
        background-color: #4a8552;
    }

.total-section {
    padding-top: 2rem;
    border-top: 2px solid #d1d5db;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.total-label {
    font-size: clamp(1rem, 4vw + 1rem, 1.25rem);
    font-weight: 600;
    color: #111827;
}

.total-amount {
    font-size: clamp(16px, 4vw + 1rem, 1.25rem);
    font-weight: bold;
    color: #000;
}

.checkout-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: #5BA15D;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

    .checkout-btn:hover {
        background-color: #4a8552;
    }

/* Responsive Design */

@media (min-width: 480px) {
    .cart-item {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .mobile-label {
        display: none;
    }

    .table-headers {
        display: grid;
    }
}

@media (min-width: 768px) {
    .product-image {
        width: 110px;
        height: 88px;
    }
}

@media (min-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr 400px;
    }

    .cart-title {
        font-size: 2.5rem;
    }

    .summary-title {
        font-size: 2rem;
    }
}

@media (max-width: 479px) {
    .cart-layout {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .cart-section {
        padding: 1rem;
    }

    .cart-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding-bottom: 1rem;
    }

    .cart-item-product-info {
        /* flex-direction: column; */
        /* align-items: center; */
        /* text-align: center; */
        /* gap: 0.5rem; */
        padding: 0;
    }

    .product-image {
        width: 60px;
        height: 60px;
    }

    .product-details {
    }

    .cart-title {
        font-size: 1.5rem;
    }

    .product-count {
        font-size: 1rem;
    }

    .cart-item > div:not(.cart-item-product-info) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .item-price,
    .item-total {
        font-size: 1rem;
    }

    .mobile-label {
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .quantity-controls {
        width: auto;
    }

    .cart-item {
        border-bottom: 2px solid #e5e7eb;
    }

    .order-summary {
        padding: 1.5rem 1rem;
    }
}

.delivery-fee-text {
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
    padding: 0.6rem 0.75rem;
    background: #f4f4f4;
    border-radius: 6px;
    margin: 0;
}

.free-delivery-text {
    font-size: 0.9rem;
    color: #2a7a2a;
    font-weight: 600;
    padding: 0.6rem 0.75rem;
    background: #edf7ed;
    border-radius: 6px;
    margin: 0;
}
