/* ============================================================
   Kovai Lakshmi Grinders – shared styles (every page)
   Header, footer, WhatsApp button and common elements.
   Values are taken unchanged from the final index.html.
============================================================ */

/* ============================================================
   1. CSS VARIABLES & RESET
============================================================ */
:root { --primary: #da0000; --red: #ff0000; --red-light: #fde8e8; --dark: #000000; --text: #333333; --muted: #666666; --bg: #f4f6f9; --white: #ffffff; --gold: #f0a500; --radius: 10px; --shadow: 0 4px 20px rgba(0,0,0,.08); --shadow-lg: 0 8px 32px rgba(0,0,0,.14); --trans: .3s ease; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 100px; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--text); line-height: 1.65; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; height: auto; }
button { cursor: pointer; font-family: inherit; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── Container ── */
.container { width: 100%; max-width: none; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) {
  .container { padding: 0 16px; }
}

/* ── Button ── */
.btn { display: inline-flex; align-items: center; gap: 6px; background: #000000; color: var(--white); padding: 12px 26px; border-radius: 6px; border: 2px solid rgba(255,255,255,.75); font-weight: 600; font-size: 14px; letter-spacing: .4px; transition: var(--trans); white-space: nowrap; }
.btn:hover { background: var(--primary); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(27,117,188,.35); }
.btn-outline { background: transparent; border: 2px solid rgba(255,255,255,.75); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,.15); box-shadow: none; }
.btn-gold { background: #000000; color: #ffffff; }
.btn-gold:hover { background: #ff0000; box-shadow: 0 6px 18px rgba(240,165,0,.4); color: #ffffff; }

/* ── Section Title ── */
.section-title { text-align: center; font-size: clamp(24px, 4vw, 34px); font-weight: 700; color: var(--primary); margin-bottom: 44px; position: relative; }
.section-title::after { content: ''; display: block; width: 52px; height: 3px; background: var(--red); border-radius: 2px; margin: 10px auto 0; }

/* ============================================================
   2. MAIN HEADER / NAV
============================================================ */
.main-header { background: white; box-shadow: 0 2px 12px rgba(0,0,0,.09); position: sticky; top: 0; z-index: 900; }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 95px; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 112px; width: auto; max-width: 220px; object-fit: contain; padding-top: 10px; padding-bottom: 10px; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #fff); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-weight: 500; font-size: 25px; font-family: Georgia, 'Times New Roman', Times, serif; color: var(--text); position: relative; padding-bottom: 4px; transition: color .25s; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--red); transition: width .25s; }
/* Hover underline fix: the red underline now grows on hover */
.nav-links a:hover::after, .nav-links a:focus-visible::after { width: 100%; }
/* Current page highlight */
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after { width: 100%; }

/* ── DROPDOWN MENU ── */
.dropdown { position: relative; }
.dropdown-content { position: absolute; top: 100%; left: 0; background-color: var(--white); min-width: 280px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); border-radius: 8px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 999; display: flex; flex-direction: column; padding: 10px 0; }
/* Show dropdown on hover, or when opened by tap / keyboard (.open) */
.dropdown:hover .dropdown-content, .dropdown.open .dropdown-content { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-links .dropdown-content a { font-size: 24px; padding: 12px 24px; display: block; color: var(--text); white-space: nowrap; width: max-content; }
.nav-links .dropdown-content a::after { display: none; }
.nav-links .dropdown-content a:hover, .nav-links .dropdown-content a:focus-visible { background-color: var(--bg); color: var(--primary); }
.nav-links .dropdown-content a.active { color: var(--primary); }

/* Mobile Dropdown Fixes */
@media (max-width: 768px) {
  .dropdown-content { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding: 0 0 0 20px; background: transparent; }
  .dropdown.open .dropdown-content { display: flex; }
  .nav-links .dropdown-content a { font-size: 12px; }
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; z-index: 910; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: var(--trans); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Header Right & Search Bar */
.header-right { display: flex; align-items: center; gap: 16px; }
.site-search { display: flex; align-items: center; background: #ffffff; border: 1px solid #ff0000; border-radius: 20px; padding: 4px 12px; transition: var(--trans); position: relative; }
.site-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-light); }
.site-search input { border: none; background: transparent; outline: none; padding: 6px; font-size: 15px; width: 140px; color: var(--text); transition: width 0.3s ease; }
.site-search input:focus { width: 200px; }
.site-search button { background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 4px; flex-shrink: 0; min-width: 32px; }
.site-search button img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; transition: opacity 0.3s ease; }
.site-search button:hover img { opacity: 0.6; }

/* ── Tablet & Mobile Collapsible Search ── */
@media (max-width: 1024px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 18px; }
  .site-search { background: transparent; border-color: transparent; padding: 0; }
  .site-search input { width: 0; padding: 0; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
  .site-search button { padding: 6px; }
  .site-search button img { width: 24px; height: 24px; }
  .site-search.active { background: #ffffff; border-color: #ffffff; padding: 4px 12px; }
  .site-search.active input { width: 140px; padding: 6px; opacity: 1; visibility: visible; }
}

/* ── Mobile specific tweaks ── */
@media (max-width: 768px) {
  .header-inner { height: 85px; }
  .logo img { height: 100px; padding: 8px 0; }
  .hamburger { display: flex; }
  .header-right { gap: 8px; }
  .site-search.active input { width: 120px; font-size: 14px; }
  .nav-links { display: none; position: fixed; inset: 85px 0 0 0; background: var(--white); flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 24px; box-shadow: 0 8px 24px rgba(0,0,0,.12); overflow-y: auto; z-index: 899; }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid #f0f0f0; }
  .nav-links a { display: block; padding: 15px 24px; font-size: 14px; }
  .nav-links a::after { display: none; }
}
@media (max-width: 480px) {
  .header-inner { height: 80px; }
  .logo img { height: 80px; padding: 6px 0; }
  .nav-links { inset: 70px 0 0 0; }
}

/* ── Live search suggestions ── */
.search-suggest { position: absolute; top: calc(100% + 8px); right: 0; width: 360px; max-width: calc(100vw - 24px); background: var(--white); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.16); border: 1px solid #eee; z-index: 1001; overflow: hidden; display: none; }
.search-suggest.show { display: block; }
.search-suggest ul { max-height: 70vh; overflow-y: auto; }
.search-suggest li a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--text); border-bottom: 1px solid #f3f3f3; }
.search-suggest li a:hover, .search-suggest li a.is-active { background: var(--red-light); }
.search-suggest img, .search-suggest .ss-noimg { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; border-radius: 6px; background: var(--bg); }
.search-suggest .ss-text { display: flex; flex-direction: column; min-width: 0; }
.search-suggest .ss-name { font-size: 14px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest .ss-type { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--primary); }
.search-suggest .ss-all { display: block; text-align: center; padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--primary); background: #fafafa; }
.search-suggest .ss-all:hover, .search-suggest .ss-all.is-active { background: var(--red-light); }
.search-suggest .ss-empty { padding: 14px; font-size: 13px; color: var(--muted); }
@media (max-width: 768px) {
  .search-suggest { position: fixed; top: 85px; left: 12px; right: 12px; width: auto; max-width: none; }
}
@media (max-width: 480px) {
  .search-suggest { top: 80px; }
}

/* ============================================================
   3. PRODUCT CARDS (Popular Products + category pages)
============================================================ */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card { background: var(--white); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); border: 1px solid transparent; transition: var(--trans); }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--red-light); }
.product-card img { width: 100%; height: 250px; object-fit: contain; margin-bottom: 14px; }
.product-card h4 { font-size: 14px; font-weight: 600; color: var(--primary); line-height: 1.4; }
a.product-card { display: block; }
.img-missing { width: 100%; height: 250px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: 8px; color: #aaa; font-size: 13px; }
@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ── Simple page banner (inner pages) ── */
.page-hero { background: linear-gradient(to bottom, rgba(44, 42, 41, 0.87) 0%, rgba(51, 51, 51, 0.65) 100%), url('https://kovailakshmi.in/LOGO/BG%20IMAGE.jpg') center/cover no-repeat; color: var(--white); text-align: center; padding: clamp(40px, 7vw, 72px) 0; }
.page-hero h1 { font-size: clamp(28px, 5vw, 46px); font-family: Georgia, 'Times New Roman', Times, serif; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.page-hero p { font-size: clamp(15px, 2vw, 19px); font-family: Georgia, 'Times New Roman', Times, serif; color: rgba(255,255,255,.88); max-width: 820px; margin: 0 auto; }

/* ============================================================
   4. FOOTER
============================================================ */
.footer { background: #ffffff; color: #aab0c0; padding: clamp(44px, 7vw, 72px) 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
.footer-logo { margin-bottom: 18px; }
.footer-logo img { height: 200px; width: auto; max-width: 400px; object-fit: contain; filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 3px #fff); }
.footer-about { font-size: 18px; line-height: 1.75; color: #000000; font-family: Georgia, 'Times New Roman', Times, serif; }
.footer h4 { color: #000000; font-size: 15px; font-weight: 700; margin-bottom: 18px; font-family: Georgia, 'Times New Roman', Times, serif; }
.footer ul li { margin-bottom: 10px; font-size: 14px; line-height: 1.5; color: #000000; font-family: Georgia, 'Times New Roman', Times, serif; }
.footer ul li a { color: #000000; transition: color .25s; }
.footer ul li a:hover { color: var(--red); }
.copyright { text-align: center; padding: 18px 0; font-family: Georgia, 'Times New Roman', Times, serif; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #666e82; }

/* Footer tablet */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-about { font-size: 14px; }
}
/* Footer mobile: single column */
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-logo img { height: 120px; }
  .footer-about { font-size: 10px; }
}
.social-list { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 10px 0 0; }
.social-list li { list-style: none; }
.social-icon { width: 50px; height: 50px; object-fit: contain; display: block; transition: opacity .25s, transform .25s; }
.social-icon:hover { transform: scale(1.1); }

/* ── Footer legal links (below the copyright line) ── */
.legal-links { margin-top: 8px; font-size: 13px; font-family: Georgia, 'Times New Roman', Times, serif; color: #666e82; }
.legal-links a { color: #666e82; transition: color .25s; }
.legal-links a:hover, .legal-links a:focus-visible { color: var(--primary); text-decoration: underline; }
.legal-links .sep { margin: 0 6px; }

/* ============================================================
   5. FLOATING WHATSAPP BUTTON
============================================================ */
.float-wa { position: fixed; bottom: 10px; right: 10px; width: 65px; height: 65px; background-color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); z-index: 9999; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.float-wa img { width: 55px; height: 55px; object-fit: contain; }
.float-wa:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 8px 22px rgba(37, 211, 102, 0.5); }
@media (max-width: 768px) {
  .float-wa { bottom: 20px; right: 20px; width: 60px; height: 60px; }
  .float-wa img { width: 45px; height: 45px; }
}

/* ── Developer credit (tiny & faded, below copyright) ── */
.site-credit { text-align: center; margin-top: 8px; opacity: .45; transition: opacity .3s ease; }
.site-credit:hover, .site-credit:focus-within { opacity: .8; }
.copyright .site-credit-name { font-family: Arial, sans-serif; font-size: 9px; line-height: 1.4; letter-spacing: .3px; color: #666e82; margin: 0 0 4px; }
.site-credit-links { display: flex; justify-content: center; align-items: center; gap: 10px; }
.site-credit-links a { line-height: 0; color: #666e82; padding: 3px; margin: -3px; transition: color .25s ease, transform .25s ease; }
.site-credit-links a:hover, .site-credit-links a:focus-visible { color: var(--primary); transform: translateY(-1px); }
.site-credit-links svg { width: 12px; height: 12px; display: block; }
@media (max-width: 768px) {
  .copyright { padding-bottom: 88px; }
  .site-credit { opacity: .55; }
  .site-credit-links { gap: 14px; }
  .site-credit-links a { padding: 6px; margin: -6px; }
}
@media (max-width: 480px) {
  .copyright .site-credit-name { font-size: 8.5px; }
  .site-credit-links svg { width: 13px; height: 13px; }
}

/* ── Empty image spots (src left empty on purpose until the photo is added) ── */
img[src=""] { visibility: hidden; }

/* ── Scroll lock (used by menus and the gallery viewer) ── */
body.no-scroll { overflow: hidden; }
