/*
  SaloCart V3.3 — Appearance, motion and sound-control layer.
  Loads after ui-pro.css. No framework or API changes required.
*/
:root{
  --sc-focus:rgba(10,108,72,.28);
  --sc-glow:rgba(92,225,153,.27);
  --sc-elevated:rgba(255,255,255,.92);
  --sc-skeleton:#E9F1EB;
}

html[data-theme="dark"]{
  color-scheme:dark;
  --sc-green:#52DB9D;
  --sc-green-deep:#A5F7C8;
  --sc-green-dark:#0B3D2A;
  --sc-lime:#C7EA6A;
  --sc-lime-soft:#293A1F;
  --sc-mint:#173726;
  --sc-mint-strong:#204E34;
  --sc-orange:#FFC35A;
  --sc-ink:#ECF6EF;
  --sc-ink-soft:#C1D2C7;
  --sc-muted:#96AA9D;
  --sc-line:#2A4434;
  --sc-line-strong:#3B614A;
  --sc-soft:#0B1510;
  --sc-surface:#111D16;
  --sc-surface-alt:#16251C;
  --sc-shadow-xs:0 4px 14px rgba(0,0,0,.22);
  --sc-shadow-sm:0 12px 34px rgba(0,0,0,.26);
  --sc-shadow-lg:0 28px 72px rgba(0,0,0,.42);
  --sc-elevated:rgba(17,29,22,.90);
  --sc-skeleton:#1D3024;
}

html[data-theme="dark"] body{
  background:
    radial-gradient(circle at 100% 0,rgba(82,219,157,.09),transparent 25rem),
    radial-gradient(circle at 0 38%,rgba(199,234,106,.045),transparent 22rem),
    linear-gradient(180deg,#0C1711 0,#0A130E 55%,#0D1711 100%);
}
html[data-theme="dark"] ::selection{background:#2B6B45;color:#F4FFF7}
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] input:focus-visible,
html[data-theme="dark"] select:focus-visible,
html[data-theme="dark"] textarea:focus-visible{outline-color:var(--sc-focus)!important}

/* Fast, subtle touch feedback. Motion is disabled below for accessibility. */
button,.btn-sc,.btn-sc-light,.btn-sc-alt,.filter-chip,.deal-card,.icon-button,.account-button{
  -webkit-tap-highlight-color:transparent;
}
button:not(:disabled),.btn-sc:not(:disabled),.btn-sc-light:not(:disabled),.btn-sc-alt:not(:disabled){
  transition:transform .16s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease,color .18s ease;
}
button:not(:disabled):active,.btn-sc:not(:disabled):active,.btn-sc-light:not(:disabled):active,.btn-sc-alt:not(:disabled):active{transform:scale(.975)}

.button-ripple{position:relative;overflow:hidden;isolation:isolate}
.button-ripple::after{
  content:"";position:absolute;width:11px;height:11px;left:var(--ripple-x,50%);top:var(--ripple-y,50%);
  transform:translate(-50%,-50%) scale(0);border-radius:50%;pointer-events:none;
  background:currentColor;opacity:.14;animation:sc-ripple .52s ease-out forwards;
}
@keyframes sc-ripple{to{transform:translate(-50%,-50%) scale(18);opacity:0}}

.page-root.page-enter{animation:page-enter .28s cubic-bezier(.2,.72,.25,1) both}
@keyframes page-enter{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.cart-pop{animation:cart-pop .42s cubic-bezier(.22,.9,.33,1.45)}
@keyframes cart-pop{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-3px) scale(1.12)}}
.toast{animation:toast-enter .25s ease-out both}
@keyframes toast-enter{from{opacity:0;transform:translateX(12px) translateY(-5px)}to{opacity:1;transform:translateX(0) translateY(0)}}

/* Appearance shortcut */
.preference-button{position:relative}
.preference-button::after{content:"";position:absolute;right:7px;bottom:7px;width:7px;height:7px;border-radius:99px;background:var(--sc-lime);border:1.5px solid var(--sc-surface)}
html[data-theme="dark"] .preference-button::after{background:#A5F7C8}

/* Preferences sheet */
.preference-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.preference-choice{
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-height:105px;padding:12px;border:1px solid var(--sc-line);
  border-radius:16px;background:var(--sc-surface-alt);color:var(--sc-ink);text-align:left;
}
.preference-choice:hover{border-color:var(--sc-green);transform:translateY(-1px)}
.preference-choice.active{border-color:var(--sc-green);box-shadow:0 0 0 3px rgba(82,219,157,.13);background:var(--sc-mint)}
.preference-choice>i{display:grid;place-items:center;width:31px;height:31px;border-radius:11px;background:var(--sc-surface);color:var(--sc-green);font-size:1rem}
.preference-choice strong{font-family:"Plus Jakarta Sans","Manrope",sans-serif;font-size:.74rem;line-height:1.15}
.preference-choice small{color:var(--sc-muted);font-size:.61rem;line-height:1.35}
.preference-panel{margin-top:16px;padding-top:16px;border-top:1px solid var(--sc-line)}
.preference-panel h3{font-family:"Plus Jakarta Sans","Manrope",sans-serif;font-size:.86rem;margin:0 0 4px}
.preference-panel p{margin:0;color:var(--sc-muted);font-size:.7rem;line-height:1.45}
.sound-row{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px;padding:12px;border:1px solid var(--sc-line);border-radius:15px;background:var(--sc-surface-alt)}
.sound-row>div{display:flex;gap:10px;align-items:flex-start}
.sound-row>div>i{display:grid;place-items:center;width:34px;height:34px;flex:0 0 34px;border-radius:12px;background:var(--sc-surface);color:var(--sc-green);font-size:1rem}
.sound-row strong{display:block;font-size:.76rem}.sound-row small{display:block;margin-top:2px;color:var(--sc-muted);font-size:.64rem;line-height:1.4}
.sound-switch{width:49px;height:29px;flex:0 0 49px;position:relative;border-radius:99px;border:1px solid var(--sc-line-strong);background:#C7D6CC}
.sound-switch::after{content:"";position:absolute;top:3px;left:3px;width:21px;height:21px;border-radius:50%;background:#FFF;box-shadow:0 2px 6px rgba(0,0,0,.18);transition:transform .18s ease}
.sound-switch[aria-pressed="true"]{background:var(--sc-green);border-color:var(--sc-green)}
.sound-switch[aria-pressed="true"]::after{transform:translateX(20px)}
.preference-note{display:flex;gap:8px;margin-top:12px;padding:10px 11px;border-radius:13px;background:var(--sc-mint);color:var(--sc-ink-soft);font-size:.67rem;line-height:1.5}
.preference-note i{color:var(--sc-green);margin-top:1px}

/* Elevated details and calmer visual depth. */
.hero::before{content:"";position:absolute;right:7%;top:12%;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle,rgba(199,234,106,.17),transparent 68%);filter:blur(2px);pointer-events:none;animation:orb-drift 8s ease-in-out infinite}
@keyframes orb-drift{0%,100%{transform:translate(0,0)}50%{transform:translate(-12px,9px)}}
.deal-card{will-change:transform}
.deal-card:hover{box-shadow:0 18px 42px rgba(9,62,38,.13)}
.deal-card:hover .deal-media img{transform:scale(1.035)}
.deal-media img{transition:transform .55s ease}
.progress-line>span{position:relative;overflow:hidden}
.progress-line>span::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.46),transparent);animation:progress-shine 3.6s ease-in-out infinite}
@keyframes progress-shine{35%,100%{transform:translateX(125%)}}
.loading-orb{box-shadow:0 0 0 5px rgba(82,219,157,.08),0 0 20px rgba(82,219,157,.16)}

/* Dark palette: overrides the older hard-coded light surfaces without touching APIs. */
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .mobile-nav,
html[data-theme="dark"] .app-footer,
html[data-theme="dark"] .modal-sheet,
html[data-theme="dark"] .cart-sheet,
html[data-theme="dark"] .deal-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .how-step,
html[data-theme="dark"] .catalog-toolbar,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .order-card,
html[data-theme="dark"] .cart-line,
html[data-theme="dark"] .cart-summary,
html[data-theme="dark"] .tier-card,
html[data-theme="dark"] .reserve-panel,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .list-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .pickup-code-card,
html[data-theme="dark"] .checkout-summary-card,
html[data-theme="dark"] .checkout-steps>div,
html[data-theme="dark"] .payment-box,
html[data-theme="dark"] .filter-select,
html[data-theme="dark"] .cart-actions-bottom{
  background:var(--sc-surface)!important;
  border-color:var(--sc-line)!important;
  color:var(--sc-ink)!important;
}
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .mobile-nav{background:rgba(16,29,21,.88)!important}
html[data-theme="dark"] .cart-summary,
html[data-theme="dark"] .reserve-panel,
html[data-theme="dark"] .checkout-summary-card,
html[data-theme="dark"] .checkout-steps>div,
html[data-theme="dark"] .notice-card,
html[data-theme="dark"] .preference-choice,
html[data-theme="dark"] .sound-row{background:var(--sc-surface-alt)!important}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .input-group-text,
html[data-theme="dark"] .hero-search,
html[data-theme="dark"] .cart-quantity,
html[data-theme="dark"] .cart-quantity input,
html[data-theme="dark"] .cart-quantity button{
  background:#0D1711!important;color:var(--sc-ink)!important;border-color:var(--sc-line)!important;
}
html[data-theme="dark"] .form-control::placeholder{color:#718379}
html[data-theme="dark"] .topbar .brand-copy small,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .deal-meta,
html[data-theme="dark"] .deal-progress-copy,
html[data-theme="dark"] .deal-next-tier,
html[data-theme="dark"] .cart-summary-note,
html[data-theme="dark"] .cart-line p,
html[data-theme="dark"] .app-footer,
html[data-theme="dark"] .text-secondary{color:var(--sc-muted)!important}
html[data-theme="dark"] .desktop-nav button,
html[data-theme="dark"] .nav-item,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .account-button{color:var(--sc-ink-soft)}
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .account-button{background:var(--sc-surface-alt);border-color:var(--sc-line)}
html[data-theme="dark"] .cart-button{background:#163F2A;border-color:#285D41;color:#A5F7C8}
html[data-theme="dark"] .location-pill{background:#14291D;border-color:#2A4B37;color:#B9D0BF}
html[data-theme="dark"] .filter-chip{background:var(--sc-surface-alt);border-color:var(--sc-line);color:var(--sc-ink-soft)}
html[data-theme="dark"] .filter-chip.active{background:#1B4C32;color:#C6F9D9;border-color:#408D62}
html[data-theme="dark"] .cart-intro{background:#143723;color:#C1E5CD}
html[data-theme="dark"] .cart-errors>div{background:#3A2026;color:#FFD4D8}
html[data-theme="dark"] .cart-line-unavailable{background:#29191D!important;border-color:#6C3540!important}
html[data-theme="dark"] .cart-remove{background:#3A2026;color:#FFB7C0}
html[data-theme="dark"] .image-fallback,.image-fallback *{background:#1C3023!important;color:#A5F7C8!important}
html[data-theme="dark"] .table{--bs-table-bg:transparent;--bs-table-color:var(--sc-ink);--bs-table-border-color:var(--sc-line);--bs-table-hover-bg:#17261D;--bs-table-hover-color:var(--sc-ink)}
html[data-theme="dark"] .toast:not(.text-bg-danger){background:#17261D!important;color:var(--sc-ink)!important;border:1px solid var(--sc-line)!important}
html[data-theme="dark"] .cart-actions-bottom{background:rgba(17,29,22,.95)!important}
html[data-theme="dark"] .close-sheet{background:var(--sc-surface-alt);color:var(--sc-ink);border-color:var(--sc-line)}
html[data-theme="dark"] .sheet-head{border-color:var(--sc-line)}
html[data-theme="dark"] .modal-backdrop-sc{background:rgba(2,8,4,.72)}
html[data-theme="dark"] .btn-sc-light{background:#1A3324;color:#B5F6CF;border-color:#345C42}
html[data-theme="dark"] .btn-sc-light:hover{background:#20442F;color:#D9FFE7}
html[data-theme="dark"] .btn-close{filter:invert(1) grayscale(1)}

@media(max-width:575.98px){
  .preference-grid{gap:7px}.preference-choice{min-height:95px;padding:10px;border-radius:14px}.preference-choice strong{font-size:.67rem}.preference-choice small{font-size:.56rem}.preference-choice>i{width:28px;height:28px;border-radius:10px;font-size:.9rem}
  .preference-button{display:inline-grid!important}
  .hero::before{right:-42px;top:0;width:140px;height:140px}
}
@media(prefers-reduced-motion:reduce){
  .page-root.page-enter,.cart-pop,.toast,.hero::before,.progress-line>span::after{animation:none!important}
  .button-ripple::after{display:none!important}
  .deal-card:hover .deal-media img{transform:none!important}
}
