/* ============================================
   LIEFERANDO WPPIZZA THEME
   Web & IT Solution - s-singh.de
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── VARIABLES ── */
:root {
  --primary:       #FF6600;
  --primary-dark:  #E55A00;
  --primary-light: #FFF3EB;
  --bg:            #F4F4F4;
  --white:         #FFFFFF;
  --dark:          #1C1C1C;
  --text:          #333333;
  --muted:         #777777;
  --border:        #E2E2E2;
  --card-shadow:   0 2px 12px rgba(0,0,0,0.08);
  --card-hover:    0 6px 24px rgba(0,0,0,0.14);
  --radius:        12px;
  --radius-sm:     8px;
  --header-h:      64px;
  --sidebar-w:     340px;
  --cat-w:         220px;
  --font-head:     'Bricolage Grotesque', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --transition:    0.2s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
}
.header-inner {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo img { height: 36px; width: auto; }
.site-logo span {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  height: 42px;
  border: 2px solid var(--border);
  border-radius: 40px;
  padding: 0 20px 0 44px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition);
  outline: none;
}
.header-search input:focus { border-color: var(--primary); background: var(--white); }
.header-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.btn-cart-mobile {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 600;
  transition: background var(--transition);
}
.btn-cart-mobile:hover { background: var(--primary-dark); }
.cart-badge {
  background: var(--white);
  color: var(--primary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* ── PAGE LAYOUT ── */
.menu-page-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: var(--cat-w) 1fr var(--sidebar-w);
  grid-template-rows: auto;
  gap: 24px;
  align-items: start;
}

/* ── RESTAURANT BANNER ── */
.restaurant-banner {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--dark) 0%, #2D2D2D 100%);
  border-radius: var(--radius);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--white);
  overflow: hidden;
  position: relative;
}
.restaurant-banner::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.15;
}
.restaurant-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.restaurant-info h1 {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}
.restaurant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}
.restaurant-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.restaurant-meta .tag {
  background: var(--primary);
  color: var(--white);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ── CATEGORY SIDEBAR ── */
.category-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  align-self: start;
}
.category-sidebar h3 {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 16px 18px 10px;
  border-bottom: 1px solid var(--border);
}
.cat-list { list-style: none; padding: 8px 0; }
.cat-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  border-left: 3px solid transparent;
}
.cat-list li a:hover,
.cat-list li a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}
.cat-list li a .cat-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 20px;
}

/* ── MENU CONTENT ── */
.menu-content { min-width: 0; }

/* WPPizza Category Title */
.menu-content .wppizza-category-title,
.menu-content h2.wppizza-category {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

/* WPPizza Items Grid */
.wppizza-articles,
.wppizza-items-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* ── ITEM CARD ── */
.wppizza-article,
article.wppizza-article {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.wppizza-article:hover {
  box-shadow: var(--card-hover);
  transform: translateY(-2px);
}
.item-image-wrap {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: var(--bg);
}
.item-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.wppizza-article:hover .item-image-wrap img { transform: scale(1.05); }
.item-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.item-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.item-name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 6px;
  line-height: 1.3;
}
.item-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-additives {
  font-size: 11px;
  color: #AAA;
  margin-bottom: 10px;
}
.item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.item-price {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.item-price .from { font-size: 12px; font-weight: 400; color: var(--muted); }

/* Size selector (WPPizza sizes) */
.wppizza-sizes select,
.wppizza-article select {
  height: 34px;
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}
.wppizza-sizes select:focus,
.wppizza-article select:focus { border-color: var(--primary); }

/* Add to cart button */
.wppizza-add-item,
button.wppizza-add-item,
.item-add-btn {
  background: var(--primary) !important;
  color: var(--white) !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 9px 16px !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  transition: background var(--transition), transform var(--transition) !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.wppizza-add-item:hover { background: var(--primary-dark) !important; transform: scale(1.03) !important; }
.wppizza-add-item:active { transform: scale(0.97) !important; }

/* ── CART SIDEBAR ── */
.cart-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 48px);
  display: flex;
  flex-direction: column;
}
.cart-sidebar-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-sidebar-head h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
}
.cart-item-count {
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-items-wrap { overflow-y: auto; flex: 1; padding: 12px 0; }

/* WPPizza cart rows */
.wppizza-cart,
#wppizza-cart {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}
.wppizza-cart table { width: 100%; border-collapse: collapse; }
.wppizza-cart .wppizza-cart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.wppizza-cart .wppizza-cart-row:last-child { border-bottom: none; }
.wppizza-cart-item-name { font-size: 14px; font-weight: 500; flex: 1; }
.wppizza-cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wppizza-cart-item-qty button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all var(--transition);
}
.wppizza-cart-item-qty button:hover { border-color: var(--primary); color: var(--primary); }
.wppizza-cart-item-price { font-weight: 700; color: var(--dark); font-size: 14px; white-space: nowrap; }

/* Cart empty state */
.cart-empty {
  padding: 40px 20px;
  text-align: center;
}
.cart-empty-icon { font-size: 48px; margin-bottom: 12px; }
.cart-empty p { color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Cart footer */
.cart-sidebar-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}
.cart-totals { margin-bottom: 14px; }
.cart-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
  color: var(--muted);
}
.cart-totals-row.total {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  padding-top: 8px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
}
.btn-checkout {
  display: block;
  width: 100%;
  background: var(--primary);
  color: var(--white);
  padding: 14px;
  border-radius: 10px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
}
.btn-checkout:hover { background: var(--primary-dark); transform: scale(1.01); }
.btn-checkout:active { transform: scale(0.98); }
.min-order-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* WPPizza checkout link override */
.wppizza-order-link a,
a.wppizza-checkout {
  display: block;
  width: 100%;
  background: var(--primary) !important;
  color: var(--white) !important;
  padding: 14px !important;
  border-radius: 10px !important;
  text-align: center !important;
  font-family: var(--font-head) !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  transition: background var(--transition) !important;
}
.wppizza-order-link a:hover { background: var(--primary-dark) !important; }

/* ── MOBILE CART OVERLAY ── */
.cart-overlay-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  backdrop-filter: blur(2px);
}
.cart-overlay-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  z-index: 1200;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-overlay-panel.open { transform: translateY(0); }
.cart-overlay-backdrop.open { display: block; }
.cart-panel-drag {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
.cart-panel-head {
  padding: 14px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-panel-head h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.cart-close-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition);
}
.cart-close-btn:hover { background: var(--border); }
.cart-panel-items { overflow-y: auto; flex: 1; padding: 8px 0; }
.cart-panel-foot { padding: 16px 20px; border-top: 1px solid var(--border); }

/* ── MOBILE BOTTOM BAR ── */
.mobile-cart-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 12px 16px;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}
.mobile-cart-btn {
  width: 100%;
  background: var(--primary);
  color: var(--white);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.mobile-cart-btn:hover { background: var(--primary-dark); }
.mobile-cart-btn .count {
  background: rgba(255,255,255,0.25);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 14px;
}

/* ── LOADING SPINNER ── */
.cart-loading {
  display: flex;
  justify-content: center;
  padding: 20px;
}
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ADD TO CART ANIMATION ── */
@keyframes addedBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.item-added { animation: addedBounce 0.3s ease; }

/* ── FOOTER ── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 40px 20px 20px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-brand .site-logo span { color: var(--white); }
.footer-brand p { font-size: 13px; margin-top: 10px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; color: rgba(255,255,255,0.6); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── CATEGORY MOBILE TABS ── */
.cat-mobile-tabs {
  display: none;
  overflow-x: auto;
  gap: 8px;
  padding: 0 4px 8px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 16px;
}
.cat-mobile-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-tab.active, .cat-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ── NOTIFICATIONS ── */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
  :root { --sidebar-w: 300px; --cat-w: 200px; }
}

@media (max-width: 960px) {
  .menu-page-wrap {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .restaurant-banner { grid-column: 1; }
  .category-sidebar { display: none; }
  .cat-mobile-tabs { display: flex; }
  .cart-sidebar { display: none; }
  .mobile-cart-bar { display: block; }
  .header-search { display: none; }
  .menu-page-wrap { padding-bottom: 80px; }
}

@media (max-width: 600px) {
  .wppizza-articles,
  .wppizza-items-wrap {
    grid-template-columns: 1fr;
  }
  .restaurant-banner {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .restaurant-info h1 { font-size: 22px; }
  .header-inner { gap: 12px; }
}

/* ── WPPIZZA SPECIFIC OVERRIDES ── */
.wppizza-main { background: transparent !important; }
.wppizza-no-items { color: var(--muted); text-align: center; padding: 40px; }
.wppizza-item-title { display: none; } /* handled by our template */

/* WPPizza notice/messages */
.wppizza-info-message {
  background: var(--primary-light);
  border: 1px solid #FFCCA3;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  color: var(--primary-dark);
  margin-bottom: 16px;
}

/* Order/checkout page */
.wppizza-checkout-wrap,
.wppizza-order-wrap {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--card-shadow);
}
.wppizza-checkout-wrap h2,
.wppizza-order-wrap h2 {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}
