/* Shopping Cart Styles */

.cart-layout {
    padding-top: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto; /* Allow scrolling on pages with tall content */
}

.cart-title {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.cart-content {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.cart-items-section {
    flex: 1;
}

.cart-header {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    color: var(--text-medium);
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.col-product { flex: 2; }
.col-price { flex: 1; text-align: center; }
.col-qty { flex: 1; text-align: center; }
.col-total { flex: 1; text-align: right; }

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-info img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 5px;
}

.details h3 {
    font-size: 15px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.part-no {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.stock-status {
    font-size: 11px;
}
.in-stock { color: #f1c40f; } /* matches image yellow */
.low-stock { color: #f39c12; }

.item-price {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.qty-control button {
    width: 30px;
    height: 30px;
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-medium);
}

.qty-control button:hover {
    background: #eee;
}

.qty-control input {
    width: 40px;
    height: 30px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: 14px;
}

.item-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.delete-btn {
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
    transition: color 0.2s;
}

.delete-btn:hover {
    color: #ff4757;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-medium);
    text-decoration: none;
    font-size: 14px;
    margin-top: 20px;
}

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

/* Order Summary */
.order-summary-section {
    width: 350px;
    flex-shrink: 0;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.summary-card h3 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--text-dark);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 15px;
}

.summary-row .val {
    color: var(--text-dark);
    font-weight: 500;
}

.promo-code {
    margin: 25px 0;
    padding-top: 25px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
}

.promo-code p {
    font-size: 13px;
    color: var(--text-medium);
    margin-bottom: 10px;
}

.promo-input {
    display: flex;
}

.promo-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 13px;
    outline: none;
}

.promo-input button {
    padding: 0 20px;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
}

.summary-total .total-val {
    font-size: 24px;
    color: var(--primary-yellow);
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--primary-yellow);
    color: #333;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.checkout-btn:hover {
    background: #e6ac00;
}

.secure-checkout {
    text-align: center;
}

.secure-checkout p {
    font-size: 12px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.text-success { color: #2ecc71; }

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 24px;
    color: #bdc3c7;
}

/* Recommended */
.recommended-section {
    margin-top: 40px;
}

.recommended-section h2 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 25px;
}

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

.rec-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.discount-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff4757;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
}

.rec-item img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.rec-item h4 {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 15px;
    flex: 1;
}

.rec-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rec-price {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
}

.add-btn {
    width: 35px;
    height: 35px;
    background: #fff8e1;
    border: none;
    border-radius: 50%;
    color: var(--primary-yellow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

@media (max-width: 992px) {
    .cart-content {
        flex-direction: column;
    }
    .order-summary-section {
        width: 100%;
    }
    .recommended-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .item-total {
        width: 100%;
        justify-content: space-between;
    }
    .recommended-grid {
        grid-template-columns: 1fr;
    }
}
