
/*
  v212 Customer Premium Phase 1 UX
  Scope: customer ordering page only (.shop-page). No staff, driver, admin selectors.
  Uses existing CSS variables from Branding Menu:
  --brand: settings.primary_color
  --ink: settings.accent_color
*/
.shop-page{
  --cp-brand: var(--brand, #f97316);
  --cp-ink: var(--ink, #0f172a);
  --cp-bg: #fffaf4;
  --cp-card: rgba(255,255,255,.92);
  --cp-line: rgba(15,23,42,.09);
  --cp-muted: #64748b;
  --cp-shadow: 0 18px 45px rgba(15,23,42,.10);
  --cp-soft-shadow: 0 10px 24px rgba(15,23,42,.075);
  --cp-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--cp-brand), white 82%) 0, transparent 28rem),
    linear-gradient(180deg, #fffaf4 0%, #fff 52%, #fffaf4 100%) !important;
  color: var(--cp-ink);
}
.shop-page *{box-sizing:border-box}
.shop-page .shop-header{
  position: sticky;
  top: 0;
  z-index: 45;
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 22px;
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 0 0 28px 28px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(15,23,42,.07);
}
.shop-page .brand-lockup img,
.shop-page .logo-mark{
  width: 48px;
  height: 48px;
  border-radius: 16px;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--cp-brand), transparent 74%);
}
.shop-page .brand-lockup strong{font-size:1.05rem;letter-spacing:-.02em}
.shop-page .brand-lockup span{color:var(--cp-muted);font-weight:650}
.shop-page .mode-switch{
  background: #fff;
  border: 1px solid var(--cp-line);
  border-radius: 999px;
  padding: 5px;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 22px rgba(15,23,42,.06);
}
.shop-page .mode-btn,
.shop-page [data-fulfillment-choice],
.shop-page .primary-cta,
.shop-page .add-btn,
.shop-page .place-order,
.shop-page .modal-add-button-v33{
  background: linear-gradient(135deg, color-mix(in srgb, var(--cp-brand), #111 8%), var(--cp-brand)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 12px 22px color-mix(in srgb, var(--cp-brand), transparent 72%);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.shop-page .mode-btn:hover,
.shop-page [data-fulfillment-choice]:hover,
.shop-page .primary-cta:hover,
.shop-page .add-btn:hover,
.shop-page .place-order:hover,
.shop-page .modal-add-button-v33:hover{
  transform: translateY(-1px);
  filter: saturate(1.08);
  box-shadow: 0 16px 28px color-mix(in srgb, var(--cp-brand), transparent 66%);
}
.shop-page .mode-btn:not(.active){
  background: transparent !important;
  color: var(--cp-ink) !important;
  box-shadow: none;
}
.shop-page .shop-nav a,
.shop-page .customer-account-pill-v115{
  border-radius: 999px !important;
  font-weight: 850;
}
.shop-page .premium-hero{
  max-width: 1320px;
  min-height: 360px;
  margin: 18px auto 18px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--cp-shadow);
  position: relative;
  isolation: isolate;
}
.shop-page .premium-hero:after{
  content:"";
  position:absolute;
  inset:auto 26px 22px 26px;
  height:72px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.6);
  border-radius:22px;
  box-shadow:0 18px 42px rgba(15,23,42,.12);
  z-index:-1;
}
.shop-page .hero-copy{
  max-width: 650px;
  padding: 46px;
}
.shop-page .hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#fff;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.22);
  backdrop-filter:blur(10px);
  border-radius:999px;
  padding:9px 14px;
  font-weight:850;
}
.shop-page .hero-copy h1{
  font-size: clamp(2.35rem, 5vw, 4.65rem);
  line-height:.95;
  letter-spacing:-.065em;
  max-width: 11ch;
  margin: 18px 0 14px;
}
.shop-page .hero-copy p{
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  max-width: 520px;
  opacity:.95;
}
.shop-page .hero-actions{gap:12px;flex-wrap:wrap}
.shop-page .secondary-cta{
  border:1px solid rgba(255,255,255,.38) !important;
  background:rgba(255,255,255,.12) !important;
  color:#fff !important;
  backdrop-filter:blur(10px);
}
.shop-page .hero-card{
  right: 32px;
  bottom: 32px;
  border-radius:22px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(255,255,255,.7);
  box-shadow:0 18px 38px rgba(15,23,42,.16);
}
.shop-page .customer-benefits-v212{
  max-width: 1320px;
  margin: -4px auto 18px;
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:12px;
  padding:0 8px;
}
.shop-page .benefit-v212{
  display:flex;
  align-items:center;
  gap:12px;
  background:rgba(255,255,255,.86);
  border:1px solid var(--cp-line);
  border-radius:18px;
  padding:14px 16px;
  box-shadow:var(--cp-soft-shadow);
}
.shop-page .benefit-v212 b{display:block;font-size:.92rem}
.shop-page .benefit-v212 span{display:block;color:var(--cp-muted);font-size:.8rem;font-weight:700}
.shop-page .benefit-icon-v212{
  width:38px;height:38px;border-radius:14px;
  display:grid;place-items:center;
  background:color-mix(in srgb, var(--cp-brand), white 87%);
}
.shop-page .shop-shell{
  max-width: 1320px;
  display: grid !important;
  grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) minmax(330px, 390px);
  gap: 22px;
  align-items:start;
  margin: 0 auto 80px;
  padding: 0 12px;
}
.shop-page .menu-column{display:contents}
.shop-page .fulfillment-required{
  grid-column: 1 / -1;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, color-mix(in srgb, var(--cp-brand), white 92%));
  border:1px solid color-mix(in srgb, var(--cp-brand), white 72%);
  box-shadow:var(--cp-soft-shadow);
}
.shop-page .menu-toolbar{
  grid-column: 2;
  background:transparent;
  margin:0;
  padding:0 2px 4px;
}
.shop-page .menu-toolbar h2{
  font-size: clamp(2rem, 4vw, 3.05rem);
  line-height:1;
  letter-spacing:-.055em;
  margin-bottom:8px;
}
.shop-page .menu-toolbar p{color:var(--cp-muted);font-weight:650}
.shop-page .search-box{
  border-radius: 999px;
  min-height: 54px;
  background: #fff;
  border: 1px solid var(--cp-line);
  box-shadow: var(--cp-soft-shadow);
}
.shop-page .search-box:focus-within{
  border-color: color-mix(in srgb, var(--cp-brand), white 35%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--cp-brand), transparent 88%), var(--cp-soft-shadow);
}
.shop-page .category-strip{
  grid-column: 1;
  grid-row: 2 / span 2;
  position: sticky;
  top: 94px;
  align-self:start;
  display:flex !important;
  flex-direction:column;
  gap:10px;
  max-height: calc(100vh - 118px);
  overflow:auto;
  background:rgba(255,255,255,.82);
  border:1px solid var(--cp-line);
  border-radius:24px;
  padding:14px;
  box-shadow:var(--cp-soft-shadow);
}
.shop-page .cat-chip{
  justify-content:flex-start;
  min-height:50px;
  width:100%;
  border-radius:16px !important;
  border:1px solid var(--cp-line) !important;
  background:#fff !important;
  color:var(--cp-ink) !important;
  font-weight:900;
  white-space:normal;
}
.shop-page .cat-chip.active{
  background: color-mix(in srgb, var(--cp-brand), white 88%) !important;
  border-color: color-mix(in srgb, var(--cp-brand), white 52%) !important;
  color: color-mix(in srgb, var(--cp-brand), #111 18%) !important;
  box-shadow: inset 4px 0 0 var(--cp-brand);
}
.shop-page .menu-grid{
  grid-column: 2;
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 18px;
}
.shop-page .premium-food-card{
  min-height: 184px;
  border-radius: var(--cp-radius);
  background: var(--cp-card);
  border:1px solid var(--cp-line);
  box-shadow:var(--cp-soft-shadow);
  overflow:hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.shop-page .premium-food-card:hover{
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cp-brand), white 64%);
  box-shadow: 0 22px 48px rgba(15,23,42,.12);
}
.shop-page .food-media{
  width: 150px;
  min-width:150px;
  min-height:150px;
  margin:12px 0 12px 12px;
  border-radius:22px;
  overflow:hidden;
  background:linear-gradient(145deg,#fff7ed,#fff);
}
.shop-page .food-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.01);
  transition:transform .24s ease;
}
.shop-page .premium-food-card:hover .food-media img{transform:scale(1.07)}
.shop-page .food-placeholder{
  font-size:2.1rem;
  opacity:.55;
  background:linear-gradient(135deg,#fff7ed,#fff);
}
.shop-page .featured-badge{
  top:10px;left:10px;
  background:linear-gradient(135deg,#111827,#334155);
  color:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
}
.shop-page .food-info{padding:18px 14px 14px 16px}
.shop-page .food-title-row h3{
  font-size:1.15rem;
  line-height:1.12;
  letter-spacing:-.03em;
}
.shop-page .heart{
  width:38px;height:38px;border-radius:14px;
  background:#fff !important;
  border:1px solid var(--cp-line) !important;
}
.shop-page .food-info p{
  color:var(--cp-muted);
  font-weight:650;
  line-height:1.4;
  min-height: 40px;
}
.shop-page .mini-options span{
  border-radius:999px;
  background: color-mix(in srgb, var(--cp-brand), white 92%);
  color: color-mix(in srgb, var(--cp-brand), #111 20%);
  border:1px solid color-mix(in srgb, var(--cp-brand), white 72%);
  font-weight:850;
}
.shop-page .food-footer strong{
  font-size:1.25rem;
  letter-spacing:-.03em;
}
.shop-page .add-btn{
  min-width:70px;
  border-radius:16px !important;
  font-size:.95rem;
  font-weight:950;
}
.shop-page .order-panel{
  grid-column:3;
  position:sticky;
  top:94px;
  border-radius:28px;
  background:rgba(255,255,255,.9);
  border:1px solid var(--cp-line);
  box-shadow:var(--cp-shadow);
  overflow:hidden;
}
.shop-page .order-panel:before{
  content:"";
  display:block;
  height:6px;
  background:linear-gradient(90deg,var(--cp-brand), color-mix(in srgb, var(--cp-brand), #fff 48%));
}
.shop-page .order-head{
  padding:20px 20px 12px;
  border-bottom:1px solid var(--cp-line);
}
.shop-page .order-head h2{letter-spacing:-.035em}
.shop-page .cart-list{padding:14px 18px}
.shop-page .checkout-summary{
  margin:0 18px 16px;
  padding:16px;
  border-radius:20px;
  background:#fff7ed;
  border:1px solid color-mix(in srgb, var(--cp-brand), white 78%);
}
.shop-page .checkout-form{padding:0 18px 20px}
.shop-page .checkout-form input,
.shop-page .checkout-form textarea,
.shop-page .checkout-form select{
  min-height:48px;
  border-radius:15px !important;
  border:1px solid var(--cp-line) !important;
  background:#fff !important;
}
.shop-page .place-order{
  min-height:56px;
  border-radius:18px !important;
  font-size:1.05rem;
  font-weight:950;
}
.shop-page .mobile-cart-button{
  left:16px !important;
  right:16px !important;
  bottom:86px !important;
  min-height:58px;
  border-radius:22px !important;
  background:linear-gradient(135deg,var(--cp-brand), color-mix(in srgb, var(--cp-brand), #111 12%)) !important;
  box-shadow:0 18px 40px color-mix(in srgb, var(--cp-brand), transparent 62%);
  font-weight:950;
}
.shop-page .premium-modal-card{
  border-radius:30px;
  border:1px solid var(--cp-line);
  box-shadow:0 26px 70px rgba(15,23,42,.24);
}
.shop-page .modal-image{
  border-radius:24px;
  overflow:hidden;
}
.shop-page .modal-image img{width:100%;height:100%;object-fit:cover}
.shop-page .phase1-added-v212{
  animation: cpAddPulseV212 .55s ease both;
}
@keyframes cpAddPulseV212{
  0%{transform:scale(1)}
  40%{transform:scale(1.06)}
  100%{transform:scale(1)}
}
@media (max-width: 1120px){
  .shop-page .shop-shell{grid-template-columns: minmax(0,1fr) minmax(320px,360px)}
  .shop-page .category-strip{
    grid-column:1 / -1;
    grid-row:auto;
    position:sticky;
    top:82px;
    z-index:30;
    flex-direction:row;
    border-radius:0;
    margin:0 -12px;
    padding:10px 12px;
    max-height:none;
    overflow-x:auto;
  }
  .shop-page .cat-chip{width:auto;white-space:nowrap;min-height:46px}
  .shop-page .menu-toolbar,.shop-page .menu-grid{grid-column:1}
  .shop-page .order-panel{grid-column:2}
  .shop-page .customer-benefits-v212{grid-template-columns:repeat(2,1fr);padding:0 14px}
}
@media (max-width: 920px){
  .shop-page{padding-bottom:88px}
  .shop-page .customer-account-link-v115{display:none}
  .shop-page .shop-header{
    position:relative;
    border-radius:0 0 24px 24px;
    padding:12px 16px;
  }
  .shop-page .shop-nav{display:none}
  .shop-page .mode-switch{
    width:100%;
    order:3;
    margin-top:10px;
  }
  .shop-page .mode-btn{flex:1;min-height:44px}
  .shop-page .premium-hero{
    min-height: 300px;
    margin: 0 14px 22px;
    border-radius: 0 0 32px 32px;
  }
  .shop-page .premium-hero:after{display:none}
  .shop-page .hero-copy{padding:32px 24px 34px}
  .shop-page .hero-copy h1{font-size:2.55rem;max-width:10ch}
  .shop-page .hero-card{display:none}
  .shop-page .customer-benefits-v212{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap:10px;
    margin:0 14px 20px;
    padding:0;
  }
  .shop-page .benefit-v212{padding:11px;border-radius:16px}
  .shop-page .benefit-v212 span{display:none}
  .shop-page .shop-shell{
    display:block !important;
    padding:0 14px;
    margin-bottom:110px;
  }
  .shop-page .fulfillment-required{margin-bottom:22px;display:block}
  .shop-page .fulfillment-required > div:last-child{display:flex;gap:10px;margin-top:12px}
  .shop-page .fulfillment-required button{flex:1;min-height:48px;border-radius:16px}
  .shop-page .menu-toolbar{
    display:block;
    margin-bottom:14px;
  }
  .shop-page .menu-toolbar h2{font-size:2.35rem}
  .shop-page .search-box{margin-top:18px;width:100%}
  .shop-page .category-strip{
    margin: 0 -14px 14px;
    top:0;
    border-left:0;border-right:0;
    border-radius:0;
    background:rgba(255,255,255,.94);
    backdrop-filter:blur(12px);
  }
  .shop-page .menu-grid{
    display:flex !important;
    flex-direction:column;
    gap:14px;
  }
  .shop-page .premium-food-card{
    min-height:0;
    display:grid !important;
    grid-template-columns:132px minmax(0,1fr);
    border-radius:24px;
  }
  .shop-page .food-media{
    width:112px;
    min-width:112px;
    min-height:112px;
    height:112px;
    margin:14px;
    border-radius:22px;
  }
  .shop-page .food-info{padding:16px 14px 14px 0}
  .shop-page .food-info p{min-height:0;font-size:.94rem}
  .shop-page .food-footer{margin-top:10px}
  .shop-page .add-btn{min-width:74px;min-height:48px}
  .shop-page .order-panel{
    position:fixed !important;
    top:auto !important;
    left:0;right:0;bottom:0;
    z-index:80;
    max-height:88vh;
    overflow:auto;
    border-radius:28px 28px 0 0;
    transform:translateY(110%);
    transition:transform .24s ease;
  }
  .shop-page .order-panel.mobile-open{transform:translateY(0)}
  .shop-page .mobile-cart-backdrop{z-index:78}
}
@media (max-width: 520px){
  .shop-page .customer-benefits-v212{display:none}
  .shop-page .premium-food-card{grid-template-columns:124px minmax(0,1fr)}
  .shop-page .food-media{width:104px;min-width:104px;height:104px;min-height:104px}
  .shop-page .food-title-row h3{font-size:1.05rem}
  .shop-page .mini-options{display:none}
}


/*
  v213 Responsive stabilization patch
  Fixes mid-width card collapse by only enabling the 3-column desktop shell
  when enough space exists, and by making food cards non-shrinking.
*/

/* Stable default desktop: category + menu + cart, with menu as readable list cards */
.shop-page .shop-shell{
  grid-template-columns: minmax(210px, 240px) minmax(520px, 1fr) minmax(320px, 370px) !important;
}
.shop-page .menu-grid{
  grid-template-columns: minmax(0, 1fr) !important;
}
.shop-page .premium-food-card{
  display:grid !important;
  grid-template-columns: 168px minmax(0, 1fr);
  min-width:0;
  overflow:hidden;
}
.shop-page .food-media{
  width:144px !important;
  min-width:144px !important;
  height:144px !important;
  min-height:144px !important;
  flex:0 0 144px !important;
}
.shop-page .food-placeholder{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
}
.shop-page .food-info{
  min-width:0;
  display:flex;
  flex-direction:column;
}
.shop-page .food-title-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}
.shop-page .food-title-row h3{
  min-width:0;
  overflow-wrap:anywhere;
}
.shop-page .heart{
  flex:0 0 38px;
}
.shop-page .food-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:auto;
}
.shop-page .add-btn{
  flex:0 0 auto;
  min-width:76px !important;
  white-space:nowrap;
}

/* Large desktop can keep the premium 3-panel shell safely */
@media (min-width: 1280px){
  .shop-page .shop-shell{
    display:grid !important;
    grid-template-columns: minmax(210px, 240px) minmax(520px, 1fr) minmax(320px, 370px) !important;
  }
  .shop-page .category-strip{
    grid-column:1 !important;
    grid-row:2 / span 2 !important;
    flex-direction:column !important;
  }
  .shop-page .menu-toolbar,
  .shop-page .menu-grid{
    grid-column:2 !important;
  }
  .shop-page .order-panel{
    grid-column:3 !important;
    position:sticky !important;
    top:94px !important;
    transform:none !important;
  }
}

/* Tablet/small desktop: do not force the left rail + cart into narrow space */
@media (max-width: 1279px){
  .shop-page .shop-shell{
    display:block !important;
    max-width: 980px;
    padding:0 18px;
    margin-bottom:110px;
  }
  .shop-page .fulfillment-required{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
  }
  .shop-page .menu-toolbar{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(260px,360px);
    align-items:end;
    gap:18px;
    margin-bottom:14px;
  }
  .shop-page .category-strip{
    position:sticky !important;
    top:0 !important;
    z-index:35;
    display:flex !important;
    flex-direction:row !important;
    gap:10px;
    max-height:none !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    margin:0 -18px 18px;
    padding:12px 18px;
    border-left:0;
    border-right:0;
    border-radius:0;
    background:rgba(255,255,255,.94);
    backdrop-filter:blur(14px);
  }
  .shop-page .cat-chip{
    width:auto !important;
    flex:0 0 auto;
    white-space:nowrap !important;
    min-height:46px;
    padding-inline:18px;
  }
  .shop-page .menu-grid{
    display:grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap:18px;
  }
  .shop-page .premium-food-card{
    grid-template-columns:1fr !important;
    min-height:0;
  }
  .shop-page .food-media{
    width:auto !important;
    min-width:0 !important;
    height:180px !important;
    min-height:180px !important;
    margin:14px 14px 0 !important;
  }
  .shop-page .food-info{
    padding:14px !important;
  }
  .shop-page .food-info p{
    min-height:42px;
  }
  .shop-page .order-panel{
    position:fixed !important;
    top:auto !important;
    left:0;
    right:0;
    bottom:0;
    z-index:80;
    max-height:88vh;
    overflow:auto;
    border-radius:28px 28px 0 0;
    transform:translateY(110%) !important;
    transition:transform .24s ease;
  }
  .shop-page .order-panel.mobile-open{
    transform:translateY(0) !important;
  }
}

/* Phone: single, comfortable app-like cards */
@media (max-width: 760px){
  .shop-page .shop-shell{
    max-width:none;
    padding:0 14px;
  }
  .shop-page .menu-toolbar{
    display:block;
  }
  .shop-page .search-box{
    width:100%;
    margin-top:16px;
  }
  .shop-page .fulfillment-required{
    display:block;
  }
  .shop-page .fulfillment-required > div:last-child{
    display:flex;
    gap:10px;
    margin-top:12px;
  }
  .shop-page .fulfillment-required button{
    flex:1;
  }
  .shop-page .menu-grid{
    display:flex !important;
    flex-direction:column;
    gap:14px;
  }
  .shop-page .premium-food-card{
    display:grid !important;
    grid-template-columns:124px minmax(0,1fr) !important;
    border-radius:24px;
  }
  .shop-page .food-media{
    width:104px !important;
    min-width:104px !important;
    height:104px !important;
    min-height:104px !important;
    margin:14px !important;
    border-radius:20px;
  }
  .shop-page .food-info{
    padding:14px 14px 14px 0 !important;
  }
  .shop-page .food-info p{
    min-height:0;
    font-size:.94rem;
  }
  .shop-page .food-footer{
    margin-top:10px;
  }
}

/* Very small phones: keep button inside card and avoid text collisions */
@media (max-width: 420px){
  .shop-page .premium-food-card{
    grid-template-columns:108px minmax(0,1fr) !important;
  }
  .shop-page .food-media{
    width:88px !important;
    min-width:88px !important;
    height:88px !important;
    min-height:88px !important;
    margin:12px !important;
  }
  .shop-page .food-title-row h3{
    font-size:1rem;
  }
  .shop-page .add-btn{
    min-width:64px !important;
    min-height:42px;
    padding-inline:12px;
  }
  .shop-page .food-footer strong{
    font-size:1.08rem;
  }
}
