/* ============================================================
   Store Experience – premium ecommerce styles
   Use --brand custom property on a wrapping element to theme
   the brand-colored components inside it.
   ============================================================ */

:root {
    --brand: #FF7722;
    --brand-fg: #ffffff;
    --brand-soft: rgba(255, 119, 34, 0.08);
    --brand-ring: rgba(255, 119, 34, 0.35);
}

.brand-scope {
    --brand-soft: color-mix(in srgb, var(--brand) 8%, transparent);
    --brand-ring: color-mix(in srgb, var(--brand) 35%, transparent);
}

/* ---------- Section primitives ---------- */
.store-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #fff 0%, var(--brand-soft) 100%);
    border-bottom: 1px solid rgb(229 231 235);
}
.store-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 20% 0%, var(--brand-soft), transparent 55%),
                      radial-gradient(circle at 100% 100%, var(--brand-soft), transparent 60%);
}

.brand-accent { color: var(--brand); }
.brand-bg { background: var(--brand); color: var(--brand-fg); }
.brand-bar { background: var(--brand); }
.brand-ring:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ---------- Buttons ---------- */
.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.1rem;
    border-radius: .75rem;
    background: var(--brand);
    color: var(--brand-fg);
    font-weight: 600;
    font-size: .9rem;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px -6px var(--brand-ring);
    transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-brand:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 6px 20px -6px var(--brand-ring); }
.btn-brand:active { transform: translateY(0); }
.btn-brand:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-brand:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem 1.1rem;
    border-radius: .75rem;
    background: white;
    color: rgb(31 41 55);
    font-weight: 600;
    font-size: .9rem;
    border: 1px solid rgb(229 231 235);
    transition: background .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background: rgb(249 250 251); border-color: rgb(209 213 219); }

/* ---------- Brand chip / pill ---------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .8rem;
    border-radius: 9999px;
    font-size: .8rem;
    font-weight: 500;
    background: rgb(243 244 246);
    color: rgb(55 65 81);
    border: 1px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { background: rgb(229 231 235); }
.chip.is-active {
    background: var(--brand);
    color: var(--brand-fg);
    border-color: var(--brand);
}
.chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Product card ---------- */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgb(229 231 235);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px -20px rgba(0,0,0,.18);
    border-color: rgb(209 213 219);
}
.product-card__media {
    position: relative;
    aspect-ratio: 4 / 5;
    background: rgb(249 250 251);
    overflow: hidden;
}
.product-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.product-card:hover .product-card__media img { transform: scale(1.04); }
.product-card__placeholder {
    width:100%; height:100%;
    display:flex; align-items:center; justify-content:center;
    background: linear-gradient(135deg, var(--brand-soft), transparent);
    color: var(--brand);
}
.product-card__chips {
    position: absolute;
    top: .65rem; left: .65rem;
    display: flex; flex-wrap: wrap; gap: .35rem;
    z-index: 2;
}
.product-card__badge {
    display: inline-flex; align-items: center;
    padding: .2rem .55rem;
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .03em;
    border-radius: .35rem;
    background: rgba(17, 24, 39, .85);
    color: white;
    backdrop-filter: blur(4px);
}
.product-card__badge--sale { background: #dc2626; }
.product-card__badge--new { background: var(--brand); }
.product-card__badge--featured { background: #f59e0b; }
.product-card__badge--low { background: #ea580c; }
.product-card__badge--out { background: rgb(75 85 99); }

.product-card__quick {
    position: absolute;
    top: .65rem; right: .65rem;
    display: flex; flex-direction: column; gap: .35rem;
    opacity: 0; transform: translateX(6px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 2;
}
.product-card:hover .product-card__quick,
.product-card:focus-within .product-card__quick { opacity: 1; transform: translateX(0); }

.product-card__quick button {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    background: rgba(255,255,255,.96);
    color: rgb(55 65 81);
    border: 1px solid rgb(229 231 235);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,.12);
    transition: background .15s ease, color .15s ease, transform .15s ease;
    cursor: pointer;
}
.product-card__quick button:hover { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); }
.product-card__quick button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.product-card__body {
    flex: 1;
    padding: 1rem 1.1rem 1.1rem;
    display: flex; flex-direction: column; gap: .35rem;
}
.product-card__category {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand);
}
.product-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(17 24 39);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__name a { color: inherit; text-decoration: none; }
.product-card__name a:hover { color: var(--brand); }
.product-card__desc {
    font-size: .85rem;
    color: rgb(75 85 99);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card__price {
    margin-top: .25rem;
    display: flex; align-items: baseline; gap: .55rem;
}
.product-card__price-now {
    font-size: 1.15rem;
    font-weight: 700;
    color: rgb(17 24 39);
}
.product-card__price-was {
    font-size: .85rem;
    color: rgb(156 163 175);
    text-decoration: line-through;
}
.product-card__actions {
    margin-top: .85rem;
    display: flex; gap: .5rem;
}
.product-card__add {
    flex: 1;
}

/* Skeleton */
.product-card.is-skeleton { pointer-events: none; }
.product-card.is-skeleton .product-card__media,
.product-card.is-skeleton .product-card__name,
.product-card.is-skeleton .product-card__desc,
.product-card.is-skeleton .product-card__price-now {
    background: linear-gradient(90deg, rgb(243 244 246) 25%, rgb(229 231 235) 50%, rgb(243 244 246) 75%);
    background-size: 200% 100%;
    animation: skel 1.4s ease-in-out infinite;
    color: transparent;
    border-radius: .35rem;
}
.product-card.is-skeleton .product-card__name { height: 1.1rem; }
.product-card.is-skeleton .product-card__desc { height: 2.2rem; }
.product-card.is-skeleton .product-card__price-now { height: 1.2rem; width: 30%; }
@keyframes skel { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Restaurant menu row ---------- */
.menu-row {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: .9rem 0;
    border-bottom: 1px dashed rgb(229 231 235);
}
.menu-row:last-child { border-bottom: 0; }
.menu-row__img {
    width: 96px; height: 96px;
    border-radius: .85rem;
    overflow: hidden;
    background: rgb(249 250 251);
    flex-shrink: 0;
}
.menu-row__img img { width: 100%; height: 100%; object-fit: cover; }
.menu-row__placeholder {
    width:100%; height:100%;
    display:flex; align-items:center; justify-content:center;
    background: var(--brand-soft);
    color: var(--brand);
}
.menu-row__name { font-weight: 600; color: rgb(17 24 39); }
.menu-row__desc { font-size: .85rem; color: rgb(75 85 99); margin-top: .15rem; }
.menu-row__price { font-weight: 700; color: rgb(17 24 39); margin-bottom: .4rem; text-align: right; }
.menu-row__add {
    border-radius: 9999px;
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: var(--brand-fg);
    border: 0; cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}
.menu-row__add:hover { filter: brightness(1.06); transform: scale(1.05); }
.menu-row__add:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 640px) {
    .menu-row { grid-template-columns: 72px 1fr auto; }
    .menu-row__img { width: 72px; height: 72px; }
}

/* ---------- Brand tile (hub) ---------- */
.brand-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgb(229 231 235);
    transition: transform .3s ease, box-shadow .3s ease;
    text-decoration: none;
    color: inherit;
}
.brand-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -25px rgba(0,0,0,.22);
}
.brand-tile__cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 70%, black) 100%);
}
.brand-tile__cover img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .6s ease;
    opacity: .92;
}
.brand-tile:hover .brand-tile__cover img { transform: scale(1.05); }
.brand-tile__gradient {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.55) 100%);
}
.brand-tile__logo {
    position: absolute; top: 1.25rem; left: 1.25rem;
    width: 64px; height: 64px;
    border-radius: 1rem;
    background: rgba(255,255,255,.95);
    display: inline-flex; align-items: center; justify-content: center;
    padding: .5rem;
    box-shadow: 0 6px 20px -8px rgba(0,0,0,.3);
}
.brand-tile__logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-tile__type {
    position: absolute; top: 1.25rem; right: 1.25rem;
    background: rgba(255,255,255,.95);
    color: rgb(55 65 81);
    padding: .25rem .7rem;
    font-size: .75rem; font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase; letter-spacing: .05em;
}
.brand-tile__title-wrap {
    position: absolute; bottom: 1.25rem; left: 1.25rem; right: 1.25rem;
    color: white;
}
.brand-tile__title {
    font-size: 1.6rem; font-weight: 700;
    text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.brand-tile__sub {
    font-size: .9rem; opacity: .9; margin-top: .15rem;
}
.brand-tile__body {
    padding: 1.1rem 1.25rem 1.25rem;
}
.brand-tile__strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .65rem;
    margin-bottom: 1rem;
}
.brand-tile__strip-item {
    border-radius: .65rem;
    overflow: hidden;
    background: rgb(249 250 251);
    aspect-ratio: 1;
    border: 1px solid rgb(243 244 246);
}
.brand-tile__strip-item img { width: 100%; height: 100%; object-fit: cover; }
.brand-tile__cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--brand);
    font-weight: 600;
    font-size: .9rem;
}
.brand-tile__cta svg {
    transition: transform .2s ease;
}
.brand-tile:hover .brand-tile__cta svg { transform: translateX(3px); }

/* ---------- Cart drawer ---------- */
.cart-drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.cart-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: -20px 0 60px -20px rgba(0,0,0,.3);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgb(229 231 235);
}
.cart-drawer__title { font-size: 1.1rem; font-weight: 700; color: rgb(17 24 39); display: flex; align-items: center; gap: .5rem; }
.cart-drawer__close {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent;
    border-radius: .5rem;
    color: rgb(75 85 99);
    cursor: pointer;
}
.cart-drawer__close:hover { background: rgb(243 244 246); color: rgb(17 24 39); }
.cart-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}
.cart-drawer__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgb(107 114 128);
}
.cart-drawer__empty svg { width: 64px; height: 64px; margin: 0 auto 1rem; color: rgb(209 213 219); }
.cart-drawer__row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: .85rem;
    padding: .85rem 0;
    border-bottom: 1px solid rgb(243 244 246);
}
.cart-drawer__row:last-child { border-bottom: 0; }
.cart-drawer__thumb {
    width: 64px; height: 64px;
    border-radius: .65rem;
    overflow: hidden;
    background: rgb(249 250 251);
}
.cart-drawer__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-drawer__name { font-weight: 600; color: rgb(17 24 39); font-size: .9rem; line-height: 1.35; }
.cart-drawer__meta { font-size: .8rem; color: rgb(107 114 128); margin-top: .15rem; }
.cart-drawer__price { font-weight: 700; color: rgb(17 24 39); }
.cart-drawer__qty {
    display: inline-flex; align-items: center;
    border: 1px solid rgb(229 231 235);
    border-radius: 9999px;
    margin-top: .35rem;
}
.cart-drawer__qty button {
    width: 28px; height: 28px;
    border: 0; background: transparent;
    color: rgb(75 85 99);
    cursor: pointer;
    border-radius: 9999px;
}
.cart-drawer__qty button:hover { background: rgb(243 244 246); }
.cart-drawer__qty button:disabled { opacity: .35; cursor: not-allowed; }
.cart-drawer__qty span { min-width: 24px; text-align: center; font-size: .85rem; font-weight: 600; }
.cart-drawer__remove {
    background: transparent; border: 0; color: rgb(156 163 175);
    font-size: .75rem; cursor: pointer; margin-top: .25rem;
}
.cart-drawer__remove:hover { color: #dc2626; }
.cart-drawer__footer {
    border-top: 1px solid rgb(229 231 235);
    padding: 1rem 1.25rem 1.25rem;
    background: rgb(249 250 251);
}
.cart-drawer__totals {
    display: flex; justify-content: space-between;
    font-size: .9rem; color: rgb(75 85 99);
    margin-bottom: .25rem;
}
.cart-drawer__total {
    display: flex; justify-content: space-between;
    font-size: 1.05rem; font-weight: 700; color: rgb(17 24 39);
    margin-bottom: 1rem;
}
.cart-drawer__cta {
    display: grid; gap: .5rem;
}
.cart-drawer__cta .btn-brand,
.cart-drawer__cta .btn-ghost { width: 100%; }

/* Toast */
.store-toast {
    position: fixed;
    top: 1rem; right: 1rem;
    z-index: 1100;
    background: rgb(17 24 39);
    color: white;
    padding: .75rem 1rem;
    border-radius: .65rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,.4);
    display: inline-flex; align-items: center; gap: .5rem;
    font-size: .9rem;
    transform: translateY(-8px);
    opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
}
.store-toast.is-show { opacity: 1; transform: translateY(0); }
.store-toast.is-error { background: #dc2626; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .product-card, .product-card__media img, .brand-tile, .brand-tile__cover img,
    .cart-drawer, .cart-drawer-backdrop, .product-card__quick, .store-toast,
    .product-card.is-skeleton .product-card__media { transition: none !important; animation: none !important; }
}

/* Visit / info card */
.visit-card {
    border-radius: 1rem;
    border: 1px solid rgb(229 231 235);
    border-left: 4px solid var(--brand);
    background: white;
    padding: 1.25rem;
    display: flex; flex-direction: column; gap: 1rem;
}
@media (min-width: 640px) {
    .visit-card { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Sticky sub-nav */
.store-subnav {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgb(229 231 235);
}
.store-subnav__inner {
    display: flex; align-items: center; gap: 1.25rem;
    padding: .75rem 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.store-subnav__inner::-webkit-scrollbar { display: none; }
.store-subnav__link {
    color: rgb(75 85 99);
    font-size: .9rem; font-weight: 500;
    white-space: nowrap;
    padding: .25rem 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.store-subnav__link:hover { color: rgb(17 24 39); }
.store-subnav__link.is-active { color: var(--brand); border-color: var(--brand); }

/* Trust strip */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
}
.trust-strip__item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: 1rem;
    background: white;
    border: 1px solid rgb(229 231 235);
    border-radius: .85rem;
}
.trust-strip__icon {
    width: 36px; height: 36px;
    border-radius: .5rem;
    background: var(--brand-soft);
    color: var(--brand);
    flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.trust-strip__title { font-weight: 600; color: rgb(17 24 39); font-size: .9rem; }
.trust-strip__desc { font-size: .8rem; color: rgb(107 114 128); margin-top: .1rem; }
