/* ===============================================
   CART PAGE STYLES - Generatorz Theme
   =============================================== */

/* Page Banner */
.page-banner {
    border-bottom: 1px solid #e2e8f0;
}

.page-banner .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.page-banner .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
    transition: color 150ms ease;
}

.page-banner .breadcrumb-item a:hover {
    color: #e5002b;
}

.page-banner .breadcrumb-item.active {
    color: #0f172a;
}

.page-banner .breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #94a3b8;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
}

.page-title i {
    color: #e5002b;
}

/* Cart Items Card */
.cart-items-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.cart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to bottom, #fafafa, white);
}

.cart-card-header h5 {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
}

.cart-card-header .item-count {
    color: #64748b;
    font-weight: 500;
}

.btn-clear-cart {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 200ms ease;
}

.btn-clear-cart:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Cart Items */
.cart-items-list {
    padding: 8px 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 150ms ease;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item:hover {
    background-color: #fafafa;
}

.cart-item-image {
    width: 100px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
}

.cart-item-info {
    min-width: 0;
}

.cart-item-title {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 150ms ease;
}

.cart-item-title:hover {
    color: #e5002b;
}

.cart-item-price-mobile {
    margin-top: 8px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 150ms ease;
}

.qty-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.qty-btn:active {
    background: #cbd5e1;
}

.qty-input {
    width: 50px;
    height: 40px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Price Columns */
.cart-item-price,
.cart-item-total {
    text-align: right;
    min-width: 100px;
}

.unit-price {
    font-size: 0.95rem;
    color: #64748b;
}

.total-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e5002b;
}

/* Remove Button */
.btn-remove-item {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 150ms ease;
}

.btn-remove-item:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Continue Shopping */
.btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 12px;
    transition: all 200ms ease;
}

.btn-continue:hover {
    color: #e5002b;
    background: rgba(229, 0, 43, 0.05);
}

/* Cart Summary Card */
.cart-summary-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

/* Prevent sticky summary from overlapping the fixed header */
.cart-summary-card.sticky-top {
    top: calc(var(--header-height, 100px) + 20px) !important;
    z-index: 1; /* keep below header */
}

.summary-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(to bottom, #fafafa, white);
}

.summary-header h5 {
    font-weight: 700;
    color: #0f172a;
    font-size: 1.1rem;
}

.summary-body {
    padding: 20px 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
    color: #475569;
}

.summary-row:last-child {
    border-bottom: none;
}

.total-row {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid #e2e8f0;
    border-bottom: none;
}

.total-row span:first-child {
    font-weight: 600;
    color: #0f172a;
    font-size: 1rem;
}

.total-row strong {
    font-size: 1.5rem;
    color: #e5002b;
}

.summary-footer {
    padding: 20px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

.btn-request-quote {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #e5002b 0%, #ff3d5a 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 250ms ease;
    box-shadow: 0 4px 15px rgba(229, 0, 43, 0.35);
}

.btn-request-quote:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 0, 43, 0.45);
    color: white;
}

.quote-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.quote-info i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Trust Badges */
.trust-badges {
    padding: 20px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #475569;
    font-size: 0.9rem;
}

.badge-item i {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* Empty Cart */
.empty-cart-container {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cart {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
    max-width: 480px;
}

.empty-cart-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.empty-cart-icon i {
    font-size: 3.5rem;
    color: #94a3b8;
}

.empty-cart h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}

.empty-cart p {
    color: #64748b;
    margin-bottom: 28px;
    font-size: 1rem;
    line-height: 1.6;
}

.btn-browse {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #e5002b 0%, #ff3d5a 100%);
    color: white;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 250ms ease;
    box-shadow: 0 4px 15px rgba(229, 0, 43, 0.35);
}

.btn-browse:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 0, 43, 0.45);
    color: white;
}

/* Removing animation */
.cart-item.removing {
    opacity: 0;
    transform: translateX(50px);
    transition: all 300ms ease;
}

/* Loading state */
.cart-item.updating {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
        gap: 12px 16px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 70px;
        grid-row: span 2;
    }
    
    .cart-item-info {
        grid-column: 2;
    }
    
    .cart-item-quantity,
    .cart-item-total,
    .btn-remove-item {
        grid-column: 2;
    }
    
    .cart-item-price {
        display: none !important;
    }
    
    .quantity-control,
    .cart-item-total,
    .btn-remove-item {
        display: inline-flex;
    }
    
    .cart-item > *:nth-child(n+3) {
        grid-column: 2;
    }
    
    .cart-item {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cart-item-image {
        flex-shrink: 0;
    }
    
    .cart-item-info {
        flex: 1;
        min-width: 150px;
    }
    
    .cart-item-quantity {
        order: 3;
    }
    
    .cart-item-total {
        order: 4;
        flex: 1;
        text-align: right;
    }
    
    .btn-remove-item {
        order: 5;
    }
}

@media (max-width: 575.98px) {
    .cart-card-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .btn-clear-cart {
        width: 100%;
        justify-content: center;
    }
    
    .cart-item {
        padding: 16px;
    }
    
    .quantity-control {
        transform: scale(0.9);
        transform-origin: left center;
    }
    
    .page-title {
        font-size: 1.4rem;
    }
    
    .total-row strong {
        font-size: 1.25rem;
    }
    
    .summary-footer {
        padding: 16px;
    }
}

/* Toast notifications */
.cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-toast.success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.cart-toast.error {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
}

.cart-toast i {
    font-size: 1.25rem;
}

@media (max-width: 575.98px) {
    .cart-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}

