/*
Theme Name: Mangalsutra Design
Theme URI: https://mangalsutradesign.com/
Author: Mangalsutra Design
Description: Jewellery gallery theme for mangalsutra designs: square design cards with weight, length and a jeweller note, grouped browsing, a full-screen viewer and image SEO.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mangalsutradesign
*/

@font-face { font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/marcellus-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/nunito-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); }

:root {
	--bg: #fdfaf3;
	--card: #ffffff;
	--ink: #1f1a17;
	--soft: #6b6058;
	--gold: #b68a2e;
	--gold-lt: #f4ead3;
	--gold-line: #e6d6b0;
	--night: #1f1a17;
	--line: #ece4d4;
	--r: 10px;
	--wrap: 1200px;
	--head: "Marcellus", "Times New Roman", serif;
	--body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16.5px/1.7 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: #8a6416; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--head); font-weight: 400; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); margin: .25em 0 .4em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.95rem); margin: 1.7em 0 .5em; }
h2::after { content: ""; display: block; width: 46px; height: 2px; background: var(--gold); margin-top: 10px; }
.ms-home-hero h1::after, .ms-faq h2::after { display: none; }
h3 { font-size: 1.15rem; margin: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }

/* header: dark band, menu left, brand centre, link right */
.ms-head { position: sticky; top: 0; z-index: 30; background: var(--night); color: #f6efe0; box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.ms-head .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 60px; gap: 10px; }
.ms-brand { display: flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; justify-self: center; }
.ms-brand svg { width: 32px; height: 32px; }
.ms-brand b { font: 400 1.3rem/1 var(--head); letter-spacing: .6px; white-space: nowrap; }
.ms-cta { justify-self: end; color: var(--gold-lt); font-size: .86rem; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.ms-cta:hover { color: #fff; }
.ms-menu { justify-self: start; }
.ms-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: .9rem; padding: 6px 0; }
.ms-menu > summary::-webkit-details-marker { display: none; }
.ms-menu .bars, .ms-menu .bars::before, .ms-menu .bars::after { display: block; width: 20px; height: 2px; background: var(--gold); position: relative; content: ""; }
.ms-menu .bars::before { position: absolute; top: -6px; } .ms-menu .bars::after { position: absolute; top: 6px; }
.ms-panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; color: var(--ink); border-top: 3px solid var(--gold); box-shadow: 0 20px 40px rgba(0, 0, 0, .18); max-height: calc(100vh - 60px); overflow: auto; }
.ms-panel .wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 28px; padding-top: 16px; padding-bottom: 20px; align-items: start; }
.ms-panel h3 { font-size: 1.05rem; color: var(--gold); margin: 10px 0 4px; }
.ms-panel ul { list-style: none; margin: 0; padding: 0; }
.ms-panel li a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; font-size: .95rem; }
.ms-panel li a:hover { color: #8a6416; }
@media (max-width: 480px) { .ms-cta { display: none; } .ms-head .wrap { grid-template-columns: auto 1fr; } .ms-brand { justify-self: end; } .ms-brand b { font-size: 1.12rem; } .ms-menu .lbl { display: none; } }

/* page header */
.ms-crumbs { font-size: .84rem; color: var(--soft); margin: 18px 0 0; }
.ms-crumbs a { color: var(--soft); }
.ms-crumbs span[aria-hidden] { margin: 0 6px; color: var(--gold); }
.ms-hero { padding: 4px 0 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.ms-kicker { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; padding: 0; list-style: none; font-size: .86rem; color: var(--soft); }
.ms-kicker li::before { content: "\25C6"; color: var(--gold); margin-right: 6px; font-size: .7rem; }
.ms-intro { max-width: 800px; font-size: 1.04rem; }
.ms-jump { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 4px 0 6px; }
.ms-jump a { text-decoration: none; color: var(--ink); font-size: .86rem; padding: 6px 12px; border-radius: 999px; background: var(--gold-lt); border: 1px solid var(--gold-line); }
.ms-jump a:hover { background: #fff; }

/* gallery */
.ms-sec > p { max-width: 800px; }
.ms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0 8px; }
@media (min-width: 700px) { .ms-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1080px) { .ms-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ms-card { margin: 0; background: var(--card); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(31, 26, 23, .06), 0 6px 18px rgba(31, 26, 23, .05); }
.ms-zoom { display: block; aspect-ratio: 1 / 1; background: var(--gold-lt); overflow: hidden; position: relative; }
.ms-zoom img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.ms-zoom:hover img { opacity: .92; }
.ms-card figcaption { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: .88rem; line-height: 1.5; }
.ms-spec { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; margin: 0; font-size: .78rem; }
.ms-spec dt { color: var(--soft); }
.ms-spec dd { margin: 0; font-weight: 700; color: var(--ink); }
.ms-card .cap { margin: 0; }
.ms-card .tip { margin: auto 0 0; background: var(--gold-lt); border-radius: 6px; padding: 6px 8px; font-size: .8rem; color: #4d4235; }
.ms-card .tip b { color: #8a6416; }
@media (max-width: 480px) { .ms-card figcaption { padding: 8px 9px 10px; font-size: .82rem; } }

/* guide + faq */
.ms-guide { margin: 30px 0; padding: 2px 0 6px; border-top: 1px solid var(--line); }
.table-scroll { overflow-x: auto; margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; background: #fff; }
th, td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top; }
th { background: var(--night); color: #f6efe0; font-weight: 700; }
.ms-faq { background: #fff; border-radius: var(--r); padding: 6px 18px 12px; margin-top: 28px; }
.ms-faq details { border-bottom: 1px solid var(--line); }
.ms-faq details:last-child { border-bottom: 0; }
.ms-faq summary { cursor: pointer; padding: 14px 30px 14px 0; position: relative; list-style: none; }
.ms-faq summary::-webkit-details-marker { display: none; }
.ms-faq summary::after { content: "\25BE"; position: absolute; right: 4px; top: 14px; color: var(--gold); transition: transform .2s; }
.ms-faq details[open] summary::after { transform: rotate(180deg); }
.ms-faq summary h3 { display: inline; font: 700 1.02rem/1.4 var(--body); }

/* tiles */
.ms-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 8px; }
@media (min-width: 640px) { .ms-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .ms-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ms-tile { display: block; text-decoration: none; color: var(--ink); background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 2px rgba(31, 26, 23, .06); }
.ms-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.ms-tile span { display: block; padding: 8px 10px 10px; line-height: 1.3; }
.ms-tile b { display: block; font: 400 1rem/1.25 var(--head); }
.ms-tile small { color: var(--soft); font-size: .76rem; }
.ms-more { margin: 34px 0 10px; }

/* home */
.ms-home-hero { padding: 40px 0 16px; text-align: center; }
.ms-home-hero p.lead { color: var(--soft); max-width: 640px; margin: 0 auto 18px; }
.ms-groupnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ms-groupnav a { display: inline-block; text-decoration: none; padding: 7px 14px; border-radius: 6px; background: var(--night); color: #f6efe0; font-size: .88rem; font-weight: 700; }
.ms-groupnav a:hover { background: var(--gold); color: var(--night); }
.ms-group h2 small { font: 400 .9rem var(--body); color: var(--soft); margin-left: 8px; }

.ms-main { padding-bottom: 40px; }
.ms-static { max-width: 800px; padding: 10px 0 40px; }
.ms-ad { margin: 26px 0; text-align: center; }

/* footer */
.ms-foot { background: var(--night); color: #d9cfbd; margin-top: 30px; padding: 34px 0 22px; font-size: .9rem; border-top: 3px solid var(--gold); }
.ms-foot a { color: #fff; text-decoration: none; }
.ms-foot a:hover { color: var(--gold-lt); text-decoration: underline; }
.ms-foot .cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 24px; }
.ms-foot h3 { color: var(--gold); font-size: 1.05rem; margin: 10px 0 6px; }
.ms-foot ul { list-style: none; margin: 0; padding: 0; }
.ms-foot li { padding: 3px 0; }
.ms-foot .legal { border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 22px; padding-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

/* viewer */
.ms-view { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: rgba(20, 16, 13, .97); color: #fff; }
.ms-view::backdrop { background: rgba(20, 16, 13, .97); }
.ms-view .stage { position: absolute; inset: 54px 0 116px; display: flex; align-items: center; justify-content: center; }
.ms-view .stage img { max-width: 94vw; max-height: 100%; object-fit: contain; border-radius: 6px; }
.ms-view .bar { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; }
.ms-view .info { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 16px 16px; text-align: center; }
.ms-view .info p { margin: 0 auto 10px; max-width: 760px; font-size: .92rem; color: #eadfc9; }
.ms-view button, .ms-view .act a { font: 700 .85rem var(--body); color: var(--night); background: var(--gold-lt); border: 0; border-radius: 6px; padding: 8px 14px; cursor: pointer; text-decoration: none; }
.ms-view .act { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ms-view .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; padding: 0; font-size: 1.4rem; }
.ms-view .prev { left: 10px; } .ms-view .next { right: 10px; }
.ms-view .count { font-size: .85rem; opacity: .8; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
