/* Darkline customer website — same look as the Darkline customer app.
   Colours from the app (lib/core/constants/app_colors.dart). */
:root {
  --dl-primary: #24416A;       /* logo navy: buttons, links, selected */
  --dl-primary-dark: #172C4A;
  --dl-primary-light: #3F6496;
  --dl-primary-soft: #EAF0F7;  /* tinted chips, icon tiles */
  --dl-highlight: #EA580C;     /* deals only */
  --dl-ink: #0F172A;
  --dl-text2: #64748B;
  --dl-muted: #94A3B8;
  --dl-border: #E2E8F0;
  --dl-border-soft: #F1F5F9;
  --dl-success: #16A34A;
  --dl-warning: #D97706;
  --dl-danger: #DC2626;
  --dl-offer: #DC2626;
}

/* ── Home: Flipkart-style category tabs ───────────────────────────────────── */
.dl-tabs { display: flex; align-items: flex-end; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--dl-border); padding: 6px 2px 0; gap: 2px; }
.dl-tabs::-webkit-scrollbar { display: none; }
.dl-tab { display: inline-flex; flex-direction: column; align-items: stretch; min-width: 60px; max-width: 96px;
  padding: 0 6px; text-decoration: none; flex-shrink: 0; color: var(--dl-ink); }
.dl-tab-icon { width: 44px; height: 40px; margin: 0 auto; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; color: var(--dl-ink); font-size: 20px; }
.dl-tab-icon img { width: 30px; height: 30px; object-fit: contain; mix-blend-mode: multiply; }
.dl-tab-label { margin-top: 4px; font-size: 12px; font-weight: 500; line-height: 1.25; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-tab-bar { display: block; height: 3px; margin-top: 6px; border-radius: 3px 3px 0 0; background: transparent; }
.dl-tab.is-active .dl-tab-icon { background: var(--dl-primary-soft); color: var(--dl-primary); }
.dl-tab.is-active .dl-tab-label { font-weight: 700; color: var(--dl-primary); }
.dl-tab.is-active .dl-tab-bar { background: var(--dl-primary); }
@media (min-width: 768px) { .dl-tabs { justify-content: flex-start; gap: 8px; } .dl-tab { max-width: 120px; } }
/* Home tab strip sticks under the top bar while the page scrolls (like the app), so
   another root category is always one tap away. The section is "display: contents" so
   the strip can stick for the whole page, not only while its own section is on screen.
   The page colour behind it runs edge to edge (box-shadow + clip-path trick).
   --dl-head-h / --dl-page-bg are set by darkline-app.js. */
.dl-home-tabs { display: contents; }
.dl-home-tabs > .dl-tabs { position: sticky; top: var(--dl-head-h, 64px); z-index: 40; margin-top: 6px;
  background: var(--dl-page-bg, #F8FAFC); box-shadow: 0 0 0 100vmax var(--dl-page-bg, #F8FAFC);
  clip-path: inset(0 -100vmax); }

/* Sub-category tiles: photo dipping into a navy 3D band with the name */
.dl-subtiles { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px 2px 6px; }
.dl-subtiles::-webkit-scrollbar { display: none; }
.dl-subtile { position: relative; flex-shrink: 0; width: 78px; height: 92px; text-decoration: none; display: block; }
.dl-subtile-band { position: absolute; left: 0; right: 0; bottom: 0; height: 42px; border-radius: 12px;
  background: linear-gradient(180deg, var(--dl-primary-light) 0%, var(--dl-primary) 55%, var(--dl-primary-dark) 100%);
  border: 1px solid rgba(255,255,255,.14); box-shadow: 0 4px 8px rgba(23,44,74,.35);
  display: flex; align-items: flex-end; justify-content: center; padding: 0 5px 6px; }
.dl-subtile-band span { display: block; max-width: 100%; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.dl-subtile-img { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 64px; height: 64px;
  border-radius: 14px; overflow: hidden; background: var(--dl-primary-soft); border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); display: flex; align-items: center; justify-content: center; color: var(--dl-primary); }
.dl-subtile-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 768px) { .dl-subtile { width: 92px; height: 104px; } .dl-subtile-img { width: 76px; height: 76px; } }

/* ── Product card (app "compact" card: no buttons, tap = product page) ─────── */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .dl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .dl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1280px) { .dl-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.dl-card { display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(226,232,240,.7);
  border-radius: 16px; overflow: hidden; box-shadow: 0 3px 10px rgba(0,0,0,.04); text-decoration: none;
  color: inherit; transition: box-shadow .2s, transform .2s; min-width: 0; }
.dl-card:hover { box-shadow: 0 8px 22px rgba(15,23,42,.09); }
.dl-card:active { transform: scale(.99); }
.dl-card-img { position: relative; display: block; aspect-ratio: 1 / 1; background: #F8FAFC; overflow: hidden; }
.dl-card-img img.dl-ph { width: 100%; height: 100%; object-fit: contain; padding: 6px; position: relative; z-index: 1; }
.dl-card-img .dl-ph-bg { position: absolute; inset: -14px; background-size: cover; background-position: center;
  filter: blur(14px); opacity: .55; }
.dl-card-img .dl-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #CBD5E1; font-size: 26px; }
.dl-heart { position: absolute; top: 6px; right: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 9999px; border: 0;
  background: rgba(255,255,255,.9); box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--dl-text2);
  display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; }
.dl-heart.is-liked { color: #EF4444; }
.dl-rating { position: absolute; right: 6px; bottom: 6px; z-index: 3; display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,251,235,.95); border: 1px solid #FDE68A; color: #B45309; border-radius: 9999px;
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; }
.dl-rating .fa-star { color: #F59E0B; font-size: 9px; }
.dl-rating small { color: var(--dl-muted); font-weight: 500; font-size: 10px; }
.dl-deal-tag { position: absolute; top: 7px; left: 7px; z-index: 3; background: var(--dl-offer); color: #fff;
  font-size: 9.5px; font-weight: 800; border-radius: 6px; padding: 2px 6px; max-width: calc(100% - 50px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-video { position: absolute; left: 7px; bottom: 7px; z-index: 3; background: rgba(0,0,0,.7); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 9999px; padding: 2px 7px; }
.dl-oos { position: absolute; inset: 0; z-index: 2; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; }
.dl-oos span { background: rgba(0,0,0,.8); color: #fff; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 4px 10px; }
.dl-card-info { display: block; padding: 6px 8px 8px; }
.dl-card-name { display: block; font-size: 12.5px; font-weight: 700; color: var(--dl-ink); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-card-sub { display: block; font-size: 10.5px; color: var(--dl-muted); line-height: 1.3; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.dl-card-price { display: block; margin-top: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-price { font-size: 14px; font-weight: 800; color: var(--dl-primary-dark); }
.dl-price.is-deal { color: var(--dl-offer); }
.dl-strike { font-size: 11px; color: var(--dl-muted); text-decoration: line-through; margin-left: 6px; font-weight: 500; }
@media (min-width: 640px) { .dl-card-name { font-size: 13.5px; } .dl-card-sub { font-size: 11.5px; } .dl-price { font-size: 15px; }
  .dl-card-info { padding: 8px 10px 10px; } }

/* Horizontal product row (Trending etc.); width from Admin → Home Layout → Card size */
.dl-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; scroll-snap-type: x proximity; }
.dl-row::-webkit-scrollbar { display: none; }
.dl-row > .dl-card { flex-shrink: 0; width: 165px; scroll-snap-align: start; }
.dl-row.dl-size-medium > .dl-card { width: 140px; }
.dl-row.dl-size-small > .dl-card { width: 118px; }
@media (min-width: 768px) { .dl-row > .dl-card { width: 190px; } .dl-row.dl-size-medium > .dl-card { width: 165px; }
  .dl-row.dl-size-small > .dl-card { width: 140px; } }

/* Section headings like the app */
.dl-section-title { font-size: 16px; font-weight: 800; color: var(--dl-ink); letter-spacing: -.01em; }
@media (min-width: 640px) { .dl-section-title { font-size: 20px; } }
.dl-section-sub { font-size: 12px; color: var(--dl-text2); }

/* Product icons row (admin "Product Icons"): price dark + bold */
.dl-pi-price { font-size: 12.5px; font-weight: 800; color: var(--dl-primary-dark); }

/* Small round icon button (top bars) */
.dl-icon-btn { width: 40px; height: 40px; border-radius: 12px; background: #fff; border: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.04); display: inline-flex; align-items: center; justify-content: center;
  color: var(--dl-ink); cursor: pointer; position: relative; }
.dl-icon-btn.is-active { background: var(--dl-primary-soft); color: var(--dl-primary); }
.dl-icon-btn .dl-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 9999px; background: var(--dl-highlight); }

/* ── Header: white like the app (applies to the customer navbar only) ──────── */
.dl-app-header { background: #fff !important; background-image: none !important;
  border-bottom: 1px solid var(--dl-border); box-shadow: 0 1px 0 rgba(15,23,42,.03) !important; }
.dl-app-header .text-white:not([class*="bg-"]):not([class*="from-"]),
.dl-app-header .text-white[class*="hover:bg-white"] { color: var(--dl-primary) !important; }
.dl-app-header .text-white\/80 { color: var(--dl-text2) !important; }
.dl-app-header .hover\:bg-white\/10:hover { background: var(--dl-border-soft) !important; }
.dl-app-header .hover\:text-blue-300:hover { color: var(--dl-primary-light) !important; }
.dl-app-header .nav-link-darkline { color: var(--dl-primary) !important; }
.dl-app-header .nav-link-darkline:hover { background: var(--dl-primary-soft) !important; }
.dl-app-header .dl-app-tagline { display: block; font-size: 11.5px; font-weight: 600; color: var(--dl-text2); line-height: 1.2; }
.dl-app-header a > div > span.text-lg, .dl-app-header a > div > span.text-xl { color: var(--dl-primary) !important; font-weight: 800; }
.dl-app-header #customerGlobalSearchInput, .dl-app-header input[type="text"] {
  background: #F1F5F9 !important; border-color: var(--dl-border) !important; color: var(--dl-ink) !important; }
.dl-app-header input::placeholder { color: var(--dl-muted) !important; }
.dl-app-header [class*="border-[#0f1729]"] { border-color: #fff !important; }
.dl-app-header button[type="submit"].bg-blue-600 { background: var(--dl-primary) !important; }

/* ── Bottom bar: Home / Orders / Profile like the app ──────────────────────── */
nav.dl-bottom, .dl-bottom { position: fixed !important; left: 0; right: 0; bottom: 0; top: auto !important; z-index: 9999 !important; background: #fff;
  border-top: 1px solid var(--dl-border); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
.dl-bottom-row { display: flex; align-items: center; justify-content: space-around; }
.dl-bottom a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 9999px;
  color: var(--dl-primary-dark); text-decoration: none; font-size: 15px; font-weight: 700; position: relative; }
.dl-bottom a i { font-size: 18px; }
.dl-bottom a .dl-bottom-label { display: none; }
.dl-bottom a.is-active { background: #E9EEF5; color: var(--dl-primary); }
.dl-bottom a.is-active .dl-bottom-label { display: inline; }
@media (min-width: 768px) { nav.dl-bottom, .dl-bottom { display: none !important; } }
.dl-icon-btn.dl-heart-top.is-liked { color: #EF4444; }

/* ── App colours on customer pages: the old bright blue (#0052ff / blue-600) becomes
      the app's navy. Only pages with the app header (customer pages). ─────────── */
body:has(.dl-app-header) .bg-blue-600, body:has(.dl-app-header) .bg-\[\#0052ff\],
body:has(.dl-app-header) .bg-blue-500 { background-color: var(--dl-primary) !important; }
body:has(.dl-app-header) .hover\:bg-blue-700:hover, body:has(.dl-app-header) .hover\:bg-blue-600:hover { background-color: var(--dl-primary-dark) !important; }
body:has(.dl-app-header) [class*="from-blue-6"][class*="to-indigo-"],
body:has(.dl-app-header) [class*="from-blue-6"][class*="to-blue-"] {
  background-image: linear-gradient(90deg, var(--dl-primary-light), var(--dl-primary)) !important; }
body:has(.dl-app-header) .text-\[\#0052ff\], body:has(.dl-app-header) .text-blue-600,
body:has(.dl-app-header) .text-blue-700 { color: var(--dl-primary) !important; }
body:has(.dl-app-header) .bg-blue-50 { background-color: var(--dl-primary-soft) !important; }
body:has(.dl-app-header) .border-blue-600, body:has(.dl-app-header) .border-\[\#0052ff\] { border-color: var(--dl-primary) !important; }
body:has(.dl-app-header) .shadow-blue-500\/25 { --tw-shadow-color: rgba(36,65,106,.25) !important; }
/* the header "Sign In" button keeps its own blue gradient look → navy too */
.dl-app-header a[href="/login"][class*="from-blue-600"] { background-image: linear-gradient(90deg, var(--dl-primary-light), var(--dl-primary)) !important; }
.dl-app-header .text-gray-300 { color: var(--dl-text2) !important; }
/* Home: search bar → category tabs gap = 12px, like the app (6 + 6 tab padding) */
main > .dl-home-tabs > .dl-tabs { margin-top: 6px !important; }
