/**
 * Wholesale Market — dense import/marketplace storefront in crimson and cream.
 *
 * Layout follows the conventions of high-SKU marketplaces: a persistent left
 * category rail, a search-first header, a split promotional banner, circular
 * "top category" chips carrying a from-price, and tightly packed product rows
 * grouped by category with percentage-off flags.
 *
 * Hand-written and not processed by Tailwind: the Shop package's Tailwind
 * content paths do not include `resources/themes`, so utility classes used in
 * this theme's Blade files are never compiled. Use the `whl-` classes here.
 */

:root {
    --whl-crimson: #de1849;
    --whl-crimson-dark: #b9123b;
    --whl-ink: #22252b;
    --whl-muted: #7b8089;
    --whl-line: #ebedf1;
    --whl-mist: #f5f6f8;
    --whl-cream: #fff5eb;
}

body { background: var(--whl-mist); }

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

.gadget-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff !important;
    border-bottom: 1px solid var(--whl-line) !important;
    box-shadow: none !important;
}

.gadget-header--static { position: static; }

.gadget-header__announcement {
    min-height: 30px;
    padding: 6px 16px !important;
    background: var(--whl-crimson) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: .05em;
    text-align: center;
}

.gadget-header__announcement a { color: #ffe08a !important; }

.gadget-header__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(1440px, calc(100% - 28px)) !important;
    min-height: 66px !important;
    margin: 0 auto !important;
    padding: 8px 0 !important;
}

.gadget-header__brand {
    color: var(--whl-crimson) !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    letter-spacing: -.04em;
    text-decoration: none;
    white-space: nowrap;
}

.gadget-header__brand img { max-height: 40px; object-fit: contain; }
.gadget-header__tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.gadget-header__icon-link, .gadget-header__cart { color: var(--whl-ink); }
.gadget-header__mobile { display: none; }

/* ------------------------------------------ search-first header layout */

.gadget-header--search .gadget-header__search--hero { display: flex; flex: 1 1 auto; max-width: 720px; gap: 0; }

.gadget-header--search .gadget-header__search--hero input {
    width: 100%;
    height: 42px !important;
    padding: 0 16px;
    border: 2px solid var(--whl-crimson) !important;
    border-right: 0 !important;
    border-radius: 24px 0 0 24px !important;
    background: #fff !important;
    font-size: 13px !important;
}

.gadget-header--search .gadget-header__search--hero button {
    height: 42px;
    padding: 0 26px;
    border: 0;
    border-radius: 0 24px 24px 0;
    background: var(--whl-crimson);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.gadget-header--search .gadget-header__search--hero button:hover { background: var(--whl-crimson-dark); }

.gadget-header__departments { position: relative; }

.gadget-header__departments summary {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 22px;
    background: var(--whl-cream);
    color: var(--whl-ink);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.gadget-header__departments summary::-webkit-details-marker { display: none; }
.gadget-header__departments summary::after { content: '▾'; color: var(--whl-crimson); }

.gadget-header__departments > div {
    position: absolute;
    z-index: 50;
    top: calc(100% + 8px);
    left: 0;
    display: grid;
    min-width: 250px;
    padding: 8px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(34, 37, 43, .16);
}

.gadget-header__departments > div a { padding: 9px 12px; border-radius: 8px; color: var(--whl-ink); font-size: 13px; text-decoration: none; }
.gadget-header__departments > div a:hover { background: var(--whl-cream); color: var(--whl-crimson); }

@media (max-width: 980px) { .gadget-header__departments { display: none; } }
@media (max-width: 760px) { .gadget-header--search .gadget-header__search--hero { display: none; } }

/* ------------------------------------------------------------- homepage */

.whl-page { background: var(--whl-mist); color: var(--whl-ink); font-family: Poppins, ui-sans-serif, system-ui, sans-serif; padding-bottom: 40px; }
.whl-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; width: min(1440px, calc(100% - 28px)); margin: 0 auto; padding-top: 16px; }

/* The persistent category rail — the defining element of this layout. */
.whl-rail { align-self: start; overflow: hidden; border-radius: 12px; background: #fff; }
.whl-rail h2 { margin: 0; padding: 13px 16px; background: var(--whl-crimson); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.whl-rail a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--whl-line); color: var(--whl-ink); font-size: 12.5px; text-decoration: none; }
.whl-rail a:last-child { border-bottom: 0; }
.whl-rail a::after { color: var(--whl-muted); content: '›'; font-size: 15px; }
.whl-rail a:hover { background: var(--whl-cream); color: var(--whl-crimson); }

.whl-main { min-width: 0; }

.whl-banner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }

.whl-banner__main,
.whl-banner__side {
    display: flex;
    min-height: 210px;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 28px 32px;
    border-radius: 14px;
    color: #fff;
}

.whl-banner__main { position: relative; background: linear-gradient(118deg, var(--whl-crimson) 0%, #f2477a 70%, #ff7aa2 100%); isolation: isolate; }
.whl-banner__main::after { position: absolute; z-index: -1; top: -70px; right: -50px; width: 300px; height: 300px; border: 40px solid rgba(255, 255, 255, .14); border-radius: 50%; content: ''; }
.whl-banner__main strong { display: block; max-width: 460px; font-size: clamp(22px, 2.8vw, 34px); font-weight: 800; letter-spacing: -.04em; line-height: 1.08; }
.whl-banner__main p { max-width: 420px; margin: 10px 0 16px; color: rgba(255, 255, 255, .85); font-size: 12.5px; line-height: 1.6; }

.whl-banner__cta { display: inline-flex; align-self: flex-start; padding: 10px 20px; border-radius: 22px; background: #fff; color: var(--whl-crimson); font-size: 12px; font-weight: 800; text-decoration: none !important; }

.whl-banner__side { background: linear-gradient(140deg, #22252b 0%, #3c4048 100%); }
.whl-banner__side small { color: #ffb3c8; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.whl-banner__side strong { display: block; margin-top: 8px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.whl-banner__side a { margin-top: 12px; color: #ffb3c8; font-size: 12px; font-weight: 800; text-decoration: none; }

.whl-block { margin-top: 18px; padding: 16px; border-radius: 12px; background: #fff; }
.whl-block__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.whl-block__head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.whl-block__head h2::before { width: 6px; height: 18px; border-radius: 3px; background: var(--whl-crimson); content: ''; }
.whl-block__head a { color: var(--whl-crimson); font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }

/* Circular category chips carrying a from-price, as marketplaces use. */
.whl-chips { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.whl-chip { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 8px; color: var(--whl-ink); text-decoration: none !important; }
.whl-chip__art { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: var(--whl-cream); }
.whl-chip__art img { width: 100%; height: 100%; object-fit: cover; }
.whl-chip__from { position: absolute; right: 0; bottom: 0; left: 0; padding: 3px 0; background: rgba(222, 24, 73, .92); color: #fff; font-size: 9px; font-weight: 800; text-align: center; }
.whl-chip span { overflow: hidden; max-width: 100%; font-size: 11px; font-weight: 650; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.whl-chip:hover span { color: var(--whl-crimson); }

.whl-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }

.whl-card { position: relative; display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--whl-line); border-radius: 10px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.whl-card:hover { z-index: 1; transform: translateY(-3px); border-color: #f4b7c8; box-shadow: 0 12px 24px rgba(222, 24, 73, .12); }

.whl-card__media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--whl-mist); }
.whl-card__media img { width: 100%; height: 100%; padding: 8px; object-fit: contain; transition: transform .3s ease; }
.whl-card:hover .whl-card__media img { transform: scale(1.06); }

.whl-flag { position: absolute; top: 8px; left: 8px; padding: 3px 8px; border-radius: 20px; background: var(--whl-crimson); color: #fff; font-size: 9px; font-weight: 800; }
.whl-flag--new { background: #22252b; }
.whl-flag--out { background: #98a0aa; }

.whl-card__body { display: flex; min-height: 84px; flex: 1; flex-direction: column; padding: 9px; }
.whl-card__name { display: -webkit-box; min-height: 30px; margin: 0 0 7px; overflow: hidden; color: var(--whl-ink); font-size: 11px; font-weight: 500; line-height: 1.4; text-decoration: none; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.whl-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: auto; }
.whl-card__prices { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.whl-card__price { overflow: hidden; color: var(--whl-crimson); font-size: 14px; font-weight: 800; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.whl-card__regular { color: #aeb4bd; font-size: 10px; text-decoration: line-through; }

.whl-cart { display: inline-grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border: 0; border-radius: 50%; background: var(--whl-cream); color: var(--whl-crimson); cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.whl-cart:hover:not(:disabled) { transform: scale(1.08); background: var(--whl-crimson); color: #fff; }
.whl-cart:disabled { cursor: not-allowed; opacity: .45; }

.whl-empty { padding: 26px; border: 1px dashed #d3d8df; border-radius: 10px; color: var(--whl-muted); font-size: 12.5px; text-align: center; }

/* ------------------------------------------------- category and product */

.whl-crumbs { margin-bottom: 12px; color: var(--whl-muted); font-size: 11px; }
.whl-crumbs a { color: var(--whl-crimson); text-decoration: none; }

.whl-head { margin-bottom: 16px; padding: 22px 26px; border-radius: 14px; background: linear-gradient(118deg, var(--whl-crimson) 0%, #f2477a 100%); color: #fff; }
.whl-head h1 { margin: 0; font-size: clamp(21px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.04em; }
.whl-head p { max-width: 640px; margin: 8px 0 0; color: rgba(255, 255, 255, .84); font-size: 12px; line-height: 1.6; }

.whl-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; padding: 18px; border-radius: 12px; background: #fff; }
.whl-detail__media { display: block; min-width: 0; }
.whl-detail__body h1 { margin: 0 0 10px; font-size: clamp(19px, 2.2vw, 27px); font-weight: 800; letter-spacing: -.035em; line-height: 1.16; }
.whl-detail__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; color: var(--whl-crimson); font-size: 26px; font-weight: 800; }
.whl-detail__price s { color: #aeb4bd; font-size: 14px; font-weight: 500; }
.whl-detail__tax { display: block; margin-top: -8px; margin-bottom: 14px; color: var(--whl-muted); font-size: 11px; }
.whl-detail__desc { margin-bottom: 18px; color: var(--whl-muted); font-size: 12.5px; line-height: 1.7; }
.whl-detail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.whl-detail__qty { padding: 8px 12px; border: 1px solid var(--whl-line); border-radius: 22px; background: #fff; }

.whl-buy { flex: 1 1 180px; padding: 13px 22px; border: 0; border-radius: 24px; background: var(--whl-crimson); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.whl-buy:hover:not(:disabled) { transform: translateY(-1px); background: var(--whl-crimson-dark); }
.whl-buy--now { background: var(--whl-ink); }
.whl-buy--now:hover:not(:disabled) { background: #14161a; }
.whl-buy:disabled { cursor: not-allowed; opacity: .45; }

.whl-detail__stock { margin-top: 12px; color: var(--whl-crimson); font-size: 12px; font-weight: 800; }

.whl-section { margin-top: 18px; padding: 18px; border-radius: 12px; background: #fff; }
.whl-section h2 { margin: 0 0 12px; font-size: 15px; font-weight: 800; letter-spacing: -.02em; }

.whl-prose { max-width: 860px; color: var(--whl-muted); font-size: 12.5px; line-height: 1.75; }
.whl-prose img { max-width: 100%; height: auto; }
.whl-prose ul, .whl-prose ol { margin: 10px 0; padding-left: 20px; }
.whl-prose li { margin-bottom: 5px; }
.whl-prose h1, .whl-prose h2, .whl-prose h3 { margin: 14px 0 8px; color: var(--whl-ink); font-weight: 800; }

.whl-specs { display: grid; max-width: 860px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--whl-line); border-radius: 10px; background: var(--whl-line); }
.whl-specs > div { display: flex; gap: 10px; padding: 10px 12px; background: #fff; }
.whl-specs dt { flex: 0 0 42%; color: var(--whl-muted); font-size: 11px; font-weight: 700; }
.whl-specs dd { margin: 0; color: var(--whl-ink); font-size: 11px; }

.whl-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }

/* ---------------------------------------------------------------- footer */

.gadget-footer { margin-top: 8px; padding: 44px 0 24px; background: #fff; border-top: 3px solid var(--whl-crimson); color: var(--whl-muted); font-size: 12px; }
.gadget-footer__inner { width: min(1440px, calc(100% - 28px)); margin: 0 auto; }
.gadget-footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 34px; }
.gadget-footer__brand { flex: 1 1 300px; max-width: 420px; }
.gadget-footer__brand a { color: var(--whl-crimson); font-size: 20px; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.gadget-footer__brand p { margin: 10px 0 0; color: var(--whl-muted); line-height: 1.7; }
.gadget-footer__social { display: flex; gap: 12px; margin-top: 16px; }
.gadget-footer__social a { color: var(--whl-crimson); }
.gadget-footer__columns { display: flex; flex-wrap: wrap; gap: 46px; }
.gadget-footer__columns h2 { margin: 0 0 13px; color: var(--whl-ink); font-size: 12px; font-weight: 800; }
.gadget-footer__columns a { display: block; margin-bottom: 9px; color: var(--whl-muted); text-decoration: none; }
.gadget-footer__columns a:hover { color: var(--whl-crimson); }

.gadget-footer__newsletter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 30px; padding: 20px; border-radius: 12px; background: var(--whl-cream); }
.gadget-footer__newsletter strong { display: block; color: var(--whl-ink); font-size: 15px; font-weight: 800; }
.gadget-footer__newsletter-form { display: flex; gap: 9px; }
.gadget-footer__newsletter input { height: 38px; min-width: 220px; padding: 0 14px; border: 1px solid var(--whl-line); border-radius: 20px; background: #fff; }
.gadget-footer__newsletter button { height: 38px; padding: 0 22px; border: 0; border-radius: 20px; background: var(--whl-crimson); color: #fff; font-weight: 800; cursor: pointer; }

.gadget-footer__legal { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--whl-line); color: #9aa1aa; font-size: 11px; text-align: center; }
.gadget-footer__visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1240px) {
    .whl-chips { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .whl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .whl-shell { grid-template-columns: 1fr; }
    .whl-rail { display: flex; overflow-x: auto; scrollbar-width: none; }
    .whl-rail h2 { display: none; }
    .whl-rail a { border-bottom: 0; white-space: nowrap; }
    .whl-rail a::after { display: none; }
}

@media (max-width: 760px) {
    .whl-shell, .gadget-header__inner { width: calc(100% - 20px) !important; }
    .whl-banner { grid-template-columns: 1fr; }
    .whl-banner__main, .whl-banner__side { min-height: 170px; padding: 22px; }
    .whl-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .whl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .whl-detail { grid-template-columns: 1fr; gap: 18px; }
    .whl-detail__actions { flex-direction: column; align-items: stretch; }
    .whl-buy { flex: 1 1 auto; width: 100%; }
    .whl-specs { grid-template-columns: 1fr; }
    .gadget-footer__top { flex-direction: column; gap: 26px; }
}

/* ------------------------------------------------------ mobile navigation */

@media (max-width: 760px) {
    .gadget-header__mobile { display: block; }
    .gadget-header__mobile summary { display: flex; width: 30px; height: 30px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; list-style: none; }
    .gadget-header__mobile summary::-webkit-details-marker { display: none; }
    .gadget-header__mobile summary span { display: block; width: 18px; height: 2px; background: var(--whl-ink); }
    .gadget-header__mobile > div { position: absolute; top: 100%; right: 0; left: 0; display: flex; max-height: 70vh; flex-direction: column; overflow-y: auto; padding: 10px 16px 14px; border-top: 1px solid var(--whl-line); background: #fff; }
    .gadget-header__mobile > div a { padding: 9px 0; color: var(--whl-ink); font-size: 13px; font-weight: 600; text-decoration: none; }
}

/* The choose-options control is an <a>, so it needs the link defaults reset
   to match the quick-add button it sits in place of. */
a.whl-cart { text-decoration: none; }

/* Constrain gallery imagery to its column. Without this the storefront
   gallery's images render at intrinsic size and overflow the detail grid. */
.whl-detail__media img { max-width: 100%; height: auto; }

/* The storefront gallery needs more width than half of a mid-size viewport,
   so the detail grid stacks at the same 1180px breakpoint Bagisto's own
   product layout uses. Below that it overflowed its column. */
@media (max-width: 1180px) {
    .whl-detail { grid-template-columns: 1fr; gap: 22px; }
}

/* Once stacked, the gallery would otherwise run the full page width and push
   the buy box far below the fold. */
@media (max-width: 1180px) {
    .whl-detail__media { max-width: 520px; margin-inline: auto; }
}

/* At six columns the price and its struck-through original do not both fit on
   one line, so the sale price truncated mid-number. Let the pair wrap and give
   the original its own row rather than clipping the price the shopper needs. */
.whl-card__prices { flex-wrap: wrap; row-gap: 1px; }
.whl-card__price { overflow: visible; font-size: 13.5px; text-overflow: clip; }
.whl-card__regular { font-size: 9.5px; }

/* -------------------------------------------- main-category header menu */

/*
   Departments spelled out along the bar rather than hidden behind a dropdown:
   on a marketplace they are the primary navigation, and the search field earns
   its place on the right instead of leading.
*/
.gadget-header--wholesale .whl-mainnav {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gadget-header--wholesale .whl-mainnav::-webkit-scrollbar { display: none; }

.gadget-header--wholesale .whl-mainnav a {
    position: relative;
    padding: 9px 13px;
    border-radius: 8px;
    color: var(--whl-ink, #17202b);
    font-size: 13.5px;
    font-weight: 650;
    text-decoration: none;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease;
}

.gadget-header--wholesale .whl-mainnav a:hover {
    background: color-mix(in srgb, var(--whl-crimson) 10%, transparent);
    color: var(--whl-crimson);
}

/* The department the visitor is inside, marked so the bar reports position. */
.gadget-header--wholesale .whl-mainnav a[aria-current="page"] {
    background: var(--whl-crimson);
    color: #fff;
}

/* Pushes the field, and the tools after it, to the right of the menu. */
.gadget-header--wholesale .whl-search {
    display: flex;
    flex: 0 1 380px;
    margin-left: auto;
    gap: 0;
}

.gadget-header--wholesale .whl-search input {
    width: 100%;
    height: 40px !important;
    padding: 0 15px;
    border: 2px solid var(--whl-crimson) !important;
    border-right: 0 !important;
    border-radius: 22px 0 0 22px !important;
    background: #fff !important;
    font-size: 13px !important;
}

.gadget-header--wholesale .whl-search button {
    height: 40px;
    padding: 0 22px;
    border: 0;
    border-radius: 0 22px 22px 0;
    background: var(--whl-crimson);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

/* The rail marks the visitor's place the same way the header menu does. */
.whl-rail a[aria-current="page"] {
    background: color-mix(in srgb, var(--whl-crimson) 12%, transparent);
    color: var(--whl-crimson);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .gadget-header--wholesale .whl-search { flex-basis: 240px; }
}

@media (max-width: 860px) {
    .gadget-header--wholesale .whl-mainnav { display: none; }
    .gadget-header--wholesale .whl-search { flex: 1 1 auto; }
}
