/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1000px;
    border-radius: 15px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #1a4430;
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal,
.close-cart-modal,
.close-login-modal,
.close-review-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-cart-modal:hover,
.close-login-modal:hover,
.close-review-modal:hover {
    color: #2c5e2e;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

/* Login Modal */
.login-modal-content {
    max-width: 450px;
}

.auth-form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5e2e;
}

.auth-switch {
    text-align: center;
    margin-top: 15px;
    color: #666;
}

.auth-switch a {
    color: #2c5e2e;
    text-decoration: none;
    font-weight: 600;
}

/* Reviews Modal */
.review-modal-content {
    max-width: 800px;
}

.write-review-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.star-rating {
    display: flex;
    gap: 10px;
    font-size: 2rem;
    margin: 10px 0;
}

.star {
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
    user-select: none;
}

.star:hover,
.star.active {
    color: #ffd700;
    transform: scale(1.1);
}

.login-required-section {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

.reviews-display-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
}

.reviews-summary {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #2c5e2e;
}

.rating-stars {
    font-size: 1.5rem;
    color: #ffd700;
}

.review-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.review-rating {
    color: #ffd700;
    font-size: 1.2rem;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #2c5e2e;
    font-weight: 600;
}

.btn-logout {
    padding: 8px 20px;
    background: transparent;
    color: #2c5e2e;
    border: 2px solid #2c5e2e;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-logout:hover {
    background: #2c5e2e;
    color: white;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.btn-view-reviews {
    padding: 10px 20px;
    background: transparent;
    color: #2c5e2e;
    border: 2px solid #2c5e2e;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-view-reviews:hover {
    background: #2c5e2e;
    color: white;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

/* Cart Styles from previous code - keeping existing cart CSS */
.cart-items-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

. qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #2c5e2e;
    background: white;
    color: #2c5e2e;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

.qty-btn:hover {
    background: #2c5e2e;
    color: white;
}

.cart-item-price {
    font-weight: 700;
    color: #2c5e2e;
    font-size: 1.2rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.3rem;
}

.cart-summary {
    border-top: 2px solid #e0e0e0;
    padding-top: 20px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-cart i {
    font-size: 5rem;
    color: #ddd;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #2c5e2e;
    background: transparent;
    color: #2c5e2e;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2c5e2e;
    color: white;
}

.all-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}