/* ===================================
   CART PAGE MODERN DESIGN
   Theme: Orange Gradient #FF6B35 → #F7931E
   Matches sidebar cart design language
   =================================== */

/* ===================================
   PAGE LAYOUT
   =================================== */
.cart-page-modern {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 30px 0 60px;
    background: #f8f9fa;
    min-height: 60vh;
}

.cart-page-modern .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===================================
   PAGE HEADER with gradient accent
   =================================== */
.cart-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) 1;
}

.cart-page-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1f1f1f;
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.5px;
}

.cart-count-badge {
    background: var(--cart-gradient, linear-gradient(135deg, #FF6B35 0%, #F7931E 100%));
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ===================================
   FREE SHIPPING PROGRESS BAR
   =================================== */
.cart-promo-bar {
    background: linear-gradient(135deg, #FFF9F0 0%, #FFFFFF 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.cart-promo-bar .promo-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.5;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-promo-bar .promo-amount {
    color: #E55A2B;
    font-weight: 700;
}

.cart-promo-bar .promo-highlight {
    color: #FF6B35;
    font-weight: 700;
}

.cart-promo-bar .promo-success {
    color: #FF6B35;
    font-weight: 600;
}

.cart-promo-bar .progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.cart-promo-bar .progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(255, 107, 53, 0.35);
}

.cart-promo-bar .byd-promo {
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #1f1f1f;
    margin: 0;
    text-align: center;
    line-height: 1.6;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-promo-bar .byd-icon {
    font-size: 16px;
    margin-right: 4px;
}

.cart-promo-bar .tc-text {
    color: #6b7280;
    font-size: 11px;
    font-style: italic;
}

/* ===================================
   TWO-COLUMN LAYOUT
   =================================== */
.cart-page-columns {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* ===================================
   CART ITEMS COLUMN
   =================================== */
.cart-items-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cart-items-header {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-items-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-items-header .items-count {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-items-list {
    padding: 20px;
}

/* ===================================
   INDIVIDUAL CART ITEM CARD
   =================================== */
.cart-item-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    position: relative;
    transition: all 0.25s ease;
}

.cart-item-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 107, 53, 0.25);
    transform: translateY(-2px);
}

.cart-item-card:last-child {
    margin-bottom: 0;
}

/* Product Image */
.cart-item-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f7;
    border: 1px solid #e5e7eb;
}

.cart-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item-card:hover .cart-item-image img {
    transform: scale(1.05);
}

/* Product Info */
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f1f1f;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-item-name:hover {
    color: #FF6B35;
}

.cart-item-meta {
    font-size: 12px;
    color: #6b7280;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.5;
}

.cart-item-meta a {
    color: #FF6B35;
    text-decoration: none;
}

.cart-item-meta a:hover {
    text-decoration: underline;
}

.cart-item-attributes {
    font-size: 12px;
    color: #6b7280;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.stock-status-label {
    color: #ef4444;
    font-weight: 600;
    font-size: 12px;
}

/* Price & Qty Row */
.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 12px;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-price .current-price {
    font-size: 18px;
    font-weight: 700;
    color: #E55A2B;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-item-price .original-price {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Modern Quantity Selector */
.cart-qty-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
    transition: border-color 0.2s ease;
}

.cart-qty-selector:focus-within {
    border-color: #FF6B35;
}

.cart-qty-selector .qty-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-qty-selector .qty-btn:hover {
    background: #FF6B35;
    color: #fff;
}

.cart-qty-selector .qty-input {
    width: 50px;
    height: 36px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #1f1f1f;
    background: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -moz-appearance: textfield;
}

.cart-qty-selector .qty-input::-webkit-outer-spin-button,
.cart-qty-selector .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Line Total */
.cart-item-total {
    font-size: 18px;
    font-weight: 700;
    color: #1f1f1f;
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
}

/* Remove Button */
.cart-item-remove {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f5f5f7;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #9ca3af;
    font-size: 12px;
    text-decoration: none;
}

.cart-item-remove:hover {
    background: rgba(255, 107, 53, 0.12);
    color: #E55A2B;
    border-color: rgba(255, 107, 53, 0.3);
    transform: rotate(90deg);
}

/* Cart Actions Row */
.cart-actions-row {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-update-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #1f1f1f;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-update-cart:hover {
    background: #1f1f1f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-continue-shop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #FF6B35;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-continue-shop:hover {
    color: #E55A2B;
    transform: translateX(-3px);
}

.btn-continue-shop i {
    transition: transform 0.2s ease;
}

.btn-continue-shop:hover i {
    transform: translateX(-3px);
}

/* ===================================
   RIGHT COLUMN - SUMMARY
   =================================== */
.cart-summary-column {
    position: sticky;
    top: 80px;
}

/* Coupon Card */
.cart-coupon-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cart-coupon-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0 0 16px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-coupon-card h4 svg {
    color: #FF6B35;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
}

.coupon-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #1f1f1f;
    background: #f9fafb;
    transition: border-color 0.2s ease;
    outline: none;
}

.coupon-input-group input:focus {
    border-color: #FF6B35;
    background: #fff;
}

.coupon-input-group input::placeholder {
    color: #9ca3af;
}

.btn-apply-coupon {
    padding: 12px 20px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    white-space: nowrap;
}

.btn-apply-coupon:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Applied coupon */
.applied-coupon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #FFF5E6 0%, #FFE8CC 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 53, 0.2);
}

.applied-coupon-code {
    font-size: 13px;
    font-weight: 600;
    color: #E55A2B;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.applied-coupon .btn-remove-coupon {
    font-size: 12px;
    color: #ef4444;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
}

.applied-coupon .btn-remove-coupon:hover {
    color: #dc2626;
}

/* Order Summary Card */
.cart-summary-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cart-summary-header {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    padding: 16px 24px;
}

.cart-summary-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-summary-body {
    padding: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row .label {
    font-size: 14px;
    color: #6b7280;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.summary-row .value {
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.summary-row.discount .value {
    color: #FF6B35;
}

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 6px;
    margin-top: 8px;
    border-top: 3px solid transparent;
    border-image: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) 1;
}

.summary-total-row .label {
    font-size: 18px;
    font-weight: 700;
    color: #1f1f1f;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.summary-total-row .value {
    font-size: 22px;
    font-weight: 800;
    color: #1f1f1f;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.shipping-note {
    font-size: 12px;
    color: #9ca3af;
    margin: 4px 0 0 0;
    text-align: right;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Checkout Button */
.cart-summary-actions {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-cart-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.03em;
}

.btn-cart-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    color: #fff;
}

.btn-cart-checkout svg {
    transition: transform 0.2s ease;
}

.btn-cart-checkout:hover svg {
    transform: translateX(4px);
}

.btn-back-to-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #fff;
    border: 2px solid #1f1f1f;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.btn-back-to-shop:hover {
    background: #1f1f1f;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Secure checkout badge */
.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    font-size: 12px;
    color: #9ca3af;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.secure-badge svg {
    color: #22c55e;
}

/* ===================================
   EMPTY CART STATE
   =================================== */
.cart-empty-state {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.cart-empty-state svg {
    color: #e5e7eb;
    margin-bottom: 20px;
    opacity: 0.6;
}

.cart-empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0 0 8px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-empty-state p {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.cart-empty-state .btn-start-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.cart-empty-state .btn-start-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
    color: #fff;
}

/* ===================================
   CROSS-SELL SECTION
   =================================== */
.cart-page-modern .ps-section--default {
    margin-top: 40px;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 991px) {
    .cart-page-columns {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cart-summary-column {
        position: static;
    }

    .cart-page-header h1 {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .cart-page-modern {
        padding: 20px 0 40px;
    }

    .cart-page-header h1 {
        font-size: 20px;
    }

    .cart-item-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cart-actions-row {
        flex-direction: column;
    }

    .btn-update-cart,
    .btn-continue-shop {
        width: 100%;
        justify-content: center;
    }

    .coupon-input-group {
        flex-direction: column;
    }

    .summary-total-row .value {
        font-size: 20px;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item-card {
    animation: fadeInUp 0.3s ease forwards;
}

.cart-item-card:nth-child(2) { animation-delay: 0.05s; }
.cart-item-card:nth-child(3) { animation-delay: 0.1s; }
.cart-item-card:nth-child(4) { animation-delay: 0.15s; }
.cart-item-card:nth-child(5) { animation-delay: 0.2s; }

/* Remove item transition */
.cart-item-card.removing {
    opacity: 0.4;
    pointer-events: none;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

/* ===================================
   OVERRIDE DEFAULT THEME STYLES
   on .ps-section--shopping
   =================================== */
.cart-page-modern .ps-section--shopping {
    background: transparent;
    padding: 0;
}

.cart-page-modern .ps-breadcrumb {
    display: none;
}
