/* Masonic Diaries & Regalia: Concept A "Heritage" */

:root {
  --ivory: #F7F3EA;
  --ivory-deep: #EFE7D4;
  --line: #E3D9C2;
  --line-strong: #D8CCAE;
  --navy: #14233F;
  --navy-hover: #1D3156;
  --navy-line: #33456A;
  --ink-soft: #3A4660;
  --gold: #A8812F;           /* decorative lines only */
  --gold-text: #7D5F1E;      /* gold for text on ivory (passes contrast) */
  --gold-light: #D9BE7E;     /* gold for text on navy */
  --error: #A3261B;
  --ok: #2E6B3A;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--navy); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--gold-text); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: clamp(38px, 5vw, 60px); }
h2 { font-size: clamp(32px, 4vw, 46px); }
h3 { font-size: 30px; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.narrow { max-width: 800px; }
.section { padding-top: 64px; padding-bottom: 72px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: var(--ivory); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.muted { color: var(--ink-soft); }
small.muted { display: block; font-size: 14px; }
.empty { color: var(--ink-soft); padding: 24px 0; }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-text); display: block; }
.eyebrow.gold { color: var(--gold-light); }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 36em; }
.prose { max-width: 42em; }
.prose a { color: var(--gold-text); }
.prose ul, .prose ol { padding-left: 1.3em; }

/* buttons and links */
.btn { display: inline-block; background: var(--navy); color: var(--ivory); border: 1px solid var(--navy); padding: 14px 28px; font-weight: 600; font-size: 14px;
       letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--navy-hover); color: var(--ivory); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--ivory); }
.btn-light { background: var(--ivory); color: var(--navy); border-color: var(--ivory); }
.btn-light:hover { background: #fff; color: var(--navy); }
.btn-small { padding: 9px 14px; font-size: 13px; min-height: 40px; }
.text-link { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
             border-bottom: 1px solid var(--gold); padding: 10px 0; }
.link-button { background: none; border: 0; padding: 8px 0; color: var(--gold-text); text-decoration: underline; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding-top: 8px; }

/* header */
.top-strip { background: var(--navy); color: #E9DFC6; font-size: 14px; letter-spacing: .04em; text-align: center; padding: 10px 16px; }
.site-header { padding-top: 28px; }
.header-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.header-search { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #C9B98F; padding: 6px 2px; max-width: 220px; }
.header-search svg, .header-basket svg { fill: none; stroke: var(--navy); stroke-width: 1.6; flex: none; }
.header-search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 15px; min-height: 32px; }
.brand { text-decoration: none; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 54px; line-height: 1; }
.brand-sub { font-size: 16px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-text); }
.header-basket { justify-self: end; display: flex; align-items: center; gap: 8px; text-decoration: none; font-size: 15px; min-height: 44px; }
.gold-rule { height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); margin-top: 20px; }
.main-nav { position: relative; text-align: center; padding: 4px 24px 12px; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 30px; }
.main-nav a { display: block; padding: 12px 0; font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; }
.main-nav a[aria-current="page"] { color: var(--gold-text); }
.has-dropdown { position: relative; }
.has-dropdown > a::after { content: ' ▾'; }
.dropdown { display: none; position: absolute; left: 50%; transform: translateX(-50%); top: 100%; z-index: 20; list-style: none; margin: 0; padding: 8px 0;
            background: var(--ivory); border: 1px solid var(--line-strong); min-width: 240px; text-align: left; box-shadow: 0 8px 24px rgba(20,35,63,.12); }
.dropdown a { padding: 10px 20px; letter-spacing: .06em; text-transform: none; font-size: 15px; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
.nav-toggle { display: none; }

.flash { margin-top: 20px; padding: 12px 16px; border: 1px solid var(--line-strong); background: #fff; }
.flash-ok { border-color: #A9C8AE; background: #EEF6EF; }
.flash-warn { border-color: #E3C77A; background: #FBF4DF; }
.flash-error { border-color: #E2A59E; background: #FBECEA; color: var(--error); }

/* hero */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 40px; padding-bottom: 80px; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 8px; }
.hero h1 { font-size: clamp(44px, 6vw, 72px); line-height: 1.02; margin-bottom: 12px; }
.hero .eyebrow { font-size: 20px; letter-spacing: .24em; }
.hero-image { flex: 1 1 420px; position: relative; }
.hero-image::before { content: ''; position: absolute; inset: 18px -18px -18px 18px; border: 1px solid var(--gold); }
.hero-image img { position: relative; width: 100%; height: 480px; object-fit: cover; background: #fff; }

/* section tiles */
.band-navy { background: var(--navy); color: var(--ivory); padding: 80px 0; }
.band-navy h2 { color: var(--ivory); }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; }
.section-head.split { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.section-head.split h2 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1px; background: var(--navy-line); border: 1px solid var(--navy-line); }
.tile { background: var(--navy); color: var(--ivory); padding: 28px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-decoration: none; }
.tile:hover { background: var(--navy-hover); color: var(--ivory); }
.tile-name { font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1.15; }
.tile-count { font-size: 14px; color: var(--gold-light); white-space: nowrap; }
.tiles-light { margin-bottom: 48px; }

/* product cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 10px; position: relative; }
.card-link { text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.card-img { overflow: hidden; background: #fff; border: 1px solid var(--line); aspect-ratio: 5 / 6; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card-link:hover .card-img img { transform: scale(1.03); }
.card-title { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.15; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.card-foot form { margin: 0; }
.no-image { color: var(--ink-soft); font-size: 14px; }
.price { font-size: 17px; }
.price .was { color: var(--ink-soft); font-size: 15px; margin-left: 6px; }
.price-note { color: var(--ink-soft); font-style: italic; }

/* promos */
.promo-row { display: flex; flex-wrap: wrap; gap: 32px; padding-top: 0; }
.promo-bespoke { flex: 1 1 460px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); background: var(--ivory-deep); border: 1px solid var(--line); position: relative; }
.promo-bespoke img { width: 100%; height: 100%; min-height: 280px; object-fit: cover; background: #fff; }
.promo-text { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.promo-text p { color: var(--ink-soft); }
.promo-app { flex: 1 1 360px; background: var(--navy); color: var(--ivory); padding: 40px; display: flex; flex-direction: column; justify-content: center; position: relative; }
.promo-app h3 { color: var(--ivory); font-size: 34px; }
.promo-app p { color: #C9D1E0; }
.store-links { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }

/* page bits */
.breadcrumb { font-size: 15px; color: var(--ink-soft); margin-bottom: 24px; }
.breadcrumb a { color: var(--ink-soft); }
.page-head { margin-bottom: 40px; position: relative; }
.hidden-tag { display: inline-block; background: #FBF4DF; border: 1px solid #E3C77A; color: #5E4A12; font-size: 13px; padding: 2px 8px; margin: 0; }
.card .hidden-tag { position: absolute; top: 8px; left: 8px; }
.is-hidden { opacity: .6; }

/* product page */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; position: relative; }
.product-main-image { background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; min-height: 300px; }
.product-main-image img { width: 100%; max-height: 640px; object-fit: contain; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb { width: 78px; height: 78px; padding: 0; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-current { border: 2px solid var(--navy); }
.product-info h1 { font-size: clamp(36px, 4vw, 52px); }
.subtitle { font-size: 18px; color: var(--ink-soft); }
.product-price { font-size: 24px; margin: 8px 0 24px; }
.product-price .price { font-size: 26px; }
.buy-form { border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); padding: 24px 0; margin-bottom: 28px; }
.buy-row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.field-qty input { width: 90px; }
.product-description { margin-top: 8px; }

/* forms */
.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; }
.field input, .field select, .field textarea, .search-form input {
  border: 1px solid #BFB394; background: #fff; padding: 10px 12px; min-height: 44px; width: 100%; border-radius: 0; }
.field textarea { min-height: 120px; resize: vertical; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field-error, .form-error { color: var(--error); font-size: 15px; margin: 0; }
.form-error { margin-bottom: 16px; }
.radio, .checkbox { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; }
.radio input, .checkbox input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.checkbox.has-error { color: var(--error); }
.hp { position: absolute; left: -9999px; }
.panel { background: #fff; border: 1px solid var(--line); padding: 28px; margin-bottom: 24px; }
.panel h2 { font-size: 30px; }
.search-form { display: flex; gap: 12px; margin-bottom: 32px; max-width: 640px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-family: var(--serif); font-size: 28px; font-weight: 600; margin-bottom: 12px; }

/* contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.contact-layout article { position: relative; }

/* basket and checkout */
.basket-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.basket-table th, .basket-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.basket-table th { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.basket-item { display: flex; gap: 14px; align-items: center; }
.basket-item img { width: 64px; height: 64px; object-fit: cover; border: 1px solid var(--line); }
.qty { width: 80px; border: 1px solid #BFB394; padding: 8px; min-height: 44px; }
.num { text-align: right !important; }
.is-unavailable { opacity: .7; }
.basket-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; margin-top: 24px; }
.totals { display: flex; flex-direction: column; gap: 8px; min-width: 280px; }
.totals > div { display: flex; justify-content: space-between; gap: 24px; }
.totals .grand { border-top: 1px solid var(--line-strong); padding-top: 10px; font-size: 20px; }
.totals .btn { margin-top: 10px; text-align: center; }
.steps { list-style: none; display: flex; gap: 24px; padding: 0; margin: 0 0 32px; color: var(--ink-soft); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.steps li[aria-current] { color: var(--navy); font-weight: 600; border-bottom: 2px solid var(--gold); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; }
.order-summary { grid-column: 2; grid-row: 1 / span 3; align-self: start; position: sticky; top: 24px; }
.summary-lines { list-style: none; padding: 0; margin: 0 0 16px; }
.summary-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 24px 0; }
.review-grid h2 { font-size: 24px; margin-bottom: 6px; }
.order-ref { font-size: 20px; }
.bank-details { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 20px; }
.bank-details dt { color: var(--ink-soft); }
.bank-details dd { margin: 0; font-weight: 600; }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.gallery-grid figure { margin: 0; background: #fff; border: 1px solid var(--line); }
.gallery-grid img { width: 100%; height: 260px; object-fit: cover; }
.gallery-grid figcaption { padding: 10px 14px; font-size: 15px; }

/* footer */
.site-footer { border-top: 1px solid var(--line-strong); padding: 40px 0; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.footer-text, .footer-nav { position: relative; }
.footer-brand { font-family: var(--serif); font-size: 24px; font-weight: 700; display: block; }
.footer-body { color: var(--ink-soft); font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: center; font-size: 15px; }
.footer-nav a { color: var(--ink-soft); padding: 10px 0; }

/* phones and small tablets */
@media (max-width: 860px) {
  .product, .contact-layout, .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .order-summary { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .header-row { grid-template-columns: 1fr auto; }
  .brand { grid-column: 1 / -1; grid-row: 1; }
  .brand-name { font-size: 40px; }
  .brand-sub { font-size: 14px; }
  .hero .eyebrow { font-size: 17px; }
  .header-search { max-width: none; }
  .nav-toggle { display: inline-block; background: none; border: 1px solid var(--navy); padding: 10px 18px; min-height: 44px; font-weight: 600;
                letter-spacing: .14em; text-transform: uppercase; font-size: 14px; margin-top: 8px; cursor: pointer; }
  .main-nav > ul { display: none; flex-direction: column; gap: 0; text-align: left; margin-top: 12px; border-top: 1px solid var(--line); }
  .main-nav.is-open > ul { display: flex; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .dropdown { position: static; transform: none; display: block; border: 0; box-shadow: none; background: transparent; padding: 0 0 8px 16px; min-width: 0; }
  .has-dropdown > a::after { content: ''; }
  .hero { gap: 40px; padding-bottom: 56px; }
  .hero-image::before { display: none; }
  .hero-image img { height: 320px; }
  .band-navy { padding: 56px 0; }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .card-title { font-size: 20px; }
  .section { padding-top: 40px; padding-bottom: 48px; }
  .basket-table thead { display: none; }
  .basket-table, .basket-table tbody, .basket-table tr, .basket-table td { display: block; width: 100%; }
  .basket-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .basket-table td { border: 0; padding: 6px 16px; }
  .basket-table td[data-label]::before { content: attr(data-label) ': '; color: var(--ink-soft); }
  .num { text-align: left !important; }
  .totals { min-width: 0; width: 100%; }
  .promo-text, .promo-app, .panel { padding: 24px; }
}
@media (max-width: 420px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}

/* cookie consent banner */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 760px; margin: 0 auto;
                 background: var(--navy); color: var(--ivory); padding: 18px 20px; display: flex; flex-wrap: wrap; gap: 12px 20px;
                 align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1 1 320px; font-size: 15px; }
.cookie-banner a { color: var(--gold-light); }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { min-width: 96px; }
.cookie-settings { color: var(--ink-soft); font-size: 15px; }
.cookie-settings[hidden] { display: none; }

/* designer credit, bottom of the footer */
.credit { margin: 24px auto 0; font-size: 13px; color: var(--ink-soft); text-align: center; }
.credit a { color: var(--ink-soft); }
.credit a:hover { color: var(--gold-text); }
