/**
 * Fold/Cart Page Styles
 */

.fold-page {
    padding-top: 120px;
    padding-bottom: 6rem;
    min-height: 60vh;
}

.page-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 2.5rem;
    text-align: center;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 0;
    max-width: 400px;
    margin: 0 auto;
}

.empty-icon {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.empty-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.empty-text {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Cart Grid */
.cart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

@media (max-width: 1024px) {
    .cart-grid {
        grid-template-columns: 1fr;
    }
}

/* Cart Items */
.cart-items {
    background-color: white;
    border: 1px solid #eee;
}

.cart-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background-color: var(--background);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
}

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

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    align-items: center;
    border-bottom: 1px solid #eee;
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Item Product */
.item-product {
    display: flex;
    gap: 1rem;
}

.item-image {
    width: 80px;
    height: 80px;
    background-color: var(--background);
    flex-shrink: 0;
}

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

.item-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
}

.item-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.item-name {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.item-name a {
    color: var(--primary);
    text-decoration: none;
}

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

.item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    text-align: left;
}

.item-remove:hover {
    color: var(--error);
}

/* Item Price */
.item-price {
    font-weight: 500;
}

@media (max-width: 768px) {
    .item-price {
        display: none;
    }
}

/* Item Quantity */
.item-qty .quantity-input {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
}

.item-qty .qty-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--primary);
}

.item-qty input {
    width: 40px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 0.9375rem;
    -moz-appearance: textfield;
}

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

/* Item Total */
.item-total {
    font-weight: 600;
    text-align: right;
}

@media (max-width: 768px) {
    .item-total {
        text-align: left;
    }
}

/* Cart Summary */
.cart-summary {
    background-color: var(--background);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

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

.summary-row.total {
    border-top: 2px solid var(--primary);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.free-shipping {
    color: var(--success);
}

/* Free Shipping Notice */
.free-shipping-notice {
    padding: 1rem;
    background-color: rgba(45, 74, 62, 0.1);
    margin: 1rem 0;
    border-radius: 4px;
}

.free-shipping-notice p {
    font-size: 0.875rem;
    color: var(--success);
    margin-bottom: 0.75rem;
}

.progress-bar {
    height: 4px;
    background-color: rgba(45, 74, 62, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--success);
    transition: width 0.3s ease;
}

/* Checkout Button */
.btn-checkout {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.25rem;
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--text-light);
    text-decoration: underline;
}

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

@media (max-width: 1024px) {
    .cart-summary {
        position: static;
    }
}
