/* ========================================
   CART PAGE STYLES
   ======================================== */

/* Cart Header */
.cart-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 60px 0;
    text-align: center;
}

.cart-header h1 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 10px;
}

.cart-header h1 i {
    margin-right: 15px;
    color: var(--accent-color);
}

.cart-header p {
    color: rgba(255, 255, 255, 0.8);
}

/* Cart Section */
.cart-section {
    padding: 40px 0 60px;
}

.cart-wrapper-page {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

/* Cart Items Container */
.cart-items-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.cart-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--light-gray);
}

.cart-items-header h2 {
    font-size: 1.3rem;
    color: var(--dark-color);
}

.clear-cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.clear-cart-btn:hover {
    background: var(--accent-color);
    color: white;
}

/* Cart Items List */
.cart-items-list {
    padding: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 25px;
    border-bottom: 1px solid var(--light-gray);
    transition: var(--transition);
}

.cart-item:hover {
    background: var(--light-color);
}

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

.item-image {
    width: 100px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--light-gray);
}

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

.item-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.item-details h3 a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.item-details h3 a:hover {
    color: var(--primary-color);
}

.item-price {
    font-size: 0.9rem;
    color: var(--gray-color);
}

/* Quantity Controls */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.qty-input {
    width: 50px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    background: white;
}

.item-total {
    text-align: right;
}

.total-label {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.total-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.item-remove {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.item-remove:hover {
    color: var(--accent-hover);
    transform: scale(1.1);
}

/* Continue Shopping */
.continue-shopping {
    padding: 20px 25px;
    border-top: 1px solid var(--light-gray);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--gray-color);
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-top: 15px;
}

.summary-row.total span:last-child {
    color: var(--primary-color);
}

.summary-divider {
    height: 1px;
    background: var(--light-gray);
    margin: 15px 0;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-large {
    padding: 16px 30px;
    font-size: 1rem;
}

/* Payment Methods */
.payment-methods {
    margin-top: 20px;
    text-align: center;
}

.payment-methods p {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1.8rem;
    color: var(--gray-color);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.empty-cart-icon {
    font-size: 5rem;
    color: var(--light-gray);
    margin-bottom: 25px;
}

.empty-cart h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.empty-cart p {
    color: var(--gray-color);
    margin-bottom: 25px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Recommended Section */
.recommended-section {
    padding: 40px 0 60px;
    background: var(--light-color);
}

.recommended-section .section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: var(--dark-color);
}

.recommended-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.recommended-item {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.recommended-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow);
}

.recommended-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.recommended-item h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.recommended-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

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

/* ========================================
   RESPONSIVE CART
   ======================================== */
@media (max-width: 992px) {
    .cart-wrapper-page {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
}

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

    .item-total {
        grid-column: 2;
        text-align: left;
    }

    .item-remove {
        grid-column: 3;
        grid-row: 1;
    }

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

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

    .item-image {
        width: 60px;
        height: 60px;
    }

    .item-quantity {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .item-total {
        grid-column: 2;
    }

    .item-remove {
        grid-column: 2;
        grid-row: auto;
        justify-self: end;
    }
}
