/*
Theme Name: Biesel Theme
Theme URI: https://mobilandi.de
Author: Biesel Mahlzeitendienst
Author URI: https://mobilandi.de
Description: Maßgeschneidertes WooCommerce Theme für den Biesel Mahlzeitendienst – optimiert für wöchentliche Speisepläne.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: biesel-theme
Tags: woocommerce, food, custom-menu
*/

/* ===== Design Tokens ===== */
:root {
  --color-accent: #C1A25F;
  --color-accent-dark: #a88c48;
  --color-accent-light: #d4bc82;
  --color-text: #1e1e1e;
  --color-text-muted: #6b7280;
  --color-bg: #f9fafb;
  --color-card: #ffffff;
  --color-border: #e5e7eb;
  --color-danger: #ef4444;
  --color-success: #22c55e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,.1);
  --spacing-xs: .5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Layout ===== */
.biesel-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* ===== Header ===== */
.biesel-header {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.biesel-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

.biesel-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.02em;
}
.biesel-logo:hover { color: var(--color-text); }

.biesel-nav { display: flex; align-items: center; gap: var(--spacing-md); }
.biesel-nav a { color: var(--color-text-muted); font-weight: 500; font-size: .9rem; }
.biesel-nav a:hover { color: var(--color-accent); }

.biesel-cart-count {
  background: var(--color-accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: -6px;
  margin-top: -8px;
}

/* ===== Footer ===== */
.biesel-footer {
  background: #1e1e1e;
  color: #d1d5db;
  padding: var(--spacing-xl) 0;
  margin-top: var(--spacing-xl);
  font-size: .9rem;
}
.biesel-footer h4 { color: #fff; margin-bottom: var(--spacing-sm); font-size: 1rem; }
.biesel-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
}
.biesel-footer-copy {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  text-align: center;
  color: #6b7280;
  font-size: .8rem;
}

/* ===== Buttons ===== */
.biesel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.4rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.biesel-btn:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.biesel-btn:active { transform: translateY(0); }
.biesel-btn--disabled, .biesel-btn:disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ===== Week Cards (KW-Übersicht) ===== */
.biesel-weeks-header {
  text-align: center;
  padding: var(--spacing-xl) 0 var(--spacing-lg);
}
.biesel-weeks-header h1 { font-size: 1.8rem; margin-bottom: .25rem; }
.biesel-weeks-header p { color: var(--color-text-muted); }

.biesel-weeks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.week-card {
  display: block;
  padding: var(--spacing-lg);
  background: var(--color-card);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.week-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}
.week-card h2 { font-size: 1.3rem; color: var(--color-text); margin-bottom: .25rem; }
.week-card .week-card__dates {
  color: var(--color-accent);
  font-weight: 600;
  font-size: .9rem;
}
.week-card .week-card__count {
  display: inline-block;
  margin-top: var(--spacing-xs);
  font-size: .8rem;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 2px 10px;
  border-radius: 20px;
}

/* ===== Speiseplan (Einzelne KW) ===== */
.biesel-plan-header {
  padding: var(--spacing-lg) 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: var(--spacing-lg);
}
.biesel-plan-header .biesel-back {
  display: inline-block;
  margin-bottom: var(--spacing-xs);
  font-size: .85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.biesel-plan-header .biesel-back:hover { color: var(--color-accent); }
.biesel-plan-header h1 { font-size: 1.6rem; margin-bottom: 2px; }
.biesel-plan-header p { color: var(--color-text-muted); margin: 0; }

.biesel-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

/* ===== Produkt-Card ===== */
.biesel-product {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.biesel-product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.biesel-product.is-expired {
  opacity: .65;
  filter: grayscale(40%);
}
.biesel-product.is-expired:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
}

.biesel-product__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.biesel-product__noimg {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: .85rem;
}

.biesel-product__body {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.biesel-product__day {
  font-size: .75rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .25rem;
}

.biesel-product__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  flex-grow: 1;
}

.biesel-product__price {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.biesel-product__expired {
  text-align: center;
  padding: .5rem;
  background: var(--color-bg);
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: .85rem;
  font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .biesel-weeks-header h1 { font-size: 1.4rem; }
  .biesel-plan-header h1 { font-size: 1.3rem; }
  .biesel-products-grid { grid-template-columns: 1fr; }
  .biesel-weeks-grid { grid-template-columns: 1fr; }
}

/* ===== WooCommerce Overrides ===== */
.woocommerce-message, .woocommerce-info {
  border-top-color: var(--color-accent);
  background: var(--color-card);
  border-radius: var(--radius);
  padding: var(--spacing-sm) var(--spacing-md);
}
.woocommerce-message::before, .woocommerce-info::before {
  color: var(--color-accent);
}

.woocommerce table.shop_table {
  border-collapse: collapse;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  padding: .7rem 1.4rem;
  transition: background .15s ease;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

/* Checkout */
.woocommerce-checkout .col2-set {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}
@media (min-width: 768px) {
  .woocommerce-checkout .col2-set {
    grid-template-columns: 1fr 1fr;
  }
}
.woocommerce-checkout h3 {
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  width: 100%;
  padding: .65rem .8rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: .9rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(193, 162, 95, .15);
}

#order_review_heading { margin-top: var(--spacing-lg); }
