/* Product Page CSS */
:root {
    --brand-primary: #b4d449;
    --brand-secondary: #083d2f;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 10px 40px -10px rgba(8, 61, 47, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(8, 61, 47, 0.15);
}

/* Base */
.products-page-container {
    background-color: var(--bg-light);
    min-height: 100vh;
}

/* Hero Section */
.products-hero-section {
    position: relative;
    padding: 120px 20px 80px;
    background-color: var(--brand-secondary);
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.blur-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.shape-1 {
    top: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--brand-primary);
}

.shape-2 {
    bottom: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(180, 212, 73, 0.3);
}

.hero-content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
    color: var(--brand-primary);
}

.hero-heading {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
}

.hero-subheading {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Sticky Filter Bar */
.sticky-filter-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.filter-controls-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .filter-controls-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-search-input {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 0.95rem;
    width: 100%;
    max-width: 250px;
    transition: var(--transition-smooth);
}

.product-search-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(180, 212, 73, 0.2);
}

.product-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.filter-pill-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filter-pill-bar::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 30px;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    background: var(--bg-light);
    border-color: var(--brand-secondary);
}

.filter-btn.active {
    background: var(--brand-secondary);
    color: white;
    border-color: var(--brand-secondary);
}

/* Product Grid */
.products-grid-section {
    padding: 60px 20px;
}

.grid-container {
    max-width: 1400px;
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile 2-column adjustments */
@media (max-width: 767px) {
    .products-grid .product-card-inner {
        height: 250px !important; /* Reduce height further to look proportionate */
    }
    
    .products-grid .product-content {
        padding: 12px !important; /* Tighter padding */
    }
    
    .products-grid .product-content h3 {
        font-size: 0.9rem !important;
        margin-bottom: 4px !important;
    }
    
    .products-grid .product-content p {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
    
    .products-grid .view-tag {
        font-size: 0.6rem !important;
        padding: 4px 6px !important;
        letter-spacing: 0 !important;
        white-space: nowrap !important; /* Force to one line */
    }
}

/* Product Card - Animation Logic Only (Visuals from style.css) */
.product-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
}

.empty-state-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.clear-filters-btn {
    padding: 10px 24px;
    background: var(--brand-secondary);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.clear-filters-btn:hover {
    background: var(--brand-primary);
    color: var(--brand-secondary);
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card.hide {
    display: none;
}

.product-card.show {
    animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ================= PRODUCT INQUIRY MODAL ================= */
.inquiry-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 13, 26, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.inquiry-modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.inquiry-modal-container {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

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

.inquiry-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--brand-secondary);
}

.inquiry-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

.inquiry-modal-header {
    margin-bottom: 30px;
    text-align: center;
}

.inquiry-modal-header h2 {
    font-size: 2rem;
    color: #0b2545;
    margin-bottom: 10px;
}

.inquiry-modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
}

.floating-label-group {
    position: relative;
}

.floating-label-group .form-control {
    width: 100%;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.floating-label-group .form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(180, 212, 73, 0.15);
    background: white;
}

.floating-label-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    transition: all 0.2s ease;
    pointer-events: none;
    background: transparent;
    padding: 0 4px;
}

.floating-label-group textarea ~ label {
    top: 24px;
}

.floating-label-group .form-control:focus ~ label,
.floating-label-group .form-control:not(:placeholder-shown) ~ label,
.floating-label-group .form-control[readonly] ~ label {
    top: 0;
    font-size: 0.8rem;
    color: var(--brand-secondary);
    font-weight: 600;
}

.floating-label-group .form-control:focus ~ label::before,
.floating-label-group .form-control:not(:placeholder-shown) ~ label::before,
.floating-label-group .form-control[readonly] ~ label::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, white 50%, #f8fafc 50%);
    z-index: -1;
    border-radius: 4px;
}

.floating-label-group .form-control:focus ~ label::before {
    background: white;
}

.floating-label-group .form-control[readonly] {
    background: rgba(180, 212, 73, 0.1);
    border-color: rgba(180, 212, 73, 0.3);
    color: var(--brand-secondary);
    font-weight: 600;
}

.floating-label-group .form-control[readonly] ~ label::before {
    background: linear-gradient(to bottom, white 50%, rgba(180, 212, 73, 0.1) 50%);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--brand-secondary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--brand-primary);
    color: var(--brand-secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(180, 212, 73, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-messages {
    text-align: center;
    font-size: 0.95rem;
    margin-top: -10px;
}

.form-messages.error { color: #ef4444; }

.inquiry-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(180, 212, 73, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: var(--brand-primary);
}

.success-icon {
    font-size: 3rem;
}

.inquiry-success h3 {
    font-size: 1.8rem;
    color: #0b2545;
    margin-bottom: 10px;
}

.inquiry-success p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.done-btn {
    padding: 12px 40px;
    background: var(--brand-secondary);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.done-btn:hover {
    background: var(--brand-primary);
    color: var(--brand-secondary);
}
