:root {
  --ivory: #FAF7F0;
  --burgundy: #7A263A;
  --wine: #5B1729;
  --wine-deep: #3A0F1F;
  --gold: #C9A45C;
  --gold-light: #E8D5A3;
  --ink: #292525;
  --muted: #8B7D6B;
  --line: #EDE4D5;
  --sand: #F5EEE4;
  --ok: #2D6A4F;
  --err: #B65F4A;
}

html, body { height: 100%; }
* { box-sizing: border-box; }
html, body, button, input, select, textarea, h1, h2, h3, h4, h5, h6, p, a, span, div, td, th, label, li, summary, nav {
  font-family: "Times New Roman", Times, serif !important;
}
body {
  margin: 0;
  background-color: var(--ivory);
  color: var(--ink);
  scroll-behavior: smooth;
  font-size: 16px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.font-display, .brand-name {
  font-family: "Times New Roman", Times, serif !important;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C9A45C44; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #C9A45C88; }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.gold-shimmer {
  background: linear-gradient(90deg, #C9A45C 0%, #E8D5A3 40%, #C9A45C 60%, #A07A32 100%);
  background-size: 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 3s linear infinite;
}
.moq-badge {
  background: linear-gradient(135deg, #7A263A, #5B1729);
  color: #C9A45C;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid #C9A45C44;
}

.site-shell { min-height: 100vh; display: flex; flex-direction: column; background: var(--ivory); }
.promo-bar {
  background: linear-gradient(90deg, #5B1729 0%, #7A263A 50%, #5B1729 100%);
  color: var(--gold);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 12px;
}
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 20px rgba(122,38,58,0.08);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--burgundy); flex-shrink: 0; }
.brand-logo { display: block; }
.brand-logo-square { height: 56px; width: auto; border-radius: 10px; }
.brand-logo-banner { width: min(280px, 100%); height: auto; border-radius: 10px; }
.brand-logo-mark { height: 44px; width: 44px; object-fit: cover; border-radius: 50%; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #7A263A, #C9A45C);
  color: #FAF7F0; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  box-shadow: 0 2px 12px rgba(201,164,92,0.4);
}
.brand-name {
  display: block; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; line-height: 1.1; color: var(--burgundy);
}
.brand-tag { display: block; font-size: 0.6rem; color: var(--muted); letter-spacing: 0.12em; font-weight: 500; }
.header-search {
  display: flex;
  width: calc(100% - 48px);
  max-width: 1400px;
  margin: 0 auto 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.header-search input {
  flex: 1; border: none; padding: 10px 16px; font-size: 0.88rem; background: transparent; min-width: 0; outline: none;
}
.header-search button {
  background: linear-gradient(135deg, #7A263A, #5B1729);
  color: var(--gold); border: none; padding: 0 18px; font-weight: 700; cursor: pointer; font-size: 0.82rem;
}
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-link {
  color: var(--burgundy); font-weight: 500; font-size: 0.85rem;
  padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
}
.header-cart { position: relative; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.cart-count {
  position: absolute; top: 2px; right: 2px; background: var(--burgundy); color: var(--gold);
  font-size: 0.6rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
}
.header-cta {
  padding: 9px 16px; border-radius: 8px;
  background: linear-gradient(135deg, #7A263A, #5B1729);
  color: var(--gold); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.03em; box-shadow: 0 2px 12px rgba(122,38,58,0.3);
}
.header-nav {
  display: flex; gap: 4px; align-items: center; flex-wrap: wrap;
}
.header-nav a {
  padding: 6px 12px; border-radius: 6px; font-weight: 500; font-size: 0.85rem; color: var(--ink);
}
.header-nav a.is-active { background: var(--line); color: var(--burgundy); }
.account-menu { position: relative; }
.account-menu summary {
  list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--line); color: var(--burgundy); font-size: 0.85rem; font-weight: 500;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-drop {
  position: absolute; right: 0; top: 100%; margin-top: 4px; background: var(--ivory);
  min-width: 160px; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 8px; z-index: 200;
}
.account-drop a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 0.85rem; color: var(--ink); }
.account-drop a:hover { background: var(--sand); color: var(--burgundy); }

.site-main { flex: 1; }
.site-footer { background: linear-gradient(180deg, #3A0F1F 0%, #1E0810 100%); color: #EDE4D5; margin-top: auto; }
.footer-moq {
  background: linear-gradient(90deg, #C9A45C22, #C9A45C44, #C9A45C22);
  border-top: 1px solid #C9A45C33; border-bottom: 1px solid #C9A45C33;
  color: var(--gold); text-align: center; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; padding: 14px;
}
.footer-grid {
  max-width: 1400px; margin: 0 auto; padding: 56px 24px 32px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px;
}
.site-footer h4 {
  color: var(--gold); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  margin: 0 0 20px; text-transform: uppercase;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #9B8A7A; font-size: 0.85rem; }
.site-footer a:hover { color: var(--gold); }
.footer-copy { color: #9B8A7A; font-size: 0.85rem; line-height: 1.7; }
.footer-note { color: var(--gold); font-weight: 700; font-size: 0.8rem; }
.footer-legal {
  border-top: 1px solid #C9A45C22; max-width: 1400px; margin: 0 auto;
  padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 0.78rem; color: #6B5B4E;
}
.footer-legal a { margin-left: 16px; color: #6B5B4E; }

.flash {
  max-width: 1400px;
  margin: 16px auto 0;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.flash-error { background: #B65F4A22; color: #B65F4A; border: 1px solid #B65F4A44; }
.flash-success { background: #2D6A4F22; color: #2D6A4F; border: 1px solid #2D6A4F44; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--ivory); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 1.8rem; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.auth-tabs { display: flex; gap: 8px; margin: 20px 0 16px; }
.auth-tabs button {
  flex: 1; padding: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-weight: 600; border-radius: 10px; color: var(--burgundy);
}
.auth-tabs button.on {
  background: linear-gradient(135deg, #7A263A, #5B1729); color: var(--gold); border-color: transparent;
}
.auth-card label { display: block; font-size: 0.82rem; font-weight: 600; margin: 12px 0 6px; }
.auth-card input[type="text"], .auth-card input[type="password"], .auth-card input[type="email"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: #fff;
}
.btn-primary {
  width: 100%; margin-top: 16px; padding: 14px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, #7A263A, #5B1729); color: var(--gold);
  font-weight: 700; cursor: pointer; font-size: 0.95rem;
}
.btn-google {
  width: 100%; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font-weight: 600; cursor: pointer; font-size: 0.9rem; color: var(--ink);
  display: flex; justify-content: center; gap: 8px; text-align: center;
}
.auth-side {
  background: var(--wine-deep); color: #fff; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px; position: relative; overflow: hidden;
}
.auth-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.auth-side::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, #5B172988 0%, #3A0F1F88 100%);
}
.auth-side .auth-side-copy { position: relative; z-index: 1; }
.auth-side .brand-name, .auth-side h2 { color: var(--gold); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

img, svg, video { max-width: 100%; }
img { height: auto; }
.hero-photo { height: 100% !important; }
input, select, textarea, button { max-width: 100%; }
div:has(> table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.site-header { position: relative; }

.form-grid-2 > *, .form-grid-3 > *, .form-grid-4 > * { min-width: 0; }
.mobile-nav { display: none; position: static; }
.mobile-nav-btn {
  list-style: none; cursor: pointer; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--burgundy); font-size: 1.2rem; line-height: 1;
}
.mobile-nav-btn::-webkit-details-marker { display: none; }
.mobile-nav-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ivory); border-top: 1px solid var(--line);
  padding: 8px 24px 20px; z-index: 150;
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}
.mobile-nav-panel a {
  display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; font-weight: 500;
}
.mobile-nav-cta {
  margin-top: 12px !important; padding: 12px !important; border-radius: 8px !important; border: none !important;
  background: linear-gradient(135deg, #7A263A, #5B1729) !important; color: var(--gold) !important;
  font-weight: 700 !important; text-align: center;
}
.cart-label { font-size: 0.75rem; }
.auth-card .brand-logo-square { height: 88px; margin: 0 auto 12px; }
.auth-side .brand-logo-banner { width: min(240px, 100%); }
.admin-aside .brand-logo-mark { height: 40px; width: 40px; }

@media (min-width: 640px) {
  .sm\:inline { display: inline !important; }
  .sm\:block { display: block !important; }
}
@media (min-width: 768px) {
  .md\:block { display: block !important; }
  .md\:grid-2 { display: grid !important; }
}
@media (min-width: 1200px) {
  .nav-desktop { display: flex !important; }
  .mobile-nav { display: none !important; }
}
@media (max-width: 1199px) {
  .nav-desktop { display: none !important; }
  .mobile-nav { display: block; }
  .header-inner { flex-wrap: nowrap; padding: 10px 16px; min-height: 0; gap: 10px; }
  .header-search { width: calc(100% - 32px); margin: 0 auto 12px; }
  .header-nav { display: none; }
  .bulk-cta { display: none !important; }
  .hero-grid { grid-template-columns: 1fr !important; min-height: auto !important; }
  .hero-copy { padding: 40px 24px !important; }
  .hero-image { min-height: 280px; }
  .two-col,
  .products-layout,
  .checkout-grid,
  .cart-grid,
  .quote-grid,
  .dash-grid,
  .admin-settings,
  .auth-split,
  .auth-page { grid-template-columns: 1fr !important; gap: 24px !important; }
  .form-grid-2,
  .form-grid-3,
  .form-grid-4 { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 767px) {
  html { font-size: 15px; }
  .promo-bar { font-size: 0.68rem; letter-spacing: 0; padding: 7px 10px; }
  .brand-name { font-size: 0.92rem; }
  .brand-tag { display: none; }
  .brand-mark { width: 36px; height: 36px; font-size: 1rem; }
  .brand-logo-square { height: 44px; }
  .brand-logo-mark { height: 36px; width: 36px; }
  .header-link { padding: 8px 10px; }
  .cart-label, .account-label { display: none; }
  .auth-image, .auth-side { display: none !important; }
  .auth-panel { padding: 28px 16px; }
  .form-grid-2,
  .form-grid-3,
  .form-grid-4 { grid-template-columns: 1fr !important; }
  .form-grid-2 > *,
  .form-grid-3 > *,
  .form-grid-4 > * { grid-column: 1 / -1 !important; }
  .cart-item { flex-direction: column !important; }
  .cart-item img { width: 100% !important; height: 180px !important; }
  .hero-badge { left: 16px !important; right: 16px !important; bottom: 16px !important; }
  .float-chip { left: 12px !important; right: 12px !important; bottom: 12px !important; }
  .quote-card { padding: 24px 18px !important; }
  .footer-grid { padding: 36px 16px 24px; gap: 24px; }
  .footer-legal { padding: 16px; }
  .footer-legal a { margin-left: 0; margin-right: 12px; display: inline-block; }
  .flash { margin: 12px 16px 0; }
  .admin-shell { flex-direction: column !important; }
  .admin-aside {
    width: 100% !important;
    flex-direction: row !important;
    overflow-x: auto;
    max-height: none;
  }
  .admin-aside nav { display: flex; flex-wrap: nowrap; }
  .admin-aside nav a { white-space: nowrap; }
  .checkout-steps { min-width: 0; }
  .checkout-steps > div { min-width: 110px; flex: 1 0 auto; }
}
@media (max-width: 480px) {
  .hero-copy { padding: 28px 16px !important; }
  .header-inner { padding: 8px 12px; }
  .header-search { width: calc(100% - 24px); margin: 0 auto 10px; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes kenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.page-home .hero-copy > * {
  opacity: 0;
  animation: fadeUp 0.75s cubic-bezier(.22,.61,.36,1) forwards;
}
.page-home .hero-copy > *:nth-child(1) { animation-delay: 0.08s; }
.page-home .hero-copy > *:nth-child(2) { animation-delay: 0.18s; }
.page-home .hero-copy > *:nth-child(3) { animation-delay: 0.28s; }
.page-home .hero-copy > *:nth-child(4) { animation-delay: 0.36s; }
.page-home .hero-copy > *:nth-child(5) { animation-delay: 0.44s; }
.page-home .hero-copy > *:nth-child(6) { animation-delay: 0.56s; }
.page-home .hero-photo {
  animation: kenBurns 18s ease-in-out infinite alternate;
  transform-origin: center center;
}
.page-home .hero-badge {
  animation: fadeUp 0.9s 0.5s cubic-bezier(.22,.61,.36,1) both, floatCard 5s 1.4s ease-in-out infinite;
}
.page-home .hero-copy a,
.page-home .reveal a {
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.page-home .hero-copy a:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.22,.61,.36,1), transform 0.7s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

.category-card {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.category-card img {
  transition: transform 0.6s ease;
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(90, 23, 41, 0.28) !important;
}
.category-card:hover img {
  transform: scale(1.06);
}

.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card img {
  transition: transform 0.5s ease;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 32px rgba(122, 38, 58, 0.16) !important;
}
.product-card:hover img {
  transform: scale(1.05);
}

.tier-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tier-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(122, 38, 58, 0.18);
}

.page-home .soft-photo {
  transition: transform 0.6s ease;
}
.page-home .soft-photo:hover {
  transform: scale(1.03);
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-copy > *,
  .page-home .hero-photo,
  .page-home .hero-badge,
  .reveal,
  .category-card,
  .product-card,
  .tier-card,
  .page-home .soft-photo {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
