/* =========================================================
   FUTURISTIC THEME ROOT VARIABLES
========================================================= */
:root {
    --bg: #f5f7fb;
    --bg-alt: #ffffff;
    --primary: #1554c0;
    --primary-soft: #e4edff;
    --primary-dark: #0c3c8b;
    --accent: #1ba1f1;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #d4dbe9;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-soft: 0 22px 40px rgba(15, 23, 42, 0.10);
    --shadow-light: 0 10px 25px rgba(15, 23, 42, 0.06);
    --glass: rgba(255,255,255,0.75);
}


/* =========================================================
   BASE RESET
========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #e1ecff, var(--bg) 40%);
    min-height: 100%;
    color: var(--text-main);
}

/* =========================================================
   PAGE WRAPPER
========================================================= */
.page {
    max-width: 1250px;
    margin: 20px auto 60px;
    padding: 0 18px;
}

/* =========================================================
   TOPBAR
========================================================= */
.topbar {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;

    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-radius: 999px;
    padding: 12px 22px;
    box-shadow: var(--shadow-soft);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.topbar-action-block {
    display: flex;
    align-items: center;
}

.topbar-action-row {
    --topbar-action-size: 44px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.topbar-language-switcher {
    min-height: var(--topbar-action-size);
}

/* ================================
   TOP NAVIGATION IN HEADER
================================ */
.topbar-left {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 34px);
    flex: 1 1 auto;
    min-width: 0;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.4vw, 24px);
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    row-gap: 6px;
}

.top-nav-link {
    font-size: 15px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 10px;
    transition: 0.15s ease;
}

.top-nav-link:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.logo-area {
    display: flex;
    flex-direction: column;   /* 👈 stack vertically */
    align-items: flex-start;  /* left align */
    gap: 4px;                 /* tighter spacing */
    flex: 0 0 auto;
}

.logo-mark {
    height: 30px;
    width: auto;
    display: flex;
    align-items: center;
}


.logo-mark img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.logo-sub {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0x;
    margin-left: 2px;
}

.cart-button {
    display: flex;
    align-items: center;
    gap: 8px;

    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    cursor: pointer;
    font-size: 13px;

    box-shadow: var(--shadow-light);
    transition: 0.15s ease;
}
.cart-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.cart-button-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--primary-soft);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    color: var(--primary-dark);
}

.cart-count {
    background: var(--primary);
    color: white;
    padding: 2px 7px;
    font-size: 11px;
    border-radius: 999px;
}

.pm-description {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
  white-space: pre-line;

  /* 🔥 scroll behaviour */
  max-height: 250px;        /* desktop default */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 6px;
}

@media (max-width: 768px) {
  .pm-description {
    max-height: 90px;       /* compact on mobile */
    font-size: 14px;
  }
}

/* Optional: nicer scroll on webkit */
.pm-description::-webkit-scrollbar {
  width: 4px;
}
.pm-description::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

/* =========================
   MOBILE TOP NAV
========================= */

.desktop-only {
  display: flex;
}

.hamburger-btn {
  display: none;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-light);
}

/* Mobile breakpoint */
@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    border-radius: 28px;
  }

  .topbar-right {
    padding-top: 2px;
  }
}

@media (max-width: 900px) {
  .desktop-only {
    display: none;
  }

  .hamburger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .topbar-right {
    display: none !important;
  }

  /* Zorg dat header links netjes blijven */
  .topbar-left {
    flex: 1;
    justify-content: space-between;
  }
}

/* Overlay */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: stretch;
  justify-content: flex-start;
  z-index: 150;
}

.mobile-menu-overlay.open {
  display: flex;
}

/* Drawer */
.mobile-menu {
  width: min(86vw, 340px);
  height: 100dvh;
  background: var(--glass);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  padding: 18px 16px;
  box-shadow: 20px 0 40px rgba(0,0,0,0.25);
  animation: slideIn 0.25s ease;
  overflow: hidden;
}

@keyframes slideIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 16px;
  font-weight: 700;
}

.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.mobile-menu a:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.mobile-menu {
  display: flex;
  flex-direction: column;
  max-height: 100dvh;
}

#mobileMenuContent {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}

.mobile-menu-footer {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-user-bubble {
  display: flex;
}

/* Cart button */
.mobile-cart-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
}

/* User section */
.mobile-user-name {
  font-size: 14px;
  font-weight: 600;
}

.mobile-logout,
.mobile-login-btn {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
}

body.menu-open {
  overflow: hidden;
}

/* =========================================================
   MOBILE RESPONSIVE LAYOUT
========================================================= */
@media (max-width: 900px) {
  .page {
    margin-top: 14px;
    padding-inline: 14px;
  }

  .topbar,
  .site-header .concept-navbar {
    width: calc(100% - 24px);
    margin-inline: auto;
  }

  .topbar {
    top: 8px;
    padding: 10px 12px;
    border-radius: 22px;
  }

  .logo-area {
    flex-direction: row;
    align-items: center;
    min-width: 0;
  }

  .logo-mark {
    max-width: min(58vw, 190px);
    height: 34px;
  }

  .logo-mark img {
    max-width: 100%;
  }

  .logo-text {
    min-width: 0;
  }

  .logo-title,
  .logo-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hamburger-btn {
    flex: 0 0 auto;
    min-width: 44px;
    min-height: 44px;
    color: var(--brand-header-fg, var(--text-main));
  }

  .mobile-menu {
    width: min(92vw, 390px);
    background: var(--bg-alt);
    color: var(--text-main);
  }

  .mobile-menu-header {
    gap: 12px;
    align-items: flex-start;
  }

  .mobile-menu-header button {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--text-main);
    cursor: pointer;
  }

  .mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }

  .mobile-menu-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
  }

  .mobile-menu-brand strong,
  .mobile-menu-brand span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-menu-brand strong {
    font-size: 15px;
  }

  .mobile-menu-brand span {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  #mobileMenuContent .top-nav-switch,
  #mobileMenuContent .top-nav-dropdown {
    display: block;
  }

  #mobileMenuContent .top-nav-switch {
    margin: 8px 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 16px;
  }

  #mobileMenuContent .top-nav-dropdown > .top-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
  }

  #mobileMenuContent .dropdown-menu {
    position: static;
    display: none;
    margin: 2px 0 10px 12px;
    padding: 6px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: none;
  }

  #mobileMenuContent .top-nav-dropdown.is-open .dropdown-menu {
    display: block;
  }

  .mobile-menu-footer .top-nav-link {
    text-align: center;
  }
}

@media (max-width: 520px) {
  body.brand-food .concept-topbar {
    display: none;
  }

  body.brand-food .site-header .concept-navbar {
    min-height: 64px;
    padding: 10px 12px;
  }

  body.brand-food .site-header .logo-mark {
    padding: 6px 10px;
    border-radius: 14px;
  }

  body.brand-food .site-header .logo-mark img {
    width: min(46vw, 148px) !important;
  }
}

/* LANGUAGE SWITCHER */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
}

.language-link {
    color: inherit;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    padding: 7px 9px;
    border-radius: 999px;
    opacity: 0.75;
    transition: 0.15s ease;
}

.language-link:hover,
.language-link.active {
    opacity: 1;
    background: var(--bg-alt);
    color: var(--primary-dark);
    box-shadow: var(--shadow-light);
}

@media (max-width: 768px) {
    .language-switcher {
        position: absolute;
        right: 64px;
        top: 50%;
        transform: translateY(-50%);
    }

    .language-link {
        font-size: 11px;
        padding: 6px 7px;
    }
}

/* Mobile language controls live inside the slide-out menu so they remain easy to reach. */
.mobile-language-switcher {
    display: none;
}

@media (max-width: 768px) {
    .mobile-language-switcher {
        display: grid;
        gap: 8px;
        width: 100%;
        margin-bottom: 14px;
        padding: 12px;
        border: 1px solid var(--border, rgba(148, 163, 184, 0.35));
        border-radius: 18px;
        background: var(--bg-alt, rgba(255, 255, 255, 0.72));
    }

    .mobile-language-label {
        color: var(--text-muted, #64748b);
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    .mobile-language-options {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .mobile-language-options .language-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        border: 1px solid var(--border, rgba(148, 163, 184, 0.35));
        background: #fff;
        color: var(--text-main, #0f172a);
        opacity: 1;
        text-align: center;
    }

    .mobile-language-options .language-link.active {
        border-color: var(--primary, #2563eb);
        background: var(--primary, #2563eb);
        color: #fff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
    }
}

/* Keep authenticated navigation readable by grouping secondary actions and pinning basket right. */
.top-nav {
    overflow: visible;
}
.top-nav-dropdown.more-nav-dropdown .dropdown-menu a {
    white-space: nowrap;
}
.cart-button.cart-button-icon-only {
    position: relative;
    justify-content: center;
    width: var(--topbar-action-size, 44px);
    height: var(--topbar-action-size, 44px);
    flex: 0 0 var(--topbar-action-size, 44px);
    padding: 0;
    border-radius: 14px;
    font-size: 18px;
    margin-left: auto;
}

.topbar-action-row .user-bubble {
    justify-content: center;
    width: var(--topbar-action-size, 44px);
    height: var(--topbar-action-size, 44px);
    flex: 0 0 var(--topbar-action-size, 44px);
    padding: 0;
    border-radius: 14px;
}

.topbar-action-row .user-icon {
    width: 28px;
    height: 28px;
}

.topbar-action-row .user-info {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.topbar-action-row .language-switcher {
    justify-content: center;
    min-height: var(--topbar-action-size, 44px);
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255,255,255,0.72);
    box-shadow: none;
    overflow: hidden;
}

.topbar-action-row .language-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--topbar-action-size, 44px);
    height: var(--topbar-action-size, 44px);
    flex: 0 0 var(--topbar-action-size, 44px);
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-alt);
    line-height: 1;
    overflow: visible;
}

.cart-button.cart-button-icon-only .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    box-shadow: var(--shadow-light);
}
@media (min-width: 901px) {
    .topbar-right {
        margin-left: auto;
    }
    .top-nav {
        flex-wrap: nowrap;
    }
}
