/* =====================================================
   OHC — Online Home Collection
   Design System v1.0
   Brand: Navy #1B2E6B | Red #CC1414
   ===================================================== */

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

/* ─── CSS VARIABLES ─── */
:root {
  /* Brand Colors */
  --primary:        #1B2E6B;
  --primary-dark:   #111E4A;
  --primary-light:  #2A4099;
  --primary-xlight: #E8EDF8;

  --accent:         #CC1414;
  --accent-dark:    #A00F0F;
  --accent-light:   #E63030;
  --accent-xlight:  #FDEAEA;

  /* Neutral */
  --white:          #FFFFFF;
  --bg:             #F4F6FB;
  --surface:        #FFFFFF;
  --surface-2:      #F8FAFC;
  --border:         #E2E8F0;
  --text:           #1A1A2E;
  --text-primary:   #1A1A2E;
  --text-secondary: #374151;
  --text-muted:     #6B7280;
  --text-light:     #9CA3AF;

  /* Status */
  --success:        #10B981;
  --warning:        #F59E0B;
  --error:          #EF4444;
  --info:           #3B82F6;

  /* Gradients */
  --grad-hero:      linear-gradient(135deg, #1B2E6B 0%, #2A4099 60%, #CC1414 100%);
  --grad-card:      linear-gradient(135deg, #1B2E6B, #111E4A);
  --grad-accent:    linear-gradient(90deg, #CC1414, #E63030);
  --grad-light:     linear-gradient(135deg, #E8EDF8 0%, #FDEAEA 100%);

  /* Typography */
  --font-heading:   'Poppins', sans-serif;
  --font-body:      'Inter', sans-serif;
  --font-tag:       'Raleway', sans-serif;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* Border Radius */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   32px;
  --r-2xl:  40px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(27,46,107,0.08);
  --shadow-md:  0 4px 16px rgba(27,46,107,0.12);
  --shadow-lg:  0 8px 32px rgba(27,46,107,0.16);
  --shadow-xl:  0 16px 48px rgba(27,46,107,0.20);
  --shadow-red: 0 4px 16px rgba(204,20,20,0.25);

  /* Transitions */
  --ease:   all 0.3s cubic-bezier(0.4,0,0.2,1);
  --ease-fast: all 0.15s ease;

  /* Nav Height */
  --nav-h:  64px;

  /* Z-index */
  --z-nav:     100;
  --z-modal:   200;
  --z-toast:   300;
}

/* ─── DARK MODE ─── */
[data-theme="dark"] {
  --bg:       #0D1117;
  --surface:  #161B27;
  --border:   #2D3748;
  --text:     #E8EDF5;
  --text-muted: #9AA5B4;
  --text-light: #6B7A90;
  --primary-xlight: #1A2340;
  --accent-xlight:  #2A0F0F;
  --surface-2:      #1C2333;
  --text-primary:   #E8EDF5;
  --text-secondary: #C9D1DC;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
}

/* ─── TEXT/ICON COLOR OVERRIDES (both themes) ────────────────────────────────
   --primary (#1B2E6B) is used as background for buttons/navbars — kept as-is.
   For foreground text & icons on a surface we use a brighter shade so they
   are clearly readable in both light and dark modes.
   Light: #3563C8  (medium bright blue, readable on white)
   Dark:  #7B9EF5  (periwinkle, readable on dark backgrounds)
 ──────────────────────────────────────────────────────────────────────────── */
:root {
  --primary-text: #3563C8;
}
[data-theme="dark"] {
  --primary-text: #7B9EF5;
}

/* Apply the readable shade to text/icon/border elements only */
.text-primary                   { color: var(--primary-text) !important; }
.badge-primary                  { background: rgba(53,99,200,0.1); color: var(--primary-text); }
.btn-outline                    { border-color: var(--primary-text); color: var(--primary-text); }
.btn-outline:hover               { background: var(--primary-text); color: #fff; }
[data-theme="dark"] .badge-primary { background: rgba(123,158,245,0.12); }

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; outline: none; }
input, textarea, select { font-family: var(--font-body); outline: none; }
ul, ol { list-style: none; }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1rem, 2vw, 1.3rem); }
p  { font-size: 0.95rem; color: var(--text-muted); }

.text-primary-color { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-primary   { color: var(--primary); }
.text-accent    { color: var(--accent); }
.text-muted     { color: var(--text-muted); }
.text-white     { color: var(--white); }
.text-success   { color: var(--success); }
.text-warning   { color: var(--warning); }
.text-error     { color: var(--error); }
.text-center    { text-align: center; }
.text-sm        { font-size: 0.85rem; }
.text-xs        { font-size: 0.75rem; }
.text-lg        { font-size: 1.1rem; }
.font-heading   { font-family: var(--font-heading); }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.font-medium    { font-weight: 500; }

/* ─── LAYOUT ─── */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--sp-md); }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 var(--sp-md); }
.section { padding: var(--sp-3xl) 0; }
.section-sm { padding: var(--sp-2xl) 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-lg); }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-sm      { gap: var(--sp-sm); }
.gap-md      { gap: var(--sp-md); }
.gap-lg      { gap: var(--sp-lg); }
.flex-wrap   { flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-sm);
  padding: 12px 24px; border-radius: var(--r-full); font-weight: 600;
  font-size: 0.9rem; transition: var(--ease); letter-spacing: 0.02em;
  white-space: nowrap; border: 2px solid transparent;
}
.btn-primary {
  background: var(--primary); color: var(--white);
  box-shadow: 0 4px 16px rgba(27,46,107,0.3);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.btn-accent {
  background: var(--accent); color: var(--white);
  box-shadow: var(--shadow-red);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-outline {
  background: transparent; border-color: var(--primary); color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }

.btn-outline-white {
  background: transparent; border-color: rgba(255,255,255,0.6); color: var(--white);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

.btn-white {
  background: var(--white); color: var(--primary); font-weight: 700;
}
.btn-white:hover { background: var(--primary-xlight); transform: translateY(-2px); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-xlight); }

.btn-sm { padding: 8px 18px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-whatsapp { background: #25D366; color: white; }
.btn-whatsapp:hover { background: #20BD5A; transform: translateY(-2px); }

/* ─── CARDS ─── */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: var(--ease); overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.card-body { padding: var(--sp-lg); }
.card-footer { padding: var(--sp-md) var(--sp-lg); border-top: 1px solid var(--border); background: var(--bg); }

.card-primary {
  background: var(--grad-card); color: var(--white);
  border: none; box-shadow: var(--shadow-lg);
}
.card-primary h1, .card-primary h2, .card-primary h3, .card-primary h4,
.card-primary p { color: var(--white); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em;
}
.badge-primary { background: var(--primary-xlight); color: var(--primary); }
.badge-accent  { background: var(--accent-xlight); color: var(--accent); }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-error   { background: #FEE2E2; color: #991B1B; }
.badge-info    { background: #DBEAFE; color: #1E40AF; }

/* ─── FORMS ─── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.form-control {
  padding: 12px 16px; border-radius: var(--r-md);
  border: 2px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 0.95rem; transition: var(--ease);
  width: 100%;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(27,46,107,0.1); }
.form-control::placeholder { color: var(--text-light); }

.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }

/* ─── SECTION HEADER ─── */
.section-header { text-align: center; margin-bottom: var(--sp-2xl); }
.section-header .section-tag {
  display: inline-block; font-family: var(--font-tag);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-xlight);
  padding: 6px 16px; border-radius: var(--r-full); margin-bottom: var(--sp-sm);
}
.section-header h2 { color: var(--text); margin-bottom: var(--sp-sm); }
.section-header p  { max-width: 540px; margin: 0 auto; }

/* ─── DIVIDERS ─── */
.divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-lg) 0; }
.divider-accent { border-color: var(--accent); }

/* ─── PILLS ─── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: var(--ease);
}
.pill:hover, .pill.active {
  background: var(--primary); color: var(--white); border-color: var(--primary);
}

/* ─── TOAST ─── */
.toast-container { position: fixed; bottom: 80px; right: var(--sp-md); z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--sp-sm); }
.toast {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary); font-size: 0.88rem; font-weight: 500;
  animation: slideInRight 0.3s ease; min-width: 240px;
}
.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--error); }

/* ─── SKELETON LOADER ─── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── SCROLL BAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ─── ANIMATIONS ─── */
@keyframes fadeIn    { from{opacity:0} to{opacity:1} }
@keyframes fadeUp    { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideInRight { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }
@keyframes pulse     { 0%,100%{transform:scale(1)} 50%{transform:scale(1.05)} }
@keyframes float     { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes spin      { from{transform:rotate(0)} to{transform:rotate(360deg)} }

.animate-fade-in { animation: fadeIn 0.5s ease; }
.animate-fade-up { animation: fadeUp 0.6s ease; }
.animate-float   { animation: float 3s ease-in-out infinite; }
.animate-pulse   { animation: pulse 2s ease infinite; }

/* ─── UTILITIES ─── */
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mt-xl { margin-top: var(--sp-xl); }
.mb-sm { margin-bottom: var(--sp-sm); }
.mb-md { margin-bottom: var(--sp-md); }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-md  { padding: var(--sp-md); }
.p-lg  { padding: var(--sp-lg); }
.rounded { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-xl { border-radius: var(--r-xl); }
.rounded-full { border-radius: var(--r-full); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.hidden { display: none !important; }
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0); }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.w-full { width: 100%; }
.d-flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--sp-xs); }
.gap-sm { gap: var(--sp-sm); }
.gap-md { gap: var(--sp-md); }
.gap-lg { gap: var(--sp-lg); }
.cursor-pointer { cursor: pointer; }

/* ─── DIAGONAL STRIPE (from brand card) ─── */
.stripe-accent {
  position: relative; overflow: hidden;
}
.stripe-accent::before {
  content: ''; position: absolute; top: -30px; right: -20px;
  width: 120px; height: 200%;
  background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(204,20,20,0.08) 10px, rgba(204,20,20,0.08) 20px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .container { padding: 0 var(--sp-sm); }
  .section { padding: var(--sp-2xl) 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  h1 { font-size: 1.7rem; }
  .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
}
