/* ============================================================
   HotRod Traders – mobile.css
   Vollständige Mobile-Optimierung
   ============================================================ */

/* ============================================================
   MOBILE HEADER OVERRIDES
   ============================================================ */
@media (max-width: 768px) {

  /* Top Bar – kompakter auf Mobile */
  .topbar { font-size: 11.5px; }

  /* Promo Bar */
  .promo-bar { font-size: 12px; padding: 9px 14px; }

  /* HEADER */
  .header { position: sticky; top: 0; z-index: 900; }
  .header-inner {
    display: grid;
    grid-template-columns: 44px 1fr auto auto auto;
    align-items: center;
    gap: 8px;
    height: 58px;
    padding: 0 14px;
  }

  /* Hamburger button (VISIBLE on mobile) */
  .mob-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    border-radius: var(--radius);
    transition: background var(--trans);
  }
  .mob-burger:hover { background: var(--gray); }
  .mob-burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease, width .3s ease;
  }
  .mob-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mob-burger.open span:nth-child(2) { opacity: 0; width: 0; }
  .mob-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Logo: centered */
  .logo { justify-self: center; }
  .logo-text span { display: none; }

  /* Hide desktop search and action labels in header */
  .search-wrap { display: none; }
  .hdr-btn span:last-child:not(.cart-count) { display: none; }
  .hdr-btn span.icon { font-size: 22px; }
  .hdr-btn { padding: 6px 7px; flex-direction: row; gap: 0; }

  /* Show only Cart + Search + Menu in header on mobile */
  .hdr-btn-beratung, .hdr-btn-konto, .hdr-btn-wunsch { display: none; }

  /* Main Nav – hidden on mobile */
  .main-nav { display: none; }

  /* ============================================================
     MOBILE SEARCH BAR (below header)
     ============================================================ */
  .mob-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--white);
    border-bottom: 1px solid var(--gray2);
    position: sticky;
    top: 58px;
    z-index: 895;
  }
  .mob-search-inner {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: visible;
    z-index: 1100;
  }
  .mob-search-inner input {
    flex: 1;
    padding: 10px 16px;
    border: 1.5px solid var(--gray2);
    border-radius: 22px;
    font-size: 14px;
    outline: none;
    background: var(--gray);
    font-family: var(--font);
    min-width: 0;
  }
  .mob-search-bar input,
  .mob-search-inner input:focus { border-color: var(--red); background: var(--white); }
  .mob-search-bar button {
    background: var(--red);
    color: var(--white);
    border: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }
  .mob-search-inner .search-suggestions {
    left: 0;
    right: 0;
    max-height: 320px;
  }

  /* ============================================================
     MOBILE NAV DRAWER
     ============================================================ */
  .mob-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9500;
    display: none;
    backdrop-filter: blur(2px);
  }
  .mob-nav-overlay.open { display: block; }

  .mob-nav-drawer {
    position: fixed;
    top: 0; left: -100%;
    width: 82vw;
    max-width: 340px;
    height: 100%;
    background: var(--white);
    z-index: 9600;
    display: flex;
    flex-direction: column;
    transition: left .32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mob-nav-drawer.open { left: 0; }

  .mob-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: var(--dark);
    flex-shrink: 0;
  }
  .mob-nav-head .logo-text strong { color: var(--white); font-size: 16px; }
  .mob-nav-head .logo-text span { color: rgba(255,255,255,.55); }
  .mob-nav-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.1);
    color: var(--white);
    font-size: 17px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
  }

  /* User Row */
  .mob-nav-user {
    display: flex;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--gray2);
    background: var(--gray);
  }
  .mob-nav-user a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    border: 1.5px solid var(--gray2);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    background: var(--white);
    transition: border-color var(--trans), color var(--trans);
  }
  .mob-nav-user a:hover { border-color: var(--red); color: var(--red); }

  /* Nav links */
  .mob-nav-list { flex: 1; overflow-y: auto; }
  .mob-nav-section { padding: 10px 0; border-bottom: 1px solid var(--gray2); }
  .mob-nav-section:last-child { border: none; }
  .mob-nav-section-title {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    padding: 6px 18px;
  }

  .mob-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark);
    cursor: pointer;
    transition: background var(--trans), color var(--trans);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    text-decoration: none;
  }
  .mob-nav-link:hover { background: var(--gray); color: var(--red); }
  .mob-nav-link .mob-link-left { display: flex; align-items: center; gap: 12px; }
  .mob-nav-link .mob-icon { font-size: 20px; width: 28px; text-align: center; }
  .mob-nav-link .mob-arrow { font-size: 12px; color: var(--muted); transition: transform .2s; }
  .mob-nav-link.expanded .mob-arrow { transform: rotate(90deg); }

  .mob-sub-list {
    display: none;
    background: var(--gray);
    padding: 4px 0 4px 58px;
  }
  .mob-sub-list.open { display: block; }
  .mob-sub-list a {
    display: block;
    padding: 9px 16px;
    font-size: 13.5px;
    color: var(--text);
    transition: color var(--trans);
  }
  .mob-sub-list a:hover { color: var(--red); }

  .mob-nav-aktion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #fff3cd, #fff8e1);
    border-left: 3px solid #f5a623;
    margin: 8px 12px;
    border-radius: var(--radius);
    color: #856404;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
  }

  /* ============================================================
     BOTTOM NAV BAR
     ============================================================ */
  .mob-bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--white);
    border-top: 1px solid var(--gray2);
    z-index: 8500;
    box-shadow: 0 -2px 12px rgba(0,0,0,.1);
  }
  .mob-bottom-nav a,
  .mob-bottom-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    font-size: 10.5px;
    color: var(--muted);
    cursor: pointer;
    transition: color var(--trans);
    text-decoration: none;
    font-family: var(--font);
    position: relative;
    padding: 0;
  }
  .mob-bottom-nav a:hover,
  .mob-bottom-nav button:hover { color: var(--red); }
  .mob-bottom-nav a.active,
  .mob-bottom-nav button.active { color: var(--red); }
  .mob-bottom-nav .bnav-icon { font-size: 22px; }
  .mob-bottom-nav .bnav-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 4px);
    background: var(--red);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
  }

  /* Push content up so bottom nav doesn't cover it */
  body { padding-bottom: 60px; }

  /* ============================================================
     HERO
     ============================================================ */
  .hero { height: 260px; }
  .hero-title { font-size: 22px; }
  .hero-sub { font-size: 13px; margin-bottom: 18px; }
  .hero-content { padding: 0 18px; }
  .hero-ctas { flex-direction: column; gap: 9px; }
  .btn-primary, .btn-outline { padding: 10px 18px; font-size: 13px; justify-content: center; }
  .hero-arrow { width: 36px; height: 36px; font-size: 17px; }
  .hero-prev { left: 10px; }
  .hero-next { right: 10px; }

  /* ============================================================
     TRUST STRIP – horizontal scroll
     ============================================================ */
  .trust-strip { overflow-x: auto; scrollbar-width: none; }
  .trust-strip::-webkit-scrollbar { display: none; }
  .trust-inner {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    padding: 0 14px;
  }
  .trust-item {
    flex: 0 0 auto;
    width: 170px;
    padding: 12px 14px;
    border-right: 1px solid var(--gray2);
    border-bottom: none;
  }
  .trust-icon { font-size: 22px; }
  .trust-text strong { font-size: 12.5px; }
  .trust-text span { font-size: 11px; }

  /* ============================================================
     SECTIONS
     ============================================================ */
  .section { padding: 28px 14px; }
  .section-header { margin-bottom: 18px; }
  .section-title { font-size: 20px; }

  /* ============================================================
     CATEGORY GRID – horizontal scroll
     ============================================================ */
  .cat-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    margin: 0 -14px;
    padding: 0 14px 8px;
  }
  .cat-grid::-webkit-scrollbar { display: none; }
  .cat-card {
    flex: 0 0 auto;
    width: 90px;
    scroll-snap-align: start;
    padding: 14px 8px 10px;
  }
  .cat-icon { font-size: 28px; }
  .cat-name { font-size: 11.5px; }

  /* ============================================================
     PRODUCTS GRID
     ============================================================ */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
  }
  .prod-img-wrap { height: 160px; padding: 14px; }
  .prod-body { padding: 10px; gap: 4px; }
  .prod-brand { font-size: 10px; }
  .prod-name { font-size: 13px; }
  .price-now { font-size: 17px; }
  .prod-footer { padding: 0 10px 10px; }
  .btn-cart { font-size: 12px; padding: 9px 6px; }

  /* Products horizontal scroll for "Neuheiten" section */
  .products-grid.cols-5 {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    margin: 0 -14px;
    padding: 0 14px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .products-grid.cols-5::-webkit-scrollbar { display: none; }
  .products-grid.cols-5 .prod-card {
    flex: 0 0 190px;
    scroll-snap-align: start;
    min-width: 190px;
  }

  /* ============================================================
     BRANDS – horizontal scroll
     ============================================================ */
  .brands-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .brands-row::-webkit-scrollbar { display: none; }
  .brand-logo { padding: 14px 20px; }
  .brand-logo span { font-size: 13px; }

  /* ============================================================
     AKTIONEN GRID
     ============================================================ */
  .aktionen-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .aktion-card { height: 150px; }
  .aktion-name { font-size: 12.5px; }
  .aktion-discount { font-size: 16px; }

  /* ============================================================
     INFO CARDS
     ============================================================ */
  .info-grid { grid-template-columns: 1fr; gap: 12px; }
  .info-card { height: 200px; }
  .info-body h3 { font-size: 17px; }
  .info-body p { font-size: 12.5px; margin-bottom: 10px; }

  /* ============================================================
     BLOG GRID – single column with horizontal scroll option
     ============================================================ */
  .blog-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    margin: 0 -14px;
    padding: 0 14px 8px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .blog-grid::-webkit-scrollbar { display: none; }
  .blog-card {
    flex: 0 0 72vw;
    max-width: 300px;
    scroll-snap-align: start;
  }
  .blog-img { height: 140px; }

  /* ============================================================
     LOCATIONS
     ============================================================ */
  .locations-bg { padding: 20px 14px; }
  .locations-row { gap: 8px; }
  .loc-chip { font-size: 12px; padding: 7px 12px; }

  /* ============================================================
     NEWSLETTER
     ============================================================ */
  .newsletter-bg { padding: 36px 16px; }
  .newsletter-inner h2 { font-size: 22px; }
  .newsletter-inner p { font-size: 14px; margin-bottom: 20px; }
  .newsletter-form { flex-direction: column; gap: 10px; }
  .newsletter-form input,
  .newsletter-form button { border-radius: 24px !important; width: 100%; padding: 13px 18px; }

  /* ============================================================
     FOOTER
     ============================================================ */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 30px 16px 20px;
  }
  .footer-brand { margin-bottom: 0; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 0; }

  /* Collapsible footer columns on mobile */
  .footer-col { border-bottom: 1px solid rgba(255,255,255,.1); }
  .footer-col h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 16px 0;
    margin: 0;
    border: none;
    user-select: none;
  }
  .footer-col h4::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    color: rgba(255,255,255,.5);
    transition: transform .25s;
    flex-shrink: 0;
  }
  .footer-col.expanded h4::after { content: '−'; }
  .footer-col ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    padding: 0;
  }
  .footer-col.expanded ul { max-height: 400px; padding-bottom: 14px; }
  .footer-col ul li { margin-bottom: 10px; }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 16px;
  }
  .footer-bottom-links { flex-wrap: wrap; justify-content: center; gap: 12px; }

  .footer-legal { padding: 22px 16px; }
  .footer-legal-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-legal-actions { min-width: 0; }
  .product-modal-layout { grid-template-columns: 1fr; }
  .product-modal-img-wrap { min-height: 200px; }

  /* ============================================================
     COOKIE BANNER – mobile stacked
     ============================================================ */
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
    gap: 14px;
  }
  .cookie-banner .cookie-icon { display: none; }
  .cookie-btns { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .btn-cookie-accept { grid-column: 1 / -1; }

  /* ============================================================
     CONTACT MODAL – full screen on mobile
     ============================================================ */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 92vh;
  }
  .modal-body { padding: 18px; }
  .form-row { grid-template-columns: 1fr; gap: 10px; }
  .form-group { margin-bottom: 10px; }

  /* ============================================================
     CART DRAWER – full screen on mobile
     ============================================================ */
  .cart-drawer {
    width: 100%;
    right: -100%;
    border-radius: 0;
  }

  /* ============================================================
     FLOATING BUTTONS REPOSITIONED
     ============================================================ */
  .float-contact {
    bottom: 74px;
    right: 16px;
    width: 50px; height: 50px;
    font-size: 20px;
  }
  .scroll-top {
    bottom: 130px;
    right: 16px;
    width: 38px; height: 38px;
    font-size: 16px;
  }

  /* Toast on mobile */
  .toast {
    top: auto;
    bottom: 74px;
    right: 10px;
    left: 10px;
    font-size: 13px;
  }

  /* ============================================================
     ABOUT SECTION CHIPS
     ============================================================ */
  .section > div > div[style*="flex-wrap"] {
    gap: 8px;
  }

  /* Promo bar scrollable */
  .promo-bar { overflow-x: auto; white-space: nowrap; text-align: left; }
}

/* ============================================================
   SMALL PHONES (< 400px)
   ============================================================ */
@media (max-width: 400px) {
  .hero { height: 230px; }
  .hero-title { font-size: 19px; }
  .hero-sub { display: none; }
  .aktionen-grid { grid-template-columns: 1fr; }
  .aktion-card { height: 130px; }
  .cat-card { width: 78px; }
  .products-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 9px; }
  .prod-img-wrap { height: 140px; }
}

/* ============================================================
   TABLET (769px – 1024px)
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-inner { gap: 14px; padding: 0 18px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid.cols-5 { grid-template-columns: repeat(3, 1fr); }
  .aktionen-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .info-card:last-child { grid-column: 1 / -1; }
  .footer-top { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
  .footer-top > .footer-brand { grid-column: 1 / -1; }
  .main-nav .nav-link { padding: 13px 11px; font-size: 12.5px; }
  .section { padding: 36px 18px; }
}

/* ============================================================
   DESKTOP (1025px+) – keep mob elements hidden
   ============================================================ */
@media (min-width: 769px) {
  .mob-burger { display: none !important; }
  .mob-search-bar { display: none !important; }
  .mob-nav-overlay { display: none !important; }
  .mob-nav-drawer { display: none !important; }
  .mob-bottom-nav { display: none !important; }
  body { padding-bottom: 0 !important; }
  .hdr-btn-beratung,
  .hdr-btn-konto,
  .hdr-btn-wunsch { display: flex !important; }
}

/* ============================================================
   SHARED – scroll snap utilities
   ============================================================ */
.scroll-snap-x {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-snap-x::-webkit-scrollbar { display: none; }

/* Swipe hint gradient overlay */
.scroll-hint-right::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8));
  pointer-events: none;
}

/* Section scroll indicator dots */
.scroll-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
}
.scroll-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray2);
}
.scroll-dot.active { background: var(--red); width: 18px; border-radius: 3px; }

/* ============================================================
   SAFE AREA SUPPORT (iPhone notch)
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  @media (max-width: 768px) {
    .mob-bottom-nav {
      height: calc(60px + env(safe-area-inset-bottom));
      padding-bottom: env(safe-area-inset-bottom);
    }
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
    .float-contact { bottom: calc(74px + env(safe-area-inset-bottom)); }
    .scroll-top { bottom: calc(130px + env(safe-area-inset-bottom)); }
  }
}
