/* ─── DS KONGEN — Prose, 404, Theme Variants, Responsive ─── */

/* Prose pages */
.dskr-prose { font-family: var(--prose); font-size: 16px; line-height: 1.7; color: var(--text); max-width: 760px; }
.dskr-prose h1, .dskr-prose h2, .dskr-prose h3 {
  font-family: var(--body); font-weight: 800; text-transform: uppercase; color: var(--gold); letter-spacing: 1px;
}
.dskr-prose a { color: var(--teal-light); }
.dskr-prose a:hover { color: var(--gold); }

/* 404 page */
.dskr-404 { min-height: 60vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.dskr-404-title { font-family: var(--pixel); font-size: 96px; color: var(--gold); margin: 0; text-shadow: 4px 4px 0 #7a5900, 0 0 40px rgba(255,215,0,0.4); }
.dskr-404-sub { font-family: var(--pixel); font-size: 14px; color: var(--red-bright); letter-spacing: 2px; margin: 16px 0 24px; }
.dskr-404-text { font-family: var(--prose); font-size: 16px; color: var(--text-dim); max-width: 480px; margin: 0 auto; }

/* Theme variants */
body.theme-dark   .hero { background: radial-gradient(ellipse 80% 60% at 50% 40%, #0e3d35 0%, #0a1628 45%, #080e1c 100%); }
body.theme-purple .hero { background: radial-gradient(ellipse 80% 60% at 50% 40%, #2d0e4a 0%, #150a28 45%, #080010 100%); }
body.theme-ember  .hero { background: radial-gradient(ellipse 80% 60% at 50% 40%, #3d1a00 0%, #1a0a00 45%, #100500 100%); }

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
  /* Kill all decorative animations */
  .hero-bg-glow,
  .pixel-coin,
  .star,
  .hero-scroll-hint,
  .footer-pixel {
    animation: none !important;
  }
  /* Stop the marquee — show it static */
  .marquee-track {
    animation: none !important;
  }
  /* Kill the scroll-bg colour transition */
  #scroll-bg {
    transition: none !important;
  }
  /* Kill button/card hover transforms */
  .btn-primary:hover,
  .btn-outline:hover,
  .nav-cart:hover,
  .cat-card:hover,
  .product-card:hover,
  .btn-add-cart:hover,
  .product-card .button:hover {
    transform: none !important;
  }
}

/* ─── Global mobile overflow guard ─── */
/* Kill any chance of horizontal scroll on mobile. We've had reports of
   off-screen content (footer cols, wide grids, decorative absolute elements)
   spilling past the viewport edge. Anchoring html/body to 100vw and clipping
   overflow stops the body from ever scrolling sideways. */
html, body {
  max-width: 100vw;
  overflow-x: clip;
}
@supports not (overflow-x: clip) {
  html, body { overflow-x: hidden; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  /* Mobile nav: two-row stacked layout.
       Row 1: centered logo
       Row 2: burger | search input | cart pill
     The .dskr-nav element keeps its bottom border, so the gold line encloses
     both rows naturally — no separate brand strip. */
  .dskr-nav {
    flex-direction: column;
    height: auto;
    padding: 10px 16px 12px;
    gap: 10px;
    align-items: stretch;
  }

  /* Row 1: center the logo (override the desktop margin-right: auto) */
  .nav-logo {
    margin: 0 auto !important;
    justify-content: center;
  }

  /* Row 2: full-width actions row with burger left, search in the middle, cart right */
  .nav-actions {
    display: flex !important;
    width: 100%;
    margin: 0 !important;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
  }
  .nav-links,
  .nav-account { display: none; }
  .nav-burger { display: flex; }

  /* Search input becomes visible on mobile in row 2 — sits between burger
     and cart, expands to fill available space */
  .dskr-nav-search-form {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }
  .nav-search {
    width: 100%;
    font-size: 16px;  /* 16+ prevents iOS focus-zoom */
    padding: 10px 12px;
  }

  /* Cart pill — bumped to meet 44px touch target */
  .nav-cart {
    padding: 12px 14px;
    min-height: 44px;
    font-size: 10px;
    flex-shrink: 0;
  }

  /* Hero: drop to 70vh so categories peek above the fold; ease text-shadow.
     Use justify-content:flex-start + extra top padding so the eyebrow text
     ("Danmarks Gaming Destination") can never sit under the sticky nav or
     overlap the cart pill on narrow screens. */
  .hero {
    min-height: 70vh;
    align-items: flex-start;
    padding-top: 24px;
  }
  .hero-content {
    padding: 32px 20px 40px;
    width: 100%;
  }
  .hero-eyebrow { margin-bottom: 14px; }
  .hero-tagline { margin-bottom: 32px; }
  /* The logo badge (added 2026-08-03) is much taller than the old text
     wordmark it replaced — left at desktop size it eats most of the 70vh
     mobile hero and defeats the "categories peek above the fold" goal
     above. Shrink it hard on mobile; it's still plenty legible small. */
  .hero-logo img { width: min(160px, 40vw); }
  .hero-title.hero-logo { margin-bottom: 12px; }

  /* Section padding */
  .section { padding: 48px 20px; }
  .dskr-shop-section { padding: 32px 16px 48px; }

  /* Footer goes to single column — avoids the lopsided 2x2 wrap caused by
     the wider brand column */
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px; }

  .sale-banner { flex-direction: column; margin: 0 20px; padding: 28px 20px; }
  .pixel-divider { margin: 0 20px; }
  .footer-bottom { padding: 20px 20px; flex-direction: column; gap: 12px; text-align: center; }
  .sale-banner-text h2 { font-size: 32px; }

  /* Tighten the product card title on mobile so common long names like
     "1945 I & II the Arcade Games" or "Theatrhythm Final Fantasy: Curtain
     Call" wrap to 2 lines instead of 3. Letter-spacing also reduced
     because uppercase + tight space exaggerates the per-line width. */
  .product-name {
    font-size: 16px;
    letter-spacing: 0.3px;
    line-height: 1.25;
  }


  /* Force single-column footer on mobile. The base footer.css used to ship
     this with !important on the 4-column desktop grid, which leaked through
     on phones and pushed INFO/KONTAKT off-screen. The !important is now
     removed from base — adding it here as defense in case any plugin adds
     a competing !important rule later. */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 32px 20px !important;
  }
  .footer-col { min-width: 0; max-width: 100%; }
  .footer-col ul,
  .footer-col li,
  .footer-col a { max-width: 100%; word-wrap: break-word; }

  /* Pagination — wrap onto multiple rows on narrow screens instead of
     overflowing horizontally */
  .woocommerce-pagination ul,
  ul.page-numbers {
    flex-wrap: wrap;
    row-gap: 8px;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  /* On very small phones, dampen the heaviest hero text-shadow stack */
  .hero-title {
    text-shadow:
      2px 2px 0 #7a5900,
      0 0 20px rgba(255,215,0,0.3);
  }
  /* Categories grid: explicit 2-column at narrow widths so the chips
     don't shrink to a single column */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* The "featured-cat" double-width chip becomes regular on phones —
     but not for photo cards, which are uniform-sized at every breakpoint
     now (2026-08-05), so exclude .has-cat-image here. */
  .cat-card.featured-cat:not(.has-cat-image) {
    grid-column: span 2;
  }
  /* Category photo cards: the 200px min-height (sections.css) is sized
     for the wide desktop grid — in mobile's narrower 2-column grid it
     reads as oversized/portrait instead of a landscape console shot.
     Scale down proportionally. All photo cards, including featured,
     share this same value so every card pops at one uniform size. */
  .cat-card.has-cat-image,
  .cat-card.has-cat-image.featured-cat {
    height: 195px !important;
    grid-column: auto !important;
  }
}
