/* ===== Krinaart storefront theme — maroon, temple gold, ivory ===== */
:root {
    --maroon: #8B1A1A;
    --maroon-dark: #6b1414;
    --gold: #C9A227;
    --gold-light: #E8C766;
    --saffron: #E07A2C;
    --ivory: #FDF8F0;
    --ivory-dark: #F5ECD9;
    --ink: #2b2320;
    --muted: #8a7c6e;
    --border: #e6ddc8;
    --success: #2e7d32;
    --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Georgia', 'Marcellus', serif;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--ivory);
    line-height: 1.55;
}
h1, h2, h3, h4 {
    font-family: Georgia, 'Cinzel', 'Times New Roman', serif;
    color: var(--maroon);
    margin: 0 0 12px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }

/* ---- Topbar ---- */
.topbar { background: var(--maroon); color: #f3e6cf; font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 6px 20px; gap: 12px; flex-wrap: wrap; }
.topbar-tagline { font-style: italic; opacity: .9; }
.topbar-social a { color: #f3e6cf; margin-left: 12px; }

/* ---- Header ---- */
.site-header { background: var(--white); border-bottom: 3px solid var(--gold); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 700; color: var(--maroon); flex-shrink: 0; }
.brand-mark { color: var(--gold); font-size: 28px; }
.header-search { flex: 1; display: flex; max-width: 480px; }
.header-search input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 24px 0 0 24px; font-size: 14px; }
.header-search button { border: 1px solid var(--gold); background: var(--gold); border-radius: 0 24px 24px 0; padding: 0 18px; cursor: pointer; }
.enquiry-cart-link { position: relative; font-size: 14px; font-weight: 600; white-space: nowrap; padding: 8px 14px; border: 1px solid var(--maroon); border-radius: 20px; color: var(--maroon); }
.enquiry-cart-link .badge { position: absolute; top: -8px; right: -8px; background: var(--saffron); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 11px; display: flex; align-items: center; justify-content: center; }

/* ---- Nav ---- */
.main-nav { background: var(--maroon-dark); }
.nav-toggle { display: none; background: none; border: none; color: #fff; padding: 12px 0; font-size: 14px; cursor: pointer; }
.nav-list { list-style: none; display: flex; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-list > li > a { display: block; padding: 12px 16px; color: #f3e6cf; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.nav-list > li:hover > a, .nav-list > li > a:hover { background: var(--maroon); color: var(--gold-light); }
.nav-list .dropdown { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 220px; box-shadow: 0 10px 24px rgba(0,0,0,.15); border-radius: 0 0 8px 8px; z-index: 60; }
.nav-list li.has-children:hover .dropdown { display: block; }
.nav-list .dropdown li a { display: block; padding: 10px 16px; color: var(--ink); font-size: 13px; font-weight: 400; }
.nav-list .dropdown li a:hover { background: var(--ivory-dark); color: var(--maroon); }

/* ---- Buttons ---- */
.btn { display: inline-block; padding: 10px 20px; border-radius: 24px; border: 1px solid var(--border); background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; text-align: center; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-dark); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; border-color: var(--maroon); color: var(--maroon); }
.btn-outline:hover { background: var(--maroon); color: #fff; }
.btn-whatsapp { background: #25D366; border-color: #25D366; color: #fff; font-weight: 600; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { display: block; width: 100%; }

/* ---- Hero / banners ---- */
.hero-slider { position: relative; overflow: hidden; }
.hero-slide { display: none; }
.hero-slide.active { display: block; }
.hero-slide img { width: 100%; height: clamp(220px, 40vw, 480px); object-fit: cover; }
.hero-dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0; background: var(--ivory-dark); }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; }
.hero-dots button.active { background: var(--gold); }

/* ---- Section headings ---- */
.section { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 8px; font-size: 28px; }
.section-title .divider { display: block; width: 60px; height: 3px; background: var(--gold); margin: 10px auto 0; }
.section-subtitle { text-align: center; color: var(--muted); margin-bottom: 28px; }

/* ---- Category tiles ---- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.category-tile { text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 10px; transition: transform .15s, box-shadow .15s; }
.category-tile:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(139,26,26,.12); }
.category-tile img { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; margin: 0 auto 10px; border: 2px solid var(--gold); }
.category-tile span { font-weight: 600; font-size: 14px; color: var(--ink); }

/* ---- Product grid & cards ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: 0 14px 28px rgba(139,26,26,.12); transform: translateY(-3px); }
.product-card-img { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--ivory-dark); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 14px; }
.product-card-body h3 { font-size: 15px; margin: 4px 0 8px; font-weight: 600; color: var(--ink); font-family: inherit; line-height: 1.3; }
.tag-set { display: inline-block; background: var(--gold); color: var(--ink); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; text-transform: uppercase; }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.price { font-weight: 700; color: var(--maroon); font-size: 16px; }
.price-mrp { text-decoration: line-through; color: var(--muted); font-size: 13px; }
.price-note { color: var(--muted); font-size: 13px; font-style: italic; }
.badge-corner { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: 12px; text-transform: uppercase; color: #fff; }
.badge-new { background: var(--success); }
.badge-best { background: var(--saffron); top: 34px; }

/* ---- Breadcrumbs ---- */
.breadcrumbs { padding: 14px 20px; font-size: 13px; color: var(--muted); }
.breadcrumbs a { color: var(--maroon); }
.breadcrumbs .sep { margin: 0 6px; }

/* ---- Category / listing layout ---- */
.listing-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.filter-sidebar { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; position: sticky; top: 90px; }
.filter-group { margin-bottom: 20px; }
.filter-group h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; color: var(--ink); }
.filter-group label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; color: var(--muted); cursor: pointer; }
.listing-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.listing-toolbar select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; }

/* ---- Pagination ---- */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 30px 0; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; }
.pagination .current { background: var(--maroon); color: #fff; border-color: var(--maroon); }

/* ---- Product detail ---- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 20px; }
.gallery-main { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; aspect-ratio: 1/1; background: var(--ivory-dark); margin-bottom: 12px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.gallery-thumbs img.active { border-color: var(--gold); }

.product-info h1 { font-size: 26px; margin-bottom: 6px; }
.product-info .sku { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.product-info .price-block { margin: 16px 0; padding: 16px; background: var(--ivory-dark); border-radius: 10px; }
.product-info .price-block .price { font-size: 24px; }
.attr-chip-group { margin-bottom: 14px; }
.attr-chip-group h4 { font-size: 13px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.attr-chip { display: inline-block; padding: 5px 12px; border: 1px solid var(--border); border-radius: 16px; font-size: 13px; margin: 0 6px 6px 0; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-table td:first-child { color: var(--muted); width: 40%; }
.set-items-list { list-style: none; padding: 0; }
.set-items-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.share-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.share-row a { width: 36px; height: 36px; border-radius: 50%; background: var(--ivory-dark); display: flex; align-items: center; justify-content: center; font-size: 15px; }

.related-section { padding: 40px 20px; }

/* ---- Enquiry cart / form ---- */
.enquiry-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.enquiry-table th, .enquiry-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.enquiry-table img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.enquiry-table input[type=number] { width: 60px; padding: 6px; border: 1px solid var(--border); border-radius: 6px; }
.enquiry-form-panel { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.enquiry-form-panel label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.enquiry-form-panel input, .enquiry-form-panel textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 16px; font-family: inherit; font-size: 14px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---- CMS pages ---- */
.cms-page { max-width: 800px; margin: 0 auto; padding: 30px 20px 60px; }
.cms-page h1 { font-size: 30px; }

/* ---- Footer ---- */
.site-footer { background: #23180f; color: #d9cdbb; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; padding: 44px 20px; }
.footer-brand { color: #fff; margin-bottom: 10px; }
.site-footer h4 { color: var(--gold-light); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; font-size: 14px; }
.footer-links a { color: #d9cdbb; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 20px; text-align: center; font-size: 12px; color: #a9998a; }

.whatsapp-float { position: fixed; bottom: 22px; right: 22px; background: #25D366; color: #fff; width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 6px 16px rgba(0,0,0,.25); z-index: 80; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e8f5e9; color: var(--success); }
.alert-error { background: #fdecea; color: #c62828; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .listing-layout { grid-template-columns: 1fr; }
    .filter-sidebar { position: static; }
    .product-detail { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .header-inner { flex-wrap: wrap; }
    .header-search { order: 3; max-width: 100%; width: 100%; }
    .nav-toggle { display: block; }
    .nav-list { display: none; flex-direction: column; }
    .nav-list.open { display: flex; }
    .nav-list .dropdown { position: static; box-shadow: none; display: block; }
    .topbar-tagline { display: none; }
}
