/* ==========================================
   PRODUCTS PAGE STYLES
   ========================================== */

/* === PAGE HEADER === */
.page-header {
    background: var(--gradient-primary);
    padding: 5rem 5% 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(212, 175, 55, 0.15) 0%, transparent 50%);
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: white;
    margin-bottom: 1rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* === FILTER SECTION === */
.filter-section {
    background: var(--off-white);
    padding: 2rem 5%;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 85px;
    z-index: 100;
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.8rem;
    border: 2px solid var(--border-light);
    background: white;
    color: var(--text-dark);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === PRODUCTS GRID === */
.all-products {
    padding: 4rem 5%;
    background: var(--cream);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.product-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.product-img-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--cream) 0%, #f0ebe3 100%);
    position: relative;
}

.product-img-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.05));
}

.product-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.product-item:hover .product-img-container img {
    transform: scale(1.12) rotate(2deg);
}

.product-label {
    position: absolute;
    top: 1.2rem;
    left: 1.2rem;
    background: var(--gradient-gold);
    color: var(--dark-brown);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.product-details {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category-tag {
    display: inline-block;
    background: rgba(26, 95, 63, 0.1);
    color: var(--primary-green);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.product-title {
    font-size: 1.6rem;
    color: var(--dark-brown);
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.product-desc {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.product-quality {
    display: flex;
    gap: 0.3rem;
}

.star {
    color: var(--primary-gold);
    font-size: 1.1rem;
}

.product-origin-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.flag-icon {
    font-size: 1.3rem;
}

/* Hide location text, keep only flag */
.product-origin-info>span:not(.flag-icon) {
    display: none;
}

/* === ENQUIRY BUTTON === */
.enquiry-btn {
    width: calc(100% - 4rem);
    margin: 0 2rem 2rem;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}

.enquiry-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #134030 0%, var(--primary-green) 100%);
}

/* === EMPTY STATE === */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.no-products h3 {
    font-size: 2rem;
    color: var(--dark-brown);
    margin-bottom: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .filter-section {
        top: 80px;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 3rem 5% 2rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    .filter-section {
        top: 130px;
        padding: 1.2rem 5%;
    }

    .filter-container {
        justify-content: center;
        gap: 0.8rem;
    }

    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-img-container {
        height: 220px;
    }

    .product-details {
        padding: 1.5rem;
    }

    .product-title {
        font-size: 1.3rem;
    }

    .enquiry-btn {
        width: calc(100% - 3rem);
        margin: 0 1.5rem 1.5rem;
    }
}

/* ==========================================
   INQUIRY MODAL STYLES
   ========================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-gray);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
    line-height: 1;
}

.modal-close:hover {
    background: var(--off-white);
    color: var(--dark-brown);
    transform: rotate(90deg);
}

.modal-title {
    font-size: 2rem;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.modal-subtitle {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--dark-brown);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(26, 95, 63, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-note {
    background: linear-gradient(135deg, rgba(26, 95, 63, 0.05), rgba(212, 175, 55, 0.05));
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-green);
}

.form-note strong {
    color: var(--primary-green);
}

/* Modal Action Buttons */
.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-submit-email,
.btn-whatsapp {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit-email {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-submit-email:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #128C7E, #075E54);
}

.btn-submit-email span,
.btn-whatsapp span {
    font-size: 1.2rem;
}

/* Form Messages */
.form-message {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    display: none;
}

.form-message.success,
.form-message.error,
.form-message.info {
    display: block;
}

.form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 2px solid rgba(34, 197, 94, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 2px solid rgba(239, 68, 68, 0.3);
}

.form-message.info {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    border: 2px solid rgba(59, 130, 246, 0.3);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-container {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .modal-title {
        font-size: 1.6rem;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   BULK QUOTE BUTTON & MODAL
   ========================================== */

/* Bulk Quote Button */
.bulk-quote-btn {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-gold), #c9a227);
    color: var(--dark-brown);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
    margin-left: auto;
}

.bulk-quote-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #c9a227, var(--primary-gold));
}

.bulk-quote-btn span {
    font-size: 1.1rem;
}

/* Bulk Modal Specific */
.bulk-modal {
    max-width: 700px;
    max-height: 85vh;
}

.product-selection {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--cream);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.selection-title {
    font-size: 1.1rem;
    color: var(--dark-brown);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.select-all-wrapper {
    padding: 0.8rem 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 2px solid var(--primary-green);
}

.product-category-group {
    margin-bottom: 1rem;
}

.category-heading {
    font-size: 0.95rem;
    color: var(--primary-green);
    margin-bottom: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

/* Custom Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.5rem 0.8rem;
    background: white;
    border-radius: 8px;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.checkbox-label:hover {
    background: rgba(26, 95, 63, 0.05);
    border-color: var(--primary-green);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background: var(--primary-green);
    border-color: var(--primary-green);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
}

.label-text {
    flex: 1;
    color: var(--text-dark);
}

/* Contact Section */
.contact-section {
    margin-top: 1.5rem;
}

/* Phone Hint */
.phone-hint {
    font-size: 0.8rem;
    color: #25D366;
    font-weight: 500;
}

/* WhatsApp Preference */
.whatsapp-preference {
    margin-top: -0.8rem;
    margin-bottom: 1rem;
}

.whatsapp-check .label-text {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #1a1a1a;
}

.whatsapp-check {
    padding: 0.3rem 0;
    background: transparent;
    border: none;
}

.whatsapp-check:hover {
    background: transparent;
}

.whatsapp-icon {
    font-size: 0.95rem;
}

/* Selected Summary */
.selected-summary {
    padding: 1rem;
    background: rgba(26, 95, 63, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
    color: var(--primary-green);
    font-size: 0.95rem;
}

#selected-count {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Responsive Bulk Modal */
@media (max-width: 768px) {
    .bulk-quote-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .bulk-modal {
        max-height: 90vh;
    }

    .product-selection {
        max-height: 200px;
    }

    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .bulk-quote-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        margin-top: 0.8rem;
    }

    .filter-container {
        flex-wrap: wrap;
    }
}