/* Fashnal — component styles on top of Bootstrap + tokens.css. */

/* ---- Navbar --------------------------------------------------------- */
.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding-top: .75rem;
    padding-bottom: .75rem;
    box-shadow: 0 1px 2px rgba(23, 34, 42, .05);
}
/* The actual mark (rounded-square background + "F" + compare-bars accent)
   is drawn entirely inside the SVG itself now (partials/logo.php) — this
   class is just sizing/shadow on the <svg> element. */
.brand-mark {
    width: 36px;
    height: 36px;
    box-shadow: 0 2px 6px rgba(15, 76, 95, .28);
    border-radius: 10px;
    flex: none;
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--ink) !important;
}
/* A styled nav item (search) with an icon — plain <a> instead of Bootstrap's
   .btn-link, whose baked-in underline read as an accidental broken link
   rather than a real nav item. */
.nav-search-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .75rem;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}
.nav-search-link:hover { background: var(--surface-2); color: var(--fjord-ink); }
.nav-search-link svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    flex: none;
}
.nav-text-link {
    color: var(--ink-soft);
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    padding: .45rem .5rem;
    white-space: nowrap;
    transition: color .15s ease;
}
.nav-text-link:hover { color: var(--fjord-ink); }
/* .nav-text-link is also used on a <button> now (the Categories dropdown
   trigger) — strip the browser's default button chrome so it reads
   identically to the plain <a> uses of the same class. */
button.nav-text-link {
    background: none;
    border: none;
    font: inherit;
}
.nav-divider {
    width: 1px;
    height: 22px;
    background: var(--border);
}

/* ---- Categories mega-menu (feedback item 11) ----------------------------- */
.category-mega-menu {
    width: min(760px, 92vw);
    max-height: 75vh;
    overflow-y: auto;
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 20px 40px -20px rgba(23, 34, 42, .25);
}
.category-mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.25rem 1rem;
}
.category-mega-heading {
    display: block;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: .4rem;
}
.category-mega-heading:hover { color: var(--fjord-ink); }
.category-mega-col ul { margin: 0; }
.category-mega-col li { margin-bottom: .3rem; }
.category-mega-link {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .88rem;
}
.category-mega-link:hover { color: var(--fjord-ink); }
.category-mega-more {
    font-size: .85rem;
    font-weight: 600;
    color: var(--fjord-ink);
    text-decoration: none;
}
.category-mega-more:hover { text-decoration: underline; }

/* ---- /categories directory (migration 0036, ~2,500 subcategories) ------- */
.category-directory-section { scroll-margin-top: 6rem; } /* clears the sticky header */
.category-directory-list {
    columns: 4 200px;
    column-gap: 1.5rem;
    margin: 0;
}
.category-directory-list li {
    break-inside: avoid;
    margin-bottom: .35rem;
}
.category-directory-list a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .9rem;
}
.category-directory-list a:hover { color: var(--fjord-ink); text-decoration: underline; }

/* ---- Account menu / avatar (feedback items 13 & 14) ----------------------- */
.account-avatar-btn {
    background: none;
    border: none;
    padding: 0;
    line-height: 0;
}
.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--berry), var(--rose));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
}
.site-nav .btn {
    border-radius: 999px;
    font-weight: 700;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    margin-top: 5rem;
}
.footer-heading {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-faint);
    margin-bottom: .9rem;
}
.footer-links li { margin-bottom: .5rem; }
.footer-links a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .92rem;
}
.footer-links a:hover { color: var(--fjord-ink); }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-subscribe {
    background: var(--fjord-soft);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
    background: linear-gradient(180deg, var(--fjord-soft), var(--paper) 75%);
    border-bottom: 1px solid var(--border);
}
.hero-eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--fjord-ink);
    background: rgba(255, 255, 255, .65);
    padding: .35rem .8rem;
    border-radius: 999px;
    margin-bottom: 1.1rem;
}
.hero h1 {
    font-size: clamp(1.5rem, 3.4vw, 2.6rem);
    font-weight: 800;
    /* Stays on one line at any width a phone doesn't force it below its own
       readable minimum — see the max-width override just after this rule. */
    white-space: nowrap;
}
@media (max-width: 575.98px) {
    /* Below this (Bootstrap's own sm breakpoint), holding the line straight
       would shrink the text past a comfortable reading size or overflow
       the viewport — better to wrap to two lines here than either. */
    .hero h1 {
        white-space: normal;
        font-size: clamp(1.5rem, 7vw, 1.9rem);
    }
}
.hero-lede {
    color: var(--ink-soft);
    font-size: 1.15rem;
    max-width: 55ch;
}
.hero-search { max-width: 720px; }
.hero-search .form-control {
    height: 3.2rem;
    font-size: 1.05rem;
    border-radius: .7rem 0 0 .7rem;
}
.hero-search .btn {
    border-radius: 0 .7rem .7rem 0;
    padding-inline: 1.6rem;
}

/* ---- Category cards ------------------------------------------------------ */
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .6rem;
    padding: 1.4rem 1rem;
    border-radius: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--ink);
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
/* 14 main categories (migration 0036) read best as two rows of 7 on wide
   screens — Bootstrap's row-cols-* stops at 6, so this one is ours. */
@media (min-width: 992px) {
    .row-cols-lg-7 > * {
        flex: 0 0 auto;
        width: calc(100% / 7);
    }
    .row-cols-lg-7 .category-card { padding: 1.2rem .5rem; }
}
.category-card:hover {
    transform: translateY(-3px);
    border-color: var(--fjord);
    box-shadow: 0 12px 24px -14px rgba(15, 76, 95, .3);
    color: var(--ink);
}
.category-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--fjord);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
}
.category-card:hover .category-icon {
    transform: scale(1.08) rotate(-4deg);
}
/* Round, solid-vivid-color bubbles with a white glyph — not the muted
   soft-tint/dark-ink pairing used elsewhere (buttons, the seller welcome
   page) — a punchier, more playful look specifically for this grid, since
   "still feels lifeless" was the exact complaint about the softer version.
   One accent per top-level category (home.php's $icons map picks the
   class) instead of every tile sharing the same teal — see tokens.css for
   the color tokens. .is-fjord is the same look as the plain .category-icon
   default above, named for when it's picked explicitly alongside the rest. */
.category-icon.is-fjord { background: var(--fjord); }
.category-icon.is-berry { background: var(--berry); }
.category-icon.is-rose { background: var(--rose); }
.category-icon.is-slate { background: var(--slate); }
.category-icon.is-amber { background: var(--amber); }
.category-icon.is-forest { background: var(--forest); }
.category-icon.is-olive { background: var(--olive); }
.category-icon.is-terracotta { background: var(--terracotta); }
.category-icon.is-plum { background: var(--plum); }
.category-card .label {
    font-weight: 600;
    font-size: .92rem;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ---- Value props / how it works ------------------------------------------ */
.value-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--berry-soft);
    color: var(--berry);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
/* A little of the same color variety as .category-icon (see above), used on
   the seller welcome/benefits screen so its four cards don't read as one
   flat berry block. */
.value-icon.is-fjord { background: var(--fjord-soft); color: var(--fjord-ink); }
.value-icon.is-forest { background: var(--forest-soft); color: var(--forest); }
.value-icon.is-plum { background: var(--plum-soft); color: var(--plum); }
.value-icon.is-amber { background: var(--amber-soft); color: var(--amber); }

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-display);
    flex: none;
}

/* ---- Product cards --------------------------------------------------- */
.product-card {
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    height: 100%;
    background: var(--surface);
    transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover {
    box-shadow: 0 14px 28px -16px rgba(23, 34, 42, .22);
    transform: translateY(-2px);
}
/* Not scoped to .product-card — catalog/index.php's search-result cards
   use plain Bootstrap .card, not this project's own .product-card, and
   still want the same thumbnail treatment. */
.product-thumb {
    aspect-ratio: 4 / 3;
    /* A warm wash (the tips band's colours) while a photo loads or when a
       product has none, instead of a dead gray box. */
    background: linear-gradient(135deg, #FFF1DE 0%, #FCE6DD 50%, #E3F3F0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card .price {
    font-weight: 700;
    color: var(--ink);
}
.price-was {
    color: var(--ink-faint);
    text-decoration: line-through;
    font-weight: 400;
    font-size: .85em;
    margin-inline-end: .4em;
}
.discount-badge {
    display: inline-block;
    background: var(--berry-soft);
    color: var(--berry);
    font-size: .72rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: .4rem;
    margin-inline-start: .4em;
    vertical-align: middle;
}

/* ---- Wishlist heart (feedback item 15) -----------------------------------
   Always rendered as a sibling of any surrounding card link, floated over
   its top corner with position-relative/absolute — see
   partials/wishlist_heart.php for why it's never nested inside the <a>. */
.wishlist-heart-form {
    position: absolute;
    top: .6rem;
    inset-inline-end: .6rem;
    z-index: 2;
}
.wishlist-heart-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, .92);
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: transform .15s ease, color .15s ease;
}
.wishlist-heart-btn:hover { transform: scale(1.12); color: var(--berry); }
.wishlist-heart-btn.is-saved { color: var(--berry); }

/* ---- Rating badge (feedback items 9 & 10 — quality alongside price) ----- */
.rating-badge {
    display: inline-flex;
    align-items: center;
    gap: .25em;
    font-size: .82rem;
    font-weight: 600;
    color: var(--amber);
}
.rating-badge .text-muted {
    font-weight: 400;
    font-size: .95em;
}

/* ---- Product gallery thumbnails (catalog/show.php) ------------------------ */
.product-gallery-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid var(--border);
    cursor: pointer;
    opacity: .7;
}
.product-gallery-thumb:hover {
    opacity: 1;
}
.product-gallery-thumb.is-active {
    border-color: var(--fjord);
    opacity: 1;
}

/* ---- Price insight (catalog/show.php) ------------------------------------
   Reuses the two existing brand colors (fjord = positive, berry = caution)
   rather than adding a traffic-light red/green/amber set. */
.price-insight {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1.25rem 0;
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: var(--surface-2);
}
.price-insight.is-good-price,
.price-insight.is-below-average {
    background: var(--fjord-soft);
    color: var(--fjord-ink); /* also tints the sparkline, which uses stroke="currentColor" */
}
.price-insight.is-above-average {
    background: var(--berry-soft);
    color: var(--berry);
}
.price-insight-title {
    font-weight: 700;
    font-size: .95rem;
}
.price-insight.is-above-average .price-insight-title {
    color: var(--berry);
}
.price-insight-body {
    color: var(--ink-soft);
    font-size: .85rem;
    margin: .1rem 0 0;
}
.price-insight-range {
    color: var(--ink-faint);
    font-size: .75rem;
    margin: .2rem 0 0;
}
.price-insight-sparkline {
    flex-shrink: 0;
}

/* ---- Seller CTA band ---------------------------------------------------- */
.cta-band {
    background: var(--ink);
    color: #fff;
    border-radius: 1.25rem;
}

/* ---- Seller launch offer (partials/launch_offer_banner.php) -------------- */
.launch-offer-banner {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    padding: .65rem 1rem;
    border-radius: 1rem;
    background: var(--amber-soft);
    color: var(--ink);
    border: 1px solid rgba(138, 90, 18, .25);
    font-size: .92rem;
    line-height: 1.35;
}
.launch-offer-badge {
    background: var(--amber);
    color: #fff;
    font-weight: 700;
    font-size: .72rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .2rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
}
/* "Limited time" pill: a red-orange tag with a ticking clock and a soft
   pulse, so the temporary nature of the offer is the first thing seen. */
.launch-offer-note {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: .35rem;
    margin-top: .35rem;
    padding: .22rem .7rem .22rem .55rem;
    border-radius: 999px;
    background: #c2410c;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 0 0 0 rgba(194, 65, 12, .45);
    animation: launch-offer-pulse 2.4s ease-out infinite;
}
.launch-offer-note-icon { display: inline-block; animation: launch-offer-tick 2.4s steps(2) infinite; }
.launch-offer-banner.is-light .launch-offer-note { background: #f97316; }
@keyframes launch-offer-pulse {
    0% { box-shadow: 0 0 0 0 rgba(194, 65, 12, .45); }
    70% { box-shadow: 0 0 0 9px rgba(194, 65, 12, 0); }
    100% { box-shadow: 0 0 0 0 rgba(194, 65, 12, 0); }
}
@keyframes launch-offer-tick { 50% { transform: rotate(180deg); } }
@media (prefers-reduced-motion: reduce) {
    .launch-offer-note, .launch-offer-note-icon { animation: none; }
}
.launch-offer-banner.is-light {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
}

/* ---- Login/register benefits panel (partials/auth_benefits.php) --------- */
.auth-benefits {
    background: var(--ink);
    color: #fff;
    border-radius: 1.25rem;
    padding: 2rem;
}
.auth-benefits-sub { color: rgba(255, 255, 255, .72); }
.auth-benefit-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

/* ---- Help widget ---------------------------------------------------------
   Fixed bottom-corner, always dismissible in one click/tap/Escape/outside
   click — see layout.php for the (tiny, framework-free) toggle logic. */
.help-widget {
    position: fixed;
    inset-block-end: 1.25rem;
    inset-inline-end: 1.25rem;
    z-index: 1040;
}
.help-toggle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--fjord);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(15, 76, 95, .45);
    cursor: pointer;
    transition: transform .15s ease, background-color .15s ease;
}
.help-toggle:hover { background: var(--fjord-ink); transform: translateY(-2px); }
.help-panel {
    position: absolute;
    inset-block-end: calc(100% + .75rem);
    inset-inline-end: 0;
    width: 300px;
    max-width: calc(100vw - 2.5rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 20px 40px -20px rgba(23, 34, 42, .35);
    padding: 1.1rem 1.2rem;
}
.help-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.help-panel-links li { margin-bottom: .5rem; }
.help-panel-links a {
    color: var(--fjord-ink);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 600;
}
.help-panel-links a:hover { text-decoration: underline; }

/* ---- Article body (rich-text, admin-authored via /admin/articles) ---- */
/* One fixed type scale for every article, whatever was pasted in: the
   editor and HtmlSanitizer drop fonts, sizes and inline colours, so these
   rules are the only styling an article body gets. */
.article-body { font-size: 1.05rem; line-height: 1.7; overflow-wrap: anywhere; }
.article-body h2 { font-size: 1.35rem; font-weight: 700; margin-top: 2rem; margin-bottom: .75rem; }
.article-body h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: .5rem; }
.article-body h4 { font-size: 1.02rem; font-weight: 700; margin-top: 1.25rem; margin-bottom: .4rem; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body hr { margin: 2rem 0; }
/* The article's top photo: always a 16:9 frame, the whole photo visible
   (portrait or square photos are not cut), the blurred photo fills the rest. */
.article-featured { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--bs-border-radius-lg, .75rem); background: var(--bs-tertiary-bg, #f1f3f5); }
.article-featured::before { content: ""; position: absolute; inset: -30px; background: var(--featured-bg) center / cover no-repeat; filter: blur(28px); opacity: .55; }
.article-featured .article-featured-image { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.article-featured-preview { max-width: 360px; }

/* Tables: scroll sideways on a phone instead of squeezing the page. */
.article-body table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .95rem;
    line-height: 1.45;
}
.article-body th, .article-body td {
    border: 1px solid var(--line, #dfe3e6);
    padding: .5rem .75rem;
    vertical-align: top;
    min-width: 6rem;
}
.article-body th { background: var(--surface-2, #eef2f3); font-weight: 700; text-align: left; }
.article-body table.table-striped tbody tr:nth-child(even) td { background: var(--surface-2, #f4f6f7); }
.article-body caption { caption-side: top; font-weight: 600; padding-bottom: .4rem; }

/* The editor's colour palette and alignment (tc-, hl-, ta- classes). */
.article-body .tc-red { color: #c0392b; }
.article-body .tc-orange { color: #c25e00; }
.article-body .tc-green { color: #1e7d45; }
.article-body .tc-blue { color: #1f5fa8; }
.article-body .tc-purple { color: #6f3fa8; }
.article-body .tc-gray { color: #5f6b72; }
.article-body .hl-yellow, .hl-yellow { background: #fff1a8; border-radius: 3px; padding: 0 .15em; }
.article-body .hl-green { background: #d4f5dc; border-radius: 3px; padding: 0 .15em; }
.article-body .hl-blue { background: #d6e9ff; border-radius: 3px; padding: 0 .15em; }
.article-body .hl-pink { background: #ffdbe8; border-radius: 3px; padding: 0 .15em; }
.article-body .ta-center { text-align: center; }
.article-body .ta-right { text-align: right; }

/* Editor bits: colour swatches, surface height, SEO preview/checklist. */
.rich-editor-surface { min-height: 420px; max-height: 75vh; overflow-y: auto; }
.rich-editor-swatches { min-width: 0; white-space: nowrap; }
.rich-editor-swatch { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9d0d4; margin: 0 .15rem; padding: 0; vertical-align: middle; }
.swatch-tc-red { background: #c0392b; } .swatch-tc-orange { background: #c25e00; } .swatch-tc-green { background: #1e7d45; }
.swatch-tc-blue { background: #1f5fa8; } .swatch-tc-purple { background: #6f3fa8; } .swatch-tc-gray { background: #5f6b72; }
.swatch-hl-yellow { background: #fff1a8; } .swatch-hl-green { background: #d4f5dc; } .swatch-hl-blue { background: #d6e9ff; } .swatch-hl-pink { background: #ffdbe8; }
.rich-editor-toolbar .tc-red { color: #c0392b; }
.seo-preview { border: 1px solid var(--line, #dfe3e6); border-radius: 10px; padding: .75rem 1rem; background: var(--surface, #fff); max-width: 600px; }
.seo-preview-url { font-size: .8rem; color: #3c763d; overflow-wrap: anywhere; }
.seo-preview-title { font-size: 1.1rem; color: #1a0dab; line-height: 1.3; }
.seo-preview-desc { font-size: .85rem; color: var(--ink-soft, #545454); }
.seo-checklist li { padding-left: 1.5rem; position: relative; margin-bottom: .25rem; }
.seo-checklist li::before { position: absolute; left: 0; font-weight: 700; }
.seo-checklist li.is-ok::before { content: "✓"; color: #1e7d45; }
.seo-checklist li.is-todo::before { content: "○"; color: #c25e00; }
.seo-checklist li.is-info::before { content: "i"; color: #1f5fa8; }
.article-seo > summary { cursor: pointer; }
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin-bottom: 1.1rem; padding-left: 1.5rem; }
.article-body li { margin-bottom: .4rem; }
.article-body blockquote {
    border-left: 3px solid var(--fjord);
    padding: .25rem 0 .25rem 1.1rem;
    margin: 1.5rem 0;
    color: var(--ink-soft);
    font-style: italic;
}
/* Centered by default (margin-left/right: auto) — only visible once a
   size class narrows the image below the column's full width, but this
   has to live in the base rule, not a ".is-align-center" class: "Center"
   in the editor toolbar is the absence of an alignment class (no class
   is the common case, and a resized-but-unaligned image should still
   look intentional, not stuck at the left edge), so nothing else sets
   these two properties for that case. */
.article-inline-image { max-width: 100%; border-radius: 12px; display: block; margin: 1.75rem auto; }
.article-editor-surface { line-height: 1.6; }
.article-editor-surface img { max-width: 100%; border-radius: 8px; cursor: pointer; margin-left: auto; margin-right: auto; display: block; }
.article-editor-surface img.is-size-small  { max-width: 240px; }
.article-editor-surface img.is-size-medium { max-width: 480px; }
.article-inline-image.is-size-small  { max-width: 240px; }
.article-inline-image.is-size-medium { max-width: 480px; }

/* Left/right float so body text wraps around a resized image. Center has
   no class of its own — it's just the base rule above (margin-left/right:
   auto) with no float, which is why these two overrides exist rather than
   three parallel ones. Applies both inside the editor
   (.article-editor-surface img) and on the public article page
   (.article-inline-image) so what an admin sees while writing matches
   what a reader sees. */
.article-editor-surface img.is-align-left,
.article-inline-image.is-align-left {
    float: left;
    margin: .25rem 1.25rem 1rem 0;
}
.article-editor-surface img.is-align-right,
.article-inline-image.is-align-right {
    float: right;
    margin: .25rem 0 1rem 1.25rem;
}
/* Contains the floats above — without this, a left/right-aligned image that
   happens to be the last thing in an article hangs out of its container and
   overlaps whatever comes after it. */
.article-body::after,
.article-editor-surface::after {
    content: "";
    display: table;
    clear: both;
}
/* On a phone, a 240px float leaves only a sliver of text beside it — every
   aligned image goes back to centered, full-flow there instead. */
@media (max-width: 575.98px) {
    .article-inline-image.is-align-left,
    .article-inline-image.is-align-right {
        float: none;
        margin: 1.75rem auto;
    }
}
/* The small floating toolbar that appears above an inline image clicked
   inside the article editor (see form.php) — sized/positioned by JS, not
   attached to normal document flow. */
.article-editor-image-toolbar {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem;
    max-width: 280px;
    background: var(--ink);
    padding: .3rem;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    z-index: 20;
}
/* Forces the size/align button groups onto their own rows within the flex
   toolbar above — the standard flex-basis:100% line-break trick, since
   flex has no literal <br>. */
.article-editor-image-toolbar-break {
    flex-basis: 100%;
    height: 0;
}
.article-editor-image-toolbar button {
    font-size: .75rem;
    line-height: 1;
    padding: .35rem .55rem;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #fff;
    white-space: nowrap;
}
.article-editor-image-toolbar button:hover,
.article-editor-image-toolbar button.is-active {
    background: rgba(255, 255, 255, .18);
}
.article-editor-image-toolbar button.is-danger:hover {
    background: var(--rose);
}

/* ---- Admin pending-products list: thumbnail per row ---------------------- */
.admin-pending-thumb {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: .5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.admin-pending-thumb.is-empty { color: var(--ink-faint); }

/* ---- Search filters (catalog/index.php) --------------------------------- */
.category-picker.is-inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}
.category-picker.is-inline .category-picker-group { margin-bottom: 0 !important; }
@media (min-width: 576px) {
    .category-picker.is-inline { grid-template-columns: 1fr 1fr; }
}

/* ---- Seller billing rules (partials/seller_billing_rules.php) ----------- */
.seller-rules {
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: var(--fjord-soft);
    font-size: .9rem;
}
.seller-rules-title { font-weight: 700; margin-bottom: .4rem; }
.seller-rules-list { margin: 0; padding-left: 1.2rem; }
.seller-rules-list li { margin-bottom: .25rem; }
.seller-rules.is-light {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
}
.wallet-first-topup {
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: var(--forest-soft);
    border: 1px solid rgba(44, 107, 63, .25);
}

/* ---- Several sellers under one search result (CatalogController::search) - */
.search-offers { border-top: 1px solid var(--border); padding-top: .5rem; }
.search-offers-title { font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .25rem; }
.search-offer {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    font-size: .85rem;
    padding: .2rem 0;
    color: var(--ink);
    text-decoration: none;
}
.search-offer:hover .search-offer-store { text-decoration: underline; }
.search-offer-store { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-offer-price { font-weight: 700; white-space: nowrap; }
.offers-table tr.is-current td { background: var(--fjord-soft); }

/* ---- Admin dashboard: three columns (products / customers / articles) --- */
.dash-column {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}
.dash-title { font-size: 1rem; font-weight: 700; margin-bottom: .75rem; display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.dash-settings { font-size: .8rem; font-weight: 500; text-decoration: none; color: var(--bs-secondary-color, #6c757d); }
.dash-settings:hover { color: var(--bs-primary, #1f6f84); text-decoration: underline; }
/* Settings: tabs scroll sideways on a phone instead of wrapping into rows */
.settings-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.settings-tabs .nav-link { white-space: nowrap; }
.settings-network.is-on { border-color: var(--bs-success, #198754); }
.dash-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .6rem .75rem;
    border-radius: .6rem;
    color: var(--ink);
    text-decoration: none;
}
a.dash-row:hover { background: var(--fjord-soft); color: var(--ink); }
.dash-row strong { font-size: 1.15rem; }
.dash-row.is-action { background: var(--amber-soft); }
.dash-row.is-action strong { color: var(--amber); }
.dash-total { font-size: .85rem; color: var(--ink-soft); margin: .75rem .75rem 0; }
.dash-actions { margin-top: auto; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.help-card { transition: border-color .15s ease, box-shadow .15s ease; }
.help-card:hover { border-color: var(--fjord); box-shadow: 0 8px 20px -14px rgba(15, 76, 95, .4); }

/* Admin all-products: sortable column headers */
.admin-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.admin-sort:hover { text-decoration: underline; }
.admin-sort.is-current { color: var(--bs-primary, #1f6f84); }

/* Article comments */
.article-comment { padding: 0.75rem 0; border-bottom: 1px solid var(--bs-border-color, #e5e7eb); }
.article-comment:last-of-type { border-bottom: 0; }
.article-comment-meta { font-size: 0.875rem; }

/* Back-to-top button (layout.php): a solid brand-colour button with an
   "arrow to the top line" icon and a short label, stacked above the help
   button. */
.back-to-top {
    position: fixed;
    inset-block-end: calc(1.25rem + 52px + .75rem);
    inset-inline-end: 1.25rem;
    z-index: 1039;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: var(--berry, #8C3A56);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
.back-to-top[hidden] { display: none; }
.back-to-top-label { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; margin-top: 1px; }
.back-to-top:hover { background: var(--fjord-ink, #0F4C5F); }
.list-end-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1rem; }

/* ---- Admin analytics: findings list and KPI tiles ---------------------- */
.insight-list { display: grid; gap: .5rem; }
.insight { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem .75rem; border-radius: 10px; background: var(--surface-2, #f4f6f7); }
.insight-icon {
    flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .85rem; color: #fff;
}
.insight.is-good .insight-icon { background: #0a7d0a; }
.insight.is-warning .insight-icon { background: #b7791f; }
.insight.is-info .insight-icon { background: #5b7083; }
.insight.is-critical .insight-icon { background: #c0392b; }
.insight-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft, #52514e); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; }
.kpi-tile {
    display: flex; flex-direction: column; gap: .15rem;
    padding: .85rem 1rem; border-radius: 12px;
    background: var(--surface, #fff); border: 1px solid var(--line, #dfe3e6);
    color: inherit; text-decoration: none;
}
a.kpi-tile:hover { border-color: var(--fjord, #1f6f84); }
.kpi-label { font-size: .8rem; color: var(--ink-soft, #52514e); }
.kpi-value { font-size: 1.6rem; font-weight: 600; line-height: 1.2; color: var(--ink, #0b0b0b); }
.kpi-delta { font-size: .78rem; font-weight: 600; }
.kpi-delta-period { font-weight: 400; color: var(--ink-soft, #52514e); }
.kpi-delta.is-good, .kpi-text-good { color: #006300; }
.kpi-delta.is-bad, .kpi-text-bad { color: #b42318; }
.kpi-delta.is-neutral { color: var(--ink-soft, #52514e); }
.analytics-table td, .analytics-table th { font-variant-numeric: tabular-nums; }

/* ---- Homepage shopping tips band: warm and bright, in the site's palette */
.guides-band {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 255, 255, .55) 0 7rem, transparent 7.1rem),
        linear-gradient(135deg, #FFE7C2 0%, #FFD9CC 45%, #D8F0EC 100%);
}
.guides-band h2 { color: var(--ink); }
.guide-card { background: var(--surface); border: 0; box-shadow: 0 6px 18px rgba(23, 34, 42, .08); transition: transform .15s ease, box-shadow .15s ease; }
.guide-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(23, 34, 42, .14); }
.guide-cover { background: linear-gradient(135deg, #2A93AE, #1F6B82); }
.guide-cover-fallback { font-size: 2.5rem; }
.guide-tag {
    display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: #A14A2A; background: #FCE3D6; border-radius: 999px; padding: .1rem .55rem;
}
@media (prefers-reduced-motion: reduce) { .guide-card, .guide-card:hover { transition: none; transform: none; } }

/* ---- Seller dashboard (views/seller/dashboard.php) --------------------- */
.insight.is-info .insight-icon { background: var(--fjord, #1f6f84); font-family: Georgia, serif; font-style: italic; }
.seller-dash .dash-column { box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.sd-summary li { position: relative; padding: .2rem 0 .2rem 1rem; }
.sd-summary li::before { content: ""; position: absolute; left: .1rem; top: .7rem; width: .4rem; height: .4rem; border-radius: 50%; background: var(--fjord, #1f6f84); }
.sd-facts { grid-template-columns: 1fr; gap: .55rem; }
.sd-facts dd { font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; }
.sd-balance { display: flex; flex-direction: column; gap: .1rem; padding: .75rem; margin-bottom: .5rem; border-radius: .75rem; background: var(--fjord-soft, #e6f1f4); }
.sd-balance.is-low { background: var(--amber-soft, #fdf3e1); }
.sd-table td, .sd-table th { white-space: nowrap; }
.sd-table .sd-title { white-space: normal; min-width: 14rem; max-width: 22rem; }
.sd-table .sd-title a { font-weight: 600; }
.sd-state-help { white-space: normal; max-width: 16rem; font-size: .75rem; }
.sd-events li { display: flex; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--border, #e5e7eb); }
.sd-events li:last-child { border-bottom: 0; }
.sd-events time { flex: 0 0 6.5rem; font-size: .78rem; color: var(--ink-soft, #52514e); }
.sd-events .sd-mail { font-size: .75rem; color: var(--ink-soft, #52514e); }
.stats-method li { margin-bottom: .35rem; }
@media (max-width: 575.98px) {
  .sd-events li { flex-direction: column; gap: .15rem; }
  .sd-events time { flex-basis: auto; }
  .sd-table .sd-title { min-width: 9rem; }
}
.ships-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .1rem .75rem; max-height: 14rem; overflow-y: auto; padding: .5rem .75rem; border: 1px solid var(--border, #dee2e6); border-radius: .5rem; font-size: .875rem; }
/* Shopping tips list header: the homepage tips band's colours. */
.list-hero {
    padding: 1.75rem 1.5rem;
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 92% 10%, rgba(255, 255, 255, .55) 0 5rem, transparent 5.1rem),
        linear-gradient(135deg, #FFE7C2 0%, #FFD9CC 45%, #D8F0EC 100%);
}
.list-hero h1 { color: var(--ink); }
.list-hero p { color: #4a4945; }
.list-hero .btn-light { background: rgba(255, 255, 255, .8); border-color: transparent; }
@media (min-width: 576px) { .seller-dash .dash-kpis { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); } }
.offer-summary { background: var(--fjord-soft, #e6f1f4); border-radius: .5rem; padding: .45rem .7rem; }

/* Text sizes from the article editor's size menu (fs-*). */
.article-body .fs-small, .rich-editor-surface .fs-small, .dropdown-item.fs-small { font-size: .875em; }
.article-body .fs-large, .rich-editor-surface .fs-large, .dropdown-item.fs-large { font-size: 1.2em; }
.article-body .fs-xlarge, .rich-editor-surface .fs-xlarge, .dropdown-item.fs-xlarge { font-size: 1.45em; line-height: 1.35; }

/* v1.73: a store button that stays at the bottom of a phone screen (picks and product pages). */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--bs-body-bg, #fff); box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
@media (max-width: 991.98px) {
  body:has(.sticky-cta.d-lg-none) { padding-bottom: 4.5rem; }
  body:has(.sticky-cta.d-lg-none) .help-widget, body:has(.sticky-cta.d-lg-none) .back-to-top { bottom: 5rem !important; }
}
@media (max-width: 767.98px) {
  body:has(.sticky-cta.d-md-none) { padding-bottom: 4.5rem; }
  body:has(.sticky-cta.d-md-none) .help-widget, body:has(.sticky-cta.d-md-none) .back-to-top { bottom: 5rem !important; }
}
.pick-cta { font-size: 1.15rem; }
.article-body a.article-buy-btn { color: #fff; text-decoration: none; padding: .55rem 1.1rem; font-weight: 600; border-radius: .6rem; }
.article-body a.article-buy-btn::after { content: " →"; }
