/* EduTools storefront — mobile-first, RTL */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --green: #25d366;
    --green-dark: #12855f;
    --green-deep: #0b6b4c;
    --ink: #16232e;
    --muted: #6b7c8c;
    --line: #e6eaf0;
    --bg: #f4f6f9;
    --card: #ffffff;
    --danger: #e5484d;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 35, 46, .06), 0 4px 16px rgba(16, 35, 46, .06);
    --shadow-lg: 0 8px 40px rgba(16, 35, 46, .16);
    --bar-height: 68px;
}

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    /* room for the sticky cart bar */
    padding-bottom: calc(var(--bar-height) + env(safe-area-inset-bottom, 0px));
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; -webkit-user-drag: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; }

/* أي عنصر عليه hidden لازم يختفي فعلاً — من غير السطر ده أي كلاس فيه
   display (زي .field) بيغلب قاعدة [hidden] الافتراضية بتاعة المتصفح. */
[hidden] { display: none !important; }

a { color: inherit; }

:focus-visible {
    outline: 3px solid rgba(37, 211, 102, .55);
    outline-offset: 2px;
    border-radius: 6px;
}

.wrap {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 14px;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 8px;
    background: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    z-index: 200;
}
.skip-link:focus { inset-inline-start: 8px; }

/* ---------- header ---------- */

.site-header {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
    color: #fff;
    padding: 14px 0;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
    padding: 3px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.brand { flex: 1; min-width: 0; }
.brand h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: .3px;
}
.brand p {
    margin: 0;
    font-size: .78rem;
    opacity: .92;
    font-weight: 400;
}

.wa-contact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .3);
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s ease;
}
.wa-contact:hover { background: rgba(255, 255, 255, .28); }
.wa-contact svg { width: 18px; height: 18px; }

/* ---------- sticky toolbar ---------- */

.toolbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 10px 0 8px;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding-inline: 12px;
    transition: border-color .2s ease, background .2s ease;
}
.search:focus-within {
    border-color: var(--green);
    background: #fff;
}
.search-icon {
    width: 18px;
    height: 18px;
    color: var(--muted);
    flex-shrink: 0;
}
.search input {
    flex: 1;
    border: 0;
    background: none;
    outline: none;
    font: inherit;
    font-size: 16px; /* keeps iOS from zooming on focus */
    padding: 11px 8px;
    min-width: 0;
    color: inherit;
}
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
    border: 0;
    background: #dfe4ea;
    color: var(--ink);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    line-height: 1;
    font-size: 17px;
    display: grid;
    place-items: center;
    padding: 0;
}

.view-toggle {
    display: flex;
    gap: 2px;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 3px;
    flex-shrink: 0;
}
.view-toggle button {
    border: 0;
    background: none;
    border-radius: 9px;
    width: 38px;
    height: 34px;
    display: grid;
    place-items: center;
    color: var(--muted);
    transition: background .18s ease, color .18s ease;
}
.view-toggle button svg { width: 19px; height: 19px; }
.view-toggle button.is-active {
    background: var(--green);
    color: #fff;
}

.chips {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 9px;
    padding-bottom: 2px;
    scroll-padding-inline: 14px;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
    flex: 0 0 auto;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    scroll-snap-align: start;
    transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.chip-count {
    font-size: .7rem;
    opacity: .6;
    font-weight: 700;
}
.chip.is-active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.chip.is-active .chip-count { opacity: .85; }

/* ---------- products ---------- */

main { padding-top: 12px; }

.results {
    margin: 0 0 10px;
    font-size: .8rem;
    color: var(--muted);
}

.products.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.products.list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card.in-cart {
    border-color: var(--green);
    box-shadow: 0 0 0 1px var(--green);
}

.card-media {
    aspect-ratio: 1 / 1;
    background: #eef1f5;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: zoom-in;
}
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-media .emoji { font-size: 2.2rem; }

.card-body {
    padding: 9px 10px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.card-name {
    font-size: .84rem;
    font-weight: 600;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.card-price {
    font-weight: 800;
    color: var(--green-dark);
    font-size: .95rem;
    margin-top: auto;
}

/* only rendered for products the admin is actually counting */
.stock-tag {
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
}
.stock-tag.stock-low { color: #b45309; }
.stock-tag.stock-out { color: var(--danger); }

.card.is-out .card-media { opacity: .5; filter: grayscale(.65); }

.card-actions { padding: 6px 10px 10px; }

.add-btn {
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .18s ease, transform .1s ease;
}
.add-btn:hover { background: var(--green-dark); }
.add-btn:active { transform: scale(.97); }
.add-btn:disabled {
    background: #eceff3;
    color: var(--muted);
    cursor: not-allowed;
}
.add-btn:disabled:hover { background: #eceff3; }
.add-btn:disabled:active { transform: none; }

.stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eef7f1;
    border-radius: var(--radius-sm);
    padding: 3px;
    height: 38px;
}
.step-btn {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    display: grid;
    place-items: center;
    transition: background .18s ease, transform .1s ease;
}
.step-btn:hover { background: var(--green-dark); }
.step-btn:active { transform: scale(.92); }
/* the + button once the cart already holds everything that is left */
.step-btn:disabled,
.step-btn:disabled:hover { background: #bcd3c6; cursor: not-allowed; }
.step-btn:disabled:active { transform: none; }
.step-qty {
    font-weight: 800;
    font-size: .95rem;
    min-width: 28px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.card-badge {
    position: absolute;
    inset-block-start: 7px;
    inset-inline-start: 7px;
    background: var(--green-dark);
    color: #fff;
    border-radius: 999px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    font-size: .75rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* list layout overrides */
.products.list .card {
    flex-direction: row;
    align-items: center;
    padding: 8px;
    gap: 10px;
}
.products.list .card-media {
    width: 74px;
    height: 74px;
    aspect-ratio: auto;
    border-radius: 12px;
    flex-shrink: 0;
}
.products.list .card-body { padding: 0; }
.products.list .card-name {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    min-height: 0;
}
.products.list .card-actions {
    padding: 0;
    width: 118px;
    flex-shrink: 0;
}
.products.list .card-badge { inset-inline-start: 62px; inset-block-start: 2px; }

.empty {
    text-align: center;
    padding: 48px 20px;
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
}
.empty-icon { font-size: 2rem; display: block; margin-bottom: 8px; }

.btn-ghost {
    border: 1.5px solid var(--line);
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 9px 16px;
    font-weight: 600;
    font-size: .85rem;
    color: var(--ink);
}
.btn-ghost:hover { border-color: var(--muted); }

.site-footer {
    text-align: center;
    padding: 26px 16px 12px;
    color: var(--muted);
    font-size: .82rem;
}
.site-footer a {
    color: var(--green-dark);
    font-weight: 700;
    text-decoration: none;
    direction: ltr;
    display: inline-block;
}

/* ---------- sticky cart bar ---------- */

.cart-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 80;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(244, 246, 249, .98) 55%, rgba(244, 246, 249, 0));
    pointer-events: none;
}
.cart-bar[hidden] { display: none; }

.cart-bar-btn {
    pointer-events: auto;
    width: 100%;
    max-width: 620px;
    margin-inline: auto;
    height: 52px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-inline: 14px;
    box-shadow: 0 6px 22px rgba(18, 133, 95, .38);
    font-weight: 700;
    transition: transform .12s ease;
}
.cart-bar-btn:active { transform: scale(.99); }
.cart-bar-count {
    background: rgba(255, 255, 255, .22);
    border-radius: 9px;
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-size: .9rem;
    font-weight: 800;
    padding-inline: 6px;
}
.cart-bar-label { flex: 1; text-align: start; font-size: .92rem; }
.cart-bar-total { font-size: 1rem; font-weight: 800; }

@keyframes bump {
    0% { transform: scale(1); }
    45% { transform: scale(1.07); }
    100% { transform: scale(1); }
}
.cart-bar-btn.bump { animation: bump .32s ease; }

/* ---------- cart sheet ---------- */

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 30, .5);
    backdrop-filter: blur(2px);
    z-index: 90;
    opacity: 0;
    transition: opacity .25s ease;
}
.sheet-overlay.is-open { opacity: 1; }

.sheet {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 100;
    background: #fff;
    border-radius: 22px 22px 0 0;
    box-shadow: var(--shadow-lg);
    max-height: min(88vh, 760px);
    display: flex;
    flex-direction: column;
    transform: translateY(102%);
    transition: transform .3s cubic-bezier(.32, .72, 0, 1);
    max-width: 620px;
    margin-inline: auto;
}
.sheet.is-open { transform: translateY(0); }

.sheet-header {
    position: relative;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sheet-grip {
    position: absolute;
    top: 6px;
    inset-inline: 0;
    margin-inline: auto;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #d7dde5;
}
.sheet-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    flex: 1;
}
.sheet-close {
    border: 0;
    background: var(--bg);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: var(--muted);
    display: grid;
    place-items: center;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 6px 16px;
}

.cart-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.cart-line:last-child { border-bottom: 0; }
.cart-line-media {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: #eef1f5;
    flex-shrink: 0;
    display: grid;
    place-items: center;
}
.cart-line-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name {
    font-size: .85rem;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-line-unit { font-size: .74rem; color: var(--muted); }
.cart-line-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #eef7f1;
    border-radius: 9px;
    padding: 3px;
}
.cart-line-controls .step-btn { width: 28px; height: 28px; font-size: 1rem; }
.cart-line-controls .step-qty { min-width: 22px; font-size: .85rem; }
.cart-line-total {
    font-weight: 800;
    font-size: .85rem;
    min-width: 62px;
    text-align: end;
    color: var(--green-dark);
}

.cart-empty {
    text-align: center;
    color: var(--muted);
    padding: 36px 10px;
}

.sheet-footer {
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--line);
    background: #fff;
}
.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.total-line strong { color: var(--green-dark); font-size: 1.2rem; }

.btn-whatsapp {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: #fff;
    font-weight: 700;
    font-size: .98rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(18, 133, 95, .3);
}
.btn-whatsapp svg { width: 20px; height: 20px; }
.btn-whatsapp:disabled {
    background: #d6dbe1;
    box-shadow: none;
    cursor: not-allowed;
}
.btn-clear {
    width: 100%;
    margin-top: 8px;
    border: 0;
    background: none;
    color: var(--danger);
    font-size: .82rem;
}
.btn-clear:hover { text-decoration: underline; }

/* ---------- lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(8, 16, 22, .92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
    max-width: 100%;
    max-height: 78vh;
    border-radius: 14px;
    object-fit: contain;
}
.lightbox-caption {
    color: #fff;
    font-size: .9rem;
    text-align: center;
    margin: 0;
    max-width: 90%;
}
.lightbox-close {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    inset-inline-end: 14px;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    display: grid;
    place-items: center;
}

/* ---------- store notice ---------- */

/* شريط التنبيه اللي الأدمن بيكتبه — لونه دافي عشان يبان إنه مش جزء من
   التصميم العادي، والخط كبير ومتباعد عشان يتقرا من أول نظرة. */
.notice {
    background: #fff6e0;
    border-bottom: 1px solid #f0d99b;
    color: #6b4a00;
}
.notice-inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-block: 12px;
}
.notice-icon {
    font-size: 1.15rem;
    line-height: 1.5;
    flex-shrink: 0;
}
.notice-text {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.75;
}

@media (min-width: 700px) {
    .notice-text { font-size: 1rem; }
}

/* ---------- product page (/p/…) ---------- */


.header-home { display: block; flex-shrink: 0; }
.brand h1 a { text-decoration: none; }

.card-link { color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
/* الصورة في الكروت المرتبطة بتوديك لصفحة المنتج، مش تكبّر الصورة */
a.card-media { cursor: pointer; }

.crumbs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--muted);
    padding: 14px 0 4px;
}
.crumbs a { color: var(--green-dark); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumb-current {
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdp {
    display: grid;
    gap: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    margin-top: 8px;
}

.pdp-media {
    aspect-ratio: 1 / 1;
    background: #eef1f5;
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: grid;
    place-items: center;
}
.pdp-media img { width: 100%; height: 100%; object-fit: cover; }
/* على الموبايل الصورة المربعة كاملة العرض بتزق زرار الطلب تحت الشاشة */
@media (max-width: 699px) {
    .pdp-media { max-width: 74%; margin-inline: auto; }
}
.pdp-emoji { font-size: 4rem; }

.pdp-info { display: flex; flex-direction: column; gap: 8px; }
.pdp-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.5;
}
.pdp-cat { margin: 0; font-size: .8rem; }
.pdp-cat a {
    background: #eef7f1;
    color: var(--green-dark);
    border-radius: 999px;
    padding: 3px 11px;
    font-weight: 700;
    text-decoration: none;
}
.pdp-price {
    margin: 4px 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--green-dark);
}
.pdp-price span { font-size: 1rem; font-weight: 700; }
.pdp-stock { margin: 0; font-size: .85rem; font-weight: 700; color: var(--muted); }
.pdp-stock.stock-low { color: #b45309; }
.pdp-stock.stock-out { color: var(--danger); }

/* زرار «أضف للسلة» — بيترسم بالـ JS، فالمساحة بتفضل فاضية من غيره */
.pdp-cart { margin-top: 8px; }
.pdp-cart .add-btn { height: 48px; font-size: .92rem; }
.pdp-cart .stepper { height: 48px; padding: 4px; }
.pdp-cart .step-btn { width: 44px; height: 40px; font-size: 1.35rem; }
.pdp-cart .step-qty { font-size: 1.1rem; min-width: 40px; }

.pdp .btn-whatsapp { margin-top: 6px; text-decoration: none; }
.pdp-back {
    display: block;
    text-align: center;
    text-decoration: none;
    margin-top: 2px;
}

.related { margin-top: 26px; }
.related-title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 10px;
}

@media (min-width: 700px) {
    .pdp {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
        align-items: start;
        gap: 22px;
        padding: 18px;
    }
    .pdp-name { font-size: 1.4rem; }
}

/* ---------- confirm dialog ---------- */

/* بيقف فوق السلة نفسها، فالطبقة أعلى من الـ sheet */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 30, .5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 160;
    opacity: 0;
    transition: opacity .2s ease;
}
.confirm-overlay.is-open { opacity: 1; }
.confirm-overlay[hidden] { display: none; }

.confirm-box {
    position: fixed;
    z-index: 170;
    inset-block-start: 50%;
    inset-inline-start: 50%;
    width: min(340px, 88vw);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 20px 18px 16px;
    text-align: center;
    opacity: 0;
    /* التوسيط بيتعمل بالـ transform، فالحركة لازم تحافظ عليه */
    transform: translate(50%, -50%) scale(.96);
    transition: opacity .18s ease, transform .24s cubic-bezier(.22, .9, .3, 1);
}
.confirm-box.is-open { opacity: 1; transform: translate(50%, -50%) scale(1); }
.confirm-box[hidden] { display: none; }

/* وهو بيختفي مايبلعش أي ضغطة */
.confirm-overlay:not(.is-open),
.confirm-box:not(.is-open) { pointer-events: none; }

.confirm-box h2 { margin: 0 0 6px; font-size: 1.05rem; }
.confirm-box p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.7;
}

.confirm-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.confirm-actions > * { flex: 1; }

.btn-confirm {
    border: 0;
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    background: var(--danger);
    color: #fff;
    font-weight: 700;
    font-size: .88rem;
    transition: background .18s ease, transform .1s ease;
}
.btn-confirm:hover { background: #cc3237; }
.btn-confirm:active { transform: scale(.97); }

/* ---------- toast ---------- */

.toast {
    position: fixed;
    bottom: calc(var(--bar-height) + 16px + env(safe-area-inset-bottom, 0px));
    inset-inline: 0;
    margin-inline: auto;
    width: max-content;
    max-width: 88vw;
    z-index: 150;
    background: rgba(16, 35, 46, .95);
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.toast[hidden] { display: none; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- larger screens ---------- */

@media (min-width: 560px) {
    .wrap { padding-inline: 20px; }
    .products.grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px; }
    .card-name { font-size: .9rem; }
    .brand h1 { font-size: 1.6rem; }
    .logo { width: 60px; height: 60px; }
    .products.list .card-media { width: 88px; height: 88px; }
}

@media (min-width: 900px) {
    .site-header { padding: 20px 0; }
    .products.grid { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
    .card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow);
        border-color: var(--green);
    }
    .products.list .card:hover { transform: none; }
    main { padding-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        transition-duration: .001ms !important;
    }
}
