/* 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); }


/* ── Feedback Popup ───────────────────────────────────── */
.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(30, 61, 41, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
    animation: feedbackFadeIn 0.35s ease;
}
.feedback-overlay.hidden { display: none; }

@keyframes feedbackFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.feedback-modal {
    background: #fdfcfa;
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 60px rgba(45, 90, 61, 0.2);
    animation: feedbackSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes feedbackSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.feedback-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-close:hover { color: #333; background: #f0f0f0; }

.feedback-icon {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.feedback-modal h2 {
    font-family: var(--heading-font);
    font-size: 1.6rem;
    color: var(--primary-green);
    margin: 0 0 0.5rem;
    font-weight: 500;
}

.feedback-modal p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

/* Stars */
.feedback-stars {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.star-btn {
    background: none;
    border: none;
    font-size: 2.2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    padding: 0 2px;
    line-height: 1;
}
.star-btn:hover,
.star-btn.active { color: #f9c74f; }
.star-btn:hover  { transform: scale(1.2); }

.feedback-star-label {
    font-size: 0.85rem;
    color: var(--primary-green);
    font-weight: 600;
    min-height: 1.2em;
    margin: 0 0 1.2rem;
}

/* Suggestion textarea */
.feedback-suggestion-wrap {
    text-align: left;
    margin-bottom: 1.5rem;
}
.feedback-suggestion-wrap label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}
.feedback-suggestion-wrap textarea {
    width: 100%;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: var(--body-font);
    font-size: 0.9rem;
    color: #333;
    resize: vertical;
    transition: border-color 0.2s;
    background: #fff;
    box-sizing: border-box;
}
.feedback-suggestion-wrap textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

/* Buttons */
.feedback-submit {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary-green), #1e3d29);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: var(--body-font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(45, 90, 61, 0.25);
    margin-bottom: 0.75rem;
}
.feedback-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.feedback-submit:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(45, 90, 61, 0.3); }

.feedback-skip {
    background: none;
    border: none;
    color: #aaa;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: var(--body-font);
    transition: color 0.2s;
    padding: 0.25rem;
}
.feedback-skip:hover { color: #666; }

.feedback-step.hidden { display: none; }

/* Responsive */
@media (max-width: 480px) {
    .feedback-modal { padding: 2rem 1.5rem 1.5rem; }
    .star-btn { font-size: 1.9rem; }
}

/* ── 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-header {
        padding: 104px 0 48px;
        margin-top: 0;
    }

    .cart-header h1 {
        font-size: 2.35rem;
    }

    .cart-content {
        padding: 40px 0 56px;
    }

    .summary-content {
        padding: 1.35rem;
    }

    .cart-item {
        grid-template-columns: 1fr auto;
        padding: 1rem;
        gap: 0.85rem;
    }

    .item-image { display: none; }
    .item-details { grid-column: 1 / 3; }
    .item-quantity {
        grid-column: 1;
        width: fit-content;
        max-width: 100%;
    }
    .item-total {
        grid-column: 2;
        justify-self: end;
        min-width: 0;
    }
    .remove-item {
        grid-column: 2;
        justify-self: end;
        align-self: start;
    }
    .checkout-btn,
    .continue-shopping-link {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
