/*
Theme Name: RetroWP
Theme URI: https://example.com/retrowp
Author: Lasse Nielsen
Author URI: https://example.com
Description: Letvægts, SEO-venligt WordPress-tema om retro fodboldtrøjer, bygget med Bootstrap 5.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.2
Text Domain: retrowp
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: bootstrap, responsive, retro, blog, minimal
*/

:root {
  --retro-primary: #0b3d2e;
  --retro-accent: #e8c547;
  --retro-bg: #f8f9fa;
  --retro-text: #212529;
}

html { scroll-behavior: smooth; }
body { background: var(--retro-bg); color: var(--retro-text); }

a { color: var(--retro-primary); }
a:hover { color: #06281e; }

.navbar-retro { background: #ffffff; border-bottom: 1px solid #e9ecef; }
.retro-brand { color: var(--retro-primary); font-weight: 700; letter-spacing: .5px; }

/* Desktop nav spacing and wrap to avoid overlap */
.navbar-nav > li { position: relative; }
.navbar-nav > li > a { padding: .5rem 1rem; text-decoration: underline; }
.navbar-nav > li > a:hover { color: #0D6EFD; }
.navbar-nav { gap: .25rem; }
@media (min-width: 992px) {
  .navbar-retro .navbar-nav { display: flex; align-items: center; flex-wrap: wrap; }
}

/* Mobile menu button with small label */
.mobile-menu-btn small { font-size: 10px; color: #495057; }

/* Offcanvas width 50% & dim rest (Bootstrap håndterer backdrop) */
.mobile-offcanvas { width: 50vw !important; max-width: 420px; }
@media (max-width: 480px) { .mobile-offcanvas { width: 80vw !important; } }

/* Offcanvas visual styling */
.mobile-offcanvas { box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15); border-right: 1px solid #e9ecef; }

/* Show/Hide 'Luk' link only when offcanvas is open */
/* Fjernet ekstern 'Luk'-link; knap findes i offcanvas-body */

/* WP admin bar offset: flyt sticky header/offcanvas ned under admin-bjælken */
.admin-bar .navbar-retro.sticky-top { top: 32px; }
@media (max-width: 782px) { .admin-bar .navbar-retro.sticky-top { top: 46px; } }

.admin-bar .offcanvas { top: 32px; height: calc(100% - 32px); }
@media (max-width: 782px) { .admin-bar .offcanvas { top: 46px; height: calc(100% - 46px); } }

.retro-card img { aspect-ratio: 4 / 3; object-fit: cover; }
.retro-card .price { color: #6c757d; font-weight: 600; }

.retro-hero { background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%); }
.retro-section-title { font-weight: 700; letter-spacing: .3px; }

/* Minimal utility for CLS safety */
.ratio-4x3 { position: relative; width: 100%; padding-top: 75%; }
.ratio-4x3 > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }


/* Contrast button using accent color */
.btn-contrast { background-color: var(--retro-accent); color: #212529; border-color: var(--retro-accent); }
.btn-contrast:hover { background-color: #d6b23f; border-color: #d6b23f; color: #212529; }

/* ── Mega Menu (Desktop) ── */
.navbar-retro .container,
.navbar-retro nav { position: static !important; }
.navbar-nav { position: static !important; }
.mega-menu-item { position: static !important; }
.mega-menu-panel {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #fff;
  border-top: 3px solid #0D6EFD;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  padding: 1.5rem 0;
  z-index: 1050;
}
.mega-menu-item.mega-open > .mega-menu-panel { display: block; }
.mega-menu-panel { overflow: visible; }
.mega-menu-panel::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -50vw; right: -50vw;
  height: 100vh;
  background: rgba(0,0,0,.4);
  pointer-events: none;
}

.mega-menu-col { min-width: 160px; }
.mega-menu-col-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #0D6EFD;
  margin-bottom: .5rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid #0D6EFD;
}
.mega-menu-col-title a { color: inherit; text-decoration: underline; }
.mega-menu-col-title a:hover { color: #0a58ca; }

.mega-menu-col:only-of-type .mega-menu-links { columns: 2; column-gap: 1.5rem; }
.mega-menu-links li { margin-bottom: .35rem; break-inside: avoid; }
.mega-menu-links a {
  color: var(--retro-text);
  text-decoration: none;
  font-size: 1rem;
  transition: color .15s;
}
.mega-menu-links a:hover { color: var(--retro-primary); }

.mega-menu-footer {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #e9ecef;
  text-align: center;
}
.mega-menu-footer a {
  font-weight: 600;
  color: #0D6EFD;
  text-decoration: underline;
  font-size: 1rem;
}
.mega-menu-footer a:hover { color: #0a58ca; }

/* Mega nav-link indicator */
.mega-menu-item > .nav-link::after {
  content: '';
  display: inline-block;
  width: .4em; height: .4em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: .4em;
  vertical-align: .1em;
  transition: transform .2s;
}
.mega-menu-item.mega-open > .nav-link::after { transform: rotate(-135deg); }

/* ── Mega Menu (Mobile) ── */
.mobile-mega-toggle-wrap { border-bottom: 1px solid #e9ecef; }
.mobile-mega-chevron {
  border: none;
  background: none;
  padding: .5rem;
  color: var(--retro-text);
  transition: transform .2s;
}
.mobile-mega-chevron:not(.collapsed) svg { transform: rotate(180deg); }

.mobile-mega-collapse { padding: 0 .75rem .75rem; }
.mobile-mega-col-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #0D6EFD;
  margin: .75rem 0 .35rem;
  padding-bottom: .25rem;
  border-bottom: 2px solid #0D6EFD;
}
.mobile-mega-col-title a { color: inherit; text-decoration: none; }
.mobile-mega-links li { margin-bottom: .2rem; }
.mobile-mega-links a {
  color: var(--retro-text);
  text-decoration: none;
  font-size: 1rem;
}
.mobile-mega-links a:hover { color: #0a58ca; }
.mobile-mega-footer { margin-top: .5rem; padding-top: .5rem; border-top: 1px solid #e9ecef; }
.mobile-mega-footer a { font-weight: 600; color: #0D6EFD; text-decoration: underline; font-size: 1rem; }

/* Breadcrumbs */
/* Retro subtitle (SEO anchor text) */
.retro-subtitle { display: block; font-size: .65em; color: #8c939a; font-weight: 300; letter-spacing: .3px; }
h1 .retro-subtitle { font-size: .4em; }

/* Breadcrumbs */
.retro-breadcrumbs { background: #fff; border-bottom: 1px solid #e9ecef; padding: .5rem 0; font-size: .85rem; }
.retro-breadcrumbs .breadcrumb { background: none; padding: 0; margin: 0; }
.retro-breadcrumbs .breadcrumb-item a { color: var(--retro-primary); text-decoration: none; }
.retro-breadcrumbs .breadcrumb-item a:hover { text-decoration: underline; }
.retro-breadcrumbs .breadcrumb-item.active { color: #6c757d; }
