/* =========================================================
   CRAZYCRAVE — App-style professional UI layer
   Loaded LAST (after mobile.css). Pure presentation: no markup/logic change.
   Mobile-first look & feel: floating bottom tab bar, pill search, chip
   categories, soft rounded cards, large tap targets, safe-area aware.
   Desktop keeps a clean, premium storefront layout.
   ========================================================= */

body.store{
  --ink:#241823; --ink-soft:#54444f; --muted:#7d6e79;
  --rose:#c2185b; --rose-dark:#a01049; --rose-soft:#fde8f0; --rose-tint:#fff5f9;
  --brand-grad:linear-gradient(135deg,#d81b70 0%,#b0154f 100%);
  --canvas:#f7f3f6; --surface:#fff; --line:#eee4ea; --line-strong:#ddcdd6;
  --r-card:20px; --r-pill:999px;
  --sh-card:0 1px 2px rgba(36,24,35,.04),0 8px 22px -12px rgba(36,24,35,.16);
  --sh-float:0 12px 34px -10px rgba(36,24,35,.35);
  --tabbar-h:64px;
  background:var(--canvas);
  -webkit-font-smoothing:antialiased;
}
body.store h1,body.store h2{font-family:var(--f-display);letter-spacing:-.005em}
body.store h3,body.store h4{font-weight:700}

/* ---------- Buttons / inputs ---------- */
body.store .btn,body.store button{border-radius:14px;font-weight:700}
body.store .btn:not(.secondary):not(.danger),
body.store button[type=submit]:not(.pass-toggle):not(.pc-add):not(.ci-remove):not(.qty-btn){background-image:var(--brand-grad);box-shadow:0 8px 18px -8px rgba(194,24,91,.55)}
body.store .btn:not(.secondary):not(.danger):hover{filter:brightness(1.05)}
body.store .btn.secondary{background:#fff;border:1.5px solid var(--line-strong);color:var(--ink);box-shadow:none}
body.store input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
body.store select,body.store textarea{
  border-radius:14px;border:1.5px solid var(--line);background:#fff;color:var(--ink);
  transition:border-color .15s,box-shadow .15s;
}
body.store input:focus,body.store select:focus,body.store textarea:focus{
  outline:0;border-color:var(--rose);box-shadow:0 0 0 4px rgba(194,24,91,.12);
}
body.store .card,body.store .form-card{border:0;border-radius:var(--r-card);box-shadow:var(--sh-card);background:#fff}
body.store .alert{border-radius:14px}

/* ---------- Header ---------- */
body.store .announce{background:var(--ink);font-size:.78rem}
body.store .topbar{background:rgba(255,255,255,.92);border-bottom:1px solid rgba(238,228,234,.9);box-shadow:0 6px 20px -16px rgba(36,24,35,.4)}
body.store .brand span{letter-spacing:.06em}
body.store .nav-search{border-radius:var(--r-pill);background:#f5eff3;border:1.5px solid transparent;overflow:hidden}
body.store .nav-search:focus-within{background:#fff;border-color:var(--rose);box-shadow:0 0 0 4px rgba(194,24,91,.1)}
body.store .nav-search input{background:transparent;border:0;box-shadow:none;border-radius:0}
body.store .nav-search input:focus{box-shadow:none;border:0}
body.store .nav-search button,body.store .nav-search button[type=submit]{background:var(--brand-grad);border-radius:50%;box-shadow:none}
body.store .nav-icon{border-radius:50%;transition:background .15s}
body.store .nav-icon:active{background:var(--rose-soft)}
body.store .nav-count{background:var(--rose);color:#fff;border:2px solid #fff;box-sizing:content-box}

/* category chips */
body.store .catbar{background:transparent;border:0}
body.store .catbar .container{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding-top:8px;padding-bottom:10px}
body.store .catbar .container::-webkit-scrollbar{display:none}
body.store .catbar a{flex:none;padding:0 16px;min-height:38px;display:inline-flex;align-items:center;border-radius:var(--r-pill);
  background:#fff;border:1.5px solid var(--line);color:var(--ink-soft);font-weight:700;font-size:.85rem;transition:all .15s}
body.store .catbar a.is-active{background:var(--ink);border-color:var(--ink);color:#fff}
body.store .catbar a::after{display:none}

/* ---------- Section titles ---------- */
body.store .section-title{margin:26px 0 14px;align-items:center}
body.store .section-title h2{font-size:1.4rem}
body.store .section-title a{font-size:.85rem;font-weight:700;color:var(--rose);background:var(--rose-soft);padding:6px 14px;border-radius:var(--r-pill)}

/* ---------- Hero ---------- */
body.store .home-page .hero-slider{border-radius:26px;box-shadow:var(--sh-float);overflow:hidden}
body.store .home-page .hero-cta{border-radius:var(--r-pill)}
body.store .home-page .hero-dot{border-radius:var(--r-pill)}

/* trust strip */
body.store .home-trust{background:#fff;border:0;border-radius:var(--r-card);box-shadow:var(--sh-card)}

/* category tiles */
body.store .home-page .cat-carousel .cat-chip{border-radius:var(--r-card);border:0;box-shadow:var(--sh-card)}

/* ---------- Product card ---------- */
.pc{border:0;border-radius:var(--r-card);box-shadow:var(--sh-card);background:#fff}
.pc:hover{box-shadow:var(--sh-float);transform:translateY(-3px)}
.pc{transition:transform .2s var(--ease),box-shadow .2s var(--ease)}
.pc:active{transform:scale(.985)}
.pc-media{aspect-ratio:1/1;background:linear-gradient(160deg,#fff5f9,#f6eef3)}
.pc-tag{border-radius:var(--r-pill);background:var(--rose);color:#fff;font-weight:800;box-shadow:0 4px 10px -4px rgba(194,24,91,.6)}
.pc-tag-dark{background:var(--ink)}
body.store .pc-heart button,body.store .pc-heart button[type=submit]{background:rgba(255,255,255,.94) none;box-shadow:0 4px 12px -4px rgba(36,24,35,.35);color:var(--ink-soft);border-radius:50%;box-shadow:0 4px 12px -4px rgba(36,24,35,.35);backdrop-filter:blur(6px);min-height:36px;width:36px;padding:0}
body.store .pc-heart button:hover{background:#fff;color:var(--rose)}
body.store .pc-heart button.is-saved{color:var(--rose)}
body.store .pc-heart button:not(.is-saved) svg{fill:none}
.pc-body{padding:12px 14px 14px}
.pc-cat{font-size:.68rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--rose)}
.pc-title{font-size:.95rem;font-weight:700;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pc-price strong{font-size:1.05rem;font-weight:800;color:var(--ink)}
body.store .pc-add{border-radius:12px;min-height:42px;background:var(--rose-soft);color:var(--rose-dark);border:0;box-shadow:none;font-weight:800;font-size:.85rem}
body.store .pc-add:hover{background:var(--rose);color:#fff}
body.store .pc-add:disabled{background:#eee;color:#999}

/* ---------- Filters / products page ---------- */
body.store .products-page .pp-bar{border-radius:var(--r-card);border:0;box-shadow:var(--sh-card)}

/* ---------- Product detail ---------- */
body.store .product-detail .image,body.store .product-gallery-frame{border-radius:var(--r-card);border:0;box-shadow:var(--sh-card);background:linear-gradient(160deg,#fff5f9,#f6eef3)}
body.store .product-page .product-info{border-radius:var(--r-card);border:0;box-shadow:var(--sh-card)}
body.store .product-page .btn-buy{background-image:var(--brand-grad);border-radius:14px}
body.store .product-page .price-row .price{color:var(--rose-dark)}
body.store .product-page .stock-badge{border-radius:var(--r-pill)}
.chat-cta{border-radius:18px}

/* ---------- Cart ---------- */
body.store .cart-item{border:0;border-radius:var(--r-card);box-shadow:var(--sh-card);background:#fff}
body.store .cart-item img{border-radius:14px}
body.store .cart-summary{border:0;border-radius:var(--r-card);box-shadow:var(--sh-card);background:#fff}
body.store .ci-qty{border-radius:var(--r-pill);background:#f5eff3}
body.store .ci-qty button{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12);border-radius:50%}

/* ---------- Auth ---------- */
body.store .auth-card,body.store .track-card{border:0;border-radius:24px;box-shadow:var(--sh-float);background:#fff}

/* ---------- Footer ---------- */
body.store .site-footer{background:#1f1520;color:#d8c9d3;border:0;margin-top:40px}
body.store .site-footer h4{color:#fff}
body.store .site-footer a{color:#d8c9d3}
body.store .site-footer a:hover{color:#fff}
body.store .site-footer .brand span{color:#fff;background:none;-webkit-text-fill-color:#fff}
body.store .site-footer .sf-assure{border-color:rgba(255,255,255,.1)}
body.store .site-footer .sf-assure small,body.store .site-footer .sf-copy{color:#a995a3}
body.store .site-footer .sf-assure strong{color:#fff}
body.store .site-footer .sf-assure .ic{color:#ff8fb8}
body.store .site-footer .sf-pay span{background:rgba(255,255,255,.08);border:0;color:#fff;border-radius:var(--r-pill)}
body.store .site-footer .sf-copy{border-color:rgba(255,255,255,.1)}

/* =========================================================
   MOBILE — app experience
   ========================================================= */
@media(max-width:820px){
  body.store{padding-bottom:calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom))}
  body.store .announce{display:none}
  body.store .container{width:min(100% - 28px,1200px)}

  /* app bar: logo + actions on one line, search pill on the next */
  body.store .nav{min-height:0;padding:10px 0 8px;gap:10px 8px;display:flex;flex-wrap:wrap;align-items:center}
  body.store .brand{flex:1;min-width:0;order:1;font-size:1.15rem}
  body.store .brand img{width:34px;height:34px;border-radius:10px}
  body.store .nav-tools{order:2;margin-left:auto;gap:4px}
  body.store .nav-tools .nav-icon{background:#f5eff3;width:42px;height:42px}
  body.store .nav-search{order:3;flex:1 0 100%;min-height:46px;margin:0}
  body.store .nav-search input{min-height:44px;padding-left:18px}
  body.store .menu-toggle{background:#f5eff3;color:var(--ink);border-radius:50%;width:42px;min-height:42px;padding:0;box-shadow:none}
  body.store .nav-links.open{position:absolute;left:14px;right:14px;top:100%;background:#fff;border-radius:20px;box-shadow:var(--sh-float);padding:8px;margin-top:6px;border:1px solid var(--line)}
  body.store .nav-links.open a{border-radius:12px;padding:0 14px}
  body.store .nav-links.open a:active{background:var(--rose-soft)}

  /* headings & spacing */
  body.store main{padding-top:4px}
  body.store .section-title{margin:22px 0 12px}
  body.store .section-title h2{font-size:1.25rem}

  /* hero */
  body.store .home-page .hero-slider{margin-top:8px;border-radius:22px}

  /* trust strip → swipeable chips */
  body.store .home-trust{display:flex;overflow-x:auto;gap:10px;background:transparent;box-shadow:none;padding:2px 2px 6px;scroll-snap-type:x proximity;scrollbar-width:none}
  body.store .home-trust::-webkit-scrollbar{display:none}
  body.store .home-trust>div{flex:0 0 auto;background:#fff;border-radius:16px;box-shadow:var(--sh-card);padding:10px 14px;scroll-snap-align:start;border:0}

  /* product grid: tight 2 columns */
  .pc-grid{gap:12px}
  .pc-body{padding:10px 12px 12px}
  .pc-title{font-size:.88rem}
  .pc-price strong{font-size:.98rem}
  body.store .pc-add{min-height:40px;font-size:.8rem}

  /* swipe rails show peeking next card */
  .pc-rail .pc{flex:0 0 46%}

  /* floating tab bar */
  body.store .bottom-nav{
    left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));
    height:var(--tabbar-h);padding:0 6px;align-items:center;
    background:rgba(255,255,255,.92);backdrop-filter:saturate(180%) blur(18px);-webkit-backdrop-filter:saturate(180%) blur(18px);
    border:1px solid rgba(238,228,234,.9);border-radius:26px;box-shadow:0 14px 36px -12px rgba(36,24,35,.4);
  }
  body.store .bottom-nav a{position:relative;height:50px;border-radius:18px;justify-content:center;gap:2px;font-size:.66rem;color:#8d7c87;transition:background .15s,color .15s}
  body.store .bottom-nav a:active{transform:scale(.94)}
  body.store .bottom-nav a.is-active{color:var(--rose);background:var(--rose-soft)}
  body.store .bottom-nav .bn-cart{margin-top:-26px;flex:0 0 68px;background:none!important}
  body.store .bn-cart-btn{width:58px;height:58px;background-image:var(--brand-grad);border:4px solid var(--canvas);box-shadow:0 10px 22px -6px rgba(194,24,91,.6)}
  body.store .bn-cart-btn em{border:2px solid #fff;box-sizing:content-box}
  body.store .back-to-top{bottom:calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom))}
  .pwa-banner{bottom:calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom))}

  /* product detail */
  body.store .product-page .product-info{padding:20px 18px}
  body.store .product-page .product-info h1{font-size:1.35rem}
  body.store .product-page .price-row .price{font-size:1.5rem}

  /* cart */
  body.store .cart-item{padding:12px;gap:12px}

  /* checkout sticky bar clears the tab bar */
  body.has-checkout{padding-bottom:calc(170px + env(safe-area-inset-bottom))}

  /* footer: compact */
  body.store .site-footer{border-radius:26px 26px 0 0;margin-top:30px}
  body.store .site-footer .sf-assure{display:grid;grid-template-columns:1fr 1fr;gap:12px}
  body.store .site-footer .sf-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 16px}
  body.store .site-footer .sf-about{grid-column:1/-1}
  body.store .site-footer .sf-grid a{padding:7px 0;font-size:.9rem}
  body.store .site-footer .sf-assure small{display:none}
}

/* small phones */
@media(max-width:380px){
  body.store .container{width:min(100% - 20px,1200px)}
  .pc-grid{gap:10px}
  body.store .bottom-nav{left:8px;right:8px}
}

/* tablets: 3-column grids, centered content */
@media(min-width:641px) and (max-width:1024px){
  .pc-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
}

/* =========================================================
   DESKTOP refinements
   ========================================================= */
@media(min-width:821px){
  body.store .catbar .container{justify-content:flex-start}
  body.store .nav-links a{border-radius:var(--r-pill);padding:8px 14px}
  body.store .nav-links a.is-active{background:var(--rose-soft);color:var(--rose-dark)}
  body.store .nav-links a::after{display:none}
  body.store .nav-links a.nav-register{background-image:var(--brand-grad);color:#fff}
  .pc-grid{gap:22px}
}

/* ---------- Motion / a11y ---------- */
@media(prefers-reduced-motion:reduce){
  .pc,.pc:hover,.pc:active,body.store .bottom-nav a{transition:none;transform:none}
}

/* guard against stray sideways scroll */
html{overflow-x:clip}
body.store main{overflow-x:clip}
