/* =========================================================================
   1. GLOBAL SYSTEM DESIGN & RESETS
   ========================================================================= */
:root {
  --pastry-cream: #fffdf9;
  --espresso: #2b1e17;
  --accent-gold: #d4a373;
  --brand-purple: #512d6d; /* Replicating reference interface colors */
  --soft-tan: #f5f0e6;
  --text-muted: #73675e;
  --border-light: #eef1f4;
  --success-green: #2e7d32;
  --error-red: #d32f2f;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--pastry-cream);
  color: var(--espresso);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   2. APP NAV & UTILITY ANNOUNCEMENTS
   ========================================================================= */
.announcement-bar {
  background-color: var(--espresso);
  color: #ffffff;
  text-align: center;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  box-shadow: 0 4px 12px rgba(43, 30, 23, 0.04);
}

.logo-main {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--espresso);
  display: block;
}

.logo-sub {
  font-size: 0.85rem;
  color: var(--accent-gold);
  display: block;
  margin-top: -4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header__logo a {
  text-decoration: none;
}

.nav__list {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__link {
  text-decoration: none;
  color: var(--espresso);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav__link:hover {
  color: var(--brand-purple);
}

.header__utilities {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.fulfillment-badge {
  background-color: var(--soft-tan);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(43, 30, 23, 0.05);
}

.cart-icon {
  text-decoration: none;
  font-size: 1.3rem;
  position: relative;
  display: inline-block;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background-color: var(--brand-purple);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* =========================================================================
   3. FULFILLMENT SELECTOR SUB-STRIPS & TABS
   ========================================================================= */
.store-profile-anchor {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.2rem;
  margin: 1.5rem 5% 0 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}

.store-profile-anchor__details {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.geo-pin {
  font-size: 1.5rem;
}

.store-profile-anchor__details h4 {
  margin: 0 0 0.15rem 0;
  color: var(--espresso);
  font-size: 1.1rem;
}

.store-profile-anchor__details p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.indicator-dot-red {
  color: var(--error-red);
  margin-right: 4px;
}

/* Sticky Categorization Multi-Tabs Bar */
.category-sticky-tabs {
  position: sticky;
  top: 73px; /* Stays clear underneath header ceiling */
  z-index: 90;
  background-color: #ffffff;
  border-bottom: 2px solid #f2f4f7;
  padding: 0 5%;
}

.tabs-inner-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 2.5rem;
  overflow-x: auto;
  white-space: nowrap;
}

.category-tab-link {
  display: block;
  padding: 1.1rem 0;
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.category-tab-link.active,
.category-tab-link:hover {
  color: var(--brand-purple);
  border-bottom-color: var(--brand-purple);
  font-weight: 600;
}

/* =========================================================================
   4. TWO-COLUMN GRID MASTER LAYOUT
   ========================================================================= */
.split-viewport-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  padding: 2.5rem 5%;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

@media (max-width: 1024px) {
  .split-viewport-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   5. CATALOG PRODUCT CARDS & IMAGE COMPRESSION
   ========================================================================= */
.menu-group-block {
  margin-bottom: 3.5rem;
}

.menu-group-block__title {
  font-family: 'Playfair Display', serif;
  color: var(--espresso);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.menu-group-block__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.store-product-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.01);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 30, 23, 0.05);
}

.store-product-card__main {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.store-product-card__txt {
  flex-grow: 1;
}

.store-product-card__txt h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1.15rem;
  color: var(--espresso);
}

.store-product-card__desc {
  margin: 0 0 0.8rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.store-product-card__cost {
  margin: 0;
  font-weight: 700;
  color: var(--brand-purple);
  font-size: 1rem;
}

/* Clean Professional Image Cropping */
.store-product-card__photo-frame {
  width: 95px;
  height: 95px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--soft-tan);
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.03);
}

.store-product-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents stretching and compresses within standard grid frames */
  display: block;
}

/* Modifiers Dropdowns */
.card-dropdowns {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.card-modifier-dropdown {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.8rem;
  background-color: #ffffff;
  color: var(--espresso);
  font-weight: 500;
  outline: none;
}

.card-modifier-dropdown:focus {
  border-color: var(--brand-purple);
}

.card-footer-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #f2f4f7;
  padding-top: 0.85rem;
}

.math-badge {
  font-weight: 700;
  font-size: 0.95rem;
}

.card-add-trigger {
  background-color: var(--brand-purple);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.card-add-trigger:hover {
  background-color: #3d2054;
}

/* =========================================================================
   6. STICKY SIDEBAR CART CONTROL PANEL
   ========================================================================= */
.checkout-sticky-panel__card {
  position: sticky;
  top: 145px; /* Floats smoothly down screen boundaries next to menu layout scrolls */
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(43, 30, 23, 0.02);
}

.checkout-sticky-panel__card h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.35rem;
  color: var(--espresso);
}

.checkout-sticky-panel__subtitle {
  margin: 0 0 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.sidebar-items-scroller {
  min-height: 80px;
  max-height: 320px;
  overflow-y: auto;
  border-bottom: 1px solid #f2f4f7;
  margin-bottom: 1.5rem;
}

.empty-tray-text {
  color: #9c8e85;
  font-size: 0.85rem;
  text-align: center;
  padding: 2.5rem 0;
  line-height: 1.5;
}

.checkout-sticky-panel__summary {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.summary-flex-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #6b5c52;
}

.summary-flex-line.grand-total-border {
  border-top: 1px dashed var(--border-light);
  padding-top: 0.8rem;
  font-size: 1.25rem;
  color: var(--espresso);
}

.checkout-submit-action {
  width: 100%;
  background-color: var(--brand-purple);
  color: #ffffff;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.checkout-submit-action:hover {
  background-color: #3d2054;
}

/* =========================================================================
   7. BACKEND INTEGRATION COMPONENT CODES (OLD FALLBACKS)
   ========================================================================= */
.catalog-card {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.price-val {
  font-weight: 700;
}
/* =========================================================================
   8. FOOTER METRICS CLOSURE
   ========================================================================= */
.site-footer {
  background-color: var(--soft-tan);
  padding: 3.5rem 5%;
  margin-top: 5rem;
  border-top: 1px solid rgba(43, 30, 23, 0.05);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.footer-col {
  flex: 1;
  min-width: 250px;
}

.footer-col h3, .footer-col h4 {
  color: var(--espresso);
  margin-bottom: 1rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: #544338;
  line-height: 1.6;
}

.footer-col .address {
  margin-bottom: 0.5rem;
}
