/* ==========================================================================
   ONE GRAM ATELIER — SINGLE TYPEFACE SYSTEM
   The Year of Handicrafts (local OTF files only)
   ========================================================================== */

@font-face {
  font-family: 'The Year of Handicrafts';
  src: url('assets/fonts/TheYearofHandicrafts-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Year of Handicrafts';
  src: url('assets/fonts/TheYearofHandicrafts-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Year of Handicrafts';
  src: url('assets/fonts/TheYearofHandicrafts-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Year of Handicrafts';
  src: url('assets/fonts/TheYearofHandicrafts-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'The Year of Handicrafts';
  src: url('assets/fonts/TheYearofHandicrafts-Black.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Default DARK THEME */
:root {
  --theme: 'dark';
  --bg-deep: #080305;
  --bg-surface: #12070a;
  --bg-card: rgba(22, 9, 13, 0.9);
  --bg-card-hover: rgba(34, 14, 20, 0.98);
  --bg-hero-glass: rgba(14, 5, 8, 0.85);
  --bg-input: rgba(0, 0, 0, 0.65);
  --bg-modal: #0d0407;
  
  --text-pure: #ffffff;
  --text-main: #f4ede4;
  --text-muted: #a89792;
  
  --gold-primary: #d4a373;
  --gold-light: #eddcd2;
  --gold-vivid: #e9b384;
  --gold-border: rgba(212, 163, 115, 0.22);
  --gold-border-active: rgba(212, 163, 115, 0.7);
  
  --butter-beam: #ffd166;
  --butter-glow: rgba(255, 209, 102, 0.4);
  
  --nav-bg: rgba(8, 3, 5, 0.96);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --hero-bg-filter: brightness(0.4) contrast(1.15);
  --shadow-card: 0 16px 40px -8px rgba(0,0,0,0.8);
  --shadow-glow: 0 0 20px rgba(212, 163, 115, 0.25);
  --badge-bg: rgba(9, 3, 5, 0.72);
  --badge-text: #f4d6b4;
  --badge-border: rgba(244, 214, 180, 0.26);

  /* Single active typeface */
  --font-primary: 'The Year of Handicrafts', sans-serif;
}

/* LIGHT THEME */
html.theme-light {
  --theme: 'light';
  --bg-deep: #f8f4ee;
  --bg-surface: #efe8dc;
  --bg-card: #ffffff;
  --bg-card-hover: #fcfbf8;
  --bg-hero-glass: rgba(255, 255, 255, 0.94);
  --bg-input: #ffffff;
  --bg-modal: #ffffff;
  
  --text-pure: #140704;
  --text-main: #23110b;
  --text-muted: #6b554c;
  
  --gold-primary: #a86c36;
  --gold-light: #804e20;
  --gold-vivid: #8c5524;
  --gold-border: rgba(168, 108, 54, 0.28);
  --gold-border-active: rgba(168, 108, 54, 0.85);
  
  --butter-beam: #c8813a;
  --butter-glow: rgba(200, 129, 58, 0.35);
  
  --nav-bg: rgba(248, 244, 238, 0.96);
  --border-subtle: rgba(168, 108, 54, 0.18);
  --hero-bg-filter: brightness(0.85) blur(3px) contrast(0.95);
  --shadow-card: 0 16px 40px -8px rgba(168, 108, 54, 0.12);
  --shadow-glow: 0 0 20px rgba(168, 108, 54, 0.18);
  --badge-bg: rgba(255, 251, 245, 0.88);
  --badge-text: #71411c;
  --badge-border: rgba(113, 65, 28, 0.22);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Single typeface application */
html,
body,
button,
input,
select,
textarea,
option,
body *:not(svg):not(path) {
  font-family: var(--font-primary) !important;
  letter-spacing: normal !important;
}

.brand-track,
.latin-track {
  letter-spacing: 0.1em !important;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  overflow-x: hidden;
  line-height: 1.75;
  background-color: var(--bg-deep);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Tabular Numerals */
.num-val {
  font-family: var(--font-primary) !important;
  font-feature-settings: 'tnum' on, 'lnum' on;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0 !important;
  display: inline-block;
  vertical-align: baseline;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--gold-border-active); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Film Grain Texture */
.film-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Hero Background Stage */
.hero-stage-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.hero-stage-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--hero-bg-filter);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 12s ease-out;
  transform: scale(1.03);
  will-change: transform, opacity;
}

/* Hero Frosted Editorial Card */
.hero-editorial-card {
  background: var(--bg-hero-glass);
  border: 1px solid var(--gold-border-active);
  border-radius: 2rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), var(--shadow-glow);
  position: relative;
  z-index: 10;
}
html.theme-light .hero-editorial-card {
  box-shadow: 0 20px 50px -10px rgba(168, 108, 54, 0.15);
}

/* ==========================================================================
   CREATIVE FRENCH BUTTER-FLOW BORDER ANIMATION (حركة انسياب الزبدة على الإطار)
   ========================================================================== */

@property --butter-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotateButterGlow {
  0% { --butter-angle: 0deg; }
  100% { --butter-angle: 360deg; }
}

.exhibition-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 1.25rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  z-index: 1;
  border: 1px solid var(--gold-border);
}

/* Animated Golden Butter Beam Pseudo-Element */
.exhibition-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1.35rem;
  padding: 2px;
  background: conic-gradient(
    from var(--butter-angle),
    transparent 0deg,
    transparent 280deg,
    var(--butter-beam) 340deg,
    var(--gold-vivid) 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateButterGlow 6s linear infinite;
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.exhibition-card:hover::before {
  opacity: 1;
  animation-duration: 3s;
}

.exhibition-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -8px var(--butter-glow), 0 0 24px rgba(212, 163, 115, 0.2);
}

/* ==========================================================================
   BUTTON ARCHITECTURE
   ========================================================================== */

.btn-hero-primary {
  min-height: 48px;
  padding: 0.65rem 1.85rem;
  background: var(--gold-primary);
  color: #ffffff;
  border: 1px solid var(--gold-vivid);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px rgba(168, 108, 54, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: normal !important;
}
html:not(.theme-light) .btn-hero-primary {
  color: #080305;
}
.btn-hero-primary:hover {
  background: var(--gold-vivid);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(168, 108, 54, 0.45);
}

.btn-hero-secondary {
  min-height: 48px;
  padding: 0.65rem 1.85rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-pure);
  border: 1px solid var(--gold-border-active);
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: normal !important;
}
html.theme-light .btn-hero-secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-pure);
}
.btn-hero-secondary:hover {
  background: rgba(212, 163, 115, 0.2);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

/* Nav Action & Utility */
.btn-nav-utility {
  height: 36px;
  padding: 0 0.85rem;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--gold-border);
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: normal !important;
  flex-shrink: 0;
}
.btn-nav-utility:hover {
  border-color: var(--gold-primary);
  color: var(--text-pure);
  background: rgba(212, 163, 115, 0.12);
}

.btn-nav-action {
  height: 36px;
  padding: 0 1.15rem;
  background: var(--gold-primary);
  color: #ffffff;
  border: 1px solid var(--gold-vivid);
  border-radius: 9999px;
  font-size: 0.775rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: normal !important;
  flex-shrink: 0;
}
html:not(.theme-light) .btn-nav-action {
  color: #080305;
}
.btn-nav-action:hover {
  background: var(--gold-vivid);
  transform: translateY(-1px);
}

.btn-card-action {
  height: 32px;
  padding: 0 0.85rem;
  background: var(--gold-primary);
  color: #ffffff;
  border: 1px solid var(--gold-vivid);
  border-radius: 9999px;
  font-size: 0.725rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: normal !important;
  flex-shrink: 0;
}
html:not(.theme-light) .btn-card-action {
  color: #080305;
}
.btn-card-action:hover {
  background: var(--gold-vivid);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(168, 108, 54, 0.35);
}

.scene-pill {
  height: 34px;
  padding: 0 1rem;
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  color: var(--text-main);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: normal !important;
}
.scene-pill:hover, .scene-pill.active {
  background: var(--gold-primary);
  border-color: var(--gold-vivid);
  color: #ffffff;
  font-weight: 700;
  box-shadow: var(--shadow-glow);
}
html:not(.theme-light) .scene-pill:hover, html:not(.theme-light) .scene-pill.active {
  color: #080305;
}

.menu-tab-btn {
  height: 38px;
  padding: 0 1.25rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--gold-border);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: normal !important;
}
.menu-tab-btn:hover {
  color: var(--text-pure);
  background: rgba(212, 163, 115, 0.15);
  border-color: var(--gold-primary);
}
.menu-tab-btn.active {
  color: #ffffff;
  background: var(--gold-primary);
  font-weight: 700;
  border-color: var(--gold-vivid);
  box-shadow: var(--shadow-glow);
}
html:not(.theme-light) .menu-tab-btn.active {
  color: #080305;
}

/* Mobile Navigation Drawer */
#mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 82%;
  max-width: 320px;
  background: var(--bg-modal);
  border-left: 1px solid var(--gold-border);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
html[dir="ltr"] .drawer-panel {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid var(--gold-border);
  transform: translateX(-100%);
}
#mobile-nav-drawer.open .drawer-panel {
  transform: translateX(0);
}

/* Modal System */
.master-modal {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.master-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.master-modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--gold-border);
  transform: translateY(16px) scale(0.98);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.master-modal.open .master-modal-content {
  transform: translateY(0) scale(1);
}

/* Toast */
#master-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 10000;
  background: var(--bg-card);
  color: var(--gold-vivid);
  border: 1px solid var(--gold-primary);
  padding: 0.65rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: normal !important;
}
#master-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Clear paths for ordering, location and business supply */
.quick-path-card {
  min-height: 3.5rem;
  border: 1px solid var(--gold-border);
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  background: var(--bg-card);
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.quick-path-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-primary);
  background: var(--bg-card-hover);
  color: var(--gold-light);
}

.quick-path-icon {
  color: var(--gold-primary);
  font-size: 1rem;
}

.mobile-action-bar {
  position: fixed;
  z-index: 45;
  right: 0.75rem;
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: 0.75rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--gold-border);
  border-radius: 1rem;
  background: var(--nav-bg);
  background: color-mix(in srgb, var(--nav-bg) 92%, transparent);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-action-bar a {
  min-height: 2.8rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.mobile-action-primary {
  color: #0b120d;
  background: #58d68d;
}

.mobile-action-link {
  color: var(--text-main);
  background: var(--bg-card);
}

@media (max-width: 639px) {
  body { padding-bottom: 5.6rem; }
}

/* Featured daily selections */
.featured-product-card {
  overflow: hidden;
  border: 1px solid var(--gold-border);
  border-radius: 1.15rem;
  background: var(--bg-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.featured-product-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-card);
}

.featured-product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-surface);
}

.featured-product-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-product-card:hover .featured-product-media img {
  transform: scale(1.05);
}

.featured-product-tag {
  position: absolute;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  color: var(--badge-text);
  background: var(--badge-bg);
  font-size: 0.68rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.collection-product-tag {
  border: 1px solid var(--badge-border);
  color: var(--badge-text);
  background: var(--badge-bg);
  backdrop-filter: blur(8px);
}

.theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 639px) {
  .theme-toggle-control { width: 36px; padding: 0; }
  .theme-toggle-control #theme-toggle-label { display: none; }
}

.featured-product-content {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
}

.featured-product-content h3 {
  color: var(--text-pure);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
}

.featured-product-price {
  color: var(--gold-primary);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.featured-product-content p {
  min-height: 1.3rem;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.73rem;
  line-height: 1.55;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.featured-product-action {
  width: 100%;
  min-height: 2.6rem;
  border: 1px solid var(--gold-border);
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  color: var(--text-pure);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.featured-product-action:hover {
  border-color: var(--gold-primary);
  color: #140704;
  background: var(--gold-primary);
}

@media (max-width: 639px) {
  .featured-product-content { padding: 0.9rem; }
  .featured-product-content h3 { font-size: 0.9rem; }
}

/* Mobile control refinement: primary routes remain reachable with the thumb. */
.mobile-action-bar button { border: 0; cursor: pointer; font-family: inherit; }
@media (max-width: 639px) {
  body { padding-bottom: calc(6.35rem + env(safe-area-inset-bottom)); }
  .mobile-action-bar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    right: max(.55rem, env(safe-area-inset-right));
    left: max(.55rem, env(safe-area-inset-left));
    bottom: max(.55rem, env(safe-area-inset-bottom));
    gap: .35rem;
    padding: .38rem;
    border-radius: 1.05rem;
  }
  .mobile-action-bar a,
  .mobile-action-bar button { min-width: 0; min-height: 2.9rem; padding: .4rem .28rem; font-size: .72rem; line-height: 1.1; text-align: center; }
  .mobile-action-primary { box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
  .pwa-install-trigger { color: var(--text-main); background: var(--bg-card); }
}

/* Sections created from the owner builder */
.onegram-custom-section { padding: clamp(2.8rem, 6vw, 6rem) 1.25rem; background: var(--bg-deep); }
.onegram-custom-section:nth-of-type(even) { background: var(--bg-surface); }
.custom-section-shell { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; border: 1px solid var(--gold-border); border-radius: 1.35rem; padding: clamp(1.5rem, 4vw, 3.75rem); background: var(--bg-card); box-shadow: var(--shadow-card); }
.onegram-custom-image .custom-section-shell, .onegram-custom-spotlight .custom-section-shell { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.custom-section-media { min-height: 240px; border-radius: .95rem; overflow: hidden; background: var(--bg-surface); }
.custom-section-media img { width: 100%; height: 100%; min-height: 240px; display: block; object-fit: cover; }
.custom-section-copy { max-width: 650px; }
.custom-section-copy h2 { margin: 0 0 .85rem; color: var(--text-pure); font-size: clamp(1.8rem, 3.7vw, 3.35rem); line-height: 1.18; }
.custom-section-copy p { margin: 0; color: var(--text-muted); font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.9; white-space: pre-line; }
.custom-section-button { display: inline-flex; margin-top: 1.35rem; align-items: center; justify-content: center; padding: .85rem 1.35rem; border-radius: 999px; background: var(--gold-primary); color: #140704; text-decoration: none; font-weight: 800; transition: transform .2s ease, background .2s ease; }
.custom-section-button:hover { transform: translateY(-2px); background: var(--gold-vivid); }
.onegram-custom-announcement { padding-block: 1.4rem; background: var(--bg-card); }
.onegram-custom-announcement .custom-section-shell { display: block; max-width: 1240px; padding: 1.4rem 1.75rem; background: transparent; border-color: var(--gold-border-active); box-shadow: none; text-align: center; }
.onegram-custom-announcement .custom-section-copy { max-width: none; }
.onegram-custom-announcement .custom-section-copy h2 { font-size: clamp(1.25rem, 2.1vw, 1.8rem); margin-bottom: .35rem; }
.onegram-custom-announcement .custom-section-copy p { font-size: 1rem; }
.onegram-custom-cta .custom-section-shell { text-align: center; justify-items: center; background: var(--bg-card-hover); border-color: var(--gold-border-active); }
.onegram-custom-cta .custom-section-copy { max-width: 760px; }
@media (max-width: 720px) { .onegram-custom-image .custom-section-shell, .onegram-custom-spotlight .custom-section-shell { grid-template-columns: 1fr; } .custom-section-media, .custom-section-media img { min-height: 190px; } .custom-section-shell { border-radius: 1rem; } }
/* Responsive collection filters and compact-screen menu cards */
.collection-filter-toolbar{display:flex;justify-content:center;margin:0 auto 1rem}
.collection-filter-toggle{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:.65rem;padding:.6rem 1rem;border:1px solid var(--gold-border-active);border-radius:999px;background:var(--bg-card);color:var(--text-pure);font:inherit;font-size:.86rem;font-weight:700;cursor:pointer;box-shadow:0 8px 24px rgba(41,29,18,.07);transition:transform .18s ease,background .18s ease,border-color .18s ease}
.collection-filter-toggle:hover,.collection-filter-toggle:focus-visible,.collection-filter-toggle.is-open{background:var(--gold-primary);border-color:var(--gold-vivid);color:#1b110a;outline:0}
.collection-filter-toggle:focus-visible{box-shadow:0 0 0 4px rgba(212,163,115,.24)}
.collection-filter-toggle-icon{font-size:1.1rem;line-height:1}.collection-filter-toggle-state{display:grid;place-items:center;width:1.15rem;height:1.15rem;border-radius:50%;background:rgba(255,255,255,.35);font-size:1rem;line-height:1}
.collection-filter-panel{max-width:860px;margin:0 auto 1.4rem}.collection-filter-tabs{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.6rem;padding:.7rem;border:1px solid var(--gold-border);border-radius:1rem;background:var(--bg-card);box-shadow:0 14px 30px rgba(41,29,18,.06)}
.collection-filter-panel[hidden]{display:none}

@media (max-width:639px){
  html,body{overflow-x:clip}
  #collections{padding-right:max(.9rem,env(safe-area-inset-right))!important;padding-left:max(.9rem,env(safe-area-inset-left))!important}
  .collection-filter-toolbar{display:block;margin-bottom:.8rem}.collection-filter-toggle{width:100%;min-height:46px}
  .collection-filter-panel{margin-bottom:1rem}.collection-filter-tabs{display:grid;grid-template-columns:1fr;gap:.45rem;padding:.55rem}
  .collection-filter-tabs .menu-tab-btn{width:100%;min-height:42px;padding:.55rem .75rem;text-align:center;overflow:hidden;text-overflow:ellipsis}
  #tasting-collections-grid{grid-template-columns:1fr!important;gap:.8rem!important}
  .exhibition-card{min-width:0!important;padding:.9rem!important}.exhibition-card .aspect-square{aspect-ratio:16/9!important;margin-bottom:.8rem!important}
  .exhibition-card h3{font-size:1rem!important;line-height:1.45!important}.exhibition-card p{font-size:.78rem!important;line-height:1.5!important}
  .exhibition-card .btn-card-action{min-height:34px;padding:.45rem .65rem;font-size:.72rem;white-space:nowrap}
}
@media (min-width:480px) and (max-width:639px){#tasting-collections-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.exhibition-card{padding:.75rem!important}.exhibition-card h3{font-size:.82rem!important}.exhibition-card p{font-size:.7rem!important}.exhibition-card .aspect-square{aspect-ratio:1/1!important}.exhibition-card .btn-card-action{padding:.4rem .5rem;font-size:.66rem}}
@media (min-width:640px) and (max-width:1023px){.collection-filter-tabs{padding:.75rem 1rem}.collection-filter-toggle{min-width:190px}#tasting-collections-grid{gap:1.1rem!important}.exhibition-card{padding:1rem!important}}
@media (min-width:1024px){.collection-filter-panel{margin-bottom:1.75rem}.collection-filter-toggle{min-width:200px}}


/* Owner design controls: every persisted color is a validated hex token from D1. */
[data-design-section="header"] { background: var(--section-background, var(--nav-bg)) !important; }
[data-layout-section="hero"] { background: var(--section-background, transparent); }
[data-layout-section="featured"], [data-layout-section="story"], [data-layout-section="collections"], [data-layout-section="faq"] { background: var(--section-background, transparent); }
[data-layout-section="b2b"] { background: var(--section-background, var(--bg-surface)) !important; }
[data-design-section="footer"] { background: var(--section-background, var(--bg-surface)) !important; }
.featured-product-card { background: var(--section-background, var(--bg-card)); border-color: var(--gold-border); }
.exhibition-card { background: var(--section-background, var(--bg-card)); border-color: var(--gold-border); }
.design-card-supply, .design-card-faq, .custom-section-shell { background: var(--section-background, var(--bg-card)) !important; border-color: var(--gold-border) !important; }
.featured-product-card:hover, .exhibition-card:hover { background: var(--cardHover, var(--bg-card-hover)); }

/* Universal full-image presentation: preserve every pixel, unify the frame, never crop. */
.hero-stage-image,
[data-site-image],
.featured-product-media img,
.custom-section-media img {
  object-fit: contain !important;
  object-position: center;
  background: var(--bg-surface);
}
[data-site-image] { padding: clamp(.35rem, 1.2vw, .8rem); }
.hero-stage-image { padding: clamp(.75rem, 3vw, 2.5rem); transform: none; }
.featured-product-media img { padding: .55rem; }
.custom-section-media img { padding: clamp(.45rem, 1.5vw, 1rem); }

@media (max-width: 639px) {
  .hero-stage-image { padding: .45rem; }
  [data-site-image], .featured-product-media img, .custom-section-media img { padding: .3rem; }
}
