/* Storefront layer on top of DORFic for Bootstrap 6. Uses the kit's tokens only. */

body.site { min-height: 100vh; display: flex; flex-direction: column; }
/* Focused and linked-to things scroll clear of the sticky header (WCAG 2.4.11); site.js measures it. */
html { scroll-padding-block-start: calc(var(--site-header-h, 0px) + .75rem); }
.icon { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex-shrink: 0; }
.btn-icon .icon { width: 1.25rem; height: 1.25rem; }
.skip-link { position: absolute; z-index: 2000; inset-inline-start: 1rem; inset-block-start: 1rem; }
.skip-link:focus { padding: .5rem 1rem; background: var(--bs-body-bg); border-radius: var(--bs-radius-5); }

/* ---- header */
.announcement { color: var(--bs-primary-contrast, #fff); font-family: var(--bs-font-display); letter-spacing: .02em; }
.site-header { position: sticky; inset-block-start: 0; z-index: 1020; }
.site-header .navbar { border-radius: 0; }
.site-logo { max-height: 2.5rem; width: auto; display: block; }
.site-search { flex: 1 1 auto; max-width: 36rem; margin-inline: auto; }
.site-search .form-control { width: 100%; }
.cart-link { position: relative; display: inline-flex; }
.cart-count { position: absolute; z-index: 1; inset-block-start: -.45rem; inset-inline-end: -.45rem; min-width: 1.35rem; justify-content: center; pointer-events: none; }
.category-bar { background: var(--bs-plastic); border-block-end: var(--bs-border-width) solid var(--bs-border-color); }
.category-bar .nav-link { padding-block: .65rem; font-size: var(--bs-font-size-sm); }
@media (min-width: 1024px) {
  .site-header .navbar .drawer-body { align-items: center; }
}

/* ---- footer */
.site-footer { background: var(--bs-plastic); border-block-start: var(--bs-border-width) solid var(--bs-border-color); margin-block-start: var(--bs-spacer-11, 5rem); }
.footer-links { display: grid; gap: .55rem; }
.footer-links a, .footer-contact a { color: var(--bs-fg-2); text-decoration: none; }
.footer-links a:hover, .footer-contact a:hover { color: var(--bs-primary-fg); }
.footer-bottom { border-block-start: var(--bs-border-width) solid var(--bs-border-color); }

/* ---- product cards */
.product-grid { display: grid; gap: var(--bs-spacer-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); }
.product-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.product-card { position: relative; height: 100%; overflow: hidden; }
.product-card .card-body { display: flex; flex-direction: column; gap: .35rem; padding: var(--bs-spacer-4); }
.product-thumb { position: relative; aspect-ratio: 1; background: light-dark(#fff, var(--bs-gray-900)); border-block-end: var(--bs-border-width) solid var(--bs-border-color); }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; padding: var(--bs-spacer-4); }
.product-badges { position: absolute; inset-block-start: .6rem; inset-inline-start: .6rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.product-brand { font-family: var(--bs-font-display); font-size: var(--bs-font-size-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--bs-fg-2); }
.product-name { font-size: var(--bs-font-size-base, 1rem); font-weight: 600; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-name a { color: inherit; text-decoration: none; }
.product-card-action { position: relative; z-index: 2; }
/* Wishlist heart: over the card's picture, and next to the product title. Filled when saved. */
.product-card-wish { position: absolute; inset-block-start: .5rem; inset-inline-end: .5rem; z-index: 2; }
.wish-form { display: inline-flex; margin: 0; }
.wish-btn.is-on { color: var(--bs-danger, #c0392b); }
.wish-btn.is-on .icon { fill: currentColor; }
.product-card-list { flex-direction: row; }
.product-card-list .product-thumb { width: 11rem; flex-shrink: 0; aspect-ratio: auto; border-block-end: 0; border-inline-end: var(--bs-border-width) solid var(--bs-border-color); }
@media (max-width: 575.98px) { .product-card-list .product-thumb { width: 7rem; } }

/* ---- listing pages */
.page-head { padding-block: var(--bs-spacer-7) var(--bs-spacer-6); }
.listing-toolbar { display: flex; flex-wrap: wrap; gap: var(--bs-spacer-3); align-items: center; justify-content: space-between; margin-block-end: var(--bs-spacer-5); }
.filter-group + .filter-group { border-block-start: var(--bs-border-width) solid var(--bs-border-color); padding-block-start: var(--bs-spacer-4); margin-block-start: var(--bs-spacer-4); }
.filter-group .check-label { display: flex; gap: .5rem; align-items: center; font-size: var(--bs-font-size-sm); }
.filter-group .count { margin-inline-start: auto; color: var(--bs-fg-3); font-size: var(--bs-font-size-xs); }
.filter-scroll { max-height: 15rem; overflow: auto; display: grid; gap: .4rem; padding-inline-end: .25rem; }
@media (min-width: 1024px) {
  .filters-panel { position: sticky; inset-block-start: 8.5rem; }
}
.tile-grid { display: grid; gap: var(--bs-spacer-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; text-align: center; padding: var(--bs-spacer-5); min-height: 8rem; text-decoration: none; color: inherit; }
.tile img { max-height: 4.5rem; max-width: 80%; object-fit: contain; }
.tile .tile-name { font-family: var(--bs-font-display); font-weight: 600; }

/* ---- product page */
.gallery-main .carousel-item { aspect-ratio: 1; background: light-dark(#fff, var(--bs-gray-900)); }
.gallery-main .carousel-item img { width: 100%; height: 100%; object-fit: contain; padding: var(--bs-spacer-5); }
.gallery-thumbs { display: flex; gap: .5rem; flex-wrap: wrap; margin-block-start: .75rem; }
.gallery-thumbs button { width: 4.5rem; height: 4.5rem; padding: .25rem; border-radius: var(--bs-radius-5); border: 2px solid var(--bs-border-color); background: light-dark(#fff, var(--bs-gray-900)); }
.gallery-thumbs button.active { border-color: var(--bs-primary-flat); box-shadow: 0 0 10px var(--bs-primary-glow); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.qty-stepper { display: inline-flex; align-items: stretch; }
.qty-stepper input { width: 4rem; text-align: center; }
.spec-table th { width: 40%; font-weight: 600; color: var(--bs-fg-2); }

/* ---- homepage modules */
.home-module { margin-block: var(--bs-spacer-9, 3.5rem); }
.home-module:first-child { margin-block-start: var(--bs-spacer-6); }
.module-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-block-end: var(--bs-spacer-5); }
.module-head h2 { margin: 0; }
.hero-slide { position: relative; min-height: clamp(18rem, 42vw, 30rem); display: grid; align-items: center; overflow: hidden; }
.hero-slide .hero-copy { position: relative; z-index: 1; padding: var(--bs-spacer-8) var(--bs-spacer-7); max-width: 34rem; }
.hero-slide .hero-img { position: absolute; inset-block: 8%; inset-inline-end: 4%; width: 46%; height: 84%; object-fit: contain; filter: drop-shadow(0 20px 30px oklch(0% 0 0 / .25)); }
@media (max-width: 767.98px) {
  .hero-slide { align-items: end; }
  .hero-slide .hero-img { inset-block: 6% auto; inset-inline: 15%; width: 70%; height: 48%; }
  .hero-slide .hero-copy { padding-block-start: 55%; }
}
.showcase { position: relative; overflow: hidden; border-radius: var(--bs-radius-8, 1rem); }
.showcase .showcase-img { max-height: 24rem; width: 100%; object-fit: contain; filter: drop-shadow(0 18px 28px oklch(0% 0 0 / .25)); }
.promo-card { height: 100%; overflow: hidden; }
.promo-card .promo-img { aspect-ratio: 4 / 3; width: 100%; object-fit: contain; padding: var(--bs-spacer-6); background: light-dark(#fff, var(--bs-gray-900)); }
.carousel-products .carousel-item { padding: .25rem; }
.brand-strip { display: flex; flex-wrap: wrap; gap: var(--bs-spacer-4); justify-content: center; }
.brand-strip a { display: grid; place-items: center; width: 9rem; height: 5rem; padding: .75rem; text-decoration: none; color: inherit; font-family: var(--bs-font-display); font-weight: 600; overflow: hidden; }
/* Explicit size (not max-%: percentages don't resolve inside a grid cell) so any logo shape fits the tile. */
.brand-strip img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }

/* ---- account / checkout */
.account-nav .list-group-item { display: flex; align-items: center; gap: .6rem; }
.summary-line { display: flex; justify-content: space-between; gap: 1rem; padding-block: .35rem; }
.summary-total { font-family: var(--bs-font-display); font-size: var(--bs-font-size-xl); font-weight: 700; border-block-start: var(--bs-border-width) solid var(--bs-border-color); padding-block-start: .75rem; margin-block-start: .5rem; }
.cart-thumb { width: 4.5rem; height: 4.5rem; object-fit: contain; background: light-dark(#fff, var(--bs-gray-900)); border-radius: var(--bs-radius-4); border: var(--bs-border-width) solid var(--bs-border-color); padding: .2rem; }
.auth-card { max-width: 28rem; margin-inline: auto; }
.prose-sm p:last-child { margin-bottom: 0; }

/* ---- storefront pages (homepage carousels, listings, checkout) */
.carousel-products { --bs-carousel-items: 1.3; --bs-carousel-items-gap: var(--bs-spacer-4); }
@media (min-width: 576px) { .carousel-products { --bs-carousel-items: 2; } }
@media (min-width: 768px) { .carousel-products { --bs-carousel-items: 3; } }
@media (min-width: 1280px) { .carousel-products { --bs-carousel-items: 4; } }
.carousel-products .carousel-item .product-card { height: 100%; }
.hero-carousel .carousel-item { background: transparent; }
.hero-slide.border { border-color: var(--bs-border-color); }
.filters-panel .drawer-body { padding-inline: 0; }
@media (max-width: 1023.98px) { .filters-panel .drawer-body { padding-inline: var(--bs-spacer-5); } }
.listing-toolbar select.form-control { width: auto; }
.active-filters .chip { cursor: pointer; }
.product-buy .panel { padding: var(--bs-spacer-6); }
.cart-table .qty-stepper input { width: 3.5rem; }
[data-checkout] .module-number { color: var(--bs-primary-fg); }
[data-checkout] [hidden] { display: none !important; }
.account-nav .list-group-item .icon { color: var(--bs-fg-3); }
.account-nav .list-group-item.active .icon { color: inherit; }
/* Overlay carousel controls as a bottom bar (kit default centres them over content) */
.overlay-bar.carousel-overlay .carousel-overlay-controls { display: flex; align-items: center; justify-content: flex-end; gap: var(--bs-spacer-3); inset-block: auto var(--bs-spacer-4); translate: none; }
.overlay-bar.carousel-overlay .carousel-overlay-controls > div:first-child { display: flex; gap: var(--bs-spacer-2); }
.overlay-bar.carousel-overlay .carousel-control-play-pause { position: static; }
.overlay-bar.carousel-overlay .carousel-indicators { position: static; order: -1; margin: 0 auto 0 0; }
.hero-carousel .hero-slide .hero-copy { padding-block-end: calc(var(--bs-spacer-8) + 2.5rem); }
.gallery-main .overlay-bar .carousel-indicators button { background: var(--bs-border-color); }
/* Carousel dots stay small but get a 24px tap area each (WCAG 2.5.8): the gap keeps the areas apart. */
.carousel-indicators { gap: .875rem; }
.carousel-indicators button { position: relative; }
.carousel-indicators button::before { content: ""; position: absolute; inset: -.4375rem; }
.filter-group .hstack > .form-control, .filter-group .hstack > .form-adorn { flex: 1 1 0; min-width: 0; }
.filter-group .form-adorn .form-ghost { min-width: 0; width: 100%; }

/* language flags (bundled GoSquared shiny set, assets/img/flags) */
.flag { width: 1.25em; height: 1.25em; object-fit: contain; flex-shrink: 0; vertical-align: -.25em; filter: drop-shadow(0 1px 1px oklch(0% 0 0 / .2)); }
.menu-item:has(> .flag) { display: flex; align-items: center; gap: .6rem; }

/* reward points icon: an uploaded image is sized like the SVG icons */
.points-icon-img { width: 1.15em; height: 1.15em; object-fit: contain; vertical-align: -.2em; flex-shrink: 0; }
.icon.points-icon-lg, .points-icon-img.points-icon-lg { width: 1em; height: 1em; color: var(--bs-primary-fg); }

/* .label is inline-flex (for tags); used as a heading it must sit on its own line,
   or text that follows it (addresses, notes) flows onto the same line. */
:is(h1, h2, h3, h4, h5, h6).label { display: flex; width: fit-content; }

/* product page: availability per store (shops with 2+ locations) */
.availability { display: grid; gap: .4rem; font-size: var(--bs-font-size-sm); }
.availability li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: .35rem; border-block-end: var(--bs-border-width) solid var(--bs-border-color); }
.availability li:last-child { border-block-end: 0; }
.availability-place { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; }

/* header account button (beside the cart): shows the signed-in customer's initial */
.account-menu { position: relative; display: inline-flex; }
.account-initial { font-family: var(--bs-font-display); font-weight: 700; font-size: 1.05rem; line-height: 1; color: var(--bs-primary-fg); }

/* Cart remove button. On phones the table is stacked (each cell a label | value grid); this
   cell has no label, so it's a plain right-aligned row and the button keeps its size —
   otherwise the square icon button stretches to the label column's width (and height). */
.cart-remove-label { display: none; }
@media (max-width: 767.98px) {
  .cart-table > tbody > tr > td.cart-remove { display: flex; justify-content: flex-end; padding-block: var(--bs-spacer-2); }
  .cart-table td.cart-remove .btn { flex: none; width: auto; aspect-ratio: auto; gap: .4rem; padding-inline: .75rem 0; } /* no end padding: the word lines up with the values above */
  .cart-table td.cart-remove .cart-remove-label { display: inline; }
}

/* Quantity steppers already have the silver − / + buttons, so hide the browser's own
   up/down spinner inside the number box (still type=number: numeric keypad on phones). */
.qty-stepper input[type="number"] { appearance: textfield; -moz-appearance: textfield; }
.qty-stepper input[type="number"]::-webkit-inner-spin-button,
.qty-stepper input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* Stacked cart on phones: every label in one left-aligned column, values aligned to the
   right (the cells keep their desktop text-end / text-center classes, which labels would
   otherwise inherit), and rows centred — except Product, whose label sits at the top. */
@media (max-width: 767.98px) {
  .cart-table > tbody > tr > td[data-cell] { align-items: center; text-align: end; }
  .cart-table > tbody > tr > td[data-cell]::before { text-align: start; justify-self: start; }
  .cart-table > tbody > tr > td[data-cell] > * { justify-self: end; }
  .cart-table > tbody > tr > td[data-cell]:first-child { align-items: start; text-align: start; }
  .cart-table > tbody > tr > td[data-cell]:first-child > * { justify-self: start; }
}

/* Labels that wrap a check box, radio or switch (DORFic leaves these unstyled): keep the control and its text aligned. */
.check-label, .radio-label, .switch-label { display: inline-flex; align-items: center; gap: .5rem; }

/* pages written in the visual editor: Quill's alignment and indent classes */
.page-body .ql-align-center { text-align: center; }
.page-body .ql-align-right { text-align: end; }
.page-body .ql-align-justify { text-align: justify; }
.page-body .ql-indent-1 { padding-inline-start: 2em; } .page-body .ql-indent-2 { padding-inline-start: 4em; } .page-body .ql-indent-3 { padding-inline-start: 6em; }
.footer-legal a { color: inherit; }

/* cookie notice: a small bar at the bottom, above everything */
.cookie-notice { position: fixed; inset-inline: var(--bs-spacer-4); inset-block-end: var(--bs-spacer-4); z-index: 1080; max-width: 40rem; margin-inline: auto;
  display: flex; align-items: center; gap: var(--bs-spacer-4); padding: var(--bs-spacer-4) var(--bs-spacer-5); border-radius: var(--bs-radius-6); box-shadow: var(--bs-shadow-lg, 0 8px 30px rgb(0 0 0 / .15)); }
.cookie-notice[hidden] { display: none; }
@media (max-width: 575.98px) { .cookie-notice { flex-direction: column; align-items: stretch; } }

/* product options (size, colour…): values that can't be bought right now */
.option-picker .is-unavailable { text-decoration: line-through; opacity: .55; }
.option-picker .text-none { text-transform: none; letter-spacing: normal; }

/* ---- blog */
.blog-grid { display: grid; gap: var(--bs-spacer-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.blog-card { position: relative; overflow: hidden; }
.blog-card-image { aspect-ratio: 16 / 9; background: light-dark(var(--bs-gray-100), var(--bs-gray-900)); }
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-post { max-width: 46rem; }
.blog-cover { display: block; width: 100%; height: auto; border-radius: var(--bs-radius-6, .75rem); }
.blog-body img { display: block; max-width: 100%; height: auto; margin: var(--bs-spacer-5) auto; border-radius: var(--bs-radius-4, .5rem); }

/* ---- theme preview (staff only) */
.theme-preview-bar { position: sticky; top: 0; z-index: 1100; padding: .5rem 1rem; text-align: center; font-size: .875rem; background: #1f1d1a; color: #fff; }
.theme-preview-bar a { color: #ffd9a8; margin-inline-start: .5rem; }
