/* ==========================================================================
   Kannan Groceries — Storefront Styles
   Palette: Maroon #8B1E4C, Leaf Green #6FA82C, Cream #FDF8F1, Ink #2B231F
   Signature element: the dotted trail + circle-outline motif from the
   brand deck, reused as a slow ambient "scattering grain" background.
   ========================================================================== */

:root {
    --maroon: #8B1E4C;
    --maroon-dark: #6E1A3C;
    --green: #6FA82C;
    --green-dark: #578A21;
    --cream: #FDF8F1;
    --cream-deep: #F5ECDD;
    --ink: #2B231F;
    --ink-soft: #6B5F57;
    --white: #FFFFFF;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(139, 30, 76, 0.10);
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', 'Noto Sans Tamil', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; font-weight: 600; color: var(--maroon); }
p { line-height: 1.7; color: var(--ink-soft); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { width: 92%; max-width: 1200px; margin: 0 auto; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 28px; border-radius: 999px; border: none;
    font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: transform .2s ease, box-shadow .2s ease;
}
.btn-primary { background: var(--maroon); color: var(--white); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(139,30,76,.3); }
.btn-secondary { background: var(--green); color: var(--white); }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(111,168,44,.3); }
.btn-outline { background: transparent; border: 2px solid var(--maroon); color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: var(--white); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Ambient animated background (brand dotted-trail + circle motif) ---------- */
.ambient-bg {
    position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
    background: radial-gradient(circle at 15% 10%, #FBEEF3 0%, var(--cream) 45%);
}
.ambient-bg svg { position: absolute; opacity: .55; }
.ring { fill: none; stroke-width: 2; }
.ring-maroon { stroke: var(--maroon); opacity: .18; }
.ring-green { stroke: var(--green); opacity: .18; }
.dot-trail { stroke: var(--maroon); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 10; opacity: .2; fill: none; }
.float-slow { animation: floatY 14s ease-in-out infinite; }
.float-slow-rev { animation: floatY 18s ease-in-out infinite reverse; }
.spin-slow { animation: spin 60s linear infinite; transform-origin: center; }
.pulse-dot { animation: pulseDot 4s ease-in-out infinite; }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulseDot { 0%,100% { opacity: .25; transform: scale(1); } 50% { opacity: .6; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) {
    .float-slow, .float-slow-rev, .spin-slow, .pulse-dot { animation: none; }
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(253,248,241,.92); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(139,30,76,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 46px; width: auto; }
.logo-text strong { display: block; font-family: var(--font-display); color: var(--maroon); font-size: 1.2rem; line-height: 1; }
.logo-text span { font-size: .68rem; color: var(--green-dark); font-weight: 600; letter-spacing: .04em; }
.main-nav { display: flex; gap: 30px; align-items: center; }
.main-nav a { font-weight: 600; font-size: .93rem; color: var(--ink); position: relative; padding: 6px 0; }
.main-nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--green); transition: width .25s ease; }
.main-nav a:hover { color: var(--maroon); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }
.main-nav a.active { color: var(--maroon); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.cart-pill { display: flex; align-items: center; gap: 6px; background: var(--maroon); color: var(--white); padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: .88rem; transition: transform .2s ease; }
.cart-pill:hover { transform: translateY(-2px); }
.account-link { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--cream-deep); font-size: 1.1rem; transition: background .2s ease; }
.account-link:hover { background: var(--green); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 210; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--maroon); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.nav-overlay { position: fixed; inset: 0; background: rgba(43,35,31,.45); z-index: 190; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.nav-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------- Products dropdown ---------- */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { display: flex; align-items: center; gap: 4px; background: none; border: none; font-family: inherit; font-weight: 600; font-size: .93rem; color: var(--ink); cursor: pointer; padding: 6px 0; }
.nav-dropdown-toggle:hover, .nav-dropdown-toggle.active { color: var(--maroon); }
.nav-dropdown-toggle .caret { font-size: .7rem; transition: transform .25s ease; }
.nav-dropdown.open .caret { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: calc(100% + 14px); left: 0; background: var(--white); border-radius: 14px;
    box-shadow: var(--shadow); padding: 10px; min-width: 220px; display: flex; flex-direction: column; gap: 2px;
    opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 150;
}
.dropdown-menu a { padding: 9px 12px; border-radius: 8px; font-size: .88rem; font-weight: 500; color: var(--ink); }
.dropdown-menu a:hover { background: var(--cream-deep); color: var(--maroon); }
.dropdown-menu a::after { display: none; }
.dropdown-divider { height: 1px; background: var(--cream-deep); margin: 6px 4px; }
@media (min-width: 881px) {
    .nav-dropdown:hover .dropdown-menu, .nav-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
}

/* ---------- Google Translate widget ---------- */
.translate-widget { display: flex; align-items: center; }
#google_translate_element .goog-te-gadget { font-family: var(--font-body) !important; font-size: 0 !important; }
#google_translate_element .goog-te-gadget-simple {
    background: var(--cream-deep); border: 1.5px solid var(--maroon); border-radius: 999px;
    padding: 7px 12px; display: inline-flex; align-items: center; cursor: pointer;
}
#google_translate_element .goog-te-gadget-simple .goog-te-menu-value { color: var(--maroon) !important; font-size: .8rem !important; font-weight: 600; }
#google_translate_element .goog-te-gadget-simple .goog-te-menu-value span { border: none !important; }
#google_translate_element img { display: none !important; }
.goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; }
.goog-tooltip, .goog-tooltip:hover { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

@media (max-width: 880px) {
    .main-nav {
        position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
        background: var(--white); flex-direction: column; align-items: flex-start;
        padding: 90px 28px 28px; gap: 6px; box-shadow: -10px 0 30px rgba(0,0,0,.12);
        transform: translateX(100%); transition: transform .35s ease; z-index: 200; overflow-y: auto;
    }
    .main-nav.open { transform: translateX(0); }
    .main-nav a { width: 100%; padding: 13px 0; border-bottom: 1px solid var(--cream-deep); font-size: 1rem; }
    .main-nav a::after { display: none; }
    .nav-toggle { display: flex; }
    .nav-dropdown { width: 100%; border-bottom: 1px solid var(--cream-deep); }
    .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 13px 0; font-size: 1rem; border: none; }
    .dropdown-menu {
        position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none;
        max-height: 0; overflow: hidden; padding: 0; min-width: 0; transition: max-height .3s ease, padding .3s ease;
        background: var(--cream-deep); border-radius: 10px; margin-bottom: 4px;
    }
    .nav-dropdown.open .dropdown-menu { max-height: 500px; padding: 8px; }
    .translate-widget { order: -1; }
}

/* ---------- Hero / Slider ---------- */
.hero-slider { position: relative; height: 62vh; min-height: 420px; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; display: flex; align-items: center; }
.slide.active { opacity: 1; }
.slide img.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(43,35,31,.65) 0%, rgba(43,35,31,.15) 65%); }
.slide-content { position: relative; z-index: 2; color: var(--white); max-width: 560px; padding: 0 6%; animation: fadeUp 1s ease; }
.slide-content h2 { color: var(--white); font-size: clamp(1.8rem, 4vw, 3rem); }
.slide-content p { color: #f1e9df; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px);} to { opacity: 1; transform: translateY(0);} }
.slider-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.slider-dots button { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; }
.slider-dots button.active { background: var(--white); width: 24px; border-radius: 6px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; position: relative; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.eyebrow { display: inline-block; color: var(--green-dark); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-grid img { border-radius: var(--radius); box-shadow: var(--shadow); }
.tamil-line { font-size: 1.4rem; color: var(--green); font-weight: 700; margin: 6px 0; }

.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card { background: var(--white); border-radius: var(--radius); padding: 26px 20px; box-shadow: var(--shadow); text-align: center; transition: transform .25s ease; }
.why-card:hover { transform: translateY(-6px); }
.why-card .icon { width: 50px; height: 50px; margin: 0 auto 14px; background: var(--cream-deep); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--maroon); font-size: 1.4rem; }
.why-card h4 { font-size: 1rem; margin-bottom: 6px; color: var(--ink); }
.why-card p { font-size: .86rem; margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-align: center; transition: transform .25s ease; }
.cat-card:hover { transform: translateY(-6px); }
.cat-card .cat-img { height: 130px; background: var(--cream-deep); display: flex; align-items: center; justify-content: center; }
.cat-card .cat-img img { height: 70px; }
.cat-card h4 { padding: 14px 10px; font-size: .95rem; margin: 0; color: var(--ink); }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; transition: transform .25s ease; }
.product-card:hover { transform: translateY(-6px); }
.product-card .badge { position: absolute; top: 12px; left: 12px; background: var(--green); color: var(--white); font-size: .7rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; z-index: 2; }
.product-card .p-img { height: 190px; overflow: hidden; background: var(--cream-deep); }
.product-card .p-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .p-img img { transform: scale(1.08); }
.product-card .p-body { padding: 16px; }
.product-card h4 { font-size: 1rem; margin-bottom: 4px; color: var(--ink); }
.product-card .p-unit { font-size: .78rem; color: var(--ink-soft); margin-bottom: 8px; }
.price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.price-now { font-weight: 800; color: var(--maroon); font-size: 1.05rem; }
.price-old { text-decoration: line-through; color: #B9AFA6; font-size: .85rem; }

.benefits-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.benefit-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); border-top: 4px solid var(--green); }
.benefit-card h4 { font-size: .95rem; color: var(--maroon); }
.benefit-card p { font-size: .82rem; margin: 0; }

.cta-band { background: linear-gradient(120deg, var(--maroon), var(--maroon-dark)); border-radius: 24px; padding: 50px; text-align: center; color: var(--white); position: relative; overflow: hidden; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: #f1d9e3; }

/* ---------- Homepage Video ---------- */
.video-wrap { position: relative; width: 100%; max-width: 900px; margin: 0 auto; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--ink); }
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: none; object-fit: cover; }

/* ---------- Shared section eyebrow ---------- */
.leaf-eyebrow { display: block; text-align: center; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--maroon); margin-bottom: 0; }
.section-ambient { position: absolute; z-index: 0; pointer-events: none; opacity: .7; }

/* ---------- Some of the Benefits ---------- */
.benefits-section { background: var(--cream-deep); border-radius: 24px; margin: 40px auto; max-width: 1200px; padding: 44px 30px; }
.benefit-row { display: flex; justify-content: center; gap: 44px; flex-wrap: wrap; margin-top: 30px; }
.benefit-item { text-align: center; max-width: 150px; }
.benefit-icon { width: 62px; height: 62px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto 12px; box-shadow: var(--shadow); }
.benefit-item h4 { font-size: .95rem; margin-bottom: 4px; color: var(--ink); }
.benefit-item p { font-size: .8rem; margin: 0; }

/* ---------- Our Products (maroon band) ---------- */
.our-products-band { background: linear-gradient(135deg, var(--maroon), var(--maroon-dark)); }
.our-products-band .leaf-eyebrow { color: #fff; }
.cat-circle-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 20px; margin-top: 30px; }
.cat-circle-item { text-align: center; }
.cat-circle { width: 90px; height: 90px; border-radius: 50%; background: #fff; margin: 0 auto 10px; overflow: hidden; border: 3px solid rgba(255,255,255,.4); transition: transform .25s ease; }
.cat-circle-item:hover .cat-circle { transform: scale(1.08); }
.cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cat-circle-item h4 { color: #fff; font-size: .82rem; margin: 0; font-weight: 600; }

/* ---------- Product Spotlights ---------- */
.spotlight { padding: 70px 0; background: var(--white); }
.spotlight-alt { background: var(--cream); }
.spotlight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.spotlight-grid.reverse { direction: rtl; }
.spotlight-grid.reverse > * { direction: ltr; }
.spotlight-text h2 { font-size: 2rem; }
.feature-chips { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 16px; }
.feature-chips span { font-size: .88rem; color: var(--ink); font-weight: 500; }
.spotlight-image img { border-radius: 20px; box-shadow: var(--shadow); width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- Amazon banner ---------- */
.amazon-banner { background: var(--cream-deep); border-radius: var(--radius); padding: 34px 40px; display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.amazon-logo { display: flex; flex-direction: column; align-items: flex-start; }
.amazon-logo span { font-size: .95rem; color: var(--ink); }
.amazon-logo strong { font-size: 2.2rem; color: var(--ink); font-family: Arial, sans-serif; position: relative; }
.amazon-logo strong::after { content: ''; display: block; width: 70%; height: 4px; background: #FF9900; border-radius: 4px; margin-top: -6px; }
.amazon-text { flex: 1; min-width: 240px; }
.amazon-text p { margin: 0 0 12px; }

/* ---------- Nature's Protein band ---------- */
.nature-band { background: linear-gradient(120deg, var(--maroon-dark), var(--maroon)); border-radius: 24px; max-width: 1200px; margin: 0 auto; padding: 46px 40px; }
.nature-grid { display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.nature-icons { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 10px; }
.nature-icons span { color: #fff; font-weight: 600; font-size: .95rem; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%); border-radius: 24px; max-width: 1200px; margin: 20px auto; padding: 60px 30px; }
.final-cta h2 { font-size: 2.2rem; }

@media (max-width: 980px) {
    .cat-circle-grid { grid-template-columns: repeat(4, 1fr); }
    .spotlight-grid, .spotlight-grid.reverse { grid-template-columns: 1fr; direction: ltr; }
    .spotlight-grid.reverse .spotlight-image { order: -1; }
    .nature-grid { text-align: center; justify-content: center; }
}
@media (max-width: 560px) {
    .cat-circle-grid { grid-template-columns: repeat(3, 1fr); }
    .benefit-row { gap: 26px; }
    .amazon-banner { text-align: center; justify-content: center; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc4bb; padding: 50px 0 20px; margin-top: 40px; }
.footer-badges { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-badges span { color: #fff; font-weight: 600; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 30px; margin-bottom: 30px; }
.site-footer h5 { color: var(--white); font-family: var(--font-display); margin-bottom: 14px; }
.site-footer a { color: #cfc4bb; display: block; margin-bottom: 8px; font-size: .9rem; }
.site-footer a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; text-align: center; font-size: .82rem; }

/* ---------- Forms / cards generic ---------- */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .88rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid #E7DED4; border-radius: 10px; font-family: var(--font-body); font-size: .92rem; background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--green); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .9rem; }
.alert-success { background: #E9F5DD; color: var(--green-dark); }
.alert-error { background: #FBE6EC; color: var(--maroon); }

table.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
table.data-table th, table.data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #F1E9DF; font-size: .9rem; }
table.data-table th { background: var(--cream-deep); color: var(--maroon); }

@media (max-width: 980px) {
    .about-grid, .why-grid, .cat-grid, .product-grid, .benefits-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .why-grid, .cat-grid, .product-grid, .benefits-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .hero-slider { height: 52vh; }
}
