:root{
  --ink:#1c120d;
  --paper:#fff7f2;
  --accent:#ff7a2f;
  --accent2:#d44c1c;
  --card:#ffffff;
  --muted:#6b5b52;
  --shadow: 0 12px 30px rgba(0,0,0,.18);
  --radius: 18px;
  --max: 1120px;
  --gap: 18px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Make width + padding consistent everywhere */
*, *::before, *::after { box-sizing: border-box; }

/* Normalize all form controls (works for sidebar-card too) */
select, input, button, textarea {
  font: inherit;
  box-sizing: border-box;
}

.brand h1 {
  font-size: 2.5rem;   /* adjust this value */
  margin: 0;
}

select, input, textarea {
  width: 100%;
  max-width: 100%;
  display: block;
}

/* Sidebar filter controls: enforce same sizing as the rest */
.sidebar-card .field { min-width: 0; }
.sidebar-card .field select,
.sidebar-card .field input{
  width: 100%;
  max-width: 100%;
  display: block;
}

/* Brick background */
body{
  margin:0;
  font-family:var(--font);
  color:var(--ink);
  min-height:100vh;

  background-image: url("../images/brick-bg.jpg");
  background-repeat: repeat;
  background-size: 500px 500px;
  background-attachment: fixed;

  /* ensures overlay stacking is consistent */
  position: relative;
}

/* Dark overlay ABOVE brick, BELOW content */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.25);
  pointer-events: none;
  z-index: 0;
}

/* Keep content above overlay */
.wrap,
.topbar,
.contact-footer,
.footer{
  position: relative;
  z-index: 1;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding: 18px 18px 44px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  backdrop-filter: blur(10px);
  background: rgba(255, 247, 242, .88);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

/* Header: name on top, nav row below */
.brand{
  display:flex;
  flex-direction: column;   /* stack rows */
  align-items: stretch;
  gap: 10px;
  padding: 14px 18px;
  max-width:var(--max);
  margin:0 auto;
  position: relative; /* anchor dropdown + mobile panel */
}

.brand-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
}

.brand-left{ min-width: 240px; }

.site-title{
  font-size: 3.4rem;       /* MUCH larger */
  font-weight: 900;        /* heavier */
  letter-spacing: -1px;    /* tighter look */
  margin: 0 0 4px 0;
  line-height: 1.05;
  color: #000;
}

@media (max-width: 900px){
  .site-title{
    font-size: 2.6rem;
  }
}

@media (max-width: 520px){
  .site-title{
    font-size: 2.1rem;
  }
}

.home-link{ color: inherit; text-decoration:none; }
.home-link:hover{ text-decoration:none; }

.header-search{
  display:flex;
  align-items:center;
  gap: 6px;
  margin-left: auto;
  max-width: 420px;
  width: 100%;
}

.header-search input{
  flex:1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: var(--paper);
  font-size: 0.95rem;
}

.header-search button{
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor:pointer;
  background: var(--accent2);
  color: white;
  font-weight: 700;
}

.header-search input:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}

/* Make header search behave on small screens */
.header-search{
  position: relative;
  width: 420px;
  max-width: 42vw;
  margin-left: auto;
}

.header-search-inner{
  display:flex;
  align-items:center;
  gap: 6px;
  width: 100%;
}

.header-search input{
  flex: 1;
  min-width: 0;                 /* IMPORTANT: allows shrinking without hiding text */
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;             /* ensures typed text is visible */
  color: var(--ink, #111);      /* ensures typed text is visible */
  font-size: 0.95rem;
}

.header-search button{
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  cursor:pointer;
  background: var(--accent2);
  color: white;
  font-weight: 700;
  flex: 0 0 auto;
}

/* Dropdown panel */
.search-dropdown{
  display:none;
  position:absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(255,255,255,0.98);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
  overflow:hidden;
}

.search-dropdown{
  max-height: 60vh;
  overflow: auto;
}

.search-dropdown.is-open{ display:block; }

.search-item{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 10px 12px;
  text-decoration:none;
  color: inherit;
  border-top: 1px solid rgba(0,0,0,.06);
  background: transparent;
}

.search-item:first-child{ border-top: 0; }

.search-item{
  padding: 12px 12px;
}
.search-thumb{
  width: 52px;
  height: 52px;
}

.search-item:hover,
.search-item.is-active{
  background: rgba(0,0,0,.06);
}

.search-thumb{
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(0,0,0,.05);
  flex: 0 0 auto;
}

.search-item .si-title{
  font-weight: 800;
  line-height: 1.15;
  margin: 0;
  font-size: .95rem;
}

.search-item .si-sub{
  margin: 2px 0 0 0;
  opacity: .75;
  font-size: .85rem;
}

.search-item .si-price{
  margin-left: auto;
  font-weight: 800;
  white-space: nowrap;
  color: var(--accent2);
}

/* Mobile layout: stack the search so the user can SEE what they type */
@media (max-width: 720px){
  .brand-top{
    flex-wrap: wrap;
    gap: 10px;
  }

  .header-search{
    order: 3;                 /* puts search below brand-left and before/after menu depending on your layout */
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  .header-search input{
    font-size: 1rem;          /* slightly larger for mobile */
  }
}

/* =========================
   NAV (grouped dropdowns)
   ========================= */

.nav-toggle{
  display:none;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(0,0,0,.04);
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle:hover{ background: rgba(0,0,0,.07); }

.nav{
  display:flex;
  gap:1px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-start; /* nav is its own row under title */
}

/* fallback links (if JS fails) */
.nav > a{
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.04);
}
.nav > a:hover{
  background: rgba(0,0,0,.07);
  text-decoration:none;
}

/* grouped menu (when JS builds it) */
.nav .group{ position:relative; }

.nav .group > button{
  border:0;
  background: rgba(0,0,0,.04);
  color: var(--ink);
  font: inherit;
  padding: 10px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:700;
}
.nav .group > button:hover{ background: rgba(0,0,0,.07); }

.nav .submenu{
  display:none;
  position:absolute;
  top:calc(100% + 10px);
  left:0;        /* align under button */
  right:auto;
  min-width:240px;
  background: rgba(255, 247, 242, .98);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 16px;
  padding: 10px;
  box-shadow: var(--shadow);
  z-index: 9999;
}

.nav .submenu a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.04);
}
.nav .submenu a:hover{
  background: rgba(0,0,0,.07);
  text-decoration:none;
}
/* Make top navigation buttons smaller */
.nav .group > button,
.nav > a{
  padding: 6px 10px;      /* smaller click area */
  font-size: 0.9rem;     /* smaller text */
  border-radius: 999px;  /* keep pill shape */
}


/* ✅ Click-to-open support (JS toggles .open on .group) */
.nav .group.open > .submenu{
  display:block;
}

/* ===== 3rd-level submenu support ===== */

/* A nested group inside a submenu */
.nav .submenu .subgroup{
  position: relative;
  margin-top: 8px;
}

/* The level-2 button (e.g., "Guitar") */
.nav .submenu .subgroup > button{
  width: 100%;
  text-align: left;
  border: 0;
  background: rgba(0,0,0,.04);
  color: var(--ink);
  font: inherit;
  padding: 6px 10px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.nav .submenu .subgroup > button:hover{
  background: rgba(0,0,0,.07);
}

/* The level-3 panel */
.nav .submenu .subgroup .submenu-2{
  display: none;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(0,0,0,.10);
}

/* Show level-3 when open */
.nav .submenu .subgroup.open .submenu-2{
  display: block;
}

/* Make level-3 links look like the others */
.nav .submenu .submenu-2 a{
  display:block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.04);
  margin-top: 8px;
}

.nav .submenu .submenu-2 a:hover{
  background: rgba(0,0,0,.07);
  text-decoration:none;
}

/* Optional: hover-to-open on desktop */
@media (min-width: 821px){
  .nav .group:hover > .submenu{
    display:block;
  }
}

/* Mobile panel */
@media (max-width: 820px){
  .nav-toggle{
    display:inline-flex;
    align-items:center;
    gap:.5rem;
  }

  .nav{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:100%;
    margin-top: 12px;
    background: rgba(255, 247, 242, .98);
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 18px;
    padding: 12px;
    flex-direction:column;
    align-items:stretch;
    gap: 10px;
    box-shadow: var(--shadow);
    z-index: 9999;
  }

  /* CSS expects JS to toggle body.nav-open */
  body.nav-open .nav{ display:flex; }

  /* make group buttons full width */
  .nav .group > button{ width:100%; text-align:left; }
  .nav .group{ width:100%; }

  .nav .submenu{
    position:static;
    min-width:auto;
    background:transparent;
    border:0;
    box-shadow:none;
    padding: 8px 0 0;
  }

  /* fallback links also full width on mobile */
  .nav > a{ width:100%; }
}

/* =========================
   CONTENT
   ========================= */

.dealer-note{
  /* same look as your cards */
  background: var(--card);
  border-radius: var(--radius);
  padding: 4px 6px;
  margin: 0 0 14px; /* space before the grid */

  /* accent stripe that never eats into text */
  box-shadow: inset 6px 0 0 var(--accent);

  /* safety: ensures text never clips */
  overflow: visible;
}

.dealer-dimarzio{
  box-shadow: inset 6px 0 0 var(--accent);
}

.dealer-note-inner{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

/* Subtle logo treatment */
.dealer-logo{
  height: 34px;
  opacity: 0.75;
  filter: grayscale(100%);
}

/* Text block */
.dealer-text{
  color: var(--muted);
  line-height: 1.4;
}

/* CTA button */
.dealer-cta{
  background: transparent;
  color: var(--accent2);
}

.dealer-cta:hover{
  background: var(--accent2);
  color: #fff;
}



@media (max-width: 600px) {
  .dealer-note h2 {
    font-size: 1.15rem;
  }
}

.hero{
  background: rgba(255, 247, 242, .92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-top: 18px;
}

.storefront{
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.storefront img{
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
  filter: contrast(0.95) saturate(0.9);
}

.hero h2{ margin:0 0 0px; font-size: 1.6rem; }
.hero p{ margin: 8px 0 0; color: var(--muted); line-height:1.55; }

.hero-split{
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 18px;
  align-items: center;
}

.hero-text h1{
  font-size: 2.4rem;  /* slightly smaller headline */
  margin-bottom: 0px;
}

.hero-text p{
  font-size: 1rem;
  margin-bottom: 0;
}

.storefront img{
  max-width: 250px;   /* controls visual size */
  height: auto;
}

@media (max-width: 800px){
  .hero-split{
    grid-template-columns: 1fr;
  }
}

.section{
  margin-top: 18px;
  background: rgba(255, 247, 242, .92);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.section h3{ margin: 0 0 14px; font-size: 1.2rem; }

.grid{ display:grid; gap: var(--gap); }
.grid.cols-3{ grid-template-columns: repeat(6, minmax(0,1fr)); }

@media (max-width: 900px){
  .grid.cols-3{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .grid.cols-3{ grid-template-columns: 1fr; }
}

.card{
  background: var(--card);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
  border: 1px solid rgba(0,0,0,.06);
}

.product-card{
  display:block;
  color: inherit;
  text-decoration:none;
}
.product-card:hover{ text-decoration:none; }

/* Normalize all filter controls inside cards */
.card select,
.card input[type="text"],
.card input[type="search"],
.card input[type="number"]{
  width: 100%;
  box-sizing: border-box;
  display: block;
  max-width: 100%;
}

/* Optional: ensure identical padding */
.card select,
.card input{
  padding: 10px 12px;
}

/* Fix flex overflow for search rows */
.card .search-row{
  display: flex;
  gap: 10px;
}

.card .search-row input{
  flex: 1 1 auto;
  min-width: 0;
}

/* Card images (catalog cards), but don't constrain gallery images */
.card img{
  width:100%;
  height:auto;
  object-fit: contain;
  background: #f0e6de;
}

.card:not(:has(.gallery-main)) img{
  max-height:260px;
}

.card .pad{ padding: 14px; }
.card .title{ font-weight: 700; margin: 0 0 6px; }
.card .meta{ margin:0; color: var(--muted); font-size:.95rem; line-height:1.35; }

/* Corner badge on product cards */
.product-card .card-media{
  position: relative;
}

.product-card .corner-badge{
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 300;
  line-height: 1;
  background: rgba(0,0,0,.72);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 18px rgba(0,0,0,.22);
  pointer-events: none; /* don’t block clicking the card */
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ===== Product image grid ===== */

/* If your gallery lives inside .card, this prevents the generic .card img rule
   from limiting the main image height. */
.card .gallery-main img{
  max-height: none; /* defeats max-height:260px */
}

/* Main image: larger on laptops/desktops, controlled on phones */
.gallery-main img{
  width: 100%;
  height: clamp(420px, 55vh, 780px);
  object-fit: contain;
  border-radius: 14px;
  background: #f0e6de;
}

/* Thumbnails grid */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gallery-grid img{
  width: 100%;
  height: 95px;          /* was 120px */
  object-fit: contain;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(0,0,0,.12);
  padding: 6px;
}


.gallery-grid img:hover{
  border-color: var(--accent);
}

/* Phones */
@media (max-width: 640px){
  .gallery-main img{ height: 340px; }

  /* Keep auto-fit on phones too; just reduce the minimum width */
  .gallery-grid{
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }

  .gallery-grid img{ height: 90px; }
}

@media (min-width: 1024px){
  .gallery-main img{
    height: clamp(520px, 60vh, 860px);
  }
  .gallery-grid img{ height: 100px; } /* was 190px */
}

.product-stack{ display:grid; gap:16px; }
.product-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
}
.product-title{ margin:0; }
.product-price{
  font-size:1.6rem;
  font-weight:800;
  color: var(--accent2);
  white-space:nowrap;
}

/* =========================
   SITE FOOTER (2-column layout)
   ========================= */

.site-footer{
  margin-top: 80px;
  padding: 40px 20px;
  background: rgba(0, 0, 0, 0.78);
  color: #f5f5f5;
  border-top: 4px solid var(--accent2);
}

/* Inner container matches site width */
.site-footer .footer-inner{
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

/* Columns */
.site-footer .footer-col{
  flex: 1 1 320px;
  min-width: 0;
}

/* Headings */
.site-footer h3{
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: #ffb347; /* your warm accent tone */
  letter-spacing: .5px;
}

/* Paragraph text */
.site-footer p{
  margin: 6px 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(255,255,255,.92);
}

/* Links */
.site-footer a{
  color: #ffb347;
  text-decoration: none;
}
.site-footer a:hover{
  text-decoration: underline;
}

/* Optional subtle divider between columns (desktop only) */
@media (min-width: 820px){
  .site-footer .footer-left{
    padding-right: 30px;
    border-right: 1px solid rgba(255,255,255,0.14);
  }

  .site-footer .footer-right{
    padding-left: 30px;
  }
}

/* Mobile stacking */
@media (max-width: 819px){
  .site-footer{
    padding: 32px 18px;
  }

  .site-footer .footer-inner{
    gap: 24px;
  }
}

/* ===== EG Filters: collapsed on mobile/tablet ===== */

.filter-toggle{
  display:none;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(0,0,0,.04);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.filter-toggle:hover{ background: rgba(0,0,0,.07); }

@media (max-width: 980px){
  .filter-toggle{ display:inline-block; }

  /* Hidden by default */
  #catalog-sidebar{ display:none; }

  /* Shown when toggled */
  #catalog-sidebar.is-open{ display:block !important; }
}
