/* ===== CART PAGE STYLES ===== */

.cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* ===== Page Header ===== */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 400;
    color: #2d3e50;
    margin-bottom: 8px;
}

.page-header h1 span {
    font-weight: 600;
    color: #00bcd4;
}

.page-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* ===== Cart Container ===== */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

/* ===== Cart Items ===== */
.cart-items {
    background: white;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    overflow: hidden;
}

/* Cart Header */
.cart-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #edf2f7;
    font-weight: 600;
    color: #2d3e50;
    font-size: 0.9rem;
}

/* Cart Item */
.cart-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1fr 0.5fr;
    padding: 20px;
    border-bottom: 1px solid #edf2f7;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Product Info */
.item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-product img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: #f8fafc;
}

.item-details h4 {
    color: #2d3e50;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.item-details .item-category {
    color: #8f9bb3;
    font-size: 0.85rem;
}

/* Price */
.item-price {
    color: #2d3e50;
    font-weight: 500;
}

/* Quantity */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #edf2f7;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #00bcd4;
    border-color: #00bcd4;
    color: white;
}

.item-quantity input {
    width: 45px;
    height: 35px;
    text-align: center;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    font-size: 0.95rem;
}

.item-quantity input::-webkit-inner-spin-button,
.item-quantity input::-webkit-outer-spin-button {
    opacity: 1;
    height: 20px;
}

/* Total */
.item-total {
    font-weight: 600;
    color: #00bcd4;
}

/* Remove Button */
.remove-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #edf2f7;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    color: #ff4d4d;
}

.remove-btn:hover {
    background: #ff4d4d;
    border-color: #ff4d4d;
    color: white;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
}

.continue-shopping,
.update-cart {
    padding: 10px 20px;
    border: 1px solid #edf2f7;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.continue-shopping:hover {
    background: #2d3e50;
    color: white;
    border-color: #2d3e50;
}

.update-cart:hover {
    background: #00bcd4;
    color: white;
    border-color: #00bcd4;
}

/* ===== Cart Summary ===== */
.cart-summary {
    background: white;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    padding: 25px;
    height: fit-content;
}

.cart-summary h3 {
    color: #2d3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf2f7;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 0.95rem;
}

.summary-row.total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #edf2f7;
    font-weight: 700;
    color: #2d3e50;
    font-size: 1.1rem;
}

.summary-value {
    font-weight: 500;
    color: #2d3e50;
}

.total .summary-value {
    color: #00bcd4;
    font-size: 1.2rem;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #00bcd4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkout-btn:hover {
    background: #0097a7;
}

/* Promo Code */
.promo-code h4 {
    color: #2d3e50;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.promo-input {
    display: flex;
    gap: 10px;
}

.promo-input input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #edf2f7;
    border-radius: 6px;
    font-size: 0.9rem;
}

.promo-input input:focus {
    outline: none;
    border-color: #00bcd4;
}

.apply-btn {
    padding: 10px 20px;
    background: #2d3e50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.apply-btn:hover {
    background: #00bcd4;
}

/* Payment Methods */
.payment-methods {
    margin-top: 20px;
    text-align: center;
}

.payment-methods p {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.payment-icons i {
    font-size: 1.8rem;
    color: #8f9bb3;
    transition: 0.2s;
}

.payment-icons i:hover {
    color: #00bcd4;
}

/* ===== Recently Viewed ===== */
.recently-viewed h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #2d3e50;
    margin-bottom: 20px;
}

.recently-viewed h3 span {
    font-weight: 600;
    color: #00bcd4;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.recent-item {
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    text-align: center;
    transition: 0.2s;
}

.recent-item:hover {
    transform: translateY(-3px);
    border-color: #00bcd4;
}

.recent-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
}

.recent-item h4 {
    color: #2d3e50;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.recent-price {
    color: #00bcd4;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .cart-container {
        grid-template-columns: 1.5fr 1fr;
    }
}

@media (max-width: 900px) {
    .cart-container {
        grid-template-columns: 1fr;
    }

    .recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 30px 15px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .cart-header {
        display: none;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 15px;
        position: relative;
        padding: 20px 15px;
    }

    .item-product {
        flex-direction: column;
        text-align: center;
    }

    .item-price,
    .item-quantity,
    .item-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }

    .item-price::before {
        content: "Price:";
        font-weight: 600;
        color: #6c757d;
    }

    .item-quantity::before {
        content: "Quantity:";
        font-weight: 600;
        color: #6c757d;
    }

    .item-total::before {
        content: "Total:";
        font-weight: 600;
        color: #6c757d;
    }

    .item-remove {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }

    .continue-shopping,
    .update-cart {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .recent-grid {
        grid-template-columns: 1fr;
    }
}