/* Theme 4 Ultra-Modern Cart Styling */

.t4-cart-page {
    background-color: #f7f7f9;
    padding: 40px 0 90px;
    font-family: 'Inter', sans-serif;
    color: #111111;
    min-height: 70vh;
}

.t4-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.t4-cart-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: #000000;
    margin: 0;
}

.t4-cart-count-badge {
    background: #000000;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 50px;
}

/* Grid Layout */
.t4-cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 36px;
    align-items: start;
}

@media (max-width: 991px) {
    .t4-cart-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

/* Items List Card */
.t4-cart-list-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.t4-cart-table-head {
    display: grid;
    grid-template-columns: 3fr 1.5fr 1fr 40px;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf0f5;
    color: #888888;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .t4-cart-table-head {
        display: none;
    }
}

@media (max-width: 576px) {
    .t4-cart-page {
        padding: 20px 0 60px;
    }
    .t4-cart-title {
        font-size: 22px;
    }
    .t4-cart-list-card,
    .t4-summary-card {
        padding: 20px;
        border-radius: 20px;
    }
}

.t4-cart-item-row {
    display: grid;
    grid-template-columns: 3fr 1.5fr 1fr 40px;
    gap: 16px;
    align-items: center;
    padding: 24px 0;
    border-bottom: 1px solid #f2f4f8;
}

@media (max-width: 768px) {
    .t4-cart-item-row {
        display: flex;
        flex-direction: column;
        gap: 16px;
        position: relative;
        padding-right: 0;
    }
    .t4-item-product-flex {
        padding-right: 48px;
    }
    .t4-item-remove-btn {
        position: absolute;
        top: 24px;
        right: 0;
    }
    .t4-item-mobile-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding-top: 8px;
        border-top: 1px dashed #f0f2f5;
    }
}

.t4-cart-item-row:last-child {
    border-bottom: none;
}

.t4-item-product-flex {
    display: flex;
    align-items: center;
    gap: 18px;
}

.t4-item-img-box {
    width: 86px;
    height: 86px;
    border-radius: 18px;
    overflow: hidden;
    background: #f4f5f8;
    flex-shrink: 0;
}

.t4-item-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.t4-item-details {
    display: flex;
    flex-direction: column;
}

.t4-item-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #111111;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.t4-item-variant-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.t4-v-pill {
    font-size: 11px;
    font-weight: 600;
    background: #f0f2f5;
    color: #555555;
    padding: 3px 10px;
    border-radius: 50px;
}

.t4-item-price-val,
.t4-item-total-val {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #111111;
}

/* Stepper inside cart */
.t4-cart-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e2e4e8;
    border-radius: 50px;
    overflow: hidden;
    background: #ffffff;
}

.t4-cart-qty-stepper button {
    width: 32px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    cursor: pointer;
    transition: background 0.2s;
}

.t4-cart-qty-stepper button:hover {
    background: #f0f0f4;
}

.t4-cart-qty-stepper input {
    width: 36px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    background: transparent;
}

.t4-item-remove-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
}

.t4-item-remove-btn:hover {
    background: #ffeff0;
    color: #ff4d4d;
    border-color: #ff4d4d;
}

/* Order Summary Sticky Card */
.t4-summary-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 100px;
}

.t4-summary-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 24px;
}

.t4-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555555;
    margin-bottom: 14px;
}

.t4-summary-row span:last-child {
    font-weight: 600;
    color: #111;
}

.t4-summary-divider {
    height: 1px;
    background: #edf0f5;
    margin: 20px 0;
}

.t4-summary-row.total-row {
    font-size: 18px;
    font-weight: 800;
    color: #111111;
}

.t4-summary-row.total-row span:last-child {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: #000000;
}

.t4-btn-checkout {
    width: 100%;
    background: #111111;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 50px;
    padding: 16px;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.t4-btn-checkout:hover {
    background: #ff4d4d;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 77, 77, 0.35);
}

.t4-continue-shopping-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #777777;
    text-decoration: none;
    transition: color 0.2s;
}

.t4-continue-shopping-link:hover {
    color: #000000;
}

/* Empty Cart State */
.t4-empty-cart-card {
    background: #ffffff;
    border-radius: 32px;
    padding: 70px 30px;
    text-align: center;
    max-width: 540px;
    margin: 40px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.t4-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: #888888;
    font-size: 32px;
}

.t4-empty-cart-card h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
}

.t4-empty-cart-card p {
    color: #666;
    margin-bottom: 28px;
    font-size: 15px;
}

/* Custom Confirmation Modal */
.t4-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.t4-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.t4-modal-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.t4-modal-overlay.active .t4-modal-card {
    transform: scale(1);
}

.t4-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffeff0;
    color: #ff4d4d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 20px;
}

.t4-modal-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 8px;
}

.t4-modal-desc {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.t4-modal-actions {
    display: flex;
    gap: 12px;
}

.t4-modal-btn-cancel {
    flex: 1;
    background: #f0f2f5;
    color: #333333;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 50px;
    padding: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.t4-modal-btn-cancel:hover {
    background: #e2e5ec;
}

.t4-modal-btn-confirm {
    flex: 1;
    background: #ff4d4d;
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    border: none;
    border-radius: 50px;
    padding: 13px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(255, 77, 77, 0.3);
}

.t4-modal-btn-confirm:hover {
    background: #e63939;
    box-shadow: 0 6px 18px rgba(255, 77, 77, 0.4);
}

@media (max-width: 768px) {
    .t4-cart-page {
        padding: 20px 0 60px;
    }

    .t4-cart-header {
        margin-bottom: 20px;
    }

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

    .t4-cart-list-card, .t4-summary-card {
        padding: 20px 16px;
        border-radius: 20px;
    }
}

@media (max-width: 576px) {
    .t4-cart-list-card, .t4-summary-card {
        padding: 16px 12px;
        border-radius: 16px;
    }
}
