/* ============================================================
   WARDORA HUB — Global Design System
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.wh-body {
  font-family: var(--wh-body-font, 'Inter', sans-serif);
  color: var(--wh-text, #1A1A2E);
  background: var(--wh-bg, #FAF7F5);
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,.wh-heading-font { font-family: var(--wh-heading-font, 'Playfair Display', serif); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
a { color: inherit; text-decoration: none; }

/* ---------- Logo ---------- */
.wh-logo { font-family: var(--wh-heading-font); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--wh-primary); }
.wh-logo span { color: var(--wh-secondary); font-weight: 500; }

/* ---------- Header ---------- */
.wh-header { background: var(--wh-surface); box-shadow: 0 1px 0 rgba(0,0,0,0.06); }
.wh-topbar { background: var(--wh-secondary); color: #fff; }
.wh-catstrip { background: var(--wh-surface); }
.wh-catstrip a { color: var(--wh-text-muted); font-weight: 600; white-space: nowrap; transition: color .15s; }
.wh-catstrip a:hover { color: var(--wh-primary); }
.wh-header-centered .wh-logo { margin: 0 auto; }
.wh-header-minimal .wh-topbar { display: none; }
.wh-header-bold { background: var(--wh-secondary); }
.wh-header-bold .wh-logo, .wh-header-bold .wh-icon-link, .wh-header-bold .wh-search-input { color: #fff; }

.wh-search-input {
  width: 100%; padding: 11px 46px 11px 18px; border-radius: var(--wh-radius);
  border: 1.5px solid var(--wh-border); background: var(--wh-bg); font-size: 0.9rem; outline: none;
  transition: border-color .15s;
}
.wh-search-input:focus { border-color: var(--wh-primary); }
.wh-search-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: var(--wh-primary); color: #fff; border: none; width: 34px; height: 34px; border-radius: var(--wh-radius); cursor: pointer; }
.wh-icon-link { position: relative; font-size: 1.15rem; color: var(--wh-text); cursor: pointer; display: inline-flex; align-items: center; }
.wh-badge { position: absolute; top: -8px; right: -10px; background: var(--wh-primary); color: #fff; font-size: 0.62rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
.wh-dropdown { position: absolute; right: 0; top: calc(100% + 10px); background: var(--wh-surface); border-radius: var(--wh-radius); box-shadow: 0 12px 32px rgba(0,0,0,0.14); min-width: 210px; padding: 8px; display: none; z-index: 60; }
.wh-dropdown.open { display: block; }
.wh-dropdown a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 0.88rem; }
.wh-dropdown a:hover { background: var(--wh-bg); color: var(--wh-primary); }

/* ---------- Buttons ---------- */
.wh-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--wh-radius); font-weight: 600; font-size: 0.9rem; cursor: pointer; border: none; transition: all .18s; }
.wh-btn-primary { background: var(--wh-primary); color: #fff; }
.wh-btn-primary:hover { background: var(--wh-primary-dark); transform: translateY(-1px); }
.wh-btn-outline { background: transparent; border: 1.5px solid var(--wh-primary); color: var(--wh-primary); }
.wh-btn-outline:hover { background: var(--wh-primary); color: #fff; }
.wh-btn-secondary { background: var(--wh-secondary); color: #fff; }
.wh-btn-ghost { background: var(--wh-bg); color: var(--wh-text); }
.wh-btn-danger { background: var(--wh-danger); color: #fff; }
.wh-btn:disabled { opacity: .5; cursor: not-allowed; }
.wh-btn-block { width: 100%; }
.wh-btn-sm { padding: 8px 16px; font-size: 0.82rem; }

/* ---------- Cards ---------- */
.wh-card { background: var(--wh-surface); border-radius: var(--wh-radius); border: 1px solid var(--wh-border); }
.wh-card-shadow { box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: none; }
.wh-card-glass { background: rgba(255,255,255,0.65); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.4); }

/* ---------- Product Card ---------- */
.wh-pcard { background: var(--wh-surface); border-radius: var(--wh-radius); overflow: hidden; transition: transform .2s, box-shadow .2s; position: relative; border: 1px solid var(--wh-border); }
.wh-pcard:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,0,0,0.1); }
.wh-pcard-minimal { border: none; box-shadow: none; }
.wh-pcard-bordered { border: 1.5px solid var(--wh-border); }
.wh-pcard-shadow { border: none; box-shadow: 0 3px 14px rgba(0,0,0,0.06); }
.wh-pcard-glass { background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); }
.wh-pcard-img-wrap { position: relative; aspect-ratio: 3/4; overflow: hidden; background: #f2eeeb; }
.wh-pcard-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.wh-pcard:hover .wh-pcard-img-wrap img { transform: scale(1.06); }
.wh-pcard-badge { position: absolute; top: 10px; left: 10px; background: var(--wh-danger); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 4px 9px; border-radius: 20px; z-index: 2; }
.wh-pcard-badge.new { background: var(--wh-success); }
.wh-pcard-badge.flash { background: var(--wh-accent); color: #1A1A2E; }
.wh-pcard-wish { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; background: rgba(255,255,255,0.92); border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; cursor: pointer; transition: all .15s; }
.wh-pcard-wish:hover { background: var(--wh-primary); color: #fff; }
.wh-pcard-wish.active { background: var(--wh-primary); color: #fff; }
.wh-pcard-body { padding: 12px 14px 14px; }
.wh-pcard-store { font-size: 0.68rem; color: var(--wh-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.wh-pcard-title { font-size: 0.88rem; font-weight: 600; margin: 3px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; min-height: 2.4em; }
.wh-pcard-price { display: flex; align-items: baseline; gap: 7px; }
.wh-pcard-price .now { font-weight: 700; color: var(--wh-primary); font-size: 1.02rem; }
.wh-pcard-price .old { text-decoration: line-through; color: var(--wh-text-muted); font-size: 0.78rem; }
.wh-pcard-rating { font-size: 0.72rem; color: var(--wh-text-muted); margin-top: 4px; }
.wh-pcard-rating .fa-star { color: var(--wh-accent); }

.wh-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .wh-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .wh-grid { grid-template-columns: repeat(5, 1fr); } }

/* ---------- Section ---------- */
.wh-section { padding: 40px 0; }
.wh-section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.wh-section-title { font-size: 1.6rem; font-weight: 700; }
.wh-section-sub { color: var(--wh-text-muted); font-size: 0.85rem; margin-top: 4px; }
.wh-see-all { color: var(--wh-primary); font-weight: 600; font-size: 0.88rem; }

/* ---------- Countdown ---------- */
.wh-countdown { display: flex; gap: 6px; }
.wh-countdown .box { background: var(--wh-secondary); color: #fff; padding: 6px 9px; border-radius: 6px; font-weight: 700; font-size: 0.85rem; min-width: 36px; text-align: center; }

/* ---------- Category tiles ---------- */
.wh-cat-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.wh-cat-tile .icon-wrap { width: 78px; height: 78px; border-radius: 50%; background: linear-gradient(145deg, var(--wh-bg), #fff); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; color: var(--wh-primary); border: 1px solid var(--wh-border); transition: all .2s; }
.wh-cat-tile:hover .icon-wrap { background: var(--wh-primary); color: #fff; transform: scale(1.06); }
.wh-cat-tile span { font-size: 0.82rem; font-weight: 600; }

/* ---------- Hero ---------- */
.wh-hero { border-radius: 18px; overflow: hidden; position: relative; background: linear-gradient(120deg, var(--wh-secondary), #2d2d44); color: #fff; }
.wh-hero-split { display: grid; grid-template-columns: 1fr; min-height: 320px; }
@media (min-width: 768px) { .wh-hero-split { grid-template-columns: 1.1fr 1fr; min-height: 380px; } }
.wh-hero-content { display: flex; flex-direction: column; justify-content: center; padding: 40px; gap: 14px; }
.wh-hero-content h1 { font-size: 2.4rem; line-height: 1.15; font-weight: 700; }
.wh-hero-img { background-size: cover; background-position: center; min-height: 220px; }

/* ---------- Forms ---------- */
.wh-input, select.wh-input, textarea.wh-input {
  width: 100%; padding: 12px 14px; border-radius: var(--wh-radius); border: 1.5px solid var(--wh-border);
  background: var(--wh-surface); font-size: 0.9rem; outline: none; transition: border-color .15s;
}
.wh-input:focus { border-color: var(--wh-primary); }
.wh-label { font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; display: block; color: var(--wh-text); }
.wh-form-group { margin-bottom: 16px; }

/* ---------- Footer ---------- */
.wh-footer { background: var(--wh-secondary); color: rgba(255,255,255,0.85); }
.wh-footer h4 { font-weight: 700; margin-bottom: 12px; font-size: 0.9rem; color: #fff; }
.wh-footer a { display: block; font-size: 0.85rem; opacity: 0.75; margin-bottom: 8px; }
.wh-footer a:hover { opacity: 1; color: var(--wh-accent); }

/* ---------- Auth pages ---------- */
.wh-auth-bg { background: linear-gradient(135deg, var(--wh-bg), #f0e5e9); }
.wh-auth-card { background: var(--wh-surface); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.1); width: 100%; max-width: 440px; padding: 40px; }

/* ---------- Dashboard shell ---------- */
.wh-dash { background: #F4F5F9; }
.wh-dash-shell { display: flex; min-height: 100vh; }
.wh-sidebar { width: 250px; background: #14142B; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 40; transition: transform .25s; }
.wh-sidebar .wh-logo { color: #fff; }
.wh-sidebar .wh-logo span { color: rgba(255,255,255,0.6); }
.wh-sidenav { display: flex; flex-direction: column; padding: 0 12px; gap: 2px; }
.wh-sidenav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; font-size: 0.87rem; color: rgba(255,255,255,0.65); transition: all .15s; position: relative; }
.wh-sidenav-item i { width: 18px; text-align: center; }
.wh-sidenav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.wh-sidenav-item.active { background: var(--wh-primary); color: #fff; }
.wh-nav-badge { margin-left: auto; background: var(--wh-danger); font-size: 0.65rem; padding: 1px 7px; border-radius: 10px; }
.wh-dash-main { flex: 1; margin-left: 250px; display: flex; flex-direction: column; min-height: 100vh; }
.wh-dash-topbar { background: #fff; padding: 14px 24px; display: flex; align-items: center; box-shadow: 0 1px 0 rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 30; }
.wh-dash-content { padding: 24px; flex: 1; }
.wh-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--wh-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; }
.wh-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wh-success); box-shadow: 0 0 0 rgba(27,156,99,0.5); animation: wh-pulse 2s infinite; }
@keyframes wh-pulse { 0%{box-shadow:0 0 0 0 rgba(27,156,99,.5);} 70%{box-shadow:0 0 0 8px rgba(27,156,99,0);} 100%{box-shadow:0 0 0 0 rgba(27,156,99,0);} }
@media (max-width: 767px) {
  .wh-sidebar { transform: translateX(-100%); }
  .wh-sidebar.open { transform: translateX(0); }
  .wh-dash-main { margin-left: 0; }
}

/* ---------- Stat cards ---------- */
.wh-stat { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.wh-stat .label { font-size: 0.78rem; color: #888; font-weight: 600; }
.wh-stat .value { font-size: 1.6rem; font-weight: 800; margin-top: 4px; }
.wh-stat .delta { font-size: 0.76rem; font-weight: 600; margin-top: 4px; }
.wh-stat .delta.up { color: var(--wh-success); }
.wh-stat .delta.down { color: var(--wh-danger); }

/* ---------- Table ---------- */
.wh-table { width: 100%; font-size: 0.87rem; border-collapse: collapse; }
.wh-table th { text-align: left; padding: 10px 14px; color: #888; font-weight: 600; font-size: 0.76rem; text-transform: uppercase; border-bottom: 1px solid #eee; }
.wh-table td { padding: 12px 14px; border-bottom: 1px solid #f2f2f2; }
.wh-table tr:hover td { background: #fafafa; }

/* ---------- Badges/Pills ---------- */
.wh-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }
.wh-pill-yellow { background: #FEF3C7; color: #92400E; }
.wh-pill-green { background: #D1FAE5; color: #065F46; }
.wh-pill-red { background: #FEE2E2; color: #991B1B; }
.wh-pill-blue { background: #DBEAFE; color: #1E40AF; }
.wh-pill-gray { background: #F1F1F1; color: #555; }
.wh-pill-purple { background: #EDE9FE; color: #5B21B6; }

/* ---------- Toast ---------- */
.wh-toast { background: #1A1A2E; color: #fff; padding: 12px 18px; border-radius: 10px; font-size: 0.85rem; box-shadow: 0 8px 24px rgba(0,0,0,0.2); display: flex; align-items: center; gap: 10px; animation: wh-toast-in .25s ease; min-width: 240px; }
.wh-toast.success { background: #14532D; }
.wh-toast.error { background: #7F1D1D; }
@keyframes wh-toast-in { from { opacity:0; transform: translateY(12px);} to {opacity:1; transform:translateY(0);} }

/* ---------- Misc ---------- */
.wh-star-input i { cursor: pointer; color: #ddd; font-size: 1.4rem; }
.wh-star-input i.active { color: var(--wh-accent); }
.wh-tab { padding: 10px 18px; border-radius: 10px 10px 0 0; font-weight: 600; font-size: 0.87rem; cursor: pointer; color: var(--wh-text-muted); border-bottom: 2px solid transparent; }
.wh-tab.active { color: var(--wh-primary); border-color: var(--wh-primary); }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wh-skeleton { background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%); background-size: 200% 100%; animation: wh-shimmer 1.4s infinite; border-radius: 8px; }
@keyframes wh-shimmer { 0%{background-position: 200% 0;} 100%{background-position: -200% 0;} }
.wh-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.wh-modal { background: #fff; border-radius: 16px; padding: 26px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; }

/* Theme radius applies broadly */
.wh-btn, .wh-input, .wh-card, .wh-pcard, .wh-modal, .wh-search-input, .wh-search-btn { border-radius: var(--wh-radius); }
