/* ==========================================================================
   NTech Computers — layout, footer, admin and responsive layer
   --------------------------------------------------------------------------
   Load order: style.css -> pages.css -> overrides.css (this file wins).

   Rule of the house: any selector that targets an element which *is* a
   `.container` must preserve the horizontal gutter. Several wrappers are
   declared as `class="container hero-inner"`, so writing
   `padding: 34px 0 30px` silently killed the page gutter and pushed copy
   flush against the screen edge. Use `padding-block` there instead.
   ========================================================================== */

:root {
  --gutter: 20px;
  --gutter-sm: 16px;
  --tap: 44px;
}

@media (max-width: 640px) {
  :root { --gutter: var(--gutter-sm); }
}

/* --------------------------------------------------------------------------
   1. Container + gutter discipline
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Wrappers that are ALSO containers: never reset the inline padding. */
.hero-inner,
.header-inner,
.topbar-inner,
.hero-controls,
.page-head > .container {
  padding-inline: var(--gutter);
}

/* Vertical rhythm only. */
.hero-inner { padding-block: 52px 44px; }
.hero-controls { padding-block: 0 26px; }

html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }
img, svg { max-width: 100%; }

/* --------------------------------------------------------------------------
   2. Shared spacing scale
   -------------------------------------------------------------------------- */

.section { padding-block: 44px; }
.section--alt { padding-block: 44px; }
.section-head { margin-bottom: 20px; }
.trust-row { padding-block: 32px; }
.page-head { padding-block: 34px 30px; }

.showcase,
.feature-tiles,
.category-tiles,
.results-grid { gap: 16px; }

.feature-tiles { padding-block: 4px 0; }
.feature-tile { padding: 17px 18px; }

.product-body { padding: 14px 15px 16px; gap: 7px; }
.product-brand { line-height: 1.2; }
.product-name { line-height: 1.4; }
.product-foot { padding-top: 9px; }

/* --------------------------------------------------------------------------
   3. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-copy { max-width: 520px; min-width: 0; }

/* --------------------------------------------------------------------------
   4. Top bar + header
   -------------------------------------------------------------------------- */

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  flex-wrap: wrap;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.header-search { width: 250px; }

/* Mobile category rail: a horizontal scroller pinned to the viewport so it
   can never inflate the document width. */
.mobile-nav {
  display: none;
  gap: 18px;
  width: 100%;
  max-width: 100vw;
  padding: 10px var(--gutter);
  border-top: 1px solid var(--line-2);
  background: #fff;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav a {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 0;
}
.mobile-nav a:hover { color: var(--blue-600); }

@media (max-width: 991px) {
  .mobile-nav { display: flex; }
  .header-inner { min-height: 64px; gap: 12px; }
  .brand-mark { width: 34px; height: 34px; font-size: 17px; }
  .brand-name { font-size: 17px; }
  .header-actions { gap: 2px; margin-left: auto; }
  .icon-btn { width: var(--tap); height: var(--tap); }
}

@media (max-width: 420px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 16px; }
  .header-inner { gap: 8px; }
  .icon-btn { width: 40px; height: 40px; font-size: 17px; }
}

/* --------------------------------------------------------------------------
   5. Hero on small screens
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-block: 34px 30px;
  }

  /*
   * Small screens: the artwork becomes a low-contrast side panel anchored to
   * the top-right corner. It is clipped to a narrow column so it can never sit
   * behind body copy, and it is hidden entirely on very small phones.
   */
  .hero {
    background:
      radial-gradient(520px 320px at 100% 0%, #e3ecff 0%, rgba(227, 236, 255, 0) 70%),
      linear-gradient(180deg, #eef4ff 0%, #f8fbff 72%, #ffffff 100%);
  }

  .hero-visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 38%;
    max-width: 260px;
    min-height: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: .55;
  }
  .hero-visual-glow { display: none; }
  /* hero image fade */
.hero-device.is-fading { opacity: 0 !important; }
.hero-device { transition: opacity .35s ease, filter .45s ease; }
.hero-device {
    width: 100%;
    margin: 0;
    border-radius: 0 0 0 40px;
    box-shadow: none;
    animation: none;
  }
  .hero-chip { display: none; }
  .hero-copy { position: relative; z-index: 1; max-width: 100%; }
}

/*
 * Phones: the product photo becomes a full-bleed backdrop BEHIND the copy —
 * heavily blurred, tinted, and dimmed, with a gradient scrim so the headline
 * always keeps its contrast. The image is over-sized and inset so the blur
 * never shows a hard edge.
 */
@media (max-width: 767px) {
  .hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(180deg, #f4f8ff 0%, #eef4ff 48%, #ffffff 100%);
  }

  .hero-inner {
    position: relative;
    /* above the fade wash (.hero::after) so the copy is never dimmed */
    z-index: 2;
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    position: absolute;
    /* extend past the controls row; .hero clips the excess */
    inset: 0 0 -56px 0;
    order: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
  }
  .hero-visual-glow { display: none; }

  .hero-device {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    max-width: none;
    object-fit: cover;
    object-position: 70% 40%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    animation: none;
    filter: blur(18px) saturate(140%);
    opacity: .7;
    transform: none;
    will-change: opacity;
    transition: opacity .45s ease, filter .45s ease;
  }

  /* scrim: fades the photo out behind the text so contrast never drops */
  .hero-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(125% 95% at 4% 50%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, .55) 46%, rgba(255, 255, 255, 0) 72%),
      linear-gradient(180deg, rgba(247, 250, 255, .55) 0%, rgba(247, 250, 255, .32) 45%, rgba(255, 255, 255, .9) 100%);
  }

  .hero-chip { display: none; }
  .hero-copy { order: 1; position: relative; z-index: 2; max-width: 100%; }

  /* keep the controls above the backdrop */
  .hero-controls { position: relative; z-index: 2; }
}

/* slightly stronger blur on the narrowest phones */
@media (max-width: 430px) {
  .hero-device { filter: blur(22px) saturate(145%); opacity: .62; }
}

@media (max-width: 640px) {
  .hero-inner { padding-block: 26px 22px; }
  .hero-title { font-size: clamp(27px, 8.6vw, 36px); }
  .hero-sub { font-size: 14px; margin-top: 14px; }
  .hero-eyebrow { margin-bottom: 14px; font-size: 10.5px; }
  .hero-actions { margin-top: 22px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 100%; min-height: var(--tap); }
  .hero-stats { gap: 16px; margin-top: 24px; padding-top: 20px; }
  .hero-stat strong { font-size: 18px; }
  .hero-stat span { font-size: 11px; }
  .hero-controls { padding-block: 0 20px; }
}

/* --------------------------------------------------------------------------
   6. Sections on small screens
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .showcase,
  .feature-tiles,
  .category-tiles,
  .results-grid,
  .trust-row,
  .footer-top,
  .admin-stats { min-width: 0; }

  .showcase > *,
  .feature-tiles > *,
  .category-tiles > *,
  .results-grid > *,
  .trust-row > *,
  .footer-top > * { min-width: 0; }

  .promo-card { grid-column: 1 / -1; }

  /* Filters come after results: nobody should scroll past 300px of category
     links before reaching a product. */
  .search-filters { order: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .search-layout > div { order: 1; }
  .search-filters .filter-card { margin-bottom: 0; }
}

@media (max-width: 640px) {
  .section,
  .section--alt { padding-block: 34px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .section-tools { width: 100%; }
  .trust-row { padding-block: 24px; }
  .page-head { padding-block: 24px 22px; }
  .page-head h1 { font-size: 22px; }
  .page-head p { font-size: 13.5px; }
  .breadcrumbs { font-size: 11.5px; padding-block: 14px; }

  .pills {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .pills::-webkit-scrollbar { display: none; }
  .pill { flex: 0 0 auto; }

  .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .promo-card { flex-direction: column; min-height: 0; }
  .promo-card .promo-media { width: 100%; max-width: 170px; margin: 12px auto; }
  .promo-card .promo-title { font-size: 19px; }
  .promo-price strong { font-size: 20px; }

  .search-filters { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
  .showcase { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   6b. Small control fixes found by the responsive audit
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  /* hero carousel dots: 8px tall was untappable */
  .hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    position: relative;
  }
  .hero-dot::after {
    content: '';
    position: absolute;
    inset: -14px;
  }
  .hero-dot.is-active { width: 26px; height: 10px; }
  .hero-controls { gap: 10px; }

  /* text-only "View all" links need a real hit area */
  .btn-arrow {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding-block: 8px;
  }

  /* footer legal + credit links */
  .footer-bottom a,
  .credit-name,
  .footer-credit a { min-height: 40px; display: inline-flex; align-items: center; }

  /* brand / filter links in cards */
  .product-brand { padding-block: 2px; }
  .filter-chip { min-height: 36px; }
  .check-row input[type="checkbox"] { width: 20px; height: 20px; }

  /* pagination arrows */
  .page-link, .page-btn { min-height: 40px; min-width: 40px; }
}

/* --------------------------------------------------------------------------
   6c. Remaining small-target fixes
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  /* dots: 10px visually, 44px hit area via a pseudo-element */
  .hero-dot { width: 10px; height: 10px; }
  .hero-dot.is-active { width: 26px; height: 10px; }

  /* footer contact links were 24px tall */
  .footer-contact p a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
  }
  .footer-contact p { margin-bottom: 4px; }

  /* breadcrumb trail links */
  .breadcrumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding-inline: 2px;
  }
  .breadcrumbs { gap: 4px; }
}

/* --------------------------------------------------------------------------
   7. Touch targets
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .btn { min-height: var(--tap); }
  .btn--sm { min-height: 38px; }
  .icon-btn { min-width: var(--tap); min-height: var(--tap); }

  .filter-link { min-height: var(--tap); }
  .check-row { min-height: 40px; }
  .footer-links a { min-height: 38px; display: flex; align-items: center; }

  .qty-step { width: 34px; height: 34px; }
  .cart-qty { height: 40px; }
  .cart-qty button { width: 36px; }
  .icon-action { width: 38px; height: 38px; }
  .page-btn { min-width: 40px; height: 40px; }
  .wish-btn { width: 36px; height: 36px; }
  .add-btn { width: 40px; height: 40px; }
  .arrow-btn { width: 40px; height: 40px; }

  /* iOS zooms any focused input below 16px */
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px;
  }
}

/* --------------------------------------------------------------------------
   8. Product page
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .gallery-thumb { width: 62px; height: 62px; }
  .gallery-thumbs { gap: 8px; }
  .info-buy { gap: 10px; }
  .info-buy .btn { flex: 1 1 100%; }
  .qty-control { flex: 1 1 100%; justify-content: space-between; }
  .qty-control input { flex: 1; }
  .info-facts { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tab { padding: 11px 14px; font-size: 12.5px; }
  .tab-panel { padding: 16px; }
  .spec-table th { width: 46%; }
  .price--xl { font-size: 26px; }
}

/* --------------------------------------------------------------------------
   9. Cart + checkout
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  .cart-head { display: none; }
  .cart-line { padding-right: 48px; }
}

@media (max-width: 640px) {
  .checkout-form,
  .checkout-summary,
  .cart-summary { padding: 16px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  margin-top: 64px;
  background: #080e1a;
  color: #c6d0e0;
  overflow: hidden;
  isolation: isolate;
}

.footer-glow {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 520px;
  background:
    radial-gradient(600px 260px at 18% 0%, rgba(47, 107, 243, .28), transparent 70%),
    radial-gradient(520px 240px at 82% 10%, rgba(124, 58, 237, .22), transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: glowDrift 18s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

.footer-ticker {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .02);
  padding-block: 12px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.footer-ticker-track {
  display: flex;
  gap: 42px;
  width: max-content;
  animation: tickerScroll 34s linear infinite;
}
.footer-ticker:hover .footer-ticker-track { animation-play-state: paused; }
.footer-ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8fa0bd;
  white-space: nowrap;
}
.footer-ticker-track i { color: var(--blue-500); font-size: 13px; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .footer-ticker-track, .footer-glow { animation: none; }
}

.site-footer .container { position: relative; }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 44px;
  padding-block: 46px 40px;
}
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: #7f8ca6; }
.footer-blurb {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.75;
  color: #93a0b8;
  max-width: 320px;
}

.footer-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  background: rgba(22, 163, 74, .12);
  border: 1px solid rgba(22, 163, 74, .28);
  font-size: 11.5px;
  color: #86efac;
  font-weight: 600;
}
.footer-live strong { color: #bbf7d0; font-weight: 700; }
.footer-live.is-closed {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(239, 68, 68, .28);
  color: #fca5a5;
}
.footer-live.is-closed strong { color: #fecaca; }

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: livePulse 2s infinite;
  flex-shrink: 0;
}
.footer-live.is-closed .live-dot { background: #ef4444; animation: none; }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .07);
  color: #d6dfef;
  transition: .2s ease;
}
.footer-social a:hover { background: var(--blue-500); color: #fff; transform: translateY(-2px); }

.footer-links h2,
.footer-contact h2 {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.footer-links a {
  display: block;
  font-size: 13px;
  color: #93a0b8;
  padding-block: 5px;
  transition: .16s ease;
}
.footer-links a:hover { color: #fff; padding-left: 5px; }

.footer-contact p {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #93a0b8;
  margin-bottom: 12px;
  line-height: 1.6;
}
.footer-contact i { color: var(--blue-500); font-size: 15px; margin-top: 2px; flex-shrink: 0; }
.footer-contact a:hover { color: #fff; }

.footer-credit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 4px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(47, 107, 243, .14), rgba(124, 58, 237, .12));
  border: 1px solid rgba(255, 255, 255, .09);
  flex-wrap: wrap;
}
.credit-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.credit-spark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f8bff, #7c3aed);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 8px 20px rgba(79, 139, 255, .35);
  animation: sparkTilt 6s ease-in-out infinite;
}
@keyframes sparkTilt {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-7deg) scale(1.04); }
  75% { transform: rotate(7deg) scale(1.04); }
}

.credit-copy { display: flex; flex-direction: column; gap: 2px; }
.credit-eyebrow {
  font-size: 10.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #8fa0bd;
  font-weight: 600;
}
.credit-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.015em;
  color: #fff;
  transition: .18s ease;
}
.credit-name i { font-size: 12px; transition: transform .18s ease; color: #8fb4ff; }
.credit-name:hover { color: #bfd4ff; }
.credit-name:hover i { transform: translate(2px, -2px); }

.credit-link {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px;
  font-weight: 600;
  color: #d6dfef;
  transition: .18s ease;
}
.credit-link:hover { background: #fff; color: #0b1220; }

.footer-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #93a0b8;
  min-height: 44px;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, .1);
  transition: .18s ease;
}
.footer-admin:hover {
  color: #fff;
  border-color: rgba(79, 139, 255, .5);
  background: rgba(79, 139, 255, .14);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-block: 18px 26px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  font-size: 12px;
  color: #7f8ca6;
  flex-wrap: wrap;
}
.footer-payments { display: flex; gap: 8px; flex-wrap: wrap; }
.payment-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .06);
  font-size: 11px;
  color: #b9c4d6;
}

@media (max-width: 991px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; padding-block: 38px 32px; }
  .footer-credit { flex-direction: column; align-items: stretch; }
}

@media (max-width: 640px) {
  .site-footer { margin-top: 40px; }
  .footer-ticker { padding-block: 10px; }
  .footer-ticker-track { gap: 28px; animation-duration: 26s; }
  .footer-ticker-track span { font-size: 10.5px; }

  .footer-top { grid-template-columns: 1fr; gap: 26px; padding-block: 32px 26px; }
  .footer-blurb { font-size: 12.5px; }

  .footer-credit { padding: 15px 16px; gap: 14px; }
  .credit-spark { width: 36px; height: 36px; font-size: 15px; }
  .credit-name { font-size: 15.5px; }
  .credit-link { font-size: 11.5px; padding: 8px 12px; }
  .footer-admin { width: 100%; justify-content: center; }

  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; padding-block: 16px 22px; font-size: 11.5px; }
}

/* --------------------------------------------------------------------------
   11. Admin shell
   -------------------------------------------------------------------------- */

.no-scroll { overflow: hidden; }
.admin-body { background: #f5f7fb; min-height: 100vh; }

.admin-side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  background: #0b1220;
  color: #c6d0e0;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  z-index: 200;
  transition: width .24s ease, transform .24s ease;
}
.admin-side.is-collapsed { width: 76px; }

.admin-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
  padding-inline: 4px;
}
.admin-side .brand-text { min-width: 0; overflow: hidden; transition: opacity .18s ease; }
.admin-side.is-collapsed .brand-text { opacity: 0; width: 0; }

.admin-collapse {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  color: #93a0b8;
  font-size: 12px;
  flex-shrink: 0;
  transition: .18s ease;
}
.admin-collapse:hover { color: #fff; background: var(--blue-500); border-color: var(--blue-500); }

.admin-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.admin-nav-label {
  font-size: 9.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5c6a83;
  font-weight: 700;
  padding: 16px 10px 7px;
  white-space: nowrap;
  overflow: hidden;
}
.admin-side.is-collapsed .admin-nav-label { opacity: 0; height: 12px; padding: 0; }

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: #a7b3c8;
  font-size: 13.5px;
  text-align: left;
  width: 100%;
  transition: .16s ease;
  white-space: nowrap;
  overflow: hidden;
}
.admin-nav-item i { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.admin-nav-item span { transition: opacity .16s ease; }
.admin-nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav-item.is-active { background: var(--blue-500); color: #fff; font-weight: 600; }
.admin-side.is-collapsed .admin-nav-item span { opacity: 0; }

.admin-side-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.admin-db {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  font-size: 11.5px;
  color: #8b98b0;
  white-space: nowrap;
  overflow: hidden;
}
.admin-side.is-collapsed .admin-db span:last-child { display: none; }
.admin-db .live-dot { background: #94a3b8; animation: none; }
.admin-signout { color: #f0a0a0; }

.admin-scrim {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 26, .5);
  backdrop-filter: blur(2px);
  z-index: 190;
}

.admin-main { margin-left: 248px; min-height: 100vh; transition: margin-left .24s ease; }
.admin-side.is-collapsed ~ .admin-main { margin-left: 76px; }

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 28px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-2);
}
.admin-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink-2);
  font-size: 18px;
  flex-shrink: 0;
}
.admin-topbar-title { flex: 1; min-width: 0; }
.admin-topbar-title h1 { font-size: 19px; font-weight: 800; }
.admin-topbar-title p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.admin-topbar-actions { display: flex; gap: 9px; align-items: center; margin-left: auto; }

.admin-content { padding: 26px 28px 70px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}
.admin-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: .18s ease;
}
.admin-stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.admin-stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; }
.admin-stat-value { font-family: var(--font-head); font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.admin-stat-note { font-size: 11.5px; color: var(--muted-2); }
.admin-stat--warn { border-color: #fde3b8; background: #fffdf7; }
.admin-stat--danger { border-color: #fbd5d5; background: #fffafa; }

.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.admin-panel-head h2 { font-size: 15px; }
.admin-tools { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.admin-search { position: relative; display: inline-flex; align-items: center; }
.admin-search i { position: absolute; left: 11px; color: var(--muted-2); font-size: 13px; pointer-events: none; }
.admin-search input {
  height: 38px;
  padding: 0 12px 0 32px;
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  background: #fbfcfe;
}
.admin-search input:focus { outline: none; background: #fff; border-color: var(--blue-200); box-shadow: 0 0 0 3px var(--blue-50); }
.admin-tools select {
  height: 38px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead th {
  text-align: left;
  padding: 11px 16px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.admin-table tbody td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fafcff; }
.admin-th-actions { text-align: right; }

.admin-body.admin-dark { background: #0d1424; }
.admin-body.admin-dark .admin-panel,
.admin-body.admin-dark .admin-stat { background: #141c2e; border-color: #1f2a40; color: #e2e8f5; }
.admin-body.admin-dark .admin-table thead th { background: #101828; border-color: #1f2a40; color: #8fa0bd; }
.admin-body.admin-dark .admin-table tbody td { border-color: #1a2337; color: #cbd5e1; }
.admin-body.admin-dark .admin-table tbody tr:hover { background: #172033; }
.admin-body.admin-dark .admin-topbar { background: rgba(13, 20, 36, .88); border-color: #1f2a40; color: #e2e8f5; }
.admin-body.admin-dark .admin-topbar-title p { color: #8fa0bd; }
.admin-body.admin-dark .admin-search input,
.admin-body.admin-dark .admin-tools select,
.admin-body.admin-dark .qty-inline input,
.admin-body.admin-dark .icon-action,
.admin-body.admin-dark .qty-step { background: #101828; border-color: #1f2a40; color: #cbd5e1; }
.admin-body.admin-dark .row-sku { color: #7f8ca6; }
.admin-body.admin-dark .banner { background: #141c2e; border-color: #1f2a40; color: #a8b6cc; }

@media (max-width: 1180px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .admin-side {
    transform: translateX(-100%);
    width: 270px;
    box-shadow: 24px 0 60px rgba(8, 14, 26, .25);
  }
  .admin-side.is-open { transform: translateX(0); }
  .admin-side.is-collapsed { width: 270px; }
  .admin-side.is-collapsed .brand-text,
  .admin-side.is-collapsed .admin-nav-item span,
  .admin-side.is-collapsed .admin-nav-label,
  .admin-side.is-collapsed .admin-db span:last-child { opacity: 1; display: inline; }
  .admin-side.is-collapsed .admin-nav-label { height: auto; padding: 16px 10px 7px; }
  .admin-main,
  .admin-side.is-collapsed ~ .admin-main { margin-left: 0; }
  .admin-menu-btn { display: grid; }
  .admin-content { padding: 20px 18px 60px; }
  .admin-topbar { padding: 14px 18px; }
}

@media (max-width: 720px) {
  .admin-topbar { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .admin-topbar-title { order: 3; flex-basis: 100%; }
  .admin-topbar-title h1 { font-size: 17px; }
  .admin-topbar-actions .btn span { display: none; }
  .admin-content { padding: 16px 14px 60px; }

  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .admin-stat { padding: 14px; }
  .admin-stat-label { font-size: 9.5px; }
  .admin-stat-value { font-size: 21px; }
  .admin-stat-note { font-size: 10.5px; }

  .admin-panel-head { padding: 13px 14px; gap: 10px; }
  .admin-tools { width: 100%; gap: 7px; }
  .admin-search { flex: 1 1 100%; }
  .admin-search input { width: 100%; min-width: 0; height: 38px; }
  .admin-tools select { flex: 1 1 0; min-width: 0; height: 38px; padding-inline: 8px; font-size: 12.5px; }

  .admin-table thead { display: none; }
  .admin-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line-2);
  }
  .admin-table tbody td { padding: 0; border: 0; }
  .admin-table tbody td[data-label="Product"] { grid-column: 1; }
  .admin-table tbody td[data-label="Quantity"] { grid-column: 1; margin-top: 4px; }
  .admin-table tbody td[data-label="Status"] { grid-column: 1; }
  .admin-table tbody td[data-label="Category"],
  .admin-table tbody td[data-label="Price"] { grid-column: 2; text-align: right; font-size: 12px; color: var(--muted); }
  .admin-table tbody td.cell-actions { grid-column: 2; grid-row: 2 / span 2; align-self: center; justify-self: end; }
  .row-thumb { width: 38px; height: 38px; }
  .row-name { font-size: 12.5px; }

  .modal { padding: 0; align-items: stretch; }
  .modal-card { max-width: none; border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; }
  .modal-card form { display: flex; flex-direction: column; min-height: 100vh; }
  .modal-head { padding: 15px 16px; position: sticky; top: 0; background: #fff; z-index: 2; }
  .modal-body { padding: 16px; max-height: none; flex: 1; overflow-y: auto; }
  .modal-foot { padding: 13px 16px; border-radius: 0; position: sticky; bottom: 0; }
  .spec-row { grid-template-columns: 1fr 1fr auto; gap: 6px; }
}

@media (max-width: 420px) {
  .admin-stats { grid-template-columns: 1fr; }
  .admin-stat { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .admin-stat-value { font-size: 20px; }
  .admin-stat-note { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   12. Lock screen
   -------------------------------------------------------------------------- */

.lock-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(700px 400px at 50% -10%, #e8f0ff, transparent 70%),
    #f6f9ff;
  padding: 40px 20px;
}
.lock-shell { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.lock-brand { display: inline-flex; align-items: center; gap: 10px; }
.lock-card {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(16, 24, 40, .1);
  padding: 32px 28px 24px;
  text-align: center;
}
.lock-card.is-shaking { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.lock-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--blue-50);
  color: var(--blue-500);
  font-size: 24px;
}
.lock-card h1 { font-size: 21px; font-weight: 800; }
.lock-lead { font-size: 13px; color: var(--muted); margin: 8px 0 22px; line-height: 1.6; }
.lock-field { text-align: left; margin-bottom: 18px; }
.lock-field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.lock-input { position: relative; }
.lock-input input {
  width: 100%;
  height: 46px;
  padding: 0 44px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  font-size: 14px;
  letter-spacing: .06em;
}
.lock-input input:focus { outline: none; background: #fff; border-color: var(--blue-200); box-shadow: 0 0 0 4px var(--blue-50); }
.lock-input input.is-invalid { border-color: #f5a3a3; background: #fffafa; }
.lock-reveal {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted-2);
}
.lock-reveal:hover { color: var(--blue-600); background: var(--blue-50); }
.lock-error { margin-top: 7px; font-size: 12px; color: var(--red); }
.lock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
}
.lock-foot a { color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.lock-foot a:hover { color: var(--blue-600); }
.lock-mode { color: var(--muted-2); }
.lock-note { font-size: 11.5px; color: var(--muted-2); text-align: center; line-height: 1.7; max-width: 380px; }
.lock-note code { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 11px; color: var(--ink-2); }

@media (max-width: 480px) {
  .lock-body { padding: 24px 14px; }
  .lock-shell { gap: 18px; }
  .lock-card { padding: 26px 20px 20px; border-radius: var(--radius); }
  .lock-card h1 { font-size: 19px; }
  .lock-lead { font-size: 12.5px; }
  .lock-foot { font-size: 11.5px; }
  .lock-note { font-size: 11px; }
}

@media (max-width: 991px) {
  /* centre the carousel dots under a single-column hero */
  .hero-controls { justify-content: center; }
}


/* ==========================================================================
   Admin: view switching, messages, settings, image fields
   ========================================================================== */

.admin-view { display: none; }
.admin-view.is-active { display: block; }

.admin-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
}
.admin-side.is-collapsed .admin-badge { display: none; }

.admin-user {
  font-size: 11.5px;
  color: #8b98b0;
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 10px;
}
.admin-user i { color: #64748b; }
.admin-side.is-collapsed .admin-user span { display: none; }

/* buttons that are nav items need the same reset as anchors */
button.admin-nav-item { font-family: inherit; cursor: pointer; }

/* messages */
.admin-table tbody tr.is-unread { background: #f7faff; }
.admin-table tbody tr.is-unread .row-name::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-500);
  margin-right: 7px;
  vertical-align: middle;
}
.message-body {
  max-width: 420px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* settings */
.settings-form { max-width: 860px; }
.settings-body { padding: 22px; }
.settings-hint {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.6;
}
.settings-hint code {
  background: var(--canvas-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 11.5px;
}

/* image field */
.image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.image-preview-item {
  width: 92px;
  height: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--canvas-2);
  padding: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.image-preview-item img { width: 100%; height: 100%; object-fit: contain; }
.image-preview-item.is-broken {
  border-color: #fbd5d5;
  background: #fff7f7;
  position: relative;
}
.image-preview-item.is-broken::after {
  content: 'Broken URL';
  position: absolute;
  inset: auto 0 0 0;
  background: #fbd5d5;
  color: #9b1c1c;
  font-size: 9.5px;
  text-align: center;
  padding: 2px;
}
.image-preview-empty,
.image-preview-note {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.image-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.image-tag--ok { background: var(--green-50); color: var(--green); }
.image-tag--none { background: var(--canvas-2); color: var(--muted); border: 1px solid var(--line); }

@media (max-width: 720px) {
  .settings-body { padding: 16px; }
  .message-body { max-width: none; }
}

/* Lock screen: the email field is a bare input, not wrapped like the password */
.lock-field > input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfcfe;
  font-size: 14px;
}
.lock-field > input:focus {
  outline: none;
  background: #fff;
  border-color: var(--blue-200);
  box-shadow: 0 0 0 4px var(--blue-50);
}

/* ==========================================================================
   TABLET LAYOUT  (768px – 1180px)
   --------------------------------------------------------------------------
   Tablets were falling back to the phone rule (2 columns) which left huge
   gaps — a 768px screen can comfortably hold 3 product cards. These rules sit
   at the end of the cascade so they win over the phone breakpoint.
   ========================================================================== */

/* ---- product grids: 3 across from 768px up ---- */
@media (min-width: 768px) and (max-width: 1399px) {
  .showcase,
  .showcase--plain {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* the promo tile spans the full row instead of squeezing a column */
  .promo-card {
    grid-column: 1 / -1;
    grid-row: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 200px;
    padding: 22px 26px;
  }
  .promo-card .promo-media { margin: 0; width: 180px; flex: 0 0 auto; }
  .promo-card .btn { align-self: center; }
  .promo-card .promo-title { font-size: 22px; }

  .search-page .results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- quick tiles: 4 across on tablet ---- */
@media (min-width: 768px) and (max-width: 991px) {
  .feature-tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }
  .feature-tile {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 15px 14px;
  }
  .feature-tile-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
  .feature-tile-title { font-size: 13.5px; }
  .feature-tile-link { font-size: 10px; }

  /* category tiles: 3 across, not a single 728px block */
  .category-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .category-tile {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 18px;
    gap: 10px;
  }
  .category-tile-body { max-width: 100%; }
  .category-tile-img { width: 100%; max-width: 120px; margin: 0 0 -8px auto; align-self: flex-end; }
  .category-tile-title { font-size: 15px; }

  /* trust row stays 2-up but tighter */
  .trust-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  /* footer: 4 columns fits at this width */
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 24px; }
  .footer-blurb { max-width: none; }
  .footer-credit { flex-direction: row; align-items: center; }
}

/* ---- tablets in the 992–1180 range keep the desktop ruler but calmer ---- */
@media (min-width: 992px) and (max-width: 1180px) {
  .hero-inner { gap: 32px; }
  .hero-title { font-size: clamp(30px, 3.4vw, 42px); }
  .header-search { width: 200px; }
  .primary-nav { gap: 18px; }
}

/* ---- touch targets across the whole tablet range ---- */
@media (min-width: 768px) and (max-width: 1180px) {
  .icon-btn { min-width: 42px; min-height: 42px; }
  .wish-btn { width: 36px; height: 36px; }
  .add-btn { width: 40px; height: 40px; }
  .cart-remove { width: 38px; height: 38px; }
  .qty-step { width: 30px; height: 30px; }
  .footer-links a { min-height: 36px; display: flex; align-items: center; }
  .breadcrumbs a { min-height: 32px; display: inline-flex; align-items: center; }
  .filter-chip { min-height: 34px; }
  .page-btn { min-height: 38px; min-width: 38px; }
}

/* ---- cart + checkout stack their summary below on tablets ---- */
@media (min-width: 768px) and (max-width: 991px) {
  .cart-layout,
  .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-summary,
  .checkout-summary { position: static; }
}

/* ---- hero on tablet: proper two-column instead of a clipped overlay ---- */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: 28px;
    padding-block: 34px 30px;
  }
  .hero-copy { max-width: none; }
  .hero-visual {
    /* keep it in normal flow BUT positioned, so the floating chips stay
       anchored to the image instead of escaping to the page corners */
    position: relative;
    order: 2;
    width: 100%;
    max-width: none;
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
  }
  .hero-copy { order: 1; }
  .hero-visual > * { opacity: 1; }
  .hero-visual-glow { display: block; }
  .hero-device {
    width: 100%;
    max-width: 330px;
    margin-inline: auto;
    border-radius: 22px;
  }
  .hero-chip { display: flex; }
  .hero-chip--a { top: 4%; left: 0; }
  .hero-chip--b { bottom: 6%; right: 0; }
  .hero-chip--c { display: none; }
  .hero-title { font-size: clamp(28px, 4.4vw, 38px); }
  .hero-stats { gap: 20px; }
}

/* ---- stop nav links wrapping in the 992–1180 band ---- */
@media (min-width: 992px) and (max-width: 1180px) {
  .primary-nav > a,
  .nav-dropdown-toggle { white-space: nowrap; }
  .brand-tag { font-size: 9px; letter-spacing: .1em; }
}
