/* ===================================================
   CART PAGE — Zendotech Audio
   Premium cart layout inspired by top e-commerce sites
   =================================================== */

/* --- Breadcrumb --- */
.breadcrumb-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .separator {
    color: var(--text-muted);
    font-size: 9px;
}

.breadcrumb .current {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.page-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
}

/* ---- Cart Section ---- */
.cart-section {
    padding: 40px 0 60px;
    background: var(--bg);
    min-height: 50vh;
}

/* ---- Empty Cart State ---- */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    max-width: 560px;
    margin: 0 auto;
}

.ce-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0ff, #e8e8ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary);
    margin: 0 auto 24px;
}

.cart-empty h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.cart-empty p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Free Shipping Progress Bar ---- */
.cart-progress {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.cp-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 10px;
}

.cp-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #059669);
    border-radius: 50px;
    transition: width .5s cubic-bezier(.4, 0, .2, 1);
    width: 0%;
}

.cp-fill.complete {
    background: linear-gradient(90deg, #10B981, #047857);
}

.cp-text {
    font-size: 13px;
    color: var(--text-body);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cp-text i {
    color: #10B981;
    font-size: 16px;
}

.cp-text strong {
    color: var(--text-dark);
}

/* ---- Cart Layout ---- */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

/* ---- Cart Table ---- */
.cart-table-wrap {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ct-header {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1.2fr 1fr 50px;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #2D2D7A 100%);
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.ct-body {
    padding: 0;
}

/* ---- Single Cart Item Row ---- */
.ct-item {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1.2fr 1fr 50px;
    gap: 10px;
    padding: 20px 24px;
    align-items: center;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.ct-item:hover {
    background: #fafbff;
}

.ct-item:last-child {
    border-bottom: none;
}

/* Product Cell */
.ct-product {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ct-product-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid var(--border);
}

.ct-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ct-product-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.4;
}

.ct-product-info h4 a {
    color: inherit;
    transition: color var(--transition);
}

.ct-product-info h4 a:hover {
    color: var(--primary);
}

.ct-product-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ct-product-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Price Cell */
.ct-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Quantity Cell */
.ct-qty {
    display: flex;
    align-items: center;
}

.ct-qty-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition);
}

.ct-qty-wrap:hover {
    border-color: var(--primary);
}

.ct-qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-body);
    transition: all var(--transition);
}

.ct-qty-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.ct-qty-input {
    width: 44px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    background: var(--white);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.ct-qty-input::-webkit-inner-spin-button,
.ct-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Subtotal Cell */
.ct-subtotal {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

/* Remove Button */
.ct-remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition);
}

.ct-remove:hover {
    background: rgba(234, 29, 34, .08);
    color: var(--cta);
    transform: scale(1.1);
}

/* ---- Cart Actions Row ---- */
.ct-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    background: #fafbff;
    flex-wrap: wrap;
    gap: 14px;
}

.coupon-wrap {
    display: flex;
    gap: 10px;
}

.coupon-wrap input {
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 13px;
    width: 200px;
    outline: none;
    transition: border-color var(--transition);
}

.coupon-wrap input:focus {
    border-color: var(--primary);
}

.btn-coupon {
    padding: 10px 20px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-coupon:hover {
    background: var(--primary);
    color: var(--white);
}

.ct-action-btns {
    display: flex;
    gap: 10px;
}

.btn-update,
.btn-clear {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition);
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--text-body);
}

.btn-update:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-clear:hover {
    border-color: var(--cta);
    color: var(--cta);
    background: rgba(234, 29, 34, .04);
}

/* ---- Cart Totals Sidebar ---- */
.cart-totals {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px;
    position: sticky;
    top: 140px;
}

.ct-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-body);
}

.ct-row>span:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.ct-val {
    font-weight: 600;
    color: var(--text-dark);
}

/* Shipping Options */
.ct-shipping {
    flex-direction: column;
    gap: 12px;
}

.ct-shipping>span:first-child {
    font-weight: 600;
    color: var(--text-dark);
}

.ct-shipping-options {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.shipping-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    transition: all var(--transition);
    font-size: 13px;
}

.shipping-option:hover {
    border-color: var(--primary);
}

.shipping-option input {
    display: none;
}

.so-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--transition);
}

.shipping-option input:checked~.so-radio {
    border-color: var(--primary);
}

.shipping-option input:checked~.so-radio::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.shipping-option input:checked~.so-label {
    color: var(--primary);
    font-weight: 600;
}

.so-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-body);
}

.so-price {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 13px;
}

.shipping-note {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
    padding-left: 4px;
}

.ct-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--cta));
    border-radius: 2px;
    margin: 4px 0;
}

/* Total Row */
.ct-total-row {
    border-bottom: none;
    padding: 18px 0;
}

.ct-total-row span:first-child {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
}

.ct-total-val {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.5px;
}

/* Checkout Button */
.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--cta) 0%, #c41920 100%);
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .8px;
    box-shadow: 0 6px 20px rgba(234, 29, 34, .25);
    transition: all var(--transition);
    margin-bottom: 18px;
}

.btn-checkout:hover {
    box-shadow: 0 8px 30px rgba(234, 29, 34, .35);
    transform: translateY(-2px);
}

.btn-checkout i {
    font-size: 13px;
    opacity: .85;
}

/* Security Badges */
.ct-secure {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.secure-badges {
    display: flex;
    gap: 16px;
}

.secure-badges span {
    font-size: 11px;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 5px;
}

.secure-badges i {
    font-size: 14px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    font-size: 26px;
    color: rgba(0, 0, 0, .2);
}

.payment-methods i {
    transition: color var(--transition);
}

.payment-methods i:hover {
    color: var(--primary);
}

/* Continue Shopping */
.ct-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-top: 16px;
    transition: gap var(--transition);
}

.ct-continue:hover {
    gap: 12px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-totals {
        position: static;
    }
}

@media (max-width: 768px) {
    .ct-header {
        display: none;
    }

    .ct-item {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
        padding: 20px;
    }

    .ct-product {
        width: 100%;
    }

    .ct-price,
    .ct-qty,
    .ct-subtotal {
        flex: 1;
    }

    .ct-price::before {
        content: 'Price: ';
        font-size: 11px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        display: block;
        margin-bottom: 4px;
    }

    .ct-subtotal::before {
        content: 'Subtotal: ';
        font-size: 11px;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        display: block;
        margin-bottom: 4px;
    }

    .ct-remove {
        position: absolute;
        top: 16px;
        right: 16px;
    }

    .ct-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .coupon-wrap {
        flex-direction: column;
    }

    .coupon-wrap input {
        width: 100%;
    }

    .ct-action-btns {
        flex-direction: column;
    }

    .cart-progress {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .cart-section {
        padding: 24px 0 40px;
    }

    .ct-product-img {
        width: 64px;
        height: 64px;
    }

    .cart-totals {
        padding: 20px;
    }
}