/* ═══════════════════════════════════════════════════════
   BREXÓ — mobile.css
   App mobile (app-mobile.blade.php)
═══════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
    --pink:       #FF2768;
    --pink-deep:  #E0204F;
    --yellow:     #F4B400;
    --dark:       #5A4A3A;
    --ink:        #4A3D31;
    --muted:      #8A7B6B;
    --faint:      #B3A496;
    --line:       #E8DDD0;
    --ground:     #FBF5EF;
    --surface:    #FFFFFF;
    --light-pink: #FFE8F0;
    --kraft:      #E7D9C9;
    --serif:      'Baloo 2', cursive;
    --sans:       'Inter', -apple-system, sans-serif;
    --header-h:   58px;
    --nav-h:      62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--ground);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    min-height: 100dvh;
}

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ── HEADER ── */
.app-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    background: rgba(255,255,255,.95);
    backdrop-filter: saturate(150%) blur(12px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center;
    padding: 0 1rem; gap: .75rem;
}
.app-header-back {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    border-radius: 999px; color: var(--ink); background: none; border: none; cursor: pointer;
    flex-shrink: 0; transition: background .15s;
}
.app-header-back:hover { background: var(--ground); }
.app-header-logo {
    flex: 1; display: flex; align-items: center; justify-content: center;
}
.app-header-logo img { height: 36px; width: auto; }
.app-header-logo .logo-text {
    font-family: var(--serif); font-weight: 900; font-size: 1.5rem; line-height: 1;
}
.app-header-logo .logo-text .p { color: var(--pink); }
.app-header-logo .logo-text .y { color: var(--yellow); }
.app-header-actions { display: flex; align-items: center; gap: .1rem; flex-shrink: 0; }
.app-icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink); background: none; border: none; cursor: pointer;
    transition: background .15s;
}
.app-icon-btn:hover { background: var(--light-pink); color: var(--pink); }
.app-cart-badge {
    position: absolute; top: 4px; right: 4px;
    background: var(--pink); color: #fff; font-size: .55rem; font-weight: 700;
    border-radius: 999px; min-width: 15px; height: 15px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface);
}

/* ── FLASH ── */
.flash-success { background: #E7F6EC; color: #1F6B3A; text-align: center; font-size: .85rem; padding: .65rem 1rem; }
.flash-error   { background: #FBE7E7; color: #A12A2A; text-align: center; font-size: .85rem; padding: .65rem 1rem; }

/* ── MAIN ── */
.app-main { min-height: calc(100dvh - var(--header-h) - var(--nav-h)); }

/* ── BOTTOM NAV ── */
.app-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
    height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line);
    display: flex; align-items: flex-start; justify-content: space-around;
    padding-top: .45rem;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .2rem;
    color: var(--faint); font-size: .65rem; font-weight: 600; letter-spacing: .02em;
    text-decoration: none; padding: .15rem 0; transition: color .15s; min-width: 0;
}
.nav-item svg { transition: transform .18s; }
.nav-item.active { color: var(--pink); }
.nav-item.active svg { transform: scale(1.08); }
.nav-item:not(.active):hover { color: var(--ink); }
.nav-badge {
    position: absolute; top: .3rem;
    background: var(--pink); color: #fff; font-size: .52rem; font-weight: 700;
    border-radius: 999px; min-width: 14px; height: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--surface); margin-left: 10px;
}
.nav-icon { position: relative; display: flex; }

/* sticky action bar above bottom nav */
.action-bar {
    position: fixed; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
    left: 0; right: 0; z-index: 90;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: .75rem 1rem;
}
body.has-action-bar { padding-bottom: calc(var(--nav-h) + 72px + env(safe-area-inset-bottom, 0px)); }

/* ── SHARED COMPONENTS ── */
.section { padding: 0 1rem; }

.page-section { padding: 1.5rem 1rem 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.section-link { font-size: .78rem; font-weight: 600; color: var(--pink); }

.btn-add-sacola {
    display: inline-flex; align-items: center; gap: .5rem;
    background: #2a9d4e; color: #fff; border: none;
    border-radius: 999px; padding: .85rem 1.5rem;
    font-family: var(--sans); font-weight: 700; font-size: .95rem;
    cursor: pointer; transition: background .18s;
}
.btn-add-sacola:hover { background: #218c42; }

.btn-pink {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--pink); color: #fff; border: none;
    border-radius: 999px; padding: .75rem 1.5rem;
    font-family: var(--sans); font-weight: 600; font-size: .92rem;
    cursor: pointer; text-decoration: none; transition: background .2s;
}
.btn-pink:hover { background: var(--pink-deep); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* Product card — mobile */
.product-card { display: flex; flex-direction: column; background: transparent; }
.product-card .thumb {
    position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 10px;
    background: var(--kraft); display: flex; align-items: center; justify-content: center;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:active .thumb img { transform: scale(1.04); }
.product-card .badge-promo {
    position: absolute; top: .5rem; left: .5rem; background: var(--pink); color: #fff;
    font-size: .65rem; font-weight: 700; padding: .2rem .5rem; border-radius: 4px;
}
.product-card .badge-sold {
    position: absolute; inset: 0; background: rgba(46,38,32,.45); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-size: 1rem;
}
.product-card .info { padding: .55rem .1rem 0; }
.product-card .store-name { font-size: .65rem; color: var(--faint); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.product-card .product-name { font-size: .88rem; font-weight: 500; color: var(--ink); line-height: 1.3; margin-top: .1rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-card .price-current { font-size: .95rem; font-weight: 700; color: var(--ink); display: block; margin-top: .25rem; }
.product-card .price-old { font-size: .78rem; color: var(--faint); text-decoration: line-through; margin-left: .35rem; }

.grid-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem .75rem; }

/* Category chip */
.cat-chip { display: inline-flex; flex-direction: column; align-items: center; gap: .4rem; flex-shrink: 0; }
.cat-chip-img { width: 72px; height: 72px; border-radius: 18px; overflow: hidden; background: var(--kraft); }
.cat-chip-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-chip-name { font-size: .72rem; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.cat-chip.active .cat-chip-img { box-shadow: 0 0 0 2.5px var(--pink); }

.scroll-row { display: flex; gap: .75rem; overflow-x: auto; scrollbar-width: none; padding: 0 1rem .25rem; -webkit-overflow-scrolling: touch; }
.scroll-row::-webkit-scrollbar { display: none; }

/* Empty state */
.empty-state { text-align: center; padding: 3.5rem 1.5rem; }
.empty-state .emoji { font-size: 2.5rem; margin-bottom: .75rem; }
.empty-state h2 { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink); margin-bottom: .4rem; }
.empty-state p { color: var(--muted); font-size: .88rem; margin-bottom: 1.25rem; }

/* Card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; }

/* Field */
.field { width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: .75rem 1rem; font-family: var(--sans); font-size: .95rem; color: var(--ink); outline: none; transition: border-color .15s; }
.field:focus { border-color: var(--ink); }
.field-label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink); margin-bottom: .35rem; }

/* Mini footer */
.app-footer { padding: 1.5rem 1rem 1rem; border-top: 1px solid var(--line); text-align: center; }
.app-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem .6rem; font-size: .78rem; }
.app-footer-links a { color: var(--muted); text-decoration: none; }
.app-footer-links a:hover { color: var(--pink); }
.app-footer-links span { color: var(--faint); }
.app-footer-copy { font-size: .72rem; color: var(--faint); margin-top: .6rem; }

/* Cookie consent mobile */
#mcookie-bar { position: fixed; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); left: 0; right: 0; z-index: 200; background: var(--ink); color: #fff; padding: .85rem 1rem; display: flex; align-items: center; gap: .75rem; font-size: .82rem; }
#mcookie-bar p { flex: 1; line-height: 1.45; color: rgba(255,255,255,.85); }
#mcookie-bar a { color: var(--yellow); text-decoration: underline; }
#mcookie-accept { flex-shrink: 0; background: var(--pink); color: #fff; border: none; border-radius: 999px; padding: .5rem 1.1rem; font-size: .82rem; font-weight: 600; cursor: pointer; font-family: var(--sans); white-space: nowrap; }
