/* Bakery Module - Public Page Styles
   Prefix: bk- to avoid conflicts with other modules. */
:root {
  --bk-primary: #b45309;
  --bk-secondary: #f59e0b;
  --bk-accent: #ec4899;
  --bk-bg: #fff7ed;
  --bk-surface: #ffffff;
  --bk-surface-soft: #fffbeb;
  --bk-border: #fed7aa;
  --bk-text: #2f241c;
  --bk-muted: #7c5f46;
  --bk-radius: 8px;
  --bk-shadow: 0 10px 28px rgba(146, 64, 14, 0.12);
}

body:has(.bk-hero) .liq-cart-icon,
body:has(.bk-cart-section) .liq-cart-icon,
body:has(.bk-custom-section) .liq-cart-icon,
body:has(.bk-success-section) .liq-cart-icon,
body:has(.bk-hero) [data-open-cart],
body:has(.bk-cart-section) [data-open-cart],
body:has(.bk-custom-section) [data-open-cart],
body:has(.bk-success-section) [data-open-cart],
body:has(.bk-hero) .cart-fab,
body:has(.bk-cart-section) .cart-fab,
body:has(.bk-custom-section) .cart-fab,
body:has(.bk-success-section) .cart-fab,
body:has(.bk-cart-section) #lqFoodFloatingCart {
  display: none !important;
}

body:has(.bk-cart-section) .liq-support-fab,
body:has(.bk-custom-section) .liq-support-fab {
  border-radius: var(--bk-radius);
  display: flex !important;
  height: auto;
  justify-self: center;
  left: auto !important;
  margin: 24px auto 0;
  min-height: 48px;
  padding: 12px 18px;
  position: static !important;
  right: auto !important;
  width: auto;
}

body:has(.bk-cart-section) .liq-support-panel,
body:has(.bk-custom-section) .liq-support-panel {
  bottom: calc(170px + env(safe-area-inset-bottom, 0px)) !important;
  left: 14px !important;
  right: 14px !important;
}

.bk-hero {
  background: linear-gradient(135deg, #7c2d12 0%, #b45309 55%, #f59e0b 100%);
  color: #fff;
  padding: 54px 20px;
  text-align: center;
}

.bk-hero .container,
.bk-specials-banner .container,
.bk-section-nav .container,
.bk-category-section .container,
.bk-order-page,
.bk-gallery-page,
.bk-cake-page {
  max-width: 1120px;
  margin: 0 auto;
}

.bk-hero h1 {
  color: #fff;
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 12px;
}

.bk-hero p {
  color: #fff7ed;
  font-size: 1.05rem;
  margin: 0;
}

.bk-specials-banner {
  background: var(--bk-surface-soft);
  border-bottom: 1px solid var(--bk-border);
  padding: 28px 20px;
}

.bk-specials-banner h2,
.bk-category-section h2 {
  color: var(--bk-text);
  margin: 0 0 18px;
}

.bk-specials-row,
.bk-product-grid,
.bk-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.bk-special-card,
.bk-product-card,
.bk-order-card,
.bk-gallery-card,
.bk-cake-card {
  background: var(--bk-surface);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  box-shadow: var(--bk-shadow);
  overflow: hidden;
}

.bk-special-card {
  padding: 18px;
}

.bk-special-card h3,
.bk-product-name {
  color: var(--bk-text);
  font-weight: 800;
}

.bk-special-price,
.bk-product-price {
  color: var(--bk-primary);
  font-weight: 800;
}

.bk-section-nav {
  background: #fff;
  border-bottom: 1px solid var(--bk-border);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.bk-section-nav .container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.bk-section-pill {
  border: 1px solid var(--bk-border);
  border-radius: 999px;
  color: var(--bk-primary);
  flex: 0 0 auto;
  font-weight: 700;
  padding: 8px 14px;
  text-decoration: none;
}

.bk-category-section {
  background: #fff;
  padding: 34px 20px;
}

.bk-cat-desc,
.bk-product-desc,
.bk-cake-card p {
  color: var(--bk-muted);
  line-height: 1.6;
}

.bk-product-img,
.bk-gallery-card img {
  display: block;
  height: 190px;
  object-fit: cover;
  width: 100%;
}

.bk-product-body {
  padding: 18px;
}

.bk-product-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.bk-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}

.bk-allergen,
.bk-badge,
.bk-lead-time {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 9px;
}

.bk-allergen {
  background: #fee2e2;
  color: #991b1b;
}

.bk-dietary,
.bk-badge {
  background: #dcfce7;
  color: #166534;
}

.bk-lead-time {
  background: #fef3c7;
  color: #92400e;
}

.bk-order-page,
.bk-gallery-page,
.bk-cake-page {
  padding: 34px 20px;
}

.bk-order-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.bk-order-card {
  padding: 18px;
}

.bk-order-card button,
.bk-add-btn,
.bk-submit-btn {
  background: var(--bk-primary);
  border: 0;
  border-radius: var(--bk-radius);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 12px 16px;
}

.bk-product-actions {
  margin-top: 14px;
}

.bk-add-btn {
  width: 100%;
}

.bk-cart-section {
  padding: 34px 20px;
}

.bk-cart-section .container {
  max-width: 760px;
  margin: 0 auto;
}

.bk-cart-empty,
.bk-cart-items,
.bk-cart-summary,
.bk-cart-pickup,
.bk-cart-guest-info,
.bk-cart-payment {
  background: var(--bk-surface);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  box-shadow: var(--bk-shadow);
  margin-bottom: 18px;
  padding: 18px;
}

.bk-cart-empty {
  text-align: center;
}

.bk-cart-item {
  align-items: center;
  border-bottom: 1px solid var(--bk-border);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 12px 0;
}

.bk-cart-item:last-child {
  border-bottom: 0;
}

.bk-cart-item-name {
  color: var(--bk-text);
  font-weight: 800;
}

.bk-cart-item-price {
  color: var(--bk-primary);
  font-weight: 800;
  margin-top: 4px;
}

.bk-cart-item-qty {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.bk-cart-item-info {
  min-width: 0;
}

.bk-cart-item-qty button,
.bk-cart-item-remove {
  background: var(--bk-surface-soft);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  color: var(--bk-primary);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 38px;
  min-width: 38px;
  padding: 8px 12px;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.bk-cart-item-qty button:hover,
.bk-cart-item-remove:hover {
  background: #fff3e0;
  border-color: #fdba74;
}

.bk-cart-item-qty button:active,
.bk-cart-item-remove:active {
  transform: scale(0.98);
}

.bk-cart-item-qty span {
  color: var(--bk-text);
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}

.bk-cart-item-remove {
  justify-self: end;
  min-width: 88px;
}

.bk-cart-line {
  align-items: center;
  border-bottom: 1px solid var(--bk-border);
  color: var(--bk-text);
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

.bk-cart-line:last-child {
  border-bottom: 0;
}

.bk-cart-total {
  font-size: 1.1rem;
  font-weight: 900;
}

.bk-payment-option {
  align-items: flex-start;
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
}

.bk-payment-option input {
  accent-color: var(--bk-primary);
  flex-shrink: 0;
  margin-top: 4px;
}

.bk-payment-option span {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.bk-payment-option strong {
  color: var(--bk-text);
  display: block;
  line-height: 1.35;
}

.bk-payment-option small {
  color: var(--bk-muted);
  display: block;
  line-height: 1.4;
  margin-top: 3px;
}

.bk-payment-option-disabled {
  opacity: 0.62;
}

.bk-order-summary {
  background: var(--bk-surface-soft);
  border: 1px solid var(--bk-border);
  border-radius: var(--bk-radius);
  padding: 18px;
  position: sticky;
  top: 78px;
}

.bk-empty {
  color: var(--bk-muted);
  padding: 24px;
  text-align: center;
}

@media (max-width: 720px) {
  .bk-hero {
    padding: 42px 18px;
  }

  .bk-hero h1 {
    font-size: 2rem;
  }

  .bk-product-grid,
  .bk-specials-row,
  .bk-gallery-grid,
  .bk-order-layout {
    grid-template-columns: 1fr;
  }

  .bk-order-summary {
    position: static;
  }

  .bk-product-header {
    display: block;
  }

  .bk-cart-item {
    grid-template-columns: 1fr;
  }

  .bk-cart-item-qty {
    justify-content: flex-start;
  }

  .bk-cart-item-remove {
    justify-self: start;
  }

  .bk-payment-option {
    gap: 12px;
  }
}
