/* ==========================================
   Cervinia Herbs — Products Page
   ========================================== */
:root {
    --primary: #1a6b3c;
    --primary-dark: #145530;
    --primary-light: #2d8f54;
    --secondary: #c8a951;
    --secondary-light: #e4cc7a;
    --accent: #e8f5e9;
    --text-primary: #1a2e1a;
    --text-secondary: #4a6148;
    --bg-body: #f6faf6;
    --bg-card: #ffffff;
    --bg-section: #f0f7f0;
    --border-light: #d4e8d4;
    --shadow-sm: 0 2px 8px rgba(26, 107, 60, 0.08);
    --shadow-md: 0 6px 20px rgba(26, 107, 60, 0.12);
    --shadow-lg: 0 12px 40px rgba(26, 107, 60, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body[dir="rtl"] { text-align: right; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }

/* Header */
.header-container {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem clamp(1rem, 5vw, 2.5rem);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky; top: 0; z-index: 1000;
    flex-wrap: wrap; gap: 0.75rem;
}
.logo img { height: clamp(40px, 8vw, 55px); border-radius: var(--radius-sm); object-fit: contain; transition: transform var(--transition); }
.logo img:hover { transform: scale(1.05); }
.desktop-nav ul { display: flex; gap: clamp(1.5rem, 3vw, 2.5rem); }
.desktop-nav a {
    color: rgba(255,255,255,0.85); font-size: 1rem; font-weight: 500;
    padding: 0.5rem 0; position: relative; transition: color var(--transition);
}
.desktop-nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px;
    background: var(--secondary); transition: width var(--transition); border-radius: 2px;
}
.desktop-nav a:hover, .desktop-nav a.active { color: #fff; }
.desktop-nav a:hover::after, .desktop-nav a.active::after { width: 100%; }
#languageSelect {
    padding: 0.4rem 0.8rem; border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.3); background: rgba(255,255,255,0.1);
    color: #fff; font-size: 0.9rem; font-family: var(--font-main); cursor: pointer;
}
#languageSelect:hover { background: rgba(255,255,255,0.2); }
#languageSelect option { background: var(--primary-dark); color: #fff; }

/* Hamburger & Mobile Nav */
.hamburger { display: none; flex-direction: column; cursor: pointer; gap: 5px; padding: 5px; z-index: 1001; }
.hamburger span { width: 26px; height: 3px; background-color: #fff; border-radius: 3px; transition: all var(--transition); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }
.mobile-nav {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
    z-index: 999; padding-top: 80px;
}
.mobile-nav ul { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem 1rem; }
.mobile-nav a {
    color: rgba(255,255,255,0.9); font-size: 1.2rem; font-weight: 500;
    padding: 1rem 2rem; width: 100%; text-align: center; border-radius: var(--radius-md);
    transition: all var(--transition);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.mobile-nav.active { display: block; }

/* Products Hero */
.products-hero {
    background: linear-gradient(160deg, var(--primary-dark), var(--primary), var(--primary-light));
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 3rem);
    text-align: center; color: #fff; position: relative; overflow: hidden;
}
.products-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 0.75rem; }
.products-hero p { font-size: clamp(1rem, 2vw, 1.15rem); color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto; }

/* Catalog */
.products-catalog { max-width: 1200px; margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem); }
.category-section { margin-bottom: clamp(3rem, 5vw, 4rem); }
.category-title {
    font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 700; color: var(--primary);
    text-align: center; margin-bottom: 2rem; padding: 0.75rem 2rem;
    background: var(--accent); border-radius: var(--radius-xl);
    display: inline-flex; align-items: center; gap: 0.75rem;
    position: relative; left: 50%; transform: translateX(-50%);
    transition: all var(--transition);
}
body[dir="rtl"] .category-title { left: auto; right: 50%; transform: translateX(50%); }
.category-title:hover { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.category-title i { font-size: 1.2rem; }

/* Product Grid & Cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.product {
    background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    transition: all 0.4s ease; position: relative;
}
.product:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.product-image-wrap { overflow: hidden; }
.product img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.5s ease; }
.product:hover img { transform: scale(1.08); }
.product-content { padding: 1.25rem; text-align: center; }
.product-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.product-content p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; }

/* Showcase Image */
.showcase-image {
    margin-top: 1.5rem; border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid var(--border-light); transition: all 0.4s ease;
}
.showcase-image:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.showcase-image img { width: 100%; height: clamp(200px, 30vw, 400px); object-fit: cover; transition: transform 0.5s ease; }
.showcase-image:hover img { transform: scale(1.05); }

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--accent), var(--bg-section));
    padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 5vw, 3rem);
    text-align: center; border-top: 1px solid var(--border-light);
}
.cta-section h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; color: var(--text-primary); margin-bottom: 0.75rem; }
.cta-section p { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--text-secondary); margin-bottom: 2rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 1.8rem; border-radius: var(--radius-md);
    font-size: 1rem; font-weight: 600; font-family: var(--font-main);
    cursor: pointer; transition: all var(--transition); border: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff; box-shadow: 0 4px 15px rgba(26, 107, 60, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(26, 107, 60, 0.4); }

/* WhatsApp Float */
.whatsapp-float {
    position: fixed; bottom: clamp(1rem, 3vw, 1.5rem); right: clamp(1rem, 3vw, 1.5rem);
    background: #25D366; color: #fff; width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); transition: all var(--transition);
    z-index: 900; animation: pulse-wa 2s infinite;
}
@keyframes pulse-wa {
    0%, 100% { box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6); }
}
.whatsapp-float:hover { transform: scale(1.12); }

/* Footer */
footer {
    background: linear-gradient(135deg, #0d2818, var(--primary-dark));
    color: rgba(255,255,255,0.85);
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    padding: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 5vw, 2.5rem);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 2.5rem;
}
.footer-col h3 {
    font-size: 1.1rem; font-weight: 700; color: #fff;
    margin-bottom: 1.2rem; position: relative; padding-bottom: 0.8rem;
}
.footer-col h3::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 30px; height: 2px; background: var(--secondary); border-radius: 2px;
}
body[dir="rtl"] .footer-col h3::after { left: auto; right: 0; }
.footer-col p { margin-bottom: 0.6rem; font-size: 0.95rem; }
.footer-col a { color: rgba(255,255,255,0.75); transition: color var(--transition); }
.footer-col a:hover { color: var(--secondary); }
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { font-size: 0.95rem; }
.footer-col ul a:hover { color: var(--secondary); padding-left: 4px; }
body[dir="rtl"] .footer-col ul a:hover { padding-left: 0; padding-right: 4px; }
.map-frame { border-radius: var(--radius-md); }
.footer-bottom {
    text-align: center; padding: 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; color: rgba(255,255,255,0.5);
}

/* Responsive */
@media (max-width: 1024px) { .desktop-nav { display: none; } .hamburger { display: flex; } }
@media (max-width: 768px) {
    .header-container { padding: 0.6rem clamp(0.75rem, 3vw, 1.5rem); }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
    .product img { height: 180px; }
    .product-content { padding: 1rem; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; gap: 1rem; }
    .product img { height: 200px; }
    .showcase-image img { height: 180px; }
    .whatsapp-float { width: 48px; height: 48px; font-size: 1.4rem; }
    .category-title { font-size: 1.2rem; padding: 0.6rem 1.5rem; }
}
