﻿/* ============================================================
   UBATECH STOREFRONT — frontend.css
   ============================================================ */

/* ── Variables & Reset ── */
:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --text: #101418;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 28px rgba(0,0,0,.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --sc: #111827;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

img { max-width: 100%; display: block; }

button { cursor: pointer; font-family: inherit; border: none; }

/* ── LANDING PAGE ── */
.landing-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #f0f4ff 0%, #f3f5f8 60%);
}

.landing-header {
  text-align: center;
  padding: 60px 20px 40px;
}

.landing-brand {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  color: #111827;
}

.landing-sub {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1.1rem;
}

.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.store-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, var(--store-color, #111827) 0%, #0f172a 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform .2s, box-shadow .2s;
}

.store-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(0,0,0,.22);
}

.store-card-logo {
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.store-card-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.store-card-body {
  padding: 20px;
  flex: 1;
}

.store-card-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.store-card-body p {
  opacity: .85;
  font-size: .95rem;
  margin-bottom: 10px;
}

.store-card-addr {
  display: block;
  font-size: .82rem;
  opacity: .7;
}

.store-card-cta {
  padding: 14px 20px;
  background: rgba(255,255,255,.14);
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  letter-spacing: .02em;
}

/* ── STOREFRONT HEADER ── */
.sf-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .28s ease;
}

.sf-header.hide {
  transform: translateY(-100%);
}

.sf-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sf-back {
  color: var(--sc);
  font-weight: 600;
  font-size: .85rem;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}

.sf-back:hover { background: #f3f4f6; }

.sf-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.sf-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

.sf-store-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sf-cart-btn {
  position: relative;
  background: var(--sc);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  transition: opacity .15s;
}

.sf-cart-btn:hover { opacity: .88; }

.cart-badge {
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── HERO BANNER ── */
.sf-hero {
  padding: 20px 16px;
  color: #fff;
  transition: margin .25s ease, opacity .25s ease;
}

.sf-hero.hide {
  margin-top: -100px;
  opacity: 0;
}

.sf-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.sf-hero-title {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 6px;
}

.sf-hero-desc {
  font-size: 1rem;
  opacity: .88;
  margin-bottom: 14px;
  max-width: 600px;
}

.sf-hero-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: .9rem;
  transition: background .15s;
  border: 1px solid rgba(255,255,255,.35);
}

.sf-hero-wa:hover { background: rgba(255,255,255,.28); }

/* ── MAIN & TOOLBAR ── */
.storefront {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px;
}

.sf-toolbar {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .24s ease, opacity .2s ease;
}

.sf-toolbar.hide {
  transform: translateY(calc(-100% - 6px));
  opacity: 0;
}

.sf-products-title {
  font-size: clamp(1.25rem, 2.3vw, 1.75rem);
  font-weight: 800;
  color: var(--sc);
  margin-bottom: 6px;
}

.sf-cats-label {
  font-size: .82rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.sf-cats-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.sf-categories {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.sf-subcats-toggle {
  border: 1px solid var(--border);
  background: #f3f4f6;
  color: #111827;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  padding: 6px 10px;
}

.sf-subcats-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 69;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.sf-subcats-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sf-subcats-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(320px, 90vw);
  height: 100vh;
  background: #fff;
  z-index: 70;
  transform: translateX(-100%);
  transition: transform .24s cubic-bezier(.4,0,.2,1);
  box-shadow: 8px 0 24px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
}

.sf-subcats-drawer.open {
  transform: translateX(0);
}

.sf-subcats-drawer-head {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-subcats-drawer-head h3 {
  margin: 0;
  font-size: .98rem;
  font-weight: 700;
  color: #111827;
}

.sf-subcats-drawer-head button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #374151;
}

.sf-subcats-drawer-body {
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-subcats-drawer-body .subcategory-btn {
  text-align: left;
  width: 100%;
  border-radius: 8px;
  padding: 9px 10px;
}

.sf-search-wrap {
  position: relative;
  margin-bottom: 10px;
}

.sf-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

#searchInput {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px 9px 38px;
  font-size: .95rem;
  outline: none;
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}

#searchInput:focus {
  border-color: var(--sc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 12%, transparent);
}

.sf-subcategories {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.sf-subcategories:empty { display: none; }

.category-btn {
  border: 1px solid var(--border);
  background: #f9fafb;
  color: #374151;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
  flex: 0 0 auto;
}

.category-btn:hover {
  border-color: var(--sc);
  color: var(--sc);
}

.category-btn.active {
  background: var(--sc);
  color: #fff;
  border-color: var(--sc);
}

.category-btn.offers {
  border: 0;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--sc) 0%, #14b8a6 100%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .14);
}

.category-btn.offers.active {
  transform: translateY(-1px) scale(1.03);
}

.subcategory-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: #6b7280;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .8rem;
  font-weight: 500;
  transition: all .15s;
  flex: 0 0 auto;
}

.subcategory-btn.active {
  background: var(--sc);
  color: #fff;
  border-color: var(--sc);
}

/* ── RESULTS BAR ── */
.sf-results-bar {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: .85rem;
  padding: 0 4px;
}

/* ── STATUS ── */
.sf-status {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: .95rem;
}

.sf-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--sc);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── PRODUCT GRID ── */
.storefront .product-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 220px);
  gap: 10px;
  width: 100%;
  max-width: 100%;
  align-items: stretch;
  justify-content: start;
  margin-top: 4px;
  overflow: hidden;
  box-sizing: border-box;
}

.storefront .products-grid {
  display: block;
  width: 100%;
}

.storefront .product-cards-grid > .product-card {
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: 0 0 auto;
}

@media (min-width: 1200px) {
  .storefront .product-cards-grid {
    grid-template-columns: repeat(auto-fill, 220px);
  }
}

@media (max-width: 900px) {
  .storefront .product-cards-grid {
    grid-template-columns: repeat(auto-fill, 180px);
  }
}

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

.storefront .product-category-section,
.storefront .category-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 16px;
  padding: 12px 0 0;
  border-top: 1px solid #e2e8f0;
}

.storefront .product-category-section:first-of-type,
.storefront .category-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.storefront .product-category-title,
.storefront .category-section-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.storefront .product-category-section:last-child,
.storefront .category-section:last-child {
  margin-bottom: 0;
}

/* ── PRODUCT CARD ── */
.storefront .product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  height: 282px;
  min-height: 282px;
  max-height: 282px;
  align-self: stretch;
}

.storefront .product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d1d5db;
}

.pc-img-wrap {
  position: relative;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  min-height: 150px;
  max-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  transition: transform .22s;
}

.storefront .product-card:hover .pc-img-wrap img {
  transform: scale(1.05);
}

.pc-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ef4444;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 1;
}

.pc-body {
  padding: 8px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: flex-start;
  min-height: 130px;
  max-height: 150px;
}

.pc-name {
  font-size: .82rem;
  font-weight: 600;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.2;
  min-height: 2rem;
}

.pc-cat {
  font-size: .72rem;
  color: var(--sc);
  font-weight: 500;
}

.pc-prices {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.pc-price-old {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: .76rem;
}

.pc-price-new {
  font-size: .88rem;
  font-weight: 700;
  color: #111827;
}

.pc-add-btn {
  margin-top: auto;
  padding-top: 8px;
  background: var(--sc);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 7px 0;
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  transition: opacity .15s;
  margin: 8px 0 0;
  width: 100%;
}

.pc-add-btn:hover { opacity: .88; }

/* ── PRODUCT MODAL ── */
.prod-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.prod-overlay.open { opacity: 1; pointer-events: auto; }

.prod-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 101;
  transform: translate(-50%, -50%) scale(.95);
  background: #fff;
  border-radius: var(--radius-lg);
  width: min(96vw, 680px);
  max-height: 90vh;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: all .22s;
  box-shadow: 0 24px 48px rgba(0,0,0,.22);
}

.prod-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.prod-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  background: #f3f4f6;
  color: #374151;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.prod-modal-close:hover { background: #e5e7eb; }

.pm-content { padding: 20px; }

.pm-gallery { margin-bottom: 16px; }

.pm-gallery img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: #f9fafb;
  padding: 12px;
}

.pm-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
}

.pm-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: contain;
  background: #f9fafb;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.pm-thumb.active { border-color: var(--sc); }

.pm-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; color: #111827; }
.pm-cat  { font-size: .82rem; color: var(--sc); font-weight: 500; margin-bottom: 12px; }
.pm-desc { color: var(--muted); font-size: .92rem; line-height: 1.6; margin-bottom: 16px; }

.pm-prices {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.pm-price-old { text-decoration: line-through; color: #9ca3af; font-size: .95rem; }
.pm-price-new { font-size: 1.5rem; font-weight: 800; color: #111827; }

.pm-badge {
  background: #ef4444;
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}

.pm-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pm-qty-label { font-weight: 600; font-size: .9rem; }

.pm-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.pm-qty-btn {
  width: 36px;
  height: 36px;
  background: #f3f4f6;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}

.pm-qty-btn:hover { background: #e5e7eb; }

.pm-qty-val {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  font-size: .95rem;
}

.pm-btn-row {
  display: flex;
  gap: 10px;
}

.pm-add-btn {
  flex: 1;
  background: var(--sc);
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  transition: opacity .15s;
}

.pm-add-btn:hover { opacity: .88; }

.pm-wa-btn {
  flex: 1;
  background: #25d366;
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity .15s;
}

.pm-wa-btn:hover { opacity: .88; }

/* ── CART SIDEBAR ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(400px, 100vw);
  height: 100vh;
  background: #fff;
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,.18);
  transition: right .25s cubic-bezier(.4,0,.2,1);
}

.cart-sidebar.open { right: 0; }

.cart-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sc);
  color: #fff;
}

.cart-header h3 { font-size: 1.1rem; font-weight: 700; }

.cart-close {
  background: rgba(255,255,255,.18);
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-close:hover { background: rgba(255,255,255,.28); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: flex;
  gap: 10px;
  background: #f9fafb;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.cart-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; min-width: 0; }

.cart-item-name {
  font-size: .88rem;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cart-item-price {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 3px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.ci-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ci-qty-val { font-weight: 600; font-size: .85rem; min-width: 20px; text-align: center; }

.ci-remove {
  margin-left: auto;
  color: #ef4444;
  background: none;
  font-size: .85rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.ci-remove:hover { background: #fee2e2; }

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.cart-total strong { font-size: 1.2rem; font-weight: 800; }

.cart-wa-btn {
  background: #25d366;
  color: #fff;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  transition: opacity .15s;
}

.cart-wa-btn:hover { opacity: .88; }

.cart-clear-btn {
  background: #fff;
  color: #ef4444;
  border: 1px solid #fecaca;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .88rem;
  text-align: center;
  transition: background .15s;
}

.cart-clear-btn:hover { background: #fee2e2; }

.cart-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .95rem;
}

/* ── FOOTER ── */
.sf-footer {
  background: #111827;
  color: #d1d5db;
  margin-top: 48px;
  padding: 0 0 0 0;
}

.sf-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
}

.sf-footer-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 6px;
}

.sf-footer-col h3 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.sf-footer-col h4 { color: #9ca3af; font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.sf-footer-col p  { font-size: .88rem; line-height: 1.6; color: #9ca3af; margin-bottom: 8px; }
.sf-footer-col a  { color: #93c5fd; transition: color .15s; }
.sf-footer-col a:hover { color: #fff; }

.sf-footer-copy {
  border-top: 1px solid #374151;
  padding: 16px 20px;
  text-align: center;
  color: #6b7280;
  font-size: .82rem;
}

/* ── MAINTENANCE / 404 ── */
.centered {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 12px;
  padding: 20px;
}

.centered h1 { font-size: 3rem; }
.centered p  { color: var(--muted); font-size: 1.1rem; }

.centered .back-link {
  display: inline-block;
  background: #111827;
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .sf-store-name { display: none; }
  .storefront .products-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .sf-hero { padding: 14px 12px; }
  .storefront { padding: 10px 10px; }
  .sf-toolbar { top: 58px; }
  .sf-subcats-toggle { display: inline-flex; align-items: center; }
  .sf-subcategories { display: none; }
}

@media (max-width: 400px) {
  .storefront .products-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── CONTACT PAGE ── */
.contact-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.contact-hero {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--sc);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 16px;
}

.contact-back {
  display: inline-block;
  margin-bottom: 8px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--sc);
}

.contact-hero h1 {
  margin: 0 0 6px;
  color: #111827;
  font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.contact-hero p {
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.contact-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #111827;
}

.contact-card p {
  margin: 0 0 8px;
  color: #374151;
}

.contact-form {
  display: grid;
  gap: 8px;
}

.contact-form label {
  font-size: .84rem;
  font-weight: 700;
  color: #111827;
}

.contact-form input,
.contact-form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--sc);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 12%, transparent);
}

.contact-submit {
  margin-top: 4px;
  border: 0;
  background: var(--sc);
  color: #fff;
  border-radius: 8px;
  padding: 11px;
  font-weight: 700;
}

.contact-error {
  color: #b91c1c;
  font-size: .85rem;
  margin: 0;
}

.contact-note {
  margin-top: 10px;
  color: #6b7280;
  font-size: .86rem;
}

@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; }
}
