/* ==========================================================================
   Bäckerei & Konditorei Vogel – Modern Responsive Stylesheet
   ========================================================================== */

:root {
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --color-bg: #fbf9f6;
  --color-surface: #ffffff;
  --color-surface-soft: #f5f0ea;
  --color-surface-hover: #f0e9df;
  --color-primary: #9b5a23;
  --color-primary-hover: #7e4414;
  --color-primary-light: #fbeee3;
  --color-accent: #c47632;
  --color-text: #26211e;
  --color-text-muted: #6e645c;
  --color-border: #e6ded3;
  --color-border-subtle: #f0eae1;
  --color-notice-bg: #fff8eb;
  --color-notice-border: #f3d7a8;
  --color-notice-text: #7c4400;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(38, 33, 30, 0.05);
  --shadow-md: 0 4px 12px rgba(38, 33, 30, 0.07);
  --shadow-lg: 0 10px 30px rgba(38, 33, 30, 0.09);
  --max-w: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.25;
}

p, li {
  text-wrap: pretty;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 3vw, 2rem);
  padding-right: clamp(1rem, 3vw, 2rem);
}

/* --------------------------------------------------------------------------
   Top Bar & Pächter Notice Banner
   -------------------------------------------------------------------------- */
.top-notice-banner {
  background: linear-gradient(90deg, #fff3dc 0%, #fff7eb 100%);
  border-bottom: 1px solid var(--color-notice-border);
  padding: 0.85rem 0;
  font-size: 0.95rem;
  color: var(--color-notice-text);
}

.notice-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #f7dfbe;
  color: #6b3900;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.notice-text {
  flex: 1 1 300px;
}

.notice-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: #6b3900;
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(107, 57, 0, 0.2);
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.notice-link-btn:hover {
  background-color: #502b00;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.94);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1.5rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  aspect-ratio: 1 / 1;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1.15;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.btn-header-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-surface-soft);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.btn-header-contact:hover {
  background-color: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-primary);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.35rem;
  border-radius: var(--radius-full);
  box-shadow: 0 3px 8px rgba(155, 90, 35, 0.25);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(155, 90, 35, 0.35);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #32231b 0%, #1a120e 100%);
  color: #ffffff;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: saturate(0.85);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffd8b3;
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: #e5ded7;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.highlight-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  color: #f7eee7;
  font-weight: 500;
}

.highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--color-primary);
  border-radius: 50%;
  color: #fff;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Search & Filter Section
   -------------------------------------------------------------------------- */
.catalog-section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.catalog-header {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.catalog-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-title {
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
}

.catalog-subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.print-btn:hover {
  background-color: var(--color-surface-soft);
  color: var(--color-text);
  border-color: var(--color-primary);
}

/* Search bar */
.search-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  font-family: inherit;
  font-size: 1.1rem;
  padding: 1.1rem 3rem 1.1rem 3.4rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-surface);
  color: var(--color-text);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(155, 90, 35, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

/* Category Filter Tabs */
.category-filter-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.cat-tab:hover {
  background-color: var(--color-surface-soft);
  color: var(--color-text);
}

.cat-tab.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(155, 90, 35, 0.3);
}

.cat-count {
  font-size: 0.75rem;
  opacity: 0.85;
  background-color: rgba(0, 0, 0, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.cat-tab.active .cat-count {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Stats / Status row */
.filter-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Torten Special Showcase
   -------------------------------------------------------------------------- */
.torten-showcase {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.torten-intro {
  margin-bottom: 1.75rem;
}

.torten-size-selector {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 2rem;
  background-color: var(--color-surface-soft);
  padding: 1.25rem;
  border-radius: var(--radius-md);
}

.torten-size-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.size-pill-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.size-pill {
  flex: 1 1 120px;
  background-color: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.size-pill:hover {
  border-color: var(--color-accent);
}

.size-pill.active {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
  box-shadow: 0 0 0 2px rgba(155, 90, 35, 0.2);
}

.size-pill-diameter {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-text);
  display: block;
}

.size-pill-persons {
  font-size: 0.8rem;
  color: var(--color-primary);
  font-weight: 600;
}

.torten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.torte-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.torte-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.torte-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.torte-card-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.torte-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--color-border);
}

.torte-price-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-primary);
}

.torte-price-unit {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Extra items for cakes (Decor, Baumstämme) */
.torten-extras-box {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.torten-extras-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.extra-item {
  background-color: var(--color-surface-soft);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Product List & Sections
   -------------------------------------------------------------------------- */
.catalog-content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.subcategory-group {
  margin-bottom: 1.5rem;
}

.subcategory-title {
  font-size: 1.4rem;
  font-weight: 800;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.subcategory-count {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
}

.product-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--color-accent);
}

.product-info-top {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.product-pricing-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-border-subtle);
}

.product-weight {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  background-color: var(--color-surface-soft);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
  white-space: nowrap;
}

.product-price .chf {
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.15rem;
}

/* Empty state */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  background-color: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results-text {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.no-results-sub {
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Ordering & Contact Section
   -------------------------------------------------------------------------- */
.order-section {
  background-color: var(--color-surface-soft);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.order-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.order-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.order-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  font-size: 1.5rem;
}

.order-card-title {
  font-size: 1.35rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.05rem;
}

.contact-icon {
  width: 24px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.condition-box {
  background-color: #faf5ed;
  border: 1px solid #ebd9c0;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: #63431f;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #241e1b;
  color: #c9bfb6;
  padding: 3.5rem 0 2rem;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-col-title {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid #3c342f;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #8f847b;
}

/* --------------------------------------------------------------------------
   Print Stylesheet
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .top-notice-banner,
  .hero,
  .catalog-header .search-wrapper,
  .category-filter-nav,
  .print-btn,
  .site-footer,
  .btn-primary,
  .btn-header-contact {
    display: none !important;
  }

  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  .catalog-section {
    padding: 0 !important;
  }

  .products-grid, .torten-grid {
    display: block !important;
  }

  .product-card, .torte-card {
    border: none !important;
    border-bottom: 1px solid #ccc !important;
    padding: 6px 0 !important;
    break-inside: avoid;
    box-shadow: none !important;
    transform: none !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
  }

  .subcategory-title {
    margin-top: 20px !important;
    border-bottom: 2px solid #000 !important;
  }
}

/* --------------------------------------------------------------------------
   Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .notice-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }
}
