:root {
    --paper: #fffdf9;
    --bg: #f6f1e8;
    --ink: #2a2118;
    --muted: #74685c;
    --line: #e6d9c8;
    --maroon: #8b2232;
    --green: #0f7a3d;
    --gold: #a6843d;
    --serif: "Cormorant Garamond", Palatino, serif;
    --sans: "Outfit", "Noto Sans Tamil", sans-serif;
    --nav: 62px;
    --top: 92px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background:
        radial-gradient(1200px 400px at 100% -10%, rgba(166, 132, 61, 0.08), transparent 50%),
        var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.35;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.ribbon {
    background: #5c1420;
    color: #f8efe4;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 8px 12px;
}
.ribbon a { border-bottom: 1px solid rgba(248, 239, 228, 0.45); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(246, 241, 232, 0.94);
    backdrop-filter: blur(14px);
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--line);
}
.loc {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 28px;
}
.loc img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(166, 132, 61, 0.45);
}
.loc strong, .loc em { display: block; }
.loc strong {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1;
}
.loc em { font-style: normal; color: var(--gold); font-size: 11px; letter-spacing: 0.06em; }
.search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    height: 40px;
    padding: 0 12px;
    background: #f6f4ef;
    border: 1px solid var(--line);
    border-radius: 12px;
}
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 1.8; flex: none; }
.search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
}

.notice {
    margin: 8px 12px 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f3e4c4;
    color: #5c4014;
    font-size: 13px;
}

main {
    width: min(1100px, 100%);
    margin: 0 auto;
    padding: 10px 10px calc(var(--nav) + 18px);
}

.hero {
    position: relative;
    border-radius: 0;
    margin: 0 -10px;
    overflow: hidden;
    background: #1c1612;
    height: min(46vw, 280px);
    min-height: 196px;
}
.hero video { display: block; width: 100%; height: 100%; object-fit: cover; }
.sound-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(28, 20, 18, 0.72);
    color: #fffdf9;
    font-size: 13px;
    line-height: 1;
}
.sound-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-btn .sound-wave { display: none; }
.sound-btn.is-on .sound-wave { display: block; }
.sound-btn.is-on .sound-off { display: none; }

.rail, .pills {
    display: flex;
    gap: 8px;
    margin: 12px -10px 0;
    padding: 0 10px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}
.rail::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.rail a, .pill {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 72px;
    color: var(--ink);
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
}
.rail-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 640;
    font-size: 18px;
    overflow: hidden;
}
.rail-mark img, .pill img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pill img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}
.pill {
    width: auto;
    flex-direction: row;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid var(--line);
    font-size: 12px;
}
.pill em { font-style: normal; color: var(--muted); }
.pill.is-on { background: var(--ink); color: white; border-color: var(--ink); }
.pill.is-on em { color: #ddd; }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 2px 8px;
}
.section-head h2, .product h1, .empty h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.02em;
}
.section-head a, .kicker { color: var(--maroon); font-size: 12px; font-weight: 640; }
.section-head .muted, .muted { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.section-head form { margin-left: auto; }
.section-head select {
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 6px;
}
.card { min-width: 0; }
.card-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #efeae3;
    aspect-ratio: 1;
}
.card-media a { display: block; height: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.swatch-mark {
    display: grid;
    place-items: center;
    height: 100%;
    color: white;
    font-size: 28px;
    font-weight: 640;
}
.swatch-0 { background: linear-gradient(160deg, #c23b6e, #7a2344); }
.swatch-1 { background: linear-gradient(160deg, #e0b45a, #8d6424); }
.swatch-2 { background: linear-gradient(160deg, #3d78c4, #1d3f78); }
.swatch-3 { background: linear-gradient(160deg, #3e9a62, #1d5a3a); }
.swatch-4 { background: linear-gradient(160deg, #8a3144, #4c1824); }
.off {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 5px;
    border-radius: 6px;
    background: #1d4ed8;
    color: white;
    font-size: 10px;
    font-weight: 640;
}
.adder { position: absolute; right: 6px; bottom: 6px; z-index: 2; }
.add-btn {
    min-width: 52px;
    height: 28px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--green);
    background: white;
    color: var(--green);
    font-size: 12px;
    font-weight: 640;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.stepper {
    display: flex;
    align-items: center;
    height: 28px;
    border-radius: 8px;
    background: var(--green);
    color: white;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.stepper button {
    width: 26px;
    height: 28px;
    border: 0;
    background: transparent;
    color: white;
    font-size: 18px;
    line-height: 1;
}
.stepper b { min-width: 16px; text-align: center; font-size: 13px; }
.add-btn[hidden], .stepper[hidden] { display: none !important; }
.adder-lg { position: static; display: inline-block; margin-top: 12px; }
.adder-lg .add-btn, .adder-lg .stepper { height: 44px; min-width: 148px; font-size: 15px; }
.adder-lg .stepper button { width: 44px; height: 44px; }
.hscroll {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    grid-auto-columns: 148px;
    gap: 12px 8px;
    margin: 0 -10px 8px;
    padding: 0 10px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 10px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: none;
}
.hscroll::-webkit-scrollbar { display: none; }
.hscroll .card { scroll-snap-align: start; width: 148px; }
.card-body { padding: 6px 2px 2px; }
.card-body h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 520;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}
.tamil {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.price-row { display: flex; align-items: baseline; gap: 4px; margin-top: 3px; }
.price-row strong { font-size: 13px; }
.price-row s { color: var(--muted); font-size: 11px; }

.story {
    margin-top: 16px;
    padding: 16px;
    border-radius: 0;
    border-top: 1px solid var(--gold);
    background: rgba(255, 253, 249, 0.7);
    color: var(--muted);
    font-size: 14px;
}
.story p { margin: 0 0 4px; }
.story a { color: var(--maroon); font-weight: 640; }

.product { margin-top: 4px; }
.gallery {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1;
    max-height: 320px;
    display: grid;
    place-items: center;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.thumbs .thumb { width: 58px; height: 58px; padding: 0; border-radius: 8px; border: 2px solid transparent; background: transparent; overflow: hidden; }
.thumbs .thumb.is-on { border-color: var(--maroon); }
.thumbs img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.buy { display: flex; gap: 8px; align-items: center; margin: 12px 0; }
.buy input[type="number"], .qty {
    width: 72px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--paper);
    text-align: center;
    font-size: 16px;
}
.btn, .btn-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 640;
}
.btn { background: var(--maroon); color: white; }
.btn-line { background: white; border-color: var(--line); }
.specs { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.specs li { padding: 8px 10px; border-radius: 10px; background: var(--paper); font-size: 13px; }
.specs span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.copy { white-space: pre-wrap; color: var(--muted); }

.sheet {
    background: var(--paper);
    border-radius: 14px;
    padding: 12px;
}
table { width: 100%; border-collapse: collapse; }
th { display: none; }
tbody tr { display: block; padding: 8px 0; border-top: 1px solid var(--line); }
td { display: block; padding: 4px 0; border: 0; vertical-align: middle; }
.line { display: flex; gap: 10px; align-items: center; }
.line-media, .line-media img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; }
.line-media { display: grid; place-items: center; color: white; font-weight: 640; }
.totals { margin-top: 8px; }
.totals p { display: flex; justify-content: space-between; font-size: 16px; }
.empty { text-align: center; padding: 28px 8px; }
.pages { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.pages a, .pages span {
    min-width: 32px; height: 32px; display: grid; place-items: center;
    border-radius: 8px; background: var(--paper); border: 1px solid var(--line); font-size: 13px;
}
.pages .is-on { background: var(--ink); color: white; }

.checkout { display: grid; gap: 10px; }
label { display: block; margin-bottom: 10px; }
label span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
input[type="text"], input[type="tel"], textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 10px;
    padding: 12px;
    font-size: 16px;
}
textarea { min-height: 88px; }
.error { color: var(--maroon); margin: 0 0 8px; }

.order-banner {
    margin: 0 0 12px;
    padding: 16px;
    border-radius: 16px;
    background: #143024;
    color: #f7f3ea;
}
.order-banner .kicker { color: #b7e4c7; margin: 0; }
.order-banner h2 { margin: 4px 0 6px; font-size: 22px; font-weight: 640; color: white; }
.order-banner p { margin: 0 0 12px; color: #d7e8dc; }
.order-banner .btn-line { color: #143024; background: #fff; border-color: transparent; }
.order-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-wa { background: #128c7e; color: white; }
.order-list { display: grid; gap: 10px; }
.order-card h3 { margin: 0; font-size: 16px; }
.order-card .meta { margin: 2px 0 8px; color: var(--muted); font-size: 12px; }
.order-card.is-new { outline: 2px solid #143024; }

.tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(var(--nav) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--paper);
    border-top: 1px solid var(--line);
}
.tabbar a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    color: var(--muted);
    font-weight: 520;
}
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tabbar .is-on { color: var(--maroon); }
.tabbar b {
    position: absolute;
    top: 6px;
    margin-left: 16px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    background: var(--maroon);
    color: white;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
}
.tabbar b[hidden] { display: none; }

@media (min-width: 720px) {
    .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .hero { height: min(52vh, 520px); min-height: 320px; margin: 0; border-radius: 14px; }
    .loc img { width: 52px; height: 52px; }
}
@media (min-width: 1020px) {
    .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
