/* SicilyDeals: gemeinsame Komponenten und Smartphone-Optimierung (wird nach den Seiten-Styles geladen) */

:root { --font-head: 'Playfair Display', Georgia, serif; --font-body: 'Inter', system-ui, sans-serif; --font-hero: 'EB Garamond', Georgia, 'Times New Roman', serif; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; }

/* ── HAENDLER-HINWEIS UND ANFRAGE-BUTTON AUF PRODUKTKARTEN ── */
.product-vendor { font-size: 12px; color: var(--muted); margin: -4px 0 8px; }
.btn-ask {
  width: 100%; margin-top: 7px; background: transparent; color: var(--navy);
  border: 1.5px solid var(--border); padding: 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer; transition: border-color .15s, background .15s;
}
.btn-ask:hover { border-color: var(--navy); background: var(--light); }

/* ── ANFRAGE-FENSTER ── */
.inq-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(32,28,25,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.inq-modal {
  position: relative; background: var(--white); border-radius: 14px; width: 100%; max-width: 460px;
  max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; display: grid; gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.inq-modal h3 { font-family: var(--font-head); font-size: 22px; padding-right: 30px; }
.inq-sub { font-size: 13.5px; color: var(--muted); }
.inq-modal label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 700; }
.inq-modal input, .inq-modal textarea {
  font: inherit; font-size: 16px; font-weight: 400; padding: 11px 12px; border: 1.5px solid var(--border);
  border-radius: 8px; outline: none; width: 100%; background: var(--white); color: var(--text);
}
.inq-modal input:focus, .inq-modal textarea:focus { border-color: var(--navy); }
.inq-x { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; width: 40px; height: 40px; }
.inq-send { background: var(--navy); color: #fff; border: none; border-radius: 9px; padding: 14px; font-size: 16px; font-weight: 800; cursor: pointer; min-height: 48px; }
.inq-send:disabled { opacity: .6; }
.inq-err { color: var(--red); font-size: 13px; font-weight: 600; }
.inq-hp { position: absolute; left: -9999px; }

/* ── PRODUZENTEN AUF DER HAUPTSEITE ── */
.producer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.producer-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 18px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.producer-top { display: flex; align-items: center; gap: 12px; }
.producer-logo {
  width: 48px; height: 48px; border-radius: 50%; background: var(--light) center/cover; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head);
  font-weight: 800; font-size: 18px; color: var(--navy); border: 1.5px solid var(--border);
}
.producer-name { font-weight: 700; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.producer-meta { font-size: 12px; color: var(--muted); }
.producer-desc { font-size: 13px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.producer-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.producer-actions a, .producer-actions button { font-size: 12px; font-weight: 700; color: var(--navy); background: none; border: none; padding: 4px 0; cursor: pointer; }
.producer-cta {
  border: 1.5px dashed var(--navy); background: var(--light); justify-content: center; text-align: center; align-items: center;
}
.producer-cta b { font-family: var(--font-head); font-size: 18px; color: var(--navy); }
.producer-cta a { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 800; }

/* ── TRUST-BADGES UNTER DEM HERO: erkennbare Marken + Policy-Badges ── */
.trust-row { background: var(--white); border-bottom: 1px solid var(--border); padding: 14px 40px; }
.trust-row-inner { max-width: 1280px; margin: 0 auto; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tb {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 16px 0 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--white);
  font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap;
}
.tb img { height: 22px; width: auto; border-radius: 4px; border: 1px solid var(--border); background: #fff; }
.tb img + img { margin-left: -4px; }
.tb-dhl { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 7px; border-radius: 4px; background: #FFCC00; color: #D40511; font-family: Arial, Helvetica, sans-serif; font-weight: 900; font-style: italic; font-size: 12px; letter-spacing: -0.5px; }
.tb-policy { background: var(--light); border-color: var(--light); }
.tb-policy i { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--gold); align-items: center; justify-content: center; }

/* Policy-Zeile unter dem Warenkorb-Button */
.card-policy { margin-top: 7px; font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 0.01em; }

/* Kategorie-Kacheln: ruhiger, mit Zoom */
.section-sub { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 48ch; }
.cat-card { border: none !important; border-radius: 14px !important; box-shadow: 0 1px 2px rgba(32,28,25,.06); }
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30,92,140,.16) !important; }
.cat-icon { transition: transform .5s ease; }
.cat-card:hover .cat-icon { transform: scale(1.06); }
.cat-card-overlay { background: linear-gradient(to top, rgba(22,66,95,.78) 0%, rgba(22,66,95,.05) 55%) !important; }
.cat-name { font-size: 12.5px !important; letter-spacing: 0.02em; bottom: 12px !important; padding: 0 8px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }

/* ── PRODUZENTEN-KOPF ── */
.prod-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 10px; }
.prod-title { font-size: 32px; line-height: 1.15; max-width: 24ch; text-wrap: balance; }
.prod-title em { font-style: italic; color: var(--red); }
.prod-sub { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin-top: 10px; max-width: 54ch; }
.prod-cta { display: inline-block; background: var(--gold); color: #3A2A00; font-weight: 800; font-size: 13.5px; padding: 12px 20px; border-radius: 8px; white-space: nowrap; transition: filter .15s; }
.prod-cta:hover { filter: brightness(1.07); }

/* ── ZAHLUNGSARTEN VOR DEM NEWSLETTER UND IM WARENKORB ── */
.pay-strip { background: var(--white); border-top: 1px solid var(--border); padding: 18px 40px; }
.pay-strip-inner { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px 12px; flex-wrap: wrap; }
.pay-strip-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 8px; }
.pay-badge { height: 36px; width: auto; display: block; border-radius: 6px; border: 1px solid var(--border); background: #fff; }
.pay-mini { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.pay-mini span { flex-basis: 100%; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.pay-mini img { height: 26px; width: auto; border-radius: 4px; border: 1px solid var(--border); background: #fff; }

/* ── LOGO-BAND DER PRODUZENTEN ── */
.logo-marquee {
  overflow: hidden; cursor: grab; user-select: none; padding: 10px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
.logo-marquee.dragging { cursor: grabbing; }
.logo-track { display: flex; align-items: center; gap: 72px; width: max-content; will-change: transform; animation: logo-run 60s linear infinite; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-marquee.manual .logo-track { animation: none; }
@keyframes logo-run { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@media (prefers-reduced-motion: reduce) { .logo-track { animation: none; } }
.logo-slide { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 92px; text-decoration: none; -webkit-user-drag: none; }
.logo-cap { font-size: 11px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.logo-slide img { height: 52px; width: auto; max-width: 220px; object-fit: contain; display: block; filter: grayscale(1); opacity: .7; transition: filter .25s, opacity .25s; -webkit-user-drag: none; pointer-events: none; }
.logo-slide:hover img { filter: none; opacity: 1; }
.logo-word { font-family: var(--font-head); font-size: 28px; font-weight: 700; color: var(--navy); opacity: .75; white-space: nowrap; letter-spacing: -.01em; transition: opacity .25s; }
.logo-slide:hover .logo-word { opacity: 1; }
@media (max-width: 768px) {
  .logo-track { gap: 44px; }
  .logo-slide { height: 64px; }
  .logo-slide img { height: 40px; max-width: 160px; }
  .logo-word { font-size: 22px; }
}

/* ── SPRACHUMSCHALTER ── */
.lang { display: inline-flex; border: 1.5px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--white); flex-shrink: 0; }
.lang button { background: none; border: none; padding: 7px 11px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); cursor: pointer; min-width: 40px; min-height: 34px; font-family: inherit; }
.lang button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.lang-drawer { margin-left: auto; margin-right: 8px; }
@media (max-width: 768px) { .lang-nav { display: none; } }

/* ── MOBILES MENUE ── */
.nav-burger { display: none; }
.m-drawer {
  position: fixed; inset: 0; z-index: 900; background: rgba(32,28,25,.5); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.m-drawer.open { opacity: 1; pointer-events: auto; }
.m-drawer-panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(86vw, 340px); background: var(--white);
  transform: translateX(-100%); transition: transform .25s; overflow-y: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
.m-drawer.open .m-drawer-panel { transform: none; }
.m-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 12px; border-bottom: 1px solid var(--border); }
.m-drawer-head img { height: 40px; width: auto; }
.m-drawer-close { background: none; border: none; font-size: 30px; line-height: 1; width: 44px; height: 44px; color: var(--text); cursor: pointer; }
.m-drawer-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 16px 16px 6px; }
.m-drawer a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; font-size: 16px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--light); }
.m-drawer a.deals { color: var(--red); }
.m-drawer a.m-cta { margin: 16px; border: none; border-radius: 10px; background: var(--gold); color: #3A2A00; justify-content: center; font-weight: 800; }

/* ════════════════════════ TABLET ════════════════════════ */
@media (max-width: 1024px) {
  .producer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .portal-main { padding: 24px 20px; }
}

/* ════════════════════════ SMARTPHONE ════════════════════════ */
@media (max-width: 768px) {
  body { font-size: 16px; }
  input, select, textarea { font-size: 16px; }

  /* Banner: eine Zeile */
  .top-banner { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; padding: 7px 12px; }

  /* Kopfzeile: Menue | Logo | Icons, darunter Suche in voller Breite */
  .nav { padding: 0 12px; position: sticky; top: 0; }
  .nav-inner { height: auto; flex-wrap: wrap; gap: 8px 10px; padding: 8px 0; }
  .nav-burger {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -6px;
    background: none; border: none; color: var(--navy); cursor: pointer; flex-shrink: 0;
  }
  .nav-logo { flex: 1; min-width: 0; padding: 0 !important; }
  .nav-logo img { height: 56px !important; }
  .nav-links { display: none !important; }
  .nav-icons { gap: 4px; margin-left: auto; }
  .nav-icon { min-width: 44px; min-height: 44px; justify-content: center; padding: 2px; }
  .nav-icon span { font-size: 8.5px; }
  .nav-search { order: 10; width: 100% !important; flex: 1 1 100%; height: 42px; }
  .cat-bar { padding: 0 12px; }
  .cat-bar a { padding: 12px 12px; }

  /* Hero */
  .hero { padding: 0 16px; }
  .hero { background-image: linear-gradient(170deg, rgba(22,66,95,0.86) 0%, rgba(30,92,140,0.72) 55%, rgba(22,66,95,0.66) 100%), url('https://images.unsplash.com/photo-1612834857321-08085283147b?auto=format&fit=crop&w=900&h=1200&q=75'); }
  .hero-credit { display: none; }
  .hero-inner { padding: 32px 0 30px; gap: 24px; }
  .hero-inner > * { min-width: 0; }
  .hero h1 { font-size: clamp(32px, 9vw, 40px); }
  .hero-motto { font-size: clamp(28px, 8vw, 38px); margin-bottom: 16px; }
  .hero-desc { font-size: 16px; }
  .hero-btns { flex-direction: column; }
  .hero-btns a { text-align: center; width: 100%; }
  .hero-proof { flex-wrap: wrap; }
  .hero-stats { gap: 18px; flex-wrap: wrap; }

  /* Abschnitte */
  .section, .section-sm { padding: 28px 16px; }
  .container { padding: 0; }
  .section-title { font-size: 24px; }
  .section-header { margin-bottom: 18px; }

  /* Produkte: 2 Spalten, kompakt */
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card { min-width: 0; }
  .product-info { padding: 10px; }
  .product-name { font-size: 13px; }
  .product-price { flex-wrap: wrap; gap: 2px 6px; }
  .price-current { font-size: 18px; }
  .price-old { font-size: 12px; }
  .badge { top: 6px; left: 6px; font-size: 9px; }
  .btn-cart { padding: 11px 6px; font-size: 10.5px; letter-spacing: .03em; min-height: 42px; }
  .btn-ask { font-size: 10.5px; min-height: 38px; }

  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .promo-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .producer-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .producer-card { padding: 14px; }

  /* Kategorie-Seite: Filter als waagerechte Leiste */
  .cat-layout { flex-direction: column; }
  .cat-sidebar { width: 100% !important; }
  .cat-sidebar > div { padding: 14px !important; margin-bottom: 10px !important; }
  .cat-sidebar .filter-row { flex-direction: row !important; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .cat-sidebar .filter-chip { white-space: nowrap; flex-shrink: 0; }
  .cat-main { width: 100%; }
  .cat-toolbar select { max-width: 100%; }
  .page-title-bar { padding: 20px 16px; }
  .page-title-bar h1 { font-size: 26px; }

  /* Warenkorb: untereinander, Tabelle als Karten */
  #cart-layout { grid-template-columns: 1fr !important; gap: 20px !important; }
  .cart-table, .cart-table tbody { display: block; width: 100%; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 72px 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center; }
  .cart-table td { display: block; padding: 0 !important; border: none !important; }
  .cart-table td:first-child { grid-column: 1 / -1; }
  .summary-box { position: static !important; }

  /* Rechtstexte und Tabellen: nie breiter als der Bildschirm */
  h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
  .legal-body h1 { font-size: clamp(24px, 7.5vw, 32px) !important; }
  .legal-body { padding-left: 16px !important; padding-right: 16px !important; }
  .legal-content, .legal-wrap, main { overflow-wrap: anywhere; }
  table.data-table, .legal-content table { display: block; overflow-x: auto; max-width: 100%; }

  /* Trust-Badges, Produzenten-Kopf */
  section[id], .section { scroll-margin-top: 120px; }
  .trust-row { padding: 10px 12px; }
  .trust-row-inner { display: flex; gap: 8px; overflow-x: auto; justify-content: flex-start; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .trust-row-inner::-webkit-scrollbar { display: none; }
  .tb { height: 40px; font-size: 12.5px; flex: 0 0 auto; }
  .prod-title { font-size: 24px; }
  .prod-cta { width: 100%; text-align: center; }
  .card-policy { font-size: 10.5px; }

  /* Newsletter und Footer */
  .newsletter { padding: 36px 16px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input, .newsletter-form button { width: 100%; min-height: 48px; }
  .footer { padding: 32px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 24px 16px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  /* Haendler-Portal: Seitenleiste wird zur waagerechten Tab-Leiste */
  .portal-layout { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .portal-sidebar {
    display: flex !important; position: sticky; top: 0; z-index: 50; padding: 0 !important;
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .portal-sidebar::-webkit-scrollbar { display: none; }
  .portal-sidebar-header, .sidebar-nav-section { display: none !important; }
  .sidebar-nav-item {
    flex-shrink: 0; white-space: nowrap; padding: 14px 14px !important; font-size: 13px !important;
    border-left: none !important; border-bottom: 3px solid transparent; min-height: 48px;
  }
  .sidebar-nav-item.active { border-bottom-color: var(--gold) !important; }
  .portal-main { padding: 16px !important; }
  .portal-welcome { padding: 18px !important; }
  .portal-welcome h2 { font-size: 20px !important; }
  .portal-welcome-btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-card { padding: 14px !important; }
  .stat-val { font-size: 24px !important; }
  .stat-ic { width: 34px !important; height: 34px !important; }
  .portal-card { padding: 16px !important; overflow-x: auto; }
  .portal-card table { min-width: 520px; }
  .ticket-row { flex-wrap: wrap; gap: 6px 10px; }
  .ticket-subject { flex-basis: 100%; order: 3; }
}

@media (max-width: 380px) {
  .product-grid { gap: 8px; }
  .price-current { font-size: 16px; }
  .producer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
