/* ============================================================
   DoerStitch - Public Site Styles
   (Consolidated: this file now includes what used to be
   styletwo.css as well — keep this as the ONE public
   stylesheet to edit. Do not create a second file; add new
   rules to the relevant section below instead.)

   Theme: black & white throughout. Only the uploaded logo
   (an image, not CSS) is exempt from this rule. --accent-color
   is a dark charcoal rather than pure black purely so hover/
   active states have a hair of contrast; nothing here should
   read as "colored".
   ============================================================ */
:root{
  --primary-color: #000000;
  --accent-color: #1a1a1a;
  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Inter', sans-serif;
  --text-dark: #1c1c22;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-soft: #f7f7fb;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body{ overflow-x: clip; max-width: 100%; }
body{
  margin: 0;
  font-family: var(--body-font);
  color: var(--text-dark);
  background: #fff;
  line-height: 1.55;
}
h1,h2,h3,h4,h5{
  font-family: var(--heading-font);
  font-weight: 700;
  margin: 0 0 .5em;
  color: var(--text-dark);
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container{ max-width: 1180px; margin: 0 auto; padding: 0 20px; }
button, .btn{
  font-family: var(--body-font);
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
}
:focus-visible{ outline: 2px solid #000; outline-offset: 2px; }

/* ---------------- Header ---------------- */
.site-header{
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.header-inner{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
}
.header-left{ display: flex; align-items: center; gap: 14px; }
.brand .logo-img{ height: 42px; }
.brand .logo-text{
  font-family: var(--heading-font);
  font-weight: 800; font-size: 1.5rem; color: var(--primary-color);
  letter-spacing: .5px;
}
.main-nav{ display: flex; gap: 28px; align-items: center; }
.main-nav a{
  font-weight: 600; font-size: .95rem; color: var(--text-dark);
  padding: 6px 2px; border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}
.main-nav a:hover{ color: var(--accent-color); border-color: var(--accent-color); }
.nav-cta-btn{
  background: var(--accent-color); color: #fff !important; padding: 9px 20px !important;
  border-radius: 30px; font-weight: 700 !important; border-bottom: none !important;
}
.nav-cta-btn:hover{ opacity: .88; color: #fff !important; border-color: transparent !important; }

.nav-profile-wrap{ position: relative; display: inline-flex; }
.nav-profile-wrap-desktop{ margin-left: -14px; }
.nav-profile-icon{
  width: 40px; height: 40px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  padding: 0 !important; border-bottom: none !important; background: var(--accent-color);
  transition: opacity .2s;
}
.nav-profile-icon, .nav-profile-icon:hover, .main-nav a.nav-profile-icon{ color: #fff !important; }
.nav-profile-icon:hover{ opacity: .85; }
.nav-profile-tooltip{
  position: absolute; top: calc(100% + 10px); right: 0; white-space: nowrap;
  background: #111; color: #fff; font-size: .78rem; font-weight: 600;
  padding: 7px 12px; border-radius: 6px; opacity: 0; pointer-events: none;
  transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease; z-index: 50;
}
.nav-profile-tooltip::after{
  content: ""; position: absolute; bottom: 100%; right: 14px;
  border: 5px solid transparent; border-bottom-color: #111;
}
.nav-profile-wrap:hover .nav-profile-tooltip{ opacity: 1; transform: translateY(0); }
.nav-profile-wrap-mobile{ display: none; }
.nav-toggle{
  display: none; flex-direction: column; gap: 5px; background: none; padding: 6px;
}
.nav-toggle span{ width: 24px; height: 2px; background: var(--text-dark); border-radius: 2px; }

/* ---------- "Solutions" nav dropdown (includes/header.php) ---------- */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-trigger { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; background: none; border: none; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: #fff; min-width: 200px; box-shadow: 0 10px 30px rgba(0,0,0,.14);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 0; z-index: 200;
}
.nav-dropdown-menu.open { display: block; }
.nav-dropdown-menu a {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px; text-decoration: none;
  white-space: nowrap; font: inherit; color: #222;
}
.nav-dropdown-icon{
  width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; background: var(--bg-soft); border-radius: 4px;
}
.nav-dropdown-menu a:hover { background: #f5f5f5; }

/* ---------- Hero Section (index.php) ---------- */
.hero-new { position: relative; overflow: hidden; padding: 56px 0 40px; background: #fff; }
.hero-variant { display: none; }
.hero-variant.active { display: block; }
.hero-flex { display: flex; align-items: center; gap: 48px; }
.hero-left { flex: 1; min-width: 0; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: #f4f4f4; border: 1px solid #e4e4e4;
  border-radius: 999px; padding: 9px 18px; font-size: 14px; font-weight: 500; cursor: pointer; margin-bottom: 26px; color: #222; }
.hero-badge:hover { background: #ececec; }
.hero-left h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.12; margin: 0 0 18px; color: #111; }
.hero-desc { color: #666; font-size: 1.05rem; line-height: 1.55; max-width: 480px; margin: 0 0 26px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-btns .btn-dark { background: #111; color: #fff; padding: 14px 26px; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-block; }
.hero-btns .btn-dark:hover { background: #000; }
.hero-btns .btn-outline-dark { border: 1px solid #ccc; color: #111; padding: 13px 25px; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-block; }
.hero-btns .btn-outline-dark:hover { border-color: #999; }
.hero-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; max-width: 480px; }
.hero-features span { font-size: .92rem; color: #333; }
.hero-right { flex: 1; display: flex; justify-content: center; }
.hero-image-box { position: relative; width: 100%; max-width: 480px; height: 520px; border-radius: 26px; overflow: hidden; background: #eee; display: flex; flex-direction: column; }
.hero-slides { position: relative; flex: 1; width: 100%; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.hero-slide.active { opacity: 1; }
.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.hero-dot.active { background: #fff; transform: scale(1.25); }
.hero-image-placeholder { display:flex;align-items:center;justify-content:center;height:100%;color:#999;font-size:.9rem; }
@media (max-width: 900px) {
  .hero-flex { flex-direction: column; }
  .hero-left h1 { font-size: 2.1rem; }
  .hero-right { width: 100%; min-width: 0; }
  .hero-image-box { height: 380px; max-width: 100%; }
}
@media (max-width: 480px) {
  .hero-new{ padding: 40px 0 30px; }
  .hero-left h1{ font-size: 1.7rem; }
  .hero-image-box{ height: 300px; border-radius: 18px; }
  .hero-btns{ flex-wrap: nowrap; gap: 10px; }
  .hero-btns a{ flex: 1; text-align: center; padding-left: 14px !important; padding-right: 14px !important; font-size: .88rem; }
}

/* ---------------- Scrolling Marquee Banner ---------------- */
.marquee-wrap{
  background: #000000;
  overflow: hidden;
  white-space: nowrap;
  padding: 16px 0;
}
.marquee-track{
  display: inline-flex;
  align-items: center;
  animation: marquee-scroll 30s linear infinite;
}
.marquee-wrap:hover .marquee-track{ animation-play-state: paused; }
.marquee-item{
  color: #fff;
  font-family: var(--body-font);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 0 22px;
  white-space: nowrap;
}
.marquee-sep{
  color: #fff;
  opacity: .5;
  font-size: .95rem;
}
@keyframes marquee-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce){
  .marquee-track{ animation: none; }
}
@media (max-width: 600px){
  .marquee-item{ font-size: .74rem; padding: 0 16px; }
}

/* ---------------- Buttons ---------------- */
.btn-primary{
  background: var(--accent-color); color: #fff;
  padding: 12px 26px; font-weight: 700; font-size: .95rem;
  display: inline-block; transition: transform .15s, box-shadow .15s, opacity .15s;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.btn-primary:hover{ transform: translateY(-2px); opacity: .95; }
.btn-secondary{
  background: #fff; color: var(--primary-color); border: 2px solid var(--primary-color) !important;
  padding: 10px 24px; font-weight: 700; font-size: .9rem;
}
.btn-secondary:hover{ background: var(--primary-color); color: #fff; }
.btn-outline{
  background: #fff; color: #111; border: 1px solid #ccc !important;
  padding: 12px 26px; font-weight: 600; font-size: .9rem;
  display: inline-block; transition: border-color .15s, background .15s;
}
.btn-outline:hover{ border-color: #999 !important; background: #f7f7f7; }
.btn-block{ width: 100%; display: block; text-align: center; }
.btn-lg{ padding: 16px 30px; font-size: 1.05rem; }

/* ---------------- Category Grid (Home) ---------------- */
.section{ padding: 64px 0; }
.section-title{ text-align: center; margin-bottom: 40px; }
.section-title h2{ font-size: 2rem; }
.section-title p{ color: var(--text-muted); }

.cat-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.cat-card{
  background: var(--bg-soft); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
}
.cat-card:hover{ transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.cat-card .cat-thumb{
  height: 220px; width: 100%; object-fit: contain; background: #fff; padding: 20px;
  display: block;
}
.cat-card .cat-thumb.cat-thumb-cover{
  object-fit: cover; padding: 0; background: var(--bg-soft);
}
.cat-card .cat-thumb-placeholder{
  height: 220px; display:flex; align-items:center; justify-content:center;
  background: #eceef5; color: var(--text-muted); font-weight: 600;
}
.cat-card .cat-body{ padding: 16px 18px 20px; }
.cat-card h3{ margin-bottom: 4px; font-size: 1.15rem; }
.cat-card span.cat-link{ color: var(--accent-color); font-weight: 700; font-size: .9rem; }

/* ---------------- How It Works ---------------- */
.how-it-works{ background: var(--bg-soft); }
.steps-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px;
}
.step-card{ text-align: center; padding: 4px; }
.step-num{
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent-color); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.3rem;
  margin: 0 auto 16px; font-family: var(--heading-font);
}
.step-card h3{ font-size: 1.05rem; margin-bottom: 6px; }
.step-card p{ color: var(--text-muted); font-size: .9rem; margin-bottom: 0; }

/* ---------------- Manufacturing & Shipping ---------------- */
.mfg-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
}
.mfg-card{
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; box-shadow: var(--shadow);
}
.mfg-icon{ font-size: 2.2rem; margin-bottom: 14px; }
.mfg-card h3{ font-size: 1.1rem; margin-bottom: 8px; }
.mfg-card p{ color: var(--text-muted); font-size: .9rem; margin-bottom: 0; }

/* ---------------- Video Tutorial ---------------- */
.video-wrap{
  border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #000;
}
.video-wrap video{ width: 100%; display: block; }

/* ---------------- Custom Admin Homepage Sections ---------------- */
.custom-section{ margin: 20px 0; }
.custom-section:empty{ display: none; }

/* ---------------- Showcase (image collage) ---------------- */
.showcase-card{
  background: #eeeeee;
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 48px;
}
.showcase-content h2{ font-size: 2rem; line-height: 1.15; margin-bottom: .4em; }
.showcase-content p{ color: rgba(0,0,0,.65); font-size: 1rem; max-width: 440px; margin-bottom: 1.6em; }
.btn-dark-pill{
  background: #111; color: #fff; padding: 13px 28px; border-radius: 30px;
  font-weight: 700; font-size: .9rem; display: inline-block; transition: opacity .15s;
}
.btn-dark-pill:hover{ opacity: .85; }

.showcase-gallery{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 90px);
  gap: 12px;
}
.showcase-gallery img{
  width: 100%; height: 100%; object-fit: cover; border-radius: 14px; background: rgba(255,255,255,.5);
}
.showcase-gallery img:nth-child(1){ grid-column: 1; grid-row: 1 / span 2; }
.showcase-gallery img:nth-child(2){ grid-column: 2; grid-row: 1; }
.showcase-gallery img:nth-child(3){ grid-column: 3; grid-row: 1 / span 2; }
.showcase-gallery img:nth-child(4){ grid-column: 2; grid-row: 2 / span 2; }
.showcase-gallery img:nth-child(5){ grid-column: 1; grid-row: 3; }
.showcase-gallery img:nth-child(6){ grid-column: 3; grid-row: 3; }

/* ---------------- FAQ ---------------- */
.faq-list{ display: flex; flex-direction: column; gap: 12px; }
.faq-item{
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px 20px;
}
.faq-item summary{
  cursor: pointer; font-weight: 700; font-size: .98rem; list-style: none;
  position: relative; padding-right: 28px;
}
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::after{
  content: '+'; position: absolute; right: 0; top: -2px; font-size: 1.4rem;
  color: var(--accent-color); font-weight: 700;
}
.faq-item[open] summary::after{ content: '\2212'; }
.faq-item p{ margin: 12px 0 0; color: var(--text-muted); font-size: .92rem; }

/* ---------- Explore Catalog page (catalog.php) ---------- */
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 30px 24px; }
.catalog-card { display: block; text-decoration: none; color: inherit; }
.catalog-image-wrap { position: relative; overflow: hidden; border-radius: 6px; background: #f6f6f6; }
.catalog-image-wrap img { width: 100%; height: 270px; object-fit: contain; display: block; }
.catalog-nav-arrow{
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.92); color: #111; font-size: 1.3rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.catalog-image-wrap.has-multiple:hover .catalog-nav-arrow{ opacity: 1; pointer-events: auto; }
.catalog-nav-arrow:hover{ background: #fff; }
.catalog-nav-prev{ left: 10px; }
.catalog-nav-next{ right: 10px; }
.catalog-swatches { display: flex; gap: 8px; margin: 14px 0 6px; }
.catalog-swatch {
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2);
  display: inline-block; cursor: pointer; padding: 0;
}
.catalog-swatch.active { outline: 2px solid #111; outline-offset: 2px; }
.catalog-sku { font-size: .74rem; color: #999; display: block; margin-bottom: 2px; }
.catalog-title { font-weight: 600; font-size: .95rem; color: #111; margin: 0 0 4px; }
.catalog-meta { font-size: .78rem; color: #888; margin: 0 0 6px; }
.catalog-price { font-weight: 600; font-size: .9rem; color: #111; display: block; margin-bottom: 10px; }
.catalog-design-btn-static {
  display: block; text-align: center; background: #111; color: #fff; padding: 10px 0;
  border-radius: 6px; font-weight: 600; font-size: .85rem; text-decoration: none;
}
.catalog-design-btn-static:hover { background: #000; }

/* ---------- Catalog Men/Women tabs + shortcut icons ---------- */
.catalog-gender-tabs { display: flex; justify-content: center; gap: 32px; border-bottom: 1px solid #e5e5e5; margin-bottom: 28px; flex-wrap: wrap; }
.gender-tab {
  background: none; border: none; padding: 0 2px 14px; font-size: 1rem; font-weight: 500;
  color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
  line-height: 1.2;
}
.gender-tab.active { color: #111; font-weight: 600; border-bottom: 2px solid #111; }
.catalog-gender-panel { display: none; }
.catalog-gender-panel.active { display: block; }
.catalog-shortcuts-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 26px; margin-bottom: 36px; }
.shortcut-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; width: 90px; text-align: center; }
.shortcut-icon {
  width: 76px; height: 76px; border-radius: 10px; border: 1px solid #e2e2e2; background: #fafafa;
  display: flex; align-items: center; justify-content: center; overflow: hidden; transition: border-color .15s;
}
.shortcut-icon img { width: 100%; height: 100%; object-fit: contain; }
.shortcut-icon-all { font-weight: 600; color: #666; font-size: .85rem; }
.shortcut-item span { font-size: .82rem; color: #444; }
.shortcut-item.active .shortcut-icon { border-color: #111; border-width: 2px; }
.shortcut-item.active span { color: #111; font-weight: 600; }

/* ================================================================
   Mockup Builder — full-screen "app" experience
   ================================================================ */

/* When category.php sets $app_mode, hide the normal site chrome so
   the mockup builder can behave like a standalone app screen. */
body.app-mode .site-header,
body.app-mode .site-footer { display: none; }
html:has(body.app-mode), body.app-mode { height: 100%; margin: 0; overflow: hidden; }
body.app-mode { background: #f2f2f2; }

.mockup-app{
  height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  max-width: 1100px; margin: 0 auto;
  background: #fff;
  overflow: hidden;
}

.app-topbar{
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.app-back-btn{
  width: 38px; height: 38px; border-radius: 50%; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--text-dark); text-decoration: none; flex-shrink: 0;
  transition: background .15s;
}
.app-back-btn:hover{ background: var(--border); }
.app-topbar-title{ display: flex; flex-direction: column; line-height: 1.2; }
.app-topbar-name{ font-family: var(--heading-font); font-weight: 700; font-size: 1.05rem; }
.app-topbar-sub{ font-size: .75rem; color: var(--text-muted); }
.app-topbar-spacer{ flex: 1; }

.app-color-toggle-btn{
  display: none; position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--bg-soft);
  align-items: center; justify-content: center; color: var(--text-dark); flex-shrink: 0;
  border: none !important;
}
.app-color-toggle-btn:hover{ background: var(--border); }
.app-icon-badge{
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 3px;
  border-radius: 999px; background: #e11d1d; color: #fff; font-size: .62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

.app-flash{ margin: 10px 18px 0; flex-shrink: 0; }
.app-empty-msg{ padding: 60px 20px; text-align: center; color: var(--text-muted); }

.app-body{
  flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  overflow: hidden;
}
@media (max-width: 860px){
  .app-body{ grid-template-columns: 1fr; overflow-y: auto; }
}

.app-stage-col{
  padding: 12px 18px; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
@media (max-width: 860px){
  .app-stage-col{ border-right: none; border-bottom: 8px solid #f2f2f2; overflow: visible; }
  .app-color-toggle-btn{ display: flex; }
  .app-stage-row{ position: relative; }
}

.app-side-toggle{
  display: flex; gap: 6px; background: var(--bg-soft); border-radius: 30px;
  padding: 4px; margin-bottom: 10px; flex-shrink: 0;
}
.app-side-toggle button{
  flex: 1; border: none !important; background: transparent; padding: 9px 0;
  font-weight: 600; font-size: .85rem; border-radius: 26px; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.app-side-toggle button.active{ background: #fff; color: var(--text-dark); box-shadow: 0 1px 4px rgba(0,0,0,.12); }

.app-stage-row{ display: flex; align-items: flex-start; gap: 8px; }

.app-color-rail{
  display: flex; flex-direction: column; gap: 6px;
  max-height: 380px; overflow-y: auto; padding: 4px 2px; flex-shrink: 0;
  margin-top: 2px;
}

@media (max-width: 860px){
  /* On mobile the rail becomes a popover dropdown, opened via the topbar button,
     instead of a permanently visible strip next to the stage. */
  .app-color-rail{
    display: none; position: fixed; top: 66px; right: 12px; left: auto; z-index: 60;
    flex-direction: row; flex-wrap: wrap; width: 168px; max-height: none;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 12px; box-shadow: 0 10px 28px rgba(0,0,0,.18); margin-top: 0;
  }
  .app-color-rail.open{ display: flex; }
  .app-color-rail .color-swatch{ padding: 4px; }
}

.color-swatch{ cursor: pointer; padding: 3px; }
.color-swatch .swatch-circle{
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25);
  box-shadow: 0 0 0 1px var(--border);
  transition: border-color .15s, transform .15s;
}
.color-swatch.selected .swatch-circle{
  border-color: var(--accent-color); box-shadow: 0 0 0 2px var(--accent-color); transform: scale(1.12);
}

.app-stage{
  position: relative; flex: 1; max-width: min(100%, calc(100dvh - 170px));
  background: #fff; border-radius: 16px; border: 1px solid var(--border);
  aspect-ratio: 1 / 1; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.06);
  touch-action: none;
}
.app-stage.has-image{ border-color: var(--border); }
.app-stage img.apparel-base{ width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 860px){
  /* On mobile the two columns stack, so the stage should just be as wide as the screen
     (height follows via aspect-ratio) instead of trying to fit within leftover viewport
     height like it does in the desktop side-by-side layout. */
  .app-stage{ max-width: 100%; }
}

/* Each design-frame is the admin-configured safe-print-area (fixed, not draggable) for one
   placement slot. The design-layer inside it is what the customer actually drags/resizes,
   and its own top/left/width/height are percentages OF THE FRAME — so 0-100% can never
   leave the frame's boundary.
   The dashed red outline + drag handles only show for an EMPTY slot (as a placement guide)
   or the slot currently being edited — once a design is placed and you move on, it shows
   clean with no border/handles so the preview looks like the real product. */
.design-frame{
  position: absolute; border: 2px dashed transparent; border-radius: 4px;
  box-sizing: border-box;
}
.design-frame.guide, .design-frame.active{ border-color: #e11d1d; }
.design-frame:not(.active) .resize-handle{ display: none; }
.design-layer{
  position: absolute; cursor: move; overflow: hidden;
}
.design-overlay-img{
  width: 100%; height: 100%; object-fit: contain; pointer-events: none; display: block;
}
.resize-handle{
  position: absolute; width: 16px; height: 16px; background: #e11d1d;
  border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.rh-tl{ top: -8px; left: -8px; cursor: nwse-resize; }
.rh-tr{ top: -8px; right: -8px; cursor: nesw-resize; }
.rh-bl{ bottom: -8px; left: -8px; cursor: nesw-resize; }
.rh-br{ bottom: -8px; right: -8px; cursor: nwse-resize; }

.app-stage-empty{
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: .9rem; padding: 20px; text-align: center;
}
.app-controls-col{ padding: 20px 18px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }

.app-section-body{ display: block; }

@media (max-width: 860px){
  .app-section-body{
    display: none; position: fixed; top: 66px; left: 12px; right: 12px; z-index: 60;
    max-height: calc(100dvh - 90px); overflow-y: auto;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 14px; box-shadow: 0 10px 28px rgba(0,0,0,.18);
  }
  .app-section-body.open{ display: block; }
}
.app-hint{ color: var(--text-muted); font-size: .85rem; margin: 0 0 16px; }

.design-slot-list{ display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px){
  .design-slot-list{ grid-template-columns: 1fr; }
}
.design-slot{
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px;
  cursor: default; transition: border-color .15s, background .15s; min-width: 0;
}
.design-slot-thumb{
  width: 44px; height: 44px; border-radius: 10px; background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border: 1px dashed var(--border); overflow: hidden; flex-shrink: 0;
}
.design-slot-thumb:hover{ border-color: var(--accent-color); }
.slot-thumb-img{ width: 100%; height: 100%; object-fit: cover; }
.design-slot .upload-glyph{ font-size: 1.1rem; color: var(--text-muted); }
.design-slot-text{ flex: 1; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.slot-title{ font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-sub{ font-size: .72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-remove{
  width: 24px; height: 24px; border-radius: 50%; background: var(--bg-soft);
  border: none !important; font-size: .9rem; color: var(--text-muted); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.slot-remove:hover{ background: #eee; color: #c00; }

.app-buttons-row{
  display: flex; gap: 10px; margin-top: auto; padding-top: 16px; flex-shrink: 0;
}
.app-buttons-row .btn{ flex: 1; }

/* Quote form modal */
.quote-modal-overlay{
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55);
  align-items: center; justify-content: center; z-index: 1000; padding: 20px; overflow-y: auto;
}
.quote-modal-overlay.open{ display: flex; }
.quote-modal-content{
  background: #fff; border-radius: 14px; padding: 32px; max-width: 540px; width: 100%;
  max-height: 90vh; overflow-y: auto; position: relative; text-align: left;
}
.quote-modal-close{
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--text-muted);
}
.quote-modal-close:hover{ color: var(--accent-color); }
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 560px){ .form-row{ grid-template-columns: 1fr; } }
.field label{ display: block; font-weight: 600; font-size: .85rem; margin-bottom: 6px; }
.field input, .field select, .field textarea{
  width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px;
  font-family: var(--body-font);
}
.field textarea{ resize: vertical; min-height: 90px; }
.field input:focus, .field select:focus, .field textarea:focus{ outline: 2px solid var(--accent-color); outline-offset: 1px; }

.size-grid{ display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 560px){ .size-grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 400px){ .size-grid{ grid-template-columns: repeat(2, 1fr); } }
.size-box{ text-align: center; }
.size-box label{ display: block; font-weight: 700; font-size: .8rem; margin-bottom: 6px; }
.size-box input{
  width: 100%; text-align: center; padding: 9px 6px; border: 1px solid var(--border); border-radius: 8px; font-size: 16px;
}
.size-box input:focus{ outline: 2px solid var(--accent-color); outline-offset: 1px; }

.alert{ padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; font-size: .92rem; border: 1px solid #000; background: #f5f5f5; color: #111; }
.alert-success::before{ content: '\2713  '; font-weight: 800; }
.alert-error{ background: #fff; }
.alert-error::before{ content: '\2715  '; font-weight: 800; }

/* ---------------- Footer ---------------- */
.site-footer{ background: #000000; color: rgba(255,255,255,.75); margin-top: 40px; }
.footer-grid{
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
  padding-top: 56px; padding-bottom: 40px;
}
.footer-brand p{ font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 12px; max-width: 240px; }
.footer-col h4{
  color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 16px; font-family: var(--heading-font);
}
.footer-col a{
  display: block; font-size: .88rem; color: rgba(255,255,255,.6); margin-bottom: 12px;
  transition: color .15s;
}
.footer-col a:hover{ color: #fff; }
.footer-chat .footer-email{
  color: #fff !important; font-weight: 700; font-size: .95rem; margin-bottom: 18px !important;
}
.footer-social{ display: flex; gap: 10px; }
.footer-social a{
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; margin-bottom: 0;
}
.footer-social a:hover{ background: rgba(255,255,255,.25); }
.footer-social svg{ width: 15px; height: 15px; fill: #fff; }
.footer-bottom{ border-top: 1px solid rgba(255,255,255,.1); }
.footer-inner{ display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .8rem; padding: 18px 0; color: rgba(255,255,255,.55); }
.footer-note{ opacity: .8; }

@media (max-width: 780px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px){
  .footer-grid{ grid-template-columns: 1fr; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 780px){
  .nav-toggle{ display: flex; }
  .nav-profile-wrap-desktop{ display: none; }
  .nav-profile-wrap-mobile{ display: inline-flex; }
  .main-nav{
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: flex-start; gap: 0;
    max-height: 0; overflow: hidden; border-bottom: 1px solid var(--border);
    transition: max-height .25s ease;
  }
  .main-nav.open{ max-height: 1200px; }
  .main-nav a{ width: 100%; padding: 14px 20px; border-bottom: 1px solid var(--border); }
  .nav-cta-btn{ text-align: center; border-radius: 0 !important; }
  .nav-dropdown{ width: 100%; }
  .nav-dropdown-trigger{
    width: 100%; padding: 14px 20px; border-bottom: 1px solid var(--border);
    justify-content: space-between;
  }
  .nav-dropdown-menu{
    display: none; position: static; margin-top: 0; box-shadow: none;
    border: none; border-radius: 0; background: #fafafa; padding: 0; width: 100%;
  }
  .nav-dropdown-menu.open{ display: block; }
  .nav-dropdown-menu a{ padding: 12px 20px 12px 34px; }
  .showcase-card{
    grid-template-columns: 1fr; padding: 36px 24px; text-align: center;
  }
  .showcase-content p{ margin-left: auto; margin-right: auto; }
  .showcase-gallery{ grid-template-rows: repeat(3, 70px); }
}
@media (max-width: 480px){
  .showcase-gallery{ grid-template-rows: repeat(3, 56px); gap: 8px; }
  .showcase-gallery img{ border-radius: 10px; }
}

/* ---------------- Extra mobile polish ---------------- */
@media (max-width: 780px){
  .section{ padding: 44px 0; }
  .section-title{ margin-bottom: 28px; }
  .section-title h2{ font-size: 1.6rem; }
  .cat-grid{ grid-template-columns: 1fr; }
  .steps-grid{ grid-template-columns: 1fr; gap: 22px; }
  .mfg-grid{ grid-template-columns: 1fr; }
  .quote-modal-content{ padding: 22px; border-radius: 12px; }
  .quote-modal-close{ top: 8px; right: 10px; font-size: 1.4rem; }
  .preview-toggle button{ padding: 6px 12px; font-size: .78rem; }
  .catalog-gender-tabs{ gap: 20px; }
  .catalog-shortcuts-row{ gap: 16px; }
  .shortcut-item{ width: 74px; }
  .shortcut-icon{ width: 62px; height: 62px; }
}
@media (max-width: 480px){
  .cat-card .cat-thumb, .cat-card .cat-thumb-placeholder{ height: 180px; padding: 14px; }
  .color-swatch .swatch-circle{ width: 28px; height: 28px; }
  .builder{ padding: 32px 0 50px; }
  .btn-lg{ padding: 14px 24px; font-size: 1rem; }
  .catalog-grid{ grid-template-columns: repeat(2, 1fr); gap: 14px 12px; }
  .catalog-image-wrap img{ height: 160px; }
}
