/* MS Jewellery – main styles
   Palette: sindoor red, antique gold, ink, white.  Mobile-first. */

:root {
	--red: #8f1d2c;
	--red-dark: #6a1420;
	--gold: #b5832a;
	--gold-light: #e7cf96;
	--ink: #231a1d;
	--muted: #6a5f62;
	--line: #e7e1e2;
	--soft: #f6f3f4;
	--white: #fff;
	--radius: 10px;
	--font-body: "Mukta", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-head: "Tiro Devanagari Hindi", "Noto Serif Devanagari", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--white); color: var(--ink);
	font-family: var(--font-body); font-size: 17px; line-height: 1.6;
	padding-bottom: 56px; /* room for mobile bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.3; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 200; }
.skip-link:focus { left: 8px; top: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 780px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 46px; padding: 10px 22px; border-radius: 999px;
	font: 600 1rem/1.2 var(--font-body); border: 2px solid transparent;
	cursor: pointer; text-align: center; transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-gold { background: var(--gold-light); color: var(--ink); }
.btn-gold:hover { background: #f1dfae; }
.btn-ghost { background: transparent; color: var(--red); border-color: var(--red); }
.btn-ghost:hover { background: var(--red); color: #fff; }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--ink); color: #e9e2e3; font-size: .88rem; }
.topbar-in { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: var(--gold-light); font-weight: 600; }
.topbar-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
.header-in { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand-link { display: flex; align-items: center; gap: 10px; color: var(--red); }
.brand-link:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-head); font-size: 1.45rem; color: var(--red); }
.brand-tag { font-size: .78rem; color: var(--muted); }
.custom-logo { max-height: 52px; width: auto; }

.nav-toggle { display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: transform .2s; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 20px rgba(35,26,29,.08); }
.site-nav.is-open { display: block; }
.site-nav .menu a { display: block; padding: 14px 20px; color: var(--ink); font-weight: 600; border-top: 1px solid var(--line); }
.site-nav .menu a:hover { background: var(--soft); text-decoration: none; color: var(--red); }
.site-nav .sub-menu a { padding-left: 38px; font-weight: 500; }

/* ---------- Hero + rate board ---------- */
.hero { background: linear-gradient(135deg, #6a1420 0%, #8f1d2c 55%, #7a1826 100%); color: #fff; padding: 40px 0 44px; position: relative; overflow: hidden; }
.hero.has-img { background: linear-gradient(135deg, rgba(106,20,32,.92), rgba(35,26,29,.82)), var(--hero-img) center/cover no-repeat; }
.hero::before { /* quiet repeating diamond motif */
	content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 4l20 20-20 20L4 24z' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
}
.hero-grid { position: relative; display: grid; gap: 30px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero-copy p { color: #f0e3e5; max-width: 34em; font-size: 1.08rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.rates { background: #fff; color: var(--ink); border-radius: 14px; border-top: 5px solid var(--gold); padding: 20px 20px 16px; box-shadow: 0 18px 40px rgba(0,0,0,.28); }
.rates-head { margin-bottom: 8px; }
.rates h2 { font-size: 1.35rem; margin: 0; color: var(--red); }
.rates-date { margin: 2px 0 0; color: var(--muted); font-size: .95rem; }
.rates-list { margin: 0; }
.rate-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.rate-row dt { font-weight: 600; font-size: 1.05rem; }
.rate-row dt small { display: block; font-weight: 400; color: var(--muted); font-size: .82rem; }
.rate-row dd { margin: 0; font-family: var(--font-head); font-size: 1.5rem; color: var(--gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rate-row.rate-silver dd { color: #6b7480; }
.rate-row:last-child { border-bottom: 0; }
.rates-note { margin: 8px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-tight { padding: 28px 0; }
.section-soft { background: var(--soft); }
.section-title { margin-bottom: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.section-head .section-title { margin: 0 0 14px; }
.link-more { font-weight: 600; white-space: nowrap; }
.page-head { background: var(--soft); padding: 28px 0 20px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.page-desc { color: var(--muted); margin-top: 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 600; background: #fff; }
.chips a span { font-size: .8rem; color: var(--muted); font-weight: 500; }
.chips a:hover, .chips a.is-active { border-color: var(--red); color: var(--red); text-decoration: none; }
.chips a.is-active { background: var(--red); color: #fff; }
.chips-filter { margin-bottom: 24px; }

/* ---------- Product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #c9bcc0; }
.badge { position: absolute; left: 8px; top: 8px; background: rgba(35,26,29,.82); color: #fff; font-size: .78rem; padding: 2px 10px; border-radius: 999px; }
.badge-out { left: auto; right: 8px; background: #fff; color: var(--red); border: 1px solid var(--red); }
.card.is-out .card-media img { opacity: .55; }
.card-body { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-family: var(--font-body); font-weight: 600; font-size: 1rem; margin: 0 0 4px; line-height: 1.35; }
.card-title a { color: var(--ink); }
.card-specs { color: var(--muted); font-size: .86rem; margin: 0 0 6px; }
.card-price { font-family: var(--font-head); font-size: 1.2rem; color: var(--red); margin: auto 0 10px; padding-top: 4px; }
.card .btn { min-height: 42px; padding: 8px 12px; font-size: .95rem; }

.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

.trust { display: grid; gap: 22px; }
.trust > div { border-left: 3px solid var(--gold); padding-left: 16px; }
.trust p { color: var(--muted); margin: 0; }

.visit { display: flex; flex-direction: column; gap: 18px; background: var(--soft); border-radius: 14px; padding: 28px 22px; }
.visit .section-title { margin-bottom: 10px; }
.visit p { margin: 0 0 4px; }
.visit-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Single product ---------- */
.crumbs { padding-top: 16px; font-size: .9rem; color: var(--muted); }
.product { display: grid; gap: 24px; }
.product-media { border-radius: var(--radius); overflow: hidden; background: var(--soft); aspect-ratio: 1 / 1; border: 1px solid var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
.product-price { font-family: var(--font-head); font-size: 1.9rem; color: var(--red); margin-bottom: 14px; }
.specs { margin: 0 0 16px; border-top: 1px solid var(--line); }
.specs > div { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.product-desc { color: #3b3033; margin-bottom: 20px; }
.product-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Entries / pagination ---------- */
.entry { margin-bottom: 28px; }
.entry-content img { border-radius: 8px; }
.navigation.pagination { margin-top: 30px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.page-numbers.current { background: var(--red); border-color: var(--red); color: #fff; }
a.page-numbers:hover { text-decoration: none; border-color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #d9d0d2; padding-top: 38px; }
.footer-grid { display: grid; gap: 26px; }
.footer-title { color: var(--gold-light); font-size: 1.15rem; }
.site-footer a { color: #fff; }
.footer-menu li, .footer-contact li { margin-bottom: 6px; }
.social a { margin-right: 14px; }
.footer-bottom { margin-top: 30px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .88rem; color: #a99fa2; }

/* Mobile quick-contact bar */
.mobile-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 -4px 14px rgba(0,0,0,.15); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; min-height: 52px; font-weight: 700; color: #fff; }
.mobile-bar a:first-child { background: var(--red); }
.mobile-bar a:last-child { background: #1f7a4d; }
.mobile-bar a:hover { text-decoration: none; }

/* ---------- Order modal ---------- */
.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(35,26,29,.6); }
.modal-panel { position: relative; background: #fff; width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 24px 20px 22px; animation: sheet .22s ease-out; }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; right: 10px; top: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 2rem; line-height: 1; cursor: pointer; color: var(--muted); }
.modal h2 { font-size: 1.4rem; margin-bottom: 10px; padding-right: 40px; }
.order-summary { display: flex; justify-content: space-between; gap: 10px; background: var(--soft); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.order-price { color: var(--red); font-family: var(--font-head); white-space: nowrap; }
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid #cfc6c8; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); outline: 2px solid rgba(143,29,44,.2); }
.field-row { display: grid; grid-template-columns: 90px 1fr; gap: 12px; }
.hp { position: absolute !important; left: -9999px; height: 0; width: 0; opacity: 0; }
.order-total { display: flex; justify-content: space-between; font-size: 1.1rem; margin: 6px 0 10px; }
.order-total strong { font-family: var(--font-head); color: var(--red); font-size: 1.3rem; }
.form-msg { min-height: 1.4em; color: #b3261e; font-size: .92rem; margin-bottom: 8px; }
.order-form-wrap .btn + .btn { margin-top: 10px; }
.order-help { color: var(--muted); font-size: .84rem; text-align: center; margin: 12px 0 0; }
.order-done { text-align: center; padding: 20px 0; }
.done-mark { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #1f7a4d; color: #fff; font-size: 2rem; display: flex; align-items: center; justify-content: center; }
body.modal-open { overflow: hidden; }

/* ---------- Tablet & up ---------- */
@media (min-width: 700px) {
	body { padding-bottom: 0; }
	.mobile-bar { display: none; }
	.grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
	.card-body { padding: 16px; }
	.trust { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; }
	.visit { flex-direction: row; align-items: center; justify-content: space-between; padding: 32px 36px; }
	.product { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
	.product-actions { flex-direction: row; }
	.modal { align-items: center; }
	.modal-panel { width: 480px; border-radius: 16px; max-height: 90vh; }
	.btn-block { width: 100%; }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
	.nav-toggle { display: none; }
	.site-nav { display: block; position: static; border: 0; box-shadow: none; background: none; }
	.site-nav .menu { display: flex; gap: 4px; }
	.site-nav .menu li { position: relative; }
	.site-nav .menu a { border: 0; padding: 10px 14px; border-radius: 8px; }
	.site-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 24px rgba(35,26,29,.1); padding: 6px; z-index: 5; }
	.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: block; }
	.site-nav .sub-menu a { padding: 9px 14px; }
	.hero { padding: 64px 0 70px; }
	.hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
	.grid { grid-template-columns: repeat(4, 1fr); }
	.trust { grid-template-columns: repeat(4, 1fr); }
	.section { padding: 64px 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .topbar-addr { display: none; } .topbar-in { justify-content: center; } }

/* =========================================================
   Cart (added in step 2)
   ========================================================= */
[hidden] { display: none !important; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.cart-btn { position: relative; width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); cursor: pointer; }
.cart-btn:hover { border-color: var(--red); color: var(--red); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 700; line-height: 22px; text-align: center; }

.cart-empty { color: var(--muted); padding: 10px 0 18px; }
.cart-lines { margin: 0 0 6px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { display: block; width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { display: block; color: var(--ink); font-weight: 600; line-height: 1.3; }
.cart-unit { display: block; color: var(--muted); font-size: .88rem; margin: 2px 0 6px; }
.cart-sum { font-family: var(--font-head); font-weight: 400; color: var(--red); white-space: nowrap; }
.cart-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid #cfc6c8; border-radius: 8px; }
.qty button { width: 36px; height: 36px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--ink); }
.qty button:hover { color: var(--red); }
.qty span { min-width: 26px; text-align: center; font-weight: 600; }
.cart-remove { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: .88rem; text-decoration: underline; cursor: pointer; }
.cart-remove:hover { color: var(--red); }

.order-total { padding-top: 12px; }
.order-help-left { text-align: left; margin: -4px 0 8px; }
.form-sub { font-family: var(--font-body); font-weight: 700; font-size: 1rem; margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.cart-more { margin-top: 6px; }

.toast { position: fixed; left: 50%; bottom: 72px; transform: translateX(-50%); z-index: 120; background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
@media (min-width: 700px) { .toast { bottom: 28px; } }

@media (min-width: 960px) { .header-actions { order: 3; } }
.product-actions .btn { width: 100%; }
@media (min-width: 700px) { .product-actions .btn { width: auto; flex: 1 1 auto; } }

/* =========================================================
   Shop filters (added in step 3)
   ========================================================= */
.filters { display: grid; gap: 10px; margin-bottom: 14px; padding: 14px; background: var(--soft); border-radius: var(--radius); }
.filter-search input, .filter-selects select {
	width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #cfc6c8; border-radius: 8px;
	font: inherit; background: #fff; color: var(--ink);
}
.filter-search input:focus, .filter-selects select:focus { border-color: var(--red); outline: 2px solid rgba(143,29,44,.2); }
.filter-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-selects select:last-child { grid-column: 1 / -1; }
.filter-actions { display: flex; gap: 10px; }
.filter-actions .btn { flex: 1; min-height: 44px; }
.result-count { color: var(--muted); font-size: .92rem; margin: 0 0 16px; }
.result-count span { margin-left: 6px; }

@media (min-width: 960px) {
	.filters { grid-template-columns: 1.4fr 2fr auto; align-items: center; }
	.filter-selects { grid-template-columns: repeat(3, 1fr); }
	.filter-selects select:last-child { grid-column: auto; }
	.filter-actions .btn { flex: none; }
}

/* =========================================================
   Rate change arrows (added in step 4)
   ========================================================= */
.rate-row dd { text-align: right; }
.chg { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .01em; }
.chg.up { color: #1f7a4d; }
.chg.down { color: #b3261e; }


/* =========================================================
   Product gallery (added in step 5)
   ========================================================= */
.product-gallery { min-width: 0; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumb { display: block; width: 68px; height: 68px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--soft); cursor: pointer; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active, .thumb:hover { border-color: var(--red); }
@media (min-width: 700px) { .thumb { width: 78px; height: 78px; } }
