/*
Theme Name: Main Street General & Goods
Theme URI: https://retail.cryptidwhispers.com
Author: Cryptid Whispers LLC
Author URI: https://cryptidwhispers.com
Description: Everyday Essentials, Local Makers & Thoughtful Provisions — Standalone retail storefront concept demo built by Cryptid Whispers LLC with live 5-palette switching, filterable product catalog, quick-view modal, and demo-only shopping bag.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
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: main-street-general-goods
Tags: e-commerce, local-business, retail-demo, custom-colors, one-column
*/

:root,
[data-palette="evergreen"] {
  --bg: #F7F5EE;
  --surface: #EAE5D8;
  --elevated: #FCFBF7;
  --ink: #17221D;
  --accent: #1F6E4A;
  --accent-hover: #18583B;
  --accent-ink: #FFFFFF;
  --muted: #4E5F56;
  --border: rgba(23, 34, 29, 0.12);
  --border-strong: rgba(23, 34, 29, 0.24);
  --demo-bar-bg: #17221D;
  --demo-bar-ink: #F7F5EE;
  --demo-bar-muted: #C2CEC7;
}

[data-palette="coral"] {
  --bg: #FBF5EE;
  --surface: #F2E4D4;
  --elevated: #FFFBF7;
  --ink: #291811;
  --accent: #DE5B33;
  --accent-hover: #C44A24;
  --accent-ink: #FFFFFF;
  --muted: #755A4E;
  --border: rgba(41, 24, 17, 0.12);
  --border-strong: rgba(41, 24, 17, 0.24);
  --demo-bar-bg: #291811;
  --demo-bar-ink: #FBF5EE;
  --demo-bar-muted: #DEC7B8;
}

[data-palette="cobalt"] {
  --bg: #FFFFFF;
  --surface: #EDF3FA;
  --elevated: #FFFFFF;
  --ink: #111E32;
  --accent: #1D5FD1;
  --accent-hover: #164CAE;
  --accent-ink: #FFFFFF;
  --muted: #506480;
  --border: rgba(17, 30, 50, 0.12);
  --border-strong: rgba(17, 30, 50, 0.24);
  --demo-bar-bg: #111E32;
  --demo-bar-ink: #FFFFFF;
  --demo-bar-muted: #B8C9E0;
}

[data-palette="obsidian"] {
  --bg: #0E1110;
  --surface: #171C1A;
  --elevated: #1E2522;
  --ink: #F3F0E8;
  --accent: #E5B82E;
  --accent-hover: #D4A61E;
  --accent-ink: #0E1110;
  --muted: #9EB0A6;
  --border: rgba(243, 240, 232, 0.14);
  --border-strong: rgba(243, 240, 232, 0.28);
  --demo-bar-bg: #171C1A;
  --demo-bar-ink: #F3F0E8;
  --demo-bar-muted: #9EB0A6;
}

[data-palette="crimson"] {
  --bg: #FCF9F6;
  --surface: #F2E7E4;
  --elevated: #FFFDFB;
  --ink: #241214;
  --accent: #B91C2E;
  --accent-hover: #991524;
  --accent-ink: #FFFFFF;
  --muted: #6F5457;
  --border: rgba(36, 18, 20, 0.12);
  --border-strong: rgba(36, 18, 20, 0.24);
  --demo-bar-bg: #241214;
  --demo-bar-ink: #FCF9F6;
  --demo-bar-muted: #D8C2C5;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); color: var(--ink); font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; overflow-x: clip; transition: background-color 180ms ease, color 180ms ease; }
[data-palette="obsidian"] body { letter-spacing: 0.01em; }
h1, h2, h3, .msgg-serif { font-family: 'Fraunces', Georgia, serif; text-wrap: balance; margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.msgg-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.msgg-tabular { font-variant-numeric: tabular-nums; }

/* Concept Demo Bar */
.msgg-demo-bar { position: sticky; top: 0; z-index: 60; background: var(--demo-bar-bg); color: var(--demo-bar-ink); border-bottom: 1px solid rgba(255,255,255,0.14); font-size: 12px; }
.msgg-demo-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; min-height: 44px; padding: 8px 24px; max-width: 1380px; margin: 0 auto; flex-wrap: wrap; }
.msgg-demo-label { font-weight: 500; color: var(--demo-bar-muted); white-space: nowrap; }
.msgg-palette-group { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.msgg-palette-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.18); background: transparent; color: var(--demo-bar-ink); cursor: pointer; font-size: 12px; white-space: nowrap; flex-shrink: 0; transition: background-color 150ms ease, border-color 150ms ease; }
.msgg-palette-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }
.msgg-palette-btn[aria-pressed="true"] { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.68); font-weight: 600; color: #FFFFFF; }
.msgg-swatch { width: 14px; height: 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.55); display: inline-flex; overflow: hidden; flex-shrink: 0; }
.msgg-swatch-half { width: 50%; height: 100%; display: block; }
.msgg-back-link { color: var(--demo-bar-ink); text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; font-weight: 500; }
.msgg-back-link:hover { opacity: 0.85; }

/* Promo Banner & Header */
.msgg-promo { background: var(--surface); border-bottom: 1px solid var(--border); text-align: center; padding: 8px 16px; font-size: 13px; font-weight: 500; color: var(--muted); }
.msgg-header { background: var(--bg); border-bottom: 1px solid var(--border); }
.msgg-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; height: 72px; }
.msgg-brand { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 600; text-decoration: none; white-space: nowrap; flex-shrink: 0; letter-spacing: -0.015em; }
.msgg-nav { display: flex; align-items: center; gap: 28px; }
.msgg-nav a { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; white-space: nowrap; }
.msgg-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.msgg-header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.msgg-menu-btn { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--ink); cursor: pointer; }
.msgg-mobile-nav { display: none; border-top: 1px solid var(--border); background: var(--surface); padding: 12px 16px; }
.msgg-mobile-nav.is-open { display: block; }
.msgg-mobile-nav a { display: block; padding: 10px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); }
.msgg-mobile-nav a:hover { background: var(--bg); }
.msgg-bag-short { display: none; }

.msgg-btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 150ms ease, transform 150ms ease; }
.msgg-btn-primary:hover { background: var(--accent-hover); }
.msgg-btn-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border-strong); background: transparent; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color 150ms ease; }
.msgg-btn-secondary:hover { background: var(--surface); }

/* Hero */
.msgg-hero { padding: 56px 0 64px; border-bottom: 1px solid var(--border); }
.msgg-hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: stretch; }
.msgg-hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.msgg-kicker { font-size: 13px; color: var(--muted); font-weight: 500; }
.msgg-hero h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; }
.msgg-hero p { font-size: 16px; color: var(--muted); margin: 0; max-width: 48ch; }
.msgg-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.msgg-hero-highlights { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.msgg-hero-highlights span { white-space: nowrap; }
.msgg-hero-media { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.msgg-hero-media img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; }

/* Catalog */
.msgg-section { padding: 72px 0; border-bottom: 1px solid var(--border); }
.msgg-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.msgg-section-head h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); font-weight: 600; margin-top: 4px; }
.msgg-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.msgg-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; background: var(--surface); border-radius: 12px; }
.msgg-tab { border: 0; background: transparent; color: var(--muted); min-height: 38px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease; }
.msgg-tab:hover { color: var(--ink); }
.msgg-tab[aria-pressed="true"] { background: var(--elevated); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.msgg-search-sort { display: flex; gap: 10px; flex-wrap: wrap; }
.msgg-input, .msgg-select, .msgg-textarea { min-height: 42px; background: var(--elevated); color: var(--ink); border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 14px; font-size: 14px; }
.msgg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.msgg-card { display: flex; flex-direction: column; background: var(--elevated); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: transform 180ms ease; }
.msgg-card:hover { transform: translateY(-2px); }
.msgg-card-img-btn { padding: 0; border: 0; background: var(--surface); cursor: pointer; aspect-ratio: 4 / 3; overflow: hidden; width: 100%; }
.msgg-card-img-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform 280ms ease; }
.msgg-card:hover .msgg-card-img-btn img { transform: scale(1.03); }
.msgg-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.msgg-meta-line { font-size: 12px; color: var(--muted); }
.msgg-card-title { font-size: 17px; font-weight: 600; font-family: 'Fraunces', Georgia, serif; line-height: 1.3; }
.msgg-card-title-btn { background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.msgg-card-title-btn:hover { text-decoration: underline; text-underline-offset: 4px; }
.msgg-card-note { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.msgg-card-footer { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; margin-top: 10px; border-top: 1px solid var(--border); }
.msgg-card-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.msgg-price { font-size: 16px; font-weight: 700; }
.msgg-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.msgg-card-actions .msgg-btn-primary,
.msgg-card-actions .msgg-btn-secondary { padding: 8px 10px; font-size: 12px; width: 100%; min-width: 0; }

/* Story & Visit */
.msgg-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: stretch; }
.msgg-surface-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.msgg-elevated-box { background: var(--elevated); border: 1px solid var(--border); border-radius: 14px; padding: 28px; }
.msgg-hours-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.msgg-hours-table tr { border-bottom: 1px solid var(--border); }
.msgg-hours-table tr:last-child { border-bottom: 0; }
.msgg-hours-table td { padding: 10px 0; font-size: 14px; }
.msgg-hours-table td:last-child { text-align: right; font-weight: 600; }

/* Footer */
.msgg-footer { padding: 56px 0 40px; background: var(--surface); }
.msgg-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; padding-bottom: 36px; border-bottom: 1px solid var(--border); }
.msgg-footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* Drawers & Modals */
.msgg-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; }
.msgg-overlay.is-open { display: flex; }
.msgg-drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.48); z-index: 85; display: none; justify-content: flex-end; }
.msgg-drawer-overlay.is-open { display: flex; }
.msgg-drawer { width: 100%; max-width: 440px; background: var(--bg); color: var(--ink); height: 100%; display: flex; flex-direction: column; border-left: 1px solid var(--border); }
.msgg-modal { width: 100%; max-width: 780px; max-height: 90vh; overflow-y: auto; background: var(--bg); color: var(--ink); border-radius: 16px; border: 1px solid var(--border); padding: 28px; }
.msgg-modal-sm { max-width: 520px; }

@media (max-width: 1024px) {
  .msgg-hero-grid, .msgg-split, .msgg-footer-grid { grid-template-columns: 1fr; }
  .msgg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msgg-nav { display: none; }
  .msgg-menu-btn { display: inline-flex; }
}
@media (max-width: 640px) {
  .msgg-container { padding: 0 16px; }
  .msgg-demo-bar-inner { padding: 8px 12px; gap: 6px 12px; }
  .msgg-demo-label { font-size: 11px; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .msgg-palette-btn { padding: 4px 8px; }
  .msgg-palette-label { display: none; }
  .msgg-swatch { width: 16px; height: 16px; }
  .msgg-back-link { font-size: 11px; }
  .msgg-promo { font-size: 12px; padding: 7px 12px; }
  .msgg-header-inner { gap: 10px; height: 64px; }
  .msgg-brand { font-size: 16px; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; }
  .msgg-bag-full { display: none; }
  .msgg-bag-short { display: inline; }
  .msgg-header-actions .msgg-btn-primary { padding: 8px 12px; font-size: 12px; }
  .msgg-grid { grid-template-columns: 1fr; }
  .msgg-hero { padding: 36px 0 44px; }
  .msgg-section { padding: 48px 0; }
  .msgg-hero-media img { min-height: 240px; }
}
