/* ==========================================================================
   CART PAGE STYLES
   ========================================================================== */

body {
    background-color: #fdfbf9; /* Very light cream matching the image */
}

/* --- Base Buttons (missing from previous) --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #e85d04;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}
.btn-primary:hover {
    background: #dc2f02;
}

.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #e85d04;
    background: transparent;
    color: #e85d04;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-outline-primary:hover {
    background: #fdf3ed;
}

.btn-outline-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #ef4444;
    background: transparent;
    color: #ef4444;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-outline-danger:hover {
    background: #fef2f2;
}


/* --- Header & Breadcrumbs --- */
.cart-page-header {
    padding: 40px 0 20px 0;
}
.cart-title {
    font-size: 32px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 8px;
}
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #888;
}
.breadcrumbs a {
    color: #e85d04;
    text-decoration: none;
    font-weight: 500;
}
.breadcrumbs svg {
    width: 14px; height: 14px;
}

/* --- Free Delivery Banner --- */
.free-delivery-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border: 1px solid #fae6cb;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.free-delivery-text {
    font-size: 15px;
    color: #4a2f1d;
}
.free-delivery-text .confetti-emoji {
    font-size: 18px;
    margin-right: 8px;
}
.free-delivery-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 50%;
}
.progress-bar-container {
    flex: 1;
    height: 6px;
    background: #eee;
    border-radius: 4px;
    position: relative;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
    border-radius: 4px;
    position: relative;
    max-width: 80%; /* e.g., 80% filled */
}
.progress-truck {
    position: absolute;
    right: -10px;
    top: -8px;
    width: 24px;
    height: 24px;
    background: white;
    border: 1px solid #e85d04;
    color: #e85d04;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-truck svg {
    width: 12px; height: 12px;
}
.progress-text {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

/* --- Cart Layout --- */
.cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
    align-items: start;
}

/* --- Cart Items Section --- */
.cart-items-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 30px;
    align-self: start;
}

.cart-table-header {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.5fr 1fr;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-item {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1.5fr 1fr;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #eee;
}
.cart-item:last-child {
    border-bottom: none;
}

.item-product {
    display: flex;
    align-items: center;
    gap: 16px;
}
.item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fdfbf9;
    border-radius: 8px;
    padding: 8px;
}
.item-name {
    font-size: 15px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 4px;
}
.item-weight {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}
.item-sku {
    font-size: 12px;
    color: #999;
}

.item-price {
    font-size: 16px;
    font-weight: 700;
    color: #4a2f1d;
}

.item-quantity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 32px;
    width: 90px;
}
.qty-btn {
    width: 28px;
    height: 100%;
    background: #fcfcfc;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}
.qty-btn:hover {
    background: #eee;
}
.qty-btn svg { width: 12px; height: 12px; }
.qty-input {
    width: 34px;
    height: 100%;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #4a2f1d;
    background: white;
}
.qty-unit-price {
    font-size: 11px;
    color: #888;
}

.item-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.total-price {
    font-size: 18px;
    font-weight: 800;
    color: #4a2f1d;
}
.item-remove {
    background: #fdfaf9;
    border: 1px solid #fae6cb;
    border-radius: 50%;
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    color: #999;
    cursor: pointer;
    transition: all 0.2s;
}
.item-remove:hover {
    background: #fae6cb;
    color: #ef4444;
}
.item-remove svg { width: 14px; height: 14px; }


.cart-bottom-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px dashed #eee;
}


/* --- Order Summary Section --- */
.summary-card, .coupon-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    padding: 30px;
    margin-bottom: 24px;
}
.summary-title {
    font-size: 20px;
    font-weight: 800;
    color: #4a2f1d;
    margin-bottom: 24px;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 14px;
    color: #4a2f1d;
}
.summary-sublabel {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}
.summary-value {
    font-weight: 600;
}
.discount-value {
    color: #10b981;
}
.shipping-value {
    color: #10b981;
    font-weight: 700;
}
.summary-divider {
    border: 0;
    border-top: 1px dashed #eee;
    margin: 20px 0;
}
.total-row {
    font-size: 16px;
    font-weight: 700;
    align-items: center;
}
.total-amount {
    font-size: 24px;
    font-weight: 800;
    color: #4a2f1d;
}

.savings-badge {
    background: #ecfdf5;
    color: #059669;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin: 24px 0;
    border: 1px dashed #a7f3d0;
}
.savings-badge svg { width: 16px; height: 16px; }

.btn-checkout {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.secure-checkout-tag {
    text-align: center;
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 24px;
}

.trust-badges-mini {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    border-top: 1px solid #eee;
    padding-top: 24px;
}
.trust-badge {
    text-align: center;
    font-size: 10px;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.trust-badge svg {
    color: #e85d04;
    width: 20px; height: 20px;
}

/* --- Coupon Code Section --- */
.coupon-title {
    font-size: 15px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 16px;
}
.coupon-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.coupon-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
}
.coupon-input:focus {
    border-color: #e85d04;
}
.btn-apply {
    padding: 12px 24px;
}

.available-offers-title {
    font-size: 14px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 12px;
}
.offer-item {
    font-size: 12px;
    color: #666;
    background: #fffaf6;
    border: 1px dashed #fae6cb;
    padding: 12px;
    border-radius: 6px;
}
.offer-code {
    font-weight: 700;
    color: #e85d04;
}

/* --- Related Products Section (You May Also Like) --- */
.related-products-section {
    margin-bottom: 60px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.section-title {
    font-size: 24px;
    font-weight: 800;
    color: #4a2f1d;
}
.carousel-nav {
    display: flex;
    gap: 12px;
}
.carousel-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    display: flex; align-items: center; justify-content: center;
    color: #4a2f1d;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.carousel-btn:hover {
    border-color: #e85d04;
    color: #e85d04;
}
.carousel-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #eee;
    color: #999;
}
.carousel-btn svg { width: 18px; height: 18px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}
.product-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    border-color: #fae6cb;
}
.product-image-container {
    background: #fdfbf9;
    border-radius: 8px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 16px;
}
.product-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}
.product-info {
    text-align: left;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.product-name {
    font-size: 14px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 4px;
}
.product-weight {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}
.product-price-row {
    margin-bottom: 16px;
    margin-top: auto;
}
.product-price {
    font-size: 16px;
    font-weight: 800;
    color: #4a2f1d;
}
.btn-add-cart {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 13px;
    gap: 6px;
    border-radius: 6px;
}
.btn-add-cart svg { width: 14px; height: 14px; }


/* --- Utility Classes / Banners --- */
.banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.promo-banners-section {
    margin-top: 48px;
    margin-bottom: 60px;
}
.promo-banner {
    position: relative;
    border-radius: 8px;
    padding: 40px;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.banner-dark {
    background: #6a4124;
    color: white;
}
.banner-dark h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}
.banner-dark p {
    font-size: 14px;
    margin-bottom: 24px;
    opacity: 0.9;
    line-height: 1.5;
}
.banner-light {
    background: white;
    border: 1px solid #fae6cb;
    color: #4a2f1d;
}
.banner-light h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}
.banner-light p {
    font-size: 14px;
    margin-bottom: 24px;
    color: #666;
    line-height: 1.5;
}
.banner-content {
    position: relative;
    z-index: 2;
    max-width: 85%;
}
.banner-icon {
    position: absolute;
    right: 20px;
    bottom: -20px;
    z-index: 1;
}
.banner-icon svg {
    width: 80px;
    height: 80px;
    color: #e54d60;
    opacity: 0.2;
}

/* Features Grid (Trust Bar) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    text-align: center;
}
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e54d60;
    box-shadow: 0 0 0 6px #fff0f2;
}
.feature-icon-wrapper svg {
    width: 20px;
    height: 20px;
}
.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: #4a2f1d;
    margin-bottom: 4px;
}
.feature-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* Banner specific buttons */
.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: white;
    color: #4a2f1d;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-white:hover {
    background: #fae6cb;
}
.btn-outline-pink {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid #e54d60;
    background: transparent;
    color: #e54d60;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-outline-pink:hover {
    background: #fff0f2;
}

/* --- Cart page responsive layout --- */
@media (max-width: 900px) {
    .cart-page-header {
        padding: 28px 0 16px;
    }

    .cart-title {
        font-size: 28px;
    }

    .free-delivery-banner {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
        padding: 16px 18px;
    }

    .free-delivery-progress-wrapper {
        width: 100%;
    }

    .cart-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }

    .cart-items-section,
    .summary-card,
    .coupon-card {
        padding: 22px;
    }

    .summary-card,
    .coupon-card {
        margin-bottom: 18px;
    }

    .banners-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .promo-banners-section {
        margin-top: 36px;
        margin-bottom: 40px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
    }
}

@media (max-width: 600px) {
    .cart-page-header {
        padding: 22px 0 14px;
    }

    .cart-title {
        font-size: 24px;
    }

    .breadcrumbs {
        font-size: 12px;
    }

    .free-delivery-text {
        font-size: 13px;
        line-height: 1.45;
    }

    .free-delivery-progress-wrapper {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .progress-bar-container {
        width: 100%;
    }

    .progress-text {
        font-size: 11px;
        white-space: normal;
    }

    .cart-items-section,
    .summary-card,
    .coupon-card {
        padding: 16px;
        border-radius: 10px;
    }

    .cart-table-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr auto;
        gap: 14px 10px;
        padding: 18px 0;
    }

    .item-product {
        grid-column: 1 / -1;
        gap: 12px;
    }

    .item-img {
        width: 64px;
        height: 64px;
    }

    .item-name {
        font-size: 14px;
    }

    .item-weight,
    .item-sku {
        font-size: 11px;
    }

    .item-price {
        display: none;
    }

    .item-quantity {
        grid-column: 1;
        align-items: flex-start;
        gap: 6px;
    }

    .item-total {
        grid-column: 2;
        gap: 8px;
    }

    .total-price {
        font-size: 16px;
    }

    .cart-bottom-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-top: 18px;
        padding-top: 18px;
    }

    .cart-bottom-actions a,
    .cart-bottom-actions button {
        width: 100%;
    }

    .summary-title {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .summary-row {
        font-size: 12px;
    }

    .total-amount {
        font-size: 21px;
    }

    .promo-banner {
        min-height: 230px;
        padding: 26px 22px;
    }

    .banner-content {
        max-width: 100%;
    }

    .banner-dark h3,
    .banner-light h3 {
        font-size: 22px;
    }

    .banner-dark p,
    .banner-light p {
        font-size: 13px;
    }

    .banner-content .btn-white,
    .banner-content .btn-outline-pink {
        width: 100%;
        padding: 11px 16px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 12px;
    }

    .feature-icon-wrapper {
        width: 46px;
        height: 46px;
        flex-shrink: 0;
    }
}
