/**
 * HaroldHarvey - Cart Page Styles
 */

/* ========================================
   Cart Layout
   ======================================== */
.cart-section {
    padding: var(--space-xl) 0 var(--space-2xl);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-xl);
    align-items: start;
}

/* ========================================
   Empty Cart
   ======================================== */
.cart-empty {
    text-align: center;
    padding: var(--space-2xl) 0;
}

.empty-icon {
    color: var(--color-border);
    margin-bottom: var(--space-md);
}

.cart-empty h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: var(--space-xs);
}

.cart-empty p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
}

/* ========================================
   Cart Header
   ======================================== */
.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

/* ========================================
   Cart Items
   ======================================== */
.cart-items {
    border-bottom: 1px solid var(--color-border);
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-sm);
    align-items: center;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--color-border);
}

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

.item-product {
    display: flex;
    gap: var(--space-sm);
}

.item-product img {
    width: 100px;
    height: 120px;
    object-fit: cover;
    background: var(--color-background);
}

.item-details h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.item-details h4 a:hover {
    color: var(--color-secondary);
}

.item-size {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.item-remove {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.item-remove:hover {
    color: #c00;
}

.item-price,
.item-total {
    font-weight: 500;
}

.item-total {
    font-weight: 600;
}

/* Quantity Control in Cart */
.item-qty .qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    width: fit-content;
}

.item-qty .qty-control button {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
    font-size: 1rem;
    transition: background var(--transition-fast);
}

.item-qty .qty-control button:hover {
    background: var(--color-border);
}

.item-qty .qty-control span {
    width: 40px;
    text-align: center;
    font-weight: 500;
}

/* ========================================
   Cart Actions
   ======================================== */
.cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
}

.btn-continue {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.btn-continue:hover {
    color: var(--color-primary);
}

.btn-clear {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

.btn-clear:hover {
    color: #c00;
}

/* ========================================
   Cart Sidebar
   ======================================== */
.cart-sidebar {
    position: sticky;
    top: 100px;
}

.summary-box {
    background: var(--color-background);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.summary-box h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.summary-row.discount {
    color: #2a9d3e;
}

.summary-divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-sm) 0;
}

.summary-row.total {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: var(--color-primary);
    color: white;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: var(--space-md);
    transition: background var(--transition-base);
}

.btn-checkout:hover {
    background: var(--color-secondary);
}

.payment-icons {
    margin-top: var(--space-md);
    text-align: center;
}

.payment-icons span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-xs);
}

.payment-icons .icons {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
}

/* Promo Box */
.promo-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.promo-box label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.promo-input {
    display: flex;
    gap: 0.5rem;
}

.promo-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.promo-input button {
    padding: 0.75rem 1rem;
    background: var(--color-primary);
    color: white;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background var(--transition-fast);
}

.promo-input button:hover {
    background: var(--color-secondary);
}

.promo-message {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.promo-message.success {
    color: #2a9d3e;
}

.promo-message.error {
    color: #c00;
}

/* Help Box */
.help-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: var(--space-md);
}

.help-box h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.help-box p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.help-box a {
    color: var(--color-secondary);
    text-decoration: underline;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        position: static;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .cart-header {
        display: none;
    }
    
    .cart-item {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        padding: var(--space-md);
        background: var(--color-background);
        margin-bottom: var(--space-sm);
    }
    
    .item-product {
        flex-direction: column;
    }
    
    .item-product img {
        width: 100%;
        height: 200px;
    }
    
    .item-price::before {
        content: 'Price: ';
        color: var(--color-text-muted);
    }
    
    .item-qty::before {
        content: 'Quantity: ';
        color: var(--color-text-muted);
        display: block;
        margin-bottom: 0.3rem;
    }
    
    .item-total::before {
        content: 'Total: ';
        color: var(--color-text-muted);
    }
}
