/* Cart Page Specific Styles */

.cart-header {
    background: var(--bg-light);
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 74px;
}

.cart-header h1 {
    font-size: 3.5rem;
}

/* Cart Content */
.cart-content {
    padding: 80px 0;
    background: white;
    min-height: 60vh;
}

#cart-items-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.cart-items {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1.5rem;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 15px;
}

.item-details h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.item-details p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--body-font);
    color: var(--primary-green);
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--bg-light);
    border-radius: 25px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
}

.quantity-btn {
    background: white;
    color: var(--primary-green);
    border: 1px solid var(--border-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
}

.quantity {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
    font-family: var(--body-font);
}

.item-total {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--body-font);
    color: var(--primary-green);
    text-align: right;
    min-width: 80px;
}

.remove-item {
    background: transparent;
    color: #aaa;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    line-height: 1;
}

.remove-item:hover {
    background: #ff6b6b;
    color: white;
    transform: rotate(90deg);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 20px;
}

.empty-cart h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Cart Summary */
.cart-summary {
    background: var(--bg-light);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 110px;
}

.summary-content {
    padding: 2rem;
}

.summary-content h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem 0;
    /* border-bottom: 1px solid #eee; */ /* Removed default border */
}

.summary-row.total {
    border-top: 1px solid #eee;
    font-weight: bold;
}

.summary-content > .summary-row:first-of-type {
    margin-top: 1px;
}

.summary-row:last-of-type {
    border-bottom: none;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.shipping-message {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 10px;
    padding: 1rem;
    margin: -1rem 0 1.5rem 0;
    text-align: center;
}

.shipping-message p {
    color: #0066cc;
    margin: 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.checkout-btn {
    display: inline-block;
    width: 100%;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-green), #1e3d29);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    margin-bottom: 1rem;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 15px rgba(45, 90, 61, 0.2);
    cursor: pointer;
    font-family: var(--body-font);
    font-size: 1rem;
    text-align: center;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.checkout-btn:hover::before {
    width: 300px;
    height: 300px;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 90, 61, 0.25);
    background: linear-gradient(135deg, #1e3d29, var(--primary-green));
}

.continue-shopping-link {
    display: block;
    text-align: center;
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-green);
    border-radius: 50px;
    font-weight: 500;
    margin-top: 0.5rem;
    background: transparent;
}

.continue-shopping-link:hover {
    background: var(--primary-green);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(45, 90, 61, 0.2);
}

/* Checkout Modal */
.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.checkout-modal .modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease;
    position: relative;
    padding: 2.5rem;
    text-align: center;
}

.checkout-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
}
.checkout-modal .close-modal:hover { color: var(--text-dark); transform: rotate(90deg); }

.checkout-modal h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.checkout-modal p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.order-summary {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.order-summary h3 { margin-bottom: 1.5rem; }

.checkout-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.checkout-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.checkout-actions { display: flex; flex-direction: column; gap: 1rem; }
.demo-checkout, .cancel-checkout { padding: 1rem; border-radius: 30px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border: 1px solid; font-family: var(--body-font); }
.demo-checkout { background: var(--primary-green); color: white; border-color: var(--primary-green); }
.demo-checkout:hover { background: #1e3d29; border-color: #1e3d29; }
.cancel-checkout { background: transparent; color: var(--text-light); border-color: var(--border-color); }
.cancel-checkout:hover { color: var(--primary-green); border-color: var(--primary-green); }


/* Responsive Design */
@media (max-width: 992px) {
    #cart-items-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 80px 1fr auto;
        grid-template-rows: auto auto;
        row-gap: 1rem;
    }
    
    .item-image { grid-row: 1 / 3; }
    
    .item-details { grid-column: 2 / 4; }
    
    .item-quantity, .item-total, .remove-item {
        grid-row: 2;
    }

    .item-quantity { grid-column: 2; }
    .item-total { grid-column: 3; justify-self: end; }
}

@media (max-width: 480px) {
     .cart-item {
        grid-template-columns: 1fr auto;
        padding: 1rem;
    }
    .item-image { display: none; }
    .item-details { grid-column: 1 / 3; }
}