/*
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; }

/* Front-page utilities (moved from inline) */
.hover-lift { transition: transform 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); }

.feature-icon { width: 60px; height: 60px; }

.hero-img { cursor: pointer; }

.py-lg-6 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}
@media (min-width: 992px) {
  .py-lg-6 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
  }
}

/* Filter badges */
.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #e9ecef;
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .85rem;
  margin: .15rem;
}
.filter-badge .remove-filter {
  color: #6c757d;
  text-decoration: none;
  font-weight: 700;
  line-height: 1;
}
.filter-badge .remove-filter:hover { color: #dc3545; }

/* Modal backdrop blur */
.modal-backdrop {
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.2);
}

/* Mobile filter buttons */
.mobilebredde { width: 45%; }

/* ── Header search / autocomplete ── */
.retro-header-search { width: 320px; max-width: 38vw; }

.retro-search-wrap { position: relative; }

/* dropdown panel */
.retro-search-dropdown {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: .375rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 1100;
  overflow: hidden;
}
.retro-search-dropdown.open { display: block; }

.retro-search-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  text-decoration: none;
  color: var(--retro-text);
  border-bottom: 1px solid #f1f3f5;
  transition: background .1s;
}
.retro-search-item:last-child { border-bottom: 0; }
.retro-search-item:hover,
.retro-search-item.active { background: #f0f4ff; color: var(--retro-text); text-decoration: none; }

.retro-search-badge {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #0D6EFD;
  background: #e7f0ff;
  border-radius: 999px;
  padding: .15rem .5rem;
  white-space: nowrap;
}
.retro-search-title { font-size: .9rem; line-height: 1.3; }

.retro-search-empty {
  padding: .75rem .85rem;
  font-size: .875rem;
  color: #6c757d;
}

/* loading dots */
.retro-search-loading {
  display: flex;
  justify-content: center;
  gap: .3rem;
  padding: .75rem;
}
.retro-search-loading span {
  width: 7px; height: 7px;
  background: #0D6EFD;
  border-radius: 50%;
  animation: retro-bounce .6s infinite alternate;
}
.retro-search-loading span:nth-child(2) { animation-delay: .15s; }
.retro-search-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes retro-bounce { from { opacity: .3; transform: translateY(0); } to { opacity: 1; transform: translateY(-4px); } }

/* Mobile search bar */
.retro-mobile-search { background: #f8f9fa; border-bottom: 1px solid #e9ecef; }

/* ── Mobile layout tweaks ── */
/* Less vertical padding on mobile for .container.py-5 */
@media (max-width: 991.98px) {
  .container.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
}

/* Smaller section title + excerpt on mobile */
@media (max-width: 991.98px) {
  .retro-section-title { font-size: 1.1rem; }
  header.mb-4 .text-muted { font-size: .85rem; }
}
