/* ============================================================
   FUNDRAISER STORE — STYLES
   Mobile-first, school-brandable via CSS custom properties
   Modern redesign: glassmorphism header, elevated cards,
   hero banner, trust features, smooth animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;500;700;800&display=swap');

:root {
  --brand-primary: #000066;
  --brand-accent: #ffffff;
  --brand-light: #e8e8f4;
  --brand-dark: #000044;
  --bg: #fafaf9;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 2rem;
  --shadow: 0 10px 40px -10px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px -12px rgba(0,0,0,0.12);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', -apple-system, sans-serif;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: #cbd5e1; border-radius: 20px; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

.animate-fade-in {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-delay-1 { animation-delay: 100ms; }
.animate-delay-2 { animation-delay: 200ms; }
.animate-delay-3 { animation-delay: 300ms; }
.animate-delay-4 { animation-delay: 400ms; }

/* --- Header (Glassmorphism) --- */
.store-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 0;
  color: var(--text);
  transition: all var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 64px;
}

@media (min-width: 768px) {
  .header-inner {
    height: 76px;
    padding: 0 24px;
  }
}

.header-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .header-logo {
    width: 48px;
    height: 48px;
  }
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .header-title {
    font-size: 1.3rem;
  }
}

.header-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .header-subtitle {
    font-size: 0.7rem;
  }
}

.header-countdown {
  display: none;
  margin-left: auto;
  background: #fff1f2;
  color: #be123c;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid #fecdd3;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
}

.header-countdown::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #e11d48;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Main Layout --- */
.store-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 16px 100px;
}

@media (min-width: 768px) {
  .store-main {
    padding: 100px 24px 80px;
  }
}

/* --- Hero Banner --- */
.hero-banner {
  position: relative;
  background: var(--brand-primary);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (min-width: 768px) {
  .hero-banner {
    border-radius: 2.5rem;
    margin-bottom: 56px;
  }
}

.hero-bg-effects {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  filter: blur(80px);
  animation: blob 7s infinite;
}

.hero-blob-1 {
  top: -20%; left: -10%;
  width: 50%; height: 70%;
  background: rgba(37, 99, 235, 0.3);
}

.hero-blob-2 {
  top: 20%; right: -10%;
  width: 40%; height: 60%;
  background: rgba(20, 184, 166, 0.2);
  animation-delay: 2s;
}

.hero-blob-3 {
  bottom: -20%; left: 20%;
  width: 60%; height: 60%;
  background: rgba(99, 102, 241, 0.3);
  animation-delay: 4s;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 24px;
}

@media (min-width: 768px) {
  .hero-content {
    padding: 40px 48px;
    display: flex;
    align-items: center;
    gap: 48px;
  }
}

.hero-text {
  flex: 1;
  text-align: center;
}

.hero-desc {
  margin-left: auto;
  margin-right: auto;
}

.hero-countdown-box {
  margin-left: auto;
  margin-right: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 8px; height: 8px;
  background: #4ade80;
  border-radius: 50%;
}

.hero-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .hero-heading {
    font-size: 2.2rem;
  }
}

@media (min-width: 1024px) {
  .hero-heading {
    font-size: 2.5rem;
  }
}

.hero-heading-accent {
  background: linear-gradient(to right, #60a5fa, #5eead4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 0.85rem;
  color: #cbd5e1;
  max-width: 520px;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .hero-desc {
    font-size: 0.95rem;
  }
}

.hero-countdown-box {
  max-width: 380px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(8px);
}

.hero-countdown-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.hero-countdown-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #cbd5e1;
}

.hero-countdown-value {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.hero-countdown-bar {
  width: 100%;
  height: 8px;
  background: #1e293b;
  border-radius: 100px;
  overflow: hidden;
}

.hero-countdown-fill {
  height: 100%;
  background: linear-gradient(to right, #3b82f6, #2dd4bf);
  border-radius: 100px;
  transition: width 1s ease;
}

/* --- Section Title --- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .section-header {
    margin-bottom: 32px;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: none;
}

@media (min-width: 768px) {
  .section-desc {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
  }
}

.section-desc-icon {
  display: inline-flex;
  color: var(--text-muted);
}

/* --- Products Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 28px;
  }
}

/* --- Product Card (Elevated) --- */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 16px;
}

@media (min-width: 768px) {
  .product-card {
    padding: 20px;
  }
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-light);
  transform: translateY(-6px);
}

.product-image-wrap {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .product-image-wrap {
    margin-bottom: 20px;
  }
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .product-name {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }
}

.product-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .product-desc {
    font-size: 0.85rem;
    margin-bottom: 16px;
  }
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .product-price {
    font-size: 1.5rem;
  }
}

.product-actions {
  margin-top: auto;
}

.btn-add {
  width: 100%;
  padding: 12px 20px;
  background: var(--border-light);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-add:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.btn-add:active { transform: scale(0.97); }

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--border-light);
  border-radius: var(--radius-sm);
  border: 2px solid var(--brand-primary);
  overflow: hidden;
  width: 100%;
}

.qty-btn {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-primary);
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font);
}

.qty-btn:hover { background: var(--brand-light); }

.qty-value {
  flex: 1;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-primary);
  font-family: var(--font-display);
}

/* --- Personalization Input --- */
.personalize-group {
  margin-bottom: 12px;
  background: var(--border-light);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.personalize-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.personalize-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: var(--font);
  transition: all var(--transition);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.personalize-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 102, 0.1);
}

.cart-item-pers {
  display: block;
  font-size: 0.75rem;
  color: var(--brand-primary);
  font-style: italic;
}

/* --- Order Bar (Modern Floating Pill) --- */
.order-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 300;
  display: flex;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

@media (min-width: 640px) {
  .order-bar {
    padding: 0 16px 20px;
  }
}

.order-bar-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 100%;
  background: var(--text);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
  border-top: 1px solid rgba(255,255,255,0.08);
  transition: all var(--transition);
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
  .order-bar-inner {
    max-width: 520px;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 12px 16px;
  }
}

.order-bar-inner:hover {
  background: #1e293b;
}

.order-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-bar-icon {
  position: relative;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
}

.order-bar-icon svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.order-bar-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 20px; height: 20px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--text);
}

.order-bar-text-wrap {
  display: flex;
  flex-direction: column;
}

.order-bar-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.order-bar-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.2;
}

.order-bar-cta {
  font-weight: 600;
  font-size: 0.85rem;
  background: #ffffff;
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.order-bar-cta:active { transform: scale(0.95); }

/* --- Trust Features --- */
.trust-features {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .trust-features {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    margin-top: 72px;
    padding-top: 48px;
  }
}

.trust-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.trust-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.trust-icon-delivery { background: #eff6ff; color: #2563eb; }
.trust-icon-quality { background: #f0fdf4; color: #16a34a; }
.trust-icon-support { background: #eef2ff; color: #4f46e5; }

.trust-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.trust-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- Cart Panel (overlay) --- */
.cart-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  max-width: 100vw;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.3s ease, visibility 0s 0.3s;
  z-index: 200;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 24px 16px 80px;
  visibility: hidden;
}

.cart-panel.open {
  transform: translateY(0);
  visibility: visible;
  transition: transform 0.3s ease, visibility 0s 0s;
}

@media (min-width: 768px) {
  .cart-panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    max-width: 520px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 28px 32px 40px;
    max-height: 90vh;
  }

  .cart-panel.open {
    transform: translateX(-50%) translateY(0);
  }
}

.cart-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 199;
}

.cart-backdrop.visible { display: block; }

body.cart-open { overflow: hidden; }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cart-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.cart-close {
  display: block;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}

.cart-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  padding: 20px 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
}

.cart-item-qty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #ccc;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}

.cart-item-remove:hover { color: #e74c3c; }

.cart-summary {
  padding: 16px 0;
  border-top: 2px solid var(--text);
  margin-top: 8px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-total { color: var(--text); }

/* --- Delivery Form --- */
.delivery-form {
  margin-top: 20px;
  max-width: 100%;
  overflow: hidden;
}

.form-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font);
  transition: all var(--transition);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.form-group input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 102, 0.1);
  background: #fff;
}

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

.form-group-city { flex: 2; }
.form-group-state { flex: 0.8; }
.form-group-zip { flex: 1.2; }

.delivery-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-style: italic;
}

.btn-checkout {
  width: 100%;
  padding: 14px 24px;
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  box-shadow: 0 4px 14px rgba(0, 0, 102, 0.25);
}

.btn-checkout:hover {
  background: var(--brand-dark);
  box-shadow: 0 6px 20px rgba(0, 0, 102, 0.35);
  transform: translateY(-1px);
}
.btn-checkout:active { transform: scale(0.98); }
.btn-checkout:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

.stripe-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}

/* --- Closed Overlay --- */
.closed-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}

.closed-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}

.closed-card h2 {
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.closed-card p {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.closed-card a {
  color: var(--brand-primary);
  font-weight: 600;
}

/* --- Footer --- */
.store-footer {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
  letter-spacing: 0.02em;
}

/* --- Checkout Page --- */
.checkout-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 88px 16px 60px;
}

@media (min-width: 768px) {
  .checkout-main {
    padding: 100px 24px 60px;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--brand-primary); }

.checkout-layout {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .checkout-layout {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

.checkout-section-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.checkout-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.checkout-item:last-child { border-bottom: none; }

.checkout-item-info { flex: 1; }

.checkout-item-name {
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
}

.checkout-item-qty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checkout-item-pers {
  display: block;
  font-size: 0.8rem;
  color: var(--brand-primary);
  font-style: italic;
  margin-top: 2px;
}

.checkout-item-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  white-space: nowrap;
  margin-left: 16px;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0 0;
  margin-top: 12px;
  border-top: 2px solid var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.checkout-total { color: var(--text); }

.checkout-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

/* --- Sign Preview (checkout) --- */
.sign-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}

.sign-preview img {
  width: 100%;
  display: block;
}

.sign-preview-pers {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.92);
  color: var(--brand-primary);
  font-family: 'Georgia', serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 3.5vw, 1.15rem);
  padding: 4px 16px;
  border-radius: 4px;
  white-space: nowrap;
  max-width: 85%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  letter-spacing: 0.5px;
}

/* --- Success Page --- */
.success-container {
  max-width: 600px;
  margin: 100px auto 60px;
  padding: 40px 24px;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: #f0fdf4;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.5rem;
}

.success-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.success-message {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 24px;
  line-height: 1.7;
}

.success-details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  text-align: left;
  box-shadow: var(--shadow);
}

.success-details h3 {
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 700;
}

.success-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.success-detail-row:last-child { border-bottom: none; }

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--brand-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-family: var(--font);
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 102, 0.25);
}

.btn-home:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

/* --- Admin Dashboard --- */
.admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.btn-admin {
  padding: 8px 16px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.btn-admin:hover {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.orders-table-wrap {
  overflow-x: auto;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
}

.orders-table th {
  background: var(--text);
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

.orders-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: var(--border-light); }

.status-paid {
  color: #16a34a;
  font-weight: 700;
}

.status-pending {
  color: #ea580c;
  font-weight: 700;
}

/* --- Admin Login --- */
.login-container {
  max-width: 400px;
  margin: 120px auto;
  padding: 40px 28px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 1px solid var(--border);
}

.login-container h2 {
  font-family: var(--font-display);
  color: var(--text);
  margin-bottom: 24px;
  font-size: 1.5rem;
}

.login-container input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: var(--font);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.login-container input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 0, 102, 0.1);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 102, 0.25);
}

.btn-login:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

/* --- Admin Tabs --- */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.admin-tab {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}

.admin-tab:hover { color: var(--brand-primary); }
.admin-tab.active {
  color: var(--brand-primary);
  border-bottom-color: var(--brand-primary);
}
