/* ShopOut Theme System — CSS Custom Properties */

/* ═══════════════ BASE DESIGN TOKENS ═══════════════ */
:root {
  --color-brand-orange: #FF6B35;
  --color-brand-coral: #FF8C42;
  --color-brand-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
  --shadow-brand: 0 8px 24px rgba(255,107,53,0.25);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

/* ═══════════════ THEME: CLEAN ═══════════════ */
.theme-clean {
  --theme-bg: #FFFFFF;
  --theme-surface: #FFFFFF;
  --theme-surface-alt: #F8FAFC;
  --theme-border: #E2E8F0;
  --theme-text-primary: #1E293B;
  --theme-text-secondary: #64748B;
  --theme-text-inverse: #FFFFFF;
  --theme-primary: #FF6B35;
  --theme-primary-hover: #e55a27;
  --theme-primary-gradient: linear-gradient(135deg, #FF6B35, #FF8C42);
  --theme-primary-text: #FFFFFF;
  --theme-header-bg: #FFFFFF;
  --theme-header-text: #1E293B;
  --theme-header-border: #E2E8F0;
  --theme-footer-bg: #F1F5F9;
  --theme-footer-text: #64748B;
  --theme-card-bg: #FFFFFF;
  --theme-card-border: #E2E8F0;
  --theme-card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --theme-card-hover-shadow: 0 10px 25px rgba(0,0,0,0.1);
  --theme-card-radius: 12px;
  --theme-btn-radius: 9999px;
  --theme-badge-bg: #F1F5F9;
  --theme-badge-text: #64748B;
  --theme-badge-active-bg: linear-gradient(135deg, #FF6B35, #FF8C42);
  --theme-badge-active-text: #FFFFFF;
  --theme-img-fallback: #F8FAFC;
  --theme-heading-weight: 700;
}

/* ═══════════════ THEME: BOLD ═══════════════ */
.theme-bold {
  --theme-bg: #0D1117;
  --theme-surface: #161B22;
  --theme-surface-alt: #21262D;
  --theme-border: #30363D;
  --theme-text-primary: #F0F6FC;
  --theme-text-secondary: #8B949E;
  --theme-text-inverse: #0D1117;
  --theme-primary: #FF6B35;
  --theme-primary-hover: #FF4500;
  --theme-primary-gradient: linear-gradient(135deg, #FF4500, #FF6B35);
  --theme-primary-text: #FFFFFF;
  --theme-header-bg: rgba(13, 17, 23, 0.95);
  --theme-header-text: #F0F6FC;
  --theme-header-border: rgba(255,255,255,0.06);
  --theme-footer-bg: #0D1117;
  --theme-footer-text: #8B949E;
  --theme-card-bg: #161B22;
  --theme-card-border: #30363D;
  --theme-card-shadow: none;
  --theme-card-hover-shadow: 0 0 0 1px #FF6B35;
  --theme-card-radius: 8px;
  --theme-btn-radius: 6px;
  --theme-badge-bg: #21262D;
  --theme-badge-text: #8B949E;
  --theme-badge-active-bg: #FF6B35;
  --theme-badge-active-text: #FFFFFF;
  --theme-img-fallback: #21262D;
  --theme-heading-weight: 800;
}

/* ═══════════════ THEME: WARM ═══════════════ */
.theme-warm {
  --theme-bg: #FDF8F5;
  --theme-surface: #FFFFFF;
  --theme-surface-alt: #FEF0E9;
  --theme-border: #F0D9CE;
  --theme-text-primary: #3D2B1F;
  --theme-text-secondary: #8B6F62;
  --theme-text-inverse: #FFFFFF;
  --theme-primary: #D4845A;
  --theme-primary-hover: #C4674A;
  --theme-primary-gradient: linear-gradient(135deg, #C4674A, #E09572);
  --theme-primary-text: #FFFFFF;
  --theme-header-bg: rgba(253, 248, 245, 0.95);
  --theme-header-text: #3D2B1F;
  --theme-header-border: #F0D9CE;
  --theme-footer-bg: #FAF0EB;
  --theme-footer-text: #8B6F62;
  --theme-card-bg: #FFFFFF;
  --theme-card-border: #F0D9CE;
  --theme-card-shadow: 0 4px 20px rgba(180,100,80,0.08);
  --theme-card-hover-shadow: 0 12px 32px rgba(180,100,80,0.15);
  --theme-card-radius: 16px;
  --theme-btn-radius: 9999px;
  --theme-badge-bg: #FEF0E9;
  --theme-badge-text: #8B6F62;
  --theme-badge-active-bg: #D4845A;
  --theme-badge-active-text: #FFFFFF;
  --theme-img-fallback: #FDF8F5;
  --theme-heading-weight: 700;
}

/* ═══════════════ SHARED STOREFRONT STYLES ═══════════════ */
.sf-page { background: var(--theme-bg); color: var(--theme-text-primary); min-height: 100vh; }
.sf-header { background: var(--theme-header-bg); color: var(--theme-header-text); border-bottom: 1px solid var(--theme-header-border); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sf-header a { color: var(--theme-header-text); }
.sf-footer { background: var(--theme-footer-bg); color: var(--theme-footer-text); border-top: 1px solid var(--theme-border); }
.sf-card { background: var(--theme-card-bg); border: 1px solid var(--theme-card-border); border-radius: var(--theme-card-radius); box-shadow: var(--theme-card-shadow); transition: all 200ms ease; }
.sf-card:hover { box-shadow: var(--theme-card-hover-shadow); transform: translateY(-4px); }
.sf-card-static { background: var(--theme-card-bg); border: 1px solid var(--theme-card-border); border-radius: var(--theme-card-radius); }

.sf-btn-primary { background: var(--theme-primary-gradient); color: var(--theme-primary-text); border-radius: var(--theme-btn-radius); font-weight: 600; transition: all 150ms ease; box-shadow: 0 4px 12px rgba(255,107,53,0.2); }
.sf-btn-primary:hover { filter: brightness(1.05); box-shadow: 0 8px 24px rgba(255,107,53,0.3); }
.sf-btn-primary:active { transform: scale(0.98); }
.sf-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }

.sf-btn-secondary { background: transparent; border: 2px solid var(--theme-primary); color: var(--theme-primary); border-radius: var(--theme-btn-radius); font-weight: 600; transition: all 150ms ease; }
.sf-btn-secondary:hover { background: rgba(255,107,53,0.06); }

.sf-variant { background: var(--theme-card-bg); border-color: var(--theme-card-border); color: var(--theme-text-secondary); }
.sf-variant:hover:not(:disabled) { border-color: var(--theme-primary); color: var(--theme-primary); }
.sf-variant-selected { background: var(--theme-primary); color: var(--theme-primary-text); border-color: var(--theme-primary); font-weight: 600; }

.sf-badge { background: var(--theme-badge-bg); color: var(--theme-badge-text); border-radius: 9999px; padding: 6px 14px; font-size: 13px; font-weight: 500; transition: all 150ms ease; display: inline-block; }
.sf-badge-active { background: var(--theme-badge-active-bg); color: var(--theme-badge-active-text); box-shadow: 0 2px 8px rgba(255,107,53,0.2); }

.sf-price { color: var(--theme-primary); font-weight: 700; }
.sf-text-secondary { color: var(--theme-text-secondary); }
.sf-text-primary { color: var(--theme-text-primary); }
.sf-surface-alt { background: var(--theme-surface-alt); }
.sf-border { border-color: var(--theme-border); }
.sf-img-fallback { background: var(--theme-img-fallback); }

.sf-input { border: 1.5px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text-primary); padding: 0 14px; height: 44px; outline: none; transition: all 150ms ease; }
.sf-input:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.12); }
.sf-textarea { border: 1.5px solid var(--theme-border); border-radius: 8px; background: var(--theme-surface); color: var(--theme-text-primary); padding: 10px 14px; outline: none; transition: all 150ms ease; resize: vertical; min-height: 80px; }
.sf-textarea:focus { border-color: var(--theme-primary); box-shadow: 0 0 0 3px rgba(255,107,53,0.12); }

.sf-radio-card { background: var(--theme-card-bg); border: 2px solid var(--theme-border); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: all 150ms ease; }
.sf-radio-card.active, .sf-radio-card:has(input:checked) { border-color: var(--theme-primary); background: rgba(255,107,53,0.04); }

/* Cart badge */
.sf-cart-badge { background: var(--theme-primary); color: #FFF; font-size: 11px; font-weight: 700; width: 18px; height: 18px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; position: absolute; top: -4px; right: -4px; }

/* Scrollbar hide */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Line clamp */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══════════════ ADMIN STYLES ═══════════════ */
.admin-sidebar { background: #0F172A; color: #94A3B8; }
.admin-sidebar-item { display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; margin: 0 8px; font-size: 14px; font-weight: 500; color: #94A3B8; transition: all 150ms ease; gap: 12px; }
.admin-sidebar-item:hover { background: #1E293B; color: #CBD5E1; }
.admin-sidebar-item.active { background: rgba(255,107,53,0.12); color: #FFFFFF; border-left: 3px solid #FF6B35; }
.admin-sidebar-item.active svg { color: #FF6B35; }

.admin-stat-card { background: #1E293B; border: 1px solid #334155; border-radius: 12px; padding: 20px 24px; }
.admin-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; }
.admin-table-header { background: #F8FAFC; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: #64748B; font-weight: 600; }

.admin-btn-primary { background: var(--color-brand-gradient); color: #FFF; border-radius: 9999px; font-weight: 600; padding: 10px 24px; font-size: 14px; transition: all 150ms ease; box-shadow: var(--shadow-brand); }
.admin-btn-primary:hover { filter: brightness(1.05); }
.admin-btn-neutral { background: #F1F5F9; color: #334155; border: 1px solid #E2E8F0; border-radius: 8px; font-weight: 500; padding: 8px 16px; font-size: 14px; transition: all 150ms ease; }
.admin-btn-neutral:hover { background: #E2E8F0; }
.admin-btn-danger { background: #EF4444; color: #FFF; border-radius: 8px; font-weight: 500; padding: 8px 16px; font-size: 14px; transition: all 150ms ease; }
.admin-btn-danger:hover { background: #DC2626; }
.admin-btn-success { background: #10B981; color: #FFF; border-radius: 8px; font-weight: 500; padding: 8px 16px; font-size: 14px; transition: all 150ms ease; }
.admin-btn-success:hover { background: #059669; }

.admin-input { border: 1.5px solid #E2E8F0; border-radius: 8px; height: 44px; padding: 0 14px; font-size: 14px; color: #1E293B; outline: none; transition: all 150ms ease; }
.admin-input:focus { border-color: #FF6B35; box-shadow: 0 0 0 3px rgba(255,107,53,0.12); }
.admin-select { border: 1.5px solid #E2E8F0; border-radius: 8px; height: 44px; padding: 0 14px; font-size: 14px; color: #1E293B; outline: none; transition: all 150ms ease; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.admin-select:focus { border-color: #FF6B35; box-shadow: 0 0 0 3px rgba(255,107,53,0.12); }

/* Status badges */
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 9999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 9999px; }
.status-pending { background: #FEF3C7; color: #92400E; }
.status-pending::before { background: #F59E0B; }
.status-confirmed, .status-paid { background: #D1FAE5; color: #065F46; }
.status-confirmed::before, .status-paid::before { background: #10B981; }
.status-new { background: #DBEAFE; color: #1E40AF; }
.status-new::before { background: #3B82F6; }
.status-shipped { background: #EDE9FE; color: #4C1D95; }
.status-shipped::before { background: #8B5CF6; }
.status-completed, .status-delivered { background: #F0FDF4; color: #166534; }
.status-completed::before, .status-delivered::before { background: #22C55E; }
.status-cancelled { background: #FEE2E2; color: #991B1B; }
.status-cancelled::before { background: #EF4444; }
.status-refunded { background: #F1F5F9; color: #334155; }
.status-refunded::before { background: #64748B; }

/* Toggle switch */
.toggle-switch { width: 40px; height: 22px; border-radius: 9999px; position: relative; cursor: pointer; transition: background 150ms ease; }
.toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 9999px; background: white; box-shadow: var(--shadow-sm); transition: transform 150ms ease; }
.toggle-switch.off { background: #CBD5E1; }
.toggle-switch.on { background: #FF6B35; }
.toggle-switch.on::after { transform: translateX(18px); }

/* Toast notifications */
.toast { position: fixed; top: 16px; right: 16px; width: 340px; border-radius: 10px; padding: 16px; box-shadow: var(--shadow-xl); z-index: 9999; animation: slideIn 300ms ease; }
.toast-success { background: #1E293B; border-left: 4px solid #10B981; color: #F8FAFC; }
.toast-error { background: #1E293B; border-left: 4px solid #EF4444; color: #F8FAFC; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ═══════════════ LANDING PAGE ═══════════════ */
.landing-gradient { background: linear-gradient(160deg, #FFF5F0 0%, #FFFFFF 40%, #F8FAFC 100%); }
.landing-hero-blob { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(255,107,53,0.12) 0%, transparent 70%); border-radius: 9999px; filter: blur(60px); top: -200px; right: -200px; pointer-events: none; }
.gradient-text { background: linear-gradient(135deg, #FF6B35, #FF8C42); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pain-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 9999px; font-size: 13px; font-weight: 500; }
.pain-pill-red { background: #FEF2F2; color: #991B1B; }
.pain-pill-green { background: #F0FDF4; color: #166534; }

/* Fee calculator */
.fee-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 14px; }
.fee-row-amount { color: #EF4444; font-weight: 600; }

/* FAQ accordion */
.faq-item { border-bottom: 1px solid #E2E8F0; }
.faq-question { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.faq-answer { overflow: hidden; transition: max-height 300ms ease, opacity 200ms ease; }

/* Comparison table */
.comparison-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 16px; overflow: hidden; border: 1px solid #E2E8F0; }
.comparison-table th, .comparison-table td { padding: 14px 20px; text-align: center; border-bottom: 1px solid #E2E8F0; font-size: 14px; }
.comparison-table th:first-child, .comparison-table td:first-child { text-align: left; }
.comparison-table thead th { font-weight: 600; font-size: 13px; }

/* Pricing card */
.pricing-card { border-radius: 20px; padding: 32px; position: relative; }
.pricing-popular { border: 2px solid #FF6B35; background: linear-gradient(135deg, #FFF5F2 0%, #FFFFFF 100%); box-shadow: var(--shadow-brand); }

/* LINE button */
.btn-line { background: #06C755; color: #FFF; border-radius: 9999px; font-weight: 600; padding: 14px 28px; font-size: 15px; box-shadow: 0 4px 12px rgba(6,199,85,0.3); transition: all 150ms ease; display: inline-flex; align-items: center; gap: 8px; }
.btn-line:hover { filter: brightness(0.95); }

/* ═══════════════ ANIMATIONS ═══════════════ */
[x-cloak] { display: none !important; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp 600ms ease forwards; }

@keyframes checkmark {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}
.animate-checkmark path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: checkmark 600ms ease-out 300ms forwards; }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, #E2E8F0 25%, #F1F5F9 50%, #E2E8F0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Print */
@media print {
  .no-print { display: none !important; }
}
