/* DropBearExpress styles. Plain CSS, no build step. */

:root {
    --bg: #faf7f2;
    --surface: #ffffff;
    --ink: #1f2a24;
    --muted: #66716a;
    --green: #1f5c3f;
    --green-dark: #164530;
    --gold: #e0a526;
    --border: #e4ddd0;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--green); }
img { max-width: 100%; display: block; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; margin: 0 0 .5rem; }
.lead { color: var(--muted); margin: 0 0 1.25rem; }
.empty { color: var(--muted); }

/* Buttons */
.btn {
    display: inline-block;
    padding: .5rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--green);
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: #eef4f0; }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #2b2100; font-weight: 600; padding: .7rem 1.5rem; }
.btn-primary:hover { background: #cf961c; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Header: search left, title centre, account right */
.site-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.search { display: flex; gap: .5rem; max-width: 360px; }
.search input {
    flex: 1;
    min-width: 0;
    padding: .5rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}
.search button {
    padding: .5rem .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font: inherit;
    cursor: pointer;
}
.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--green);
    text-decoration: none;
    text-align: center;
}
.account { display: flex; gap: .5rem; justify-content: flex-end; }

/* Page layout */
.page { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
/* Full width, so the categories sit against the left edge of the window */
.page.has-sidebar {
    max-width: none;
    margin: 0;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.5rem;
}

/* Sidebar */
.sidebar h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; padding: .35rem .5rem; border-radius: 6px; color: var(--ink); text-decoration: none; }
.sidebar a:hover { background: #eef4f0; }
.sidebar a.current { background: var(--green); color: #fff; }
.sidebar .sub { margin: .1rem 0 .4rem 1rem; }
.sidebar .sub a { font-size: .95rem; color: var(--muted); }
.sidebar .sub a.current { color: #fff; }

/* Product grid and cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.home-section { margin-top: 2rem; font-size: 1.35rem; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .6rem;
}
.card:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.card-link { color: inherit; text-decoration: none; display: block; }
.card-img, .gallery-main {
    aspect-ratio: 1 / 1;
    background: #eef4f0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-img img, .gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.ph { font-size: 3rem; font-weight: 700; color: var(--green); opacity: .5; }
.card-title {
    font-size: .95rem;
    font-weight: 500;
    margin: .5rem 0 .25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.9em;
}
.price { font-weight: 700; margin: 0; }
.meta { font-size: .8rem; color: var(--muted); margin: .25rem 0 0; }
.meta.store { margin-top: 0; }

/* Pagination and breadcrumb */
.pager { display: flex; gap: 1rem; justify-content: center; align-items: center; margin: 1.5rem 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted); }

/* Item page */
.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2rem; }
.thumbs { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.thumbs button {
    width: 64px; height: 64px; padding: 0;
    border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: none; cursor: pointer;
}
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buybox label { display: block; font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.buybox select { padding: .5rem; font: inherit; border: 1px solid var(--border); border-radius: var(--radius); min-width: 12rem; }
.price-large { font-size: 1.8rem; margin: .5rem 0; }
.price-large small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.stock { font-weight: 600; margin: 1rem 0 .5rem; }
.stock.in { color: var(--green); }
.stock.out { color: #a33; }
.note { font-size: .85rem; color: var(--muted); }
.facts { list-style: none; padding: 0; margin: 1.25rem 0 0; border-top: 1px solid var(--border); }
.facts li { padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .95rem; }
.detail { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.5rem; margin: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.review { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.review p { margin: 0; }

.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }

/* Tablet and phone */
@media (max-width: 800px) {
    .product { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .site-header {
        grid-template-columns: 1fr auto;
        grid-template-areas: "brand account" "search search";
    }
    .brand { grid-area: brand; text-align: left; }
    .account { grid-area: account; }
    .search { grid-area: search; max-width: none; }

    .page.has-sidebar { grid-template-columns: 1fr; }
    /* Categories become a scrolling row of chips */
    .sidebar h2 { display: none; }
    .sidebar > ul { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; }
    .sidebar > ul > li { flex: none; }
    .sidebar a { border: 1px solid var(--border); background: var(--surface); white-space: nowrap; }
    .sidebar .sub { display: none; }
}

@media (max-width: 560px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
}

/* ---- Accounts, cart and checkout ---- */

.account { flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* Header account menu: the user's name opens a list of their pages */
.account-menu { position: relative; }
.account-menu > summary { display: inline-flex; align-items: center; gap: .45rem; list-style: none; cursor: pointer; }
.account-menu > summary::-webkit-details-marker { display: none; }
.account-menu .avatar {
    display: inline-grid; place-items: center;
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: var(--green); color: #fff; font-size: .8rem; font-weight: 700;
}
.account-name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.account-menu .caret { font-size: .7rem; transition: transform .15s; }
.account-menu[open] .caret { transform: rotate(180deg); }
.account-dropdown {
    position: absolute; right: 0; top: calc(100% + .4rem); z-index: 50;
    min-width: 230px; padding: .4rem 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.account-who { margin: 0; padding: .5rem 1rem .6rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.account-who span { color: var(--muted); font-size: .8rem; word-break: break-all; }
.account-dropdown a, .account-dropdown button {
    display: block; width: 100%; padding: .55rem 1rem; text-align: left;
    color: var(--ink); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer;
}
.account-dropdown a:hover, .account-dropdown button:hover,
.account-dropdown a:focus-visible, .account-dropdown button:focus-visible { background: #eef4f0; }
.account-dropdown form { margin: 0; border-top: 1px solid var(--border); padding-top: .3rem; margin-top: .3rem; }

/* Unread message counts */
.unread-count {
    display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 999px;
    background: #c0392b; color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.3rem; text-align: center;
}
.account-menu > summary { position: relative; }
.unread-dot {
    position: absolute; top: .2rem; left: 1.9rem; width: .65rem; height: .65rem; border-radius: 50%;
    background: #c0392b; border: 2px solid var(--surface);
}

/* Messages: the list of conversations and one conversation */
.inbox { list-style: none; margin: 0; padding: 0; max-width: 760px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.inbox li + li { border-top: 1px solid var(--border); }
.inbox-row { display: flex; align-items: center; gap: .85rem; padding: .8rem 1rem; color: var(--ink); text-decoration: none; }
.inbox-row:hover { background: #f3f8f4; }
.inbox-row.unread .inbox-name, .inbox-row.unread .inbox-last { font-weight: 700; color: var(--ink); }
.inbox-avatar {
    flex: none; display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    background: var(--green); color: #fff; font-weight: 700; object-fit: cover; border: 1px solid var(--border);
}
.inbox-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inbox-name { font-weight: 600; }
.inbox-last { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.inbox-side .meta { margin: 0; }

.thread-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.thread-head h1 { margin: 0; }
.thread-head .meta { margin: 0; }
.chat { list-style: none; margin: 0 0 1.25rem; padding: 0; max-width: 760px; display: flex; flex-direction: column; gap: .6rem; }
.chat-msg {
    max-width: 80%; align-self: flex-start; padding: .6rem .9rem; border-radius: 14px 14px 14px 4px;
    background: var(--surface); border: 1px solid var(--border);
}
.chat-msg.mine { align-self: flex-end; background: #e3f0e8; border-color: #c6dfcf; border-radius: 14px 14px 4px 14px; }
.chat-msg p { margin: .2rem 0; overflow-wrap: anywhere; }
.chat-meta { font-size: .75rem; color: var(--muted); }
.chat-about { font-size: .8rem; color: var(--muted); }
.chat-form { max-width: 760px; }
.chat-form textarea { width: 100%; }

/* Sign-up form: a field people never see, which bots fill in */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.verify-notice p { margin: 0 0 .6rem; }
.verify-notice form { margin: 0; }

/* Account page */
.account-page { max-width: 560px; margin: 0 auto; }
.account-page .panel { margin-bottom: 1.25rem; }
.account-page h2 { margin-top: 0; font-size: 1.15rem; }
.account-shortcuts { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.form input:disabled { background: var(--bg); color: var(--muted); }
@media (max-width: 720px) {
    .account-name { max-width: 6rem; }
}
.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* Messages */
.notice {
    margin: 0 0 1rem;
    padding: .7rem 1rem;
    border-radius: var(--radius);
    background: #eef4f0;
    border: 1px solid #cfe0d5;
}
.notice.success { background: #e7f5ec; border-color: #b9dfc6; }
.notice.error { background: #fbeaea; border-color: #edc0c0; color: #7a1f1f; }
.problem { color: #a33; font-weight: 600; }
.form-errors {
    margin: 0 0 1rem;
    padding: .7rem 1rem .7rem 2rem;
    background: #fbeaea;
    border: 1px solid #edc0c0;
    border-radius: var(--radius);
    color: #7a1f1f;
}

/* Forms */
.form-page { max-width: 420px; margin: 0 auto; }
.form label { display: block; margin: .9rem 0 .25rem; font-size: .9rem; font-weight: 600; }
.form label small { font-weight: 400; color: var(--muted); }
.form input[type=text], .form input[type=email], .form input[type=password],
.form input[type=tel], .form select {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--surface);
}
.form input:focus, .form select:focus, .search input:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}
.form .btn { margin-top: 1.25rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.btn-block { display: block; text-align: center; width: 100%; }

/* Item page add-to-cart */
.add-form .qty-input {
    width: 5rem;
    padding: .5rem;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.add-form label { margin-top: 1rem; }

/* Cart, checkout and order pages */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; }
.cart-store { margin-bottom: 1.5rem; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
.cart-table th, .cart-table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.cart-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cart-table input[type=number] { width: 4.5rem; padding: .35rem; font: inherit; border: 1px solid var(--border); border-radius: 6px; }
.cart-table tr.has-problem { background: #fdf3f3; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--green); text-decoration: underline; cursor: pointer; }
.shipping-line { margin: .5rem 0 0; }
.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.summary h2 { margin-bottom: .75rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; margin: 0 0 1rem; }
.summary dd { margin: 0; text-align: right; }
.summary .total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.summary-store { font-size: .95rem; margin: .75rem 0 .25rem; }
.summary-lines { list-style: none; margin: 0 0 .5rem; padding: 0; font-size: .9rem; }
.summary-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .15rem 0; }
address { font-style: normal; line-height: 1.6; }

@media (max-width: 800px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-table { font-size: .9rem; }
    .cart-table th, .cart-table td { padding: .5rem; }
}

/* ---- Seller portal and admin ---- */

.form-page.wide { max-width: 720px; }
.form textarea {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--surface);
    resize: vertical;
}
.form input[type=number], .form input[type=file] {
    width: 100%;
    padding: .55rem .7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    background: var(--surface);
}
.form input[type=file] { padding: .4rem; }
.form textarea:focus, .form input[type=number]:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.form .row.three { grid-template-columns: repeat(3, 1fr); }
.form label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin-top: 1rem; }
.form label.check input { width: auto; }

.sell-nav, .subtabs { display: flex; gap: .25rem; flex-wrap: wrap; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.sell-nav a, .subtabs a {
    padding: .5rem .9rem;
    text-decoration: none;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}
.sell-nav a:hover, .subtabs a:hover { color: var(--ink); }
.sell-nav a.current, .subtabs a.current { color: var(--green); border-bottom-color: var(--gold); font-weight: 600; }
.subtabs { margin-top: .5rem; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.page-head h1, .page-head h2 { margin: 0; }

.badge {
    display: inline-block;
    padding: .1rem .55rem;
    border-radius: 999px;
    font-size: .8rem;
    background: #eee;
    color: #444;
}
.badge-active, .badge-shipped, .badge-delivered { background: #e0f2e6; color: #1c5a35; }
.badge-pending, .badge-draft { background: #fdf0d2; color: #7a5300; }
.badge-hidden, .badge-suspended, .badge-cancelled { background: #f3dcdc; color: #7a1f1f; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin: 1rem 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; text-decoration: none; color: inherit; }
a.stat:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.stat-number { display: block; font-size: 1.8rem; font-weight: 700; color: var(--green); }
.stat-label { color: var(--muted); font-size: .9rem; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.order-card .cart-layout { margin-top: .5rem; }
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.5rem; align-items: start; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.photo { margin: 0; text-align: center; font-size: .85rem; }
.photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border: 1px solid var(--border); border-radius: 6px; }
.photo figcaption { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .25rem; }
.link-button.danger { color: #a33; }

.variants input[type=text], .variants input[type=number] {
    width: 100%; min-width: 4rem; padding: .35rem; font: inherit; border: 1px solid var(--border); border-radius: 6px;
}
.variants td { padding: .35rem; }
.variants .new-row { background: #faf7f2; }

.thumb-cell { width: 56px; }
.thumb-cell img, .thumb-ph { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.thumb-ph { display: flex; align-items: center; justify-content: center; background: #eef4f0; color: var(--green); font-weight: 700; }

.checklist { padding-left: 1.2rem; }
.checklist li { margin: .3rem 0; }

/* ---- Disputes ---- */
.thread { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.thread-msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .75rem; max-width: 46rem; }
.thread-msg p { margin: .25rem 0; }
.thread-msg.mine { margin-left: auto; background: #f3f8f4; }
.thread-system, .thread-admin { background: #faf7f2; }
.thread-photos { display: flex; flex-wrap: wrap; gap: .5rem; }
.thread-photos img { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.plain-list { list-style: none; padding: 0; margin: .5rem 0; }
.form fieldset.choices { border: 0; padding: 0; margin: .9rem 0 0; }
.form fieldset.choices legend { font-size: .9rem; font-weight: 600; padding: 0; }
.form fieldset.choices label.check { margin-top: .5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }

/* ---- Store pages ---- */
.store-hero { margin-bottom: 1rem; }
.store-banner { display: block; width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: var(--radius); background: #eef4f0; }
.store-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.store-hero.has-banner .store-head { margin-top: -2.5rem; padding-left: 1rem; align-items: flex-end; }
.store-title { flex: 1; min-width: 220px; }
.store-title h1 { margin: 0; }
.store-logo { flex: none; width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); background: var(--surface); box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.store-logo-ph { display: flex; align-items: center; justify-content: center; background: var(--green); color: #fff; font-size: 2.6rem; font-weight: 700; }
.store-tagline { margin: .15rem 0 0; font-size: 1.05rem; }
.store-facts { list-style: none; display: flex; flex-wrap: wrap; align-items: center; padding: 0; margin: .4rem 0 0; font-size: .95rem; color: var(--muted); }
.store-facts li + li::before { content: "\00B7"; margin: 0 .5rem; color: var(--muted); }
.store-facts a { color: var(--ink); text-decoration: none; }
.store-contact-btn { align-self: center; display: flex; flex-direction: column; gap: .5rem; }
.stars { color: var(--gold); letter-spacing: .05em; }
.stars-off { color: #d9d2c4; }

/* The section buttons: always look like buttons, and stay at the top while scrolling */
.shop-tabs { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
    background: var(--bg); padding: .7rem 0; margin-bottom: 1.25rem; border-top: 2px solid var(--border); border-bottom: 2px solid var(--border); }
.shop-tabs-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.shop-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.1rem; border: 2px solid var(--green); border-radius: 999px;
    background: var(--surface); color: var(--green); font-weight: 700; text-decoration: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.shop-tab:hover, .shop-tab:focus-visible { background: #e3efe7; }
.shop-tab.current { background: var(--green); color: #fff; }
.shop-tab .count, .filter-btn .count { display: inline-block; min-width: 1.6em; padding: 0 .45em; border-radius: 999px; background: #e3efe7; color: var(--green); font-size: .8rem; text-align: center; }
.shop-tab.current .count { background: rgba(255, 255, 255, .25); color: #fff; }
/* Centred in the space beside the buttons */
.shop-search { display: flex; gap: .4rem; flex: 1; max-width: 420px; min-width: 220px; margin: 0 auto; }
.shop-search input { flex: 1; padding: .55rem .8rem; border: 2px solid var(--border); border-radius: 999px; font: inherit; background: var(--surface); }
.shop-search input:focus { outline: none; border-color: var(--green); }
.shop-search .btn { border-radius: 999px; }

.shop-section { margin-bottom: 2.5rem; scroll-margin-top: 5rem; }
.shop-section-title { font-size: 1.4rem; margin: 0 0 1rem; padding-bottom: .4rem; border-bottom: 3px solid var(--gold); display: inline-block; }

/* Items: categories as clear buttons on the left, the grid on the right */
.shop-items { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.shop-items.no-filters { grid-template-columns: minmax(0, 1fr); }
.shop-filters h2 { font-size: 1rem; margin: 0 0 .5rem; }
.filter-btn { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; margin-bottom: .45rem;
    background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); color: var(--ink); font-weight: 600; text-decoration: none; }
.filter-btn::after { content: "\203A"; color: var(--green); font-size: 1.3rem; line-height: 1; margin-left: .25rem; }
.filter-btn span:first-child { flex: 1; }
.filter-btn:hover, .filter-btn:focus-visible { border-color: var(--green); background: #f3f8f4; }
.filter-btn.current { background: var(--green); border-color: var(--green); color: #fff; }
.filter-btn.current::after { color: #fff; }
.filter-btn.current .count { background: rgba(255, 255, 255, .25); color: #fff; }
.shop-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.shop-toolbar h2 { margin: 0; flex: 1; font-size: 1.15rem; }
.shop-sort { display: flex; align-items: center; gap: .4rem; }
.shop-sort label { font-size: .9rem; color: var(--muted); }
.shop-sort select { padding: .45rem .6rem; border: 2px solid var(--border); border-radius: var(--radius); font: inherit; background: var(--surface); cursor: pointer; }

/* Reviews */
.reviews-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.review-summary { text-align: center; }
.review-big { display: block; font-size: 3rem; font-weight: 700; line-height: 1; color: var(--ink); }
.review-summary .stars { font-size: 1.3rem; }
.review-card p { margin: .3rem 0; }

/* About, gallery and policies */
.about-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 1.25rem; align-items: start; }
.about-layout h3, .policy-grid h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.about-side:only-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 1.25rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .25rem 0 .5rem; }
.chips li { background: #e3efe7; color: var(--green); border-radius: 999px; padding: .2rem .75rem; font-size: .9rem; font-weight: 600; }
.contact-buttons { display: flex; flex-direction: column; gap: .45rem; }
.contact-buttons .btn { text-align: left; overflow-wrap: anywhere; }
.store-gallery, .profile-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.store-gallery figure, .profile-gallery figure { margin: 0; }
.store-gallery img, .profile-gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.store-gallery a { display: block; border-radius: 6px; outline-offset: 2px; }
.store-gallery a:hover img { opacity: .9; }
.store-gallery-page { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.store-gallery-page figcaption { font-size: .9rem; }
.store-logo-link { flex: none; border-radius: 50%; }
.store-gallery figcaption, .profile-gallery figcaption { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 1.25rem; }
.sold-by a { display: inline-flex; align-items: center; gap: .4rem; vertical-align: middle; }
.store-logo-tiny { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

@media (max-width: 760px) {
    .shop-items, .reviews-layout, .about-layout { grid-template-columns: minmax(0, 1fr); }
    /* Categories become a row of buttons that scrolls sideways */
    .shop-filters { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .3rem; }
    .shop-filters h2 { display: none; }
    .filter-btn { flex: none; margin: 0; }
    .filter-btn::after { content: none; }
    .shop-tab { padding: .45rem .8rem; }
    .shop-search { max-width: none; }
    .store-logo { width: 76px; height: 76px; }
    .store-hero.has-banner .store-head { margin-top: -1.75rem; padding-left: .5rem; }
}

/* Seller's Store page tab */
.profile-pictures { display: grid; grid-template-columns: 1fr 2fr; gap: 1.5rem; }
.profile-pictures h3 { margin: 0; }
.profile-logo-preview { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; display: block; margin: .5rem 0; }
.profile-banner-preview { width: 100%; aspect-ratio: 4 / 1; object-fit: cover; border-radius: 6px; display: block; margin: .5rem 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.form label.show-toggle { margin-top: 1rem; padding-top: .75rem; border-top: 1px dashed var(--border); color: var(--green); font-weight: 600; }

@media (max-width: 760px) {
    .profile-pictures { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .edit-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .form .row.three { grid-template-columns: 1fr; }
}

/* ---- Sign in extras ---- */
.or-divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0 1rem; color: var(--muted); font-size: .85rem; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.btn-google { background: #fff; color: #1f1f1f; border-color: #c9c9c9; text-align: center; }
.btn-google:hover { background: #f4f4f4; }
.form .note { margin-top: 1rem; }

/* ---- Installable app ---- */
[hidden] { display: none !important; }
/* When launched from the home screen there is no browser bar, so leave room for the phone's notch and gesture bar */
@media (display-mode: standalone) {
    body { padding-bottom: env(safe-area-inset-bottom); }
    .site-header { padding-top: calc(.75rem + env(safe-area-inset-top)); }
}
