/* myCollectors — brand-faithful, mobile-responsive base stylesheet.
   Colours match the legacy palette (see project_brand_palette memory).
   Mobile-first; @media (min-width: 768px) widens to the desktop three-column feel. */

:root {
    --c-navy-deep:    #292F45;
    --c-navy:         #5C6991;
    --c-navy-dark:    #000033;
    --c-navy-text:    #242937;
    --c-cream:        #FAFAE7;
    --c-card-title:   #495881;
    --c-card-body:    #EEEEEE;
    --c-card-footer:  #586A9A;
    --c-tan:          #FDB768;
    --c-tan-soft:     #FEE7C5;
    --c-tan-warm:     #FFCC66;
    --c-tan-bar:      #E8DDCC;
    --c-white:        #FFFFFF;
    --c-muted:        #6B6F7E;
    --c-rule:         #D4D4C6;

    --font-stack:     Arial, Helvetica, sans-serif;

    --maxw:           1200px;
    --gutter:         1rem;
    --radius:         3px;
}

/* ----- reset-ish ----- */

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

html {
    font-family: var(--font-stack);
    font-size: 100%;
    line-height: 1.5;
    /* overflow-x on html (alongside body) reliably suppresses horizontal scroll across
       browsers; body-only sometimes leaks. */
    overflow-x: hidden;
    /* Long unbreakable strings (legacy SKUs, URLs in product descriptions) should
       break-wrap rather than push the page wider than the viewport. */
    overflow-wrap: anywhere;
}

body {
    margin: 0;
    background: var(--c-navy-deep);
    color: var(--c-navy-text);
    font-size: 0.95rem;
    overflow-x: hidden;
}

a { color: var(--c-navy); text-decoration: underline; }
a:hover { color: var(--c-navy-dark); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { color: var(--c-navy-text); margin: 0 0 0.5em; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }

.skip-link {
    position: absolute; top: -100px; left: 0;
    background: var(--c-navy-dark); color: #fff; padding: 0.5em 1em;
    z-index: 100;
}
.skip-link:focus { top: 0; }

a:focus, button:focus { outline: 2px solid var(--c-tan); outline-offset: 2px; }

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

.site-header {
    background: var(--c-white);
}
.site-header__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1rem var(--gutter);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* stretch (default) so children fill the available width and the tagline / search wrap
       naturally on narrow viewports. flex-start lets children shrink-to-content which made the
       tagline force the page wider than the viewport. */
    align-items: stretch;
}
.site-header__brand-tagline { overflow-wrap: anywhere; }
.site-header__brand { display: block; text-decoration: none; color: inherit; }
.site-header__brand-name {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--c-navy-deep);
    letter-spacing: 0.5px;
    line-height: 1.1;
}
.site-header__brand-name-accent { color: var(--c-tan); }
.site-header__brand-tagline {
    display: block;
    font-size: 0.85rem;
    color: var(--c-muted);
    margin-top: 0.25rem;
}
.site-header__phone {
    font-size: 0.95rem;
}
.site-header__phone-label { color: var(--c-muted); margin-right: 0.25em; }
.site-header__phone-number {
    font-weight: bold;
    color: var(--c-navy-deep);
    text-decoration: none;
}
.site-header__phone-number:hover { text-decoration: underline; }

.site-header__search {
    display: flex;
    width: 100%;
    gap: 0.25rem;
}
.site-header__search-input {
    flex: 1;
    padding: 0.5em 0.75em;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
}
.site-header__search-btn {
    padding: 0.5em 1em;
    background: var(--c-navy-deep);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
}
.site-header__search-btn:hover { background: var(--c-navy-dark); }

.search-form {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0 1.5rem;
}
.search-form__input {
    flex: 1;
    padding: 0.6em 0.85em;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .site-header__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }
    /* Constrain brand so the tagline wraps to two lines instead of pushing the row past
       the max-width and forcing the basket+account block onto a second row. The brand name
       sits comfortably inside 280px; the tagline rewraps neatly under it. */
    .site-header__brand { flex: 0 0 auto; max-width: 280px; }
    .site-header__brand-tagline { white-space: normal; }
    .site-header__search { flex: 1 1 280px; max-width: 380px; width: auto; }
    .site-header__phone { font-size: 1rem; }
}

/* ----- site nav (departments) ----- */

.site-nav {
    background: var(--c-tan-bar);
    border-bottom: 2px solid var(--c-tan);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.site-nav__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
}
.site-nav__toggle {
    display: block;
    width: 100%;
    background: none;
    border: 0;
    padding: 0.75rem 0;
    text-align: left;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    color: var(--c-navy-deep);
    cursor: pointer;
}
.site-nav__toggle-icon { display: inline-block; margin-right: 0.5em; }

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
}
.site-nav__list--open { display: block; padding-bottom: 0.5rem; }
.site-nav__list li { border-top: 1px solid var(--c-tan); }
.site-nav__link {
    display: block;
    padding: 0.5rem 0;
    color: var(--c-navy-deep);
    text-decoration: none;
    font-weight: bold;
}
.site-nav__link:hover { color: var(--c-navy-dark); text-decoration: underline; }

@media (min-width: 768px) {
    .site-nav__toggle { display: none; }
    .site-nav__list {
        display: flex !important;
        flex-wrap: wrap;
        gap: 0;
        padding: 0;
    }
    .site-nav__list li { border-top: 0; }
    .site-nav__link {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
    .site-nav__link:hover {
        background: var(--c-tan-soft);
        text-decoration: none;
    }
}

/* ----- main ----- */

.site-main { background: var(--c-cream); }
.site-main__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.5rem var(--gutter);
    min-height: 50vh;
}

/* ----- breadcrumb ----- */

.breadcrumb {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em 0.5em;
    color: var(--c-muted);
}
.breadcrumb li + li::before { content: "\203A"; margin-right: 0.5em; }
.breadcrumb a { color: var(--c-navy); }

/* ----- product grid + cards ----- */

.product-grid {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    /* Use min(220px, 100%) so on narrow viewports the column can shrink below 220px
       rather than overflow. Above 220px the grid auto-fills as before. */
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 1rem;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--c-card-body);
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease-out, transform 0.15s ease-out;
    /* Lets the card shrink inside narrow grid tracks instead of forcing the track wider. */
    min-width: 0;
}
.product-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}
.product-card__title {
    background: var(--c-card-title);
    color: #fff;
    font-size: 0.95rem;
    font-weight: bold;
    padding: 0.5em 0.75em;
    margin: 0;
    line-height: 1.25;
    min-height: 3em;
    /* Break long unbroken strings (e.g. legacy SKU-style names) so they wrap inside
       narrow cards instead of pushing the card past the viewport. */
    overflow-wrap: anywhere;
}
.product-card__image-wrap {
    background: #fff;
    text-align: center;
    padding: 0.5rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.product-card__image-wrap img { max-height: 220px; width: auto; }
.product-card__image-wrap .product-card__no-image {
    color: var(--c-muted); font-size: 0.85rem; font-style: italic;
}

/* Status badge overlay on listing cards (out of stock / discontinued). Sits on top
   of the image and stays readable against any background colour. Unavailable cards
   get a slight dim so they're visibly differentiated when mixed in with in-stock. */
.product-card__status {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15em 0.55em;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius);
    background: var(--c-navy-deep);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.product-card__status--oos          { background: #a05c00; }
.product-card__status--discontinued { background: var(--c-muted); }
.product-card--unavailable .product-card__image-wrap img { opacity: 0.6; }
.product-card__body { padding: 0.5em 0.75em; flex: 1; font-size: 0.85rem; }
.product-card__footer {
    background: var(--c-card-footer);
    color: #fff;
    padding: 0.5em 0.75em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.product-card__price { font-size: 1.05rem; font-weight: bold; }
.product-card__cta { font-size: 0.85rem; }

/* ----- department tiles (home page) ----- */

.dept-tiles {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 480px)  { .dept-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .dept-tiles { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .dept-tiles { grid-template-columns: repeat(5, 1fr); } }

.dept-tiles > li { min-width: 0; }
.dept-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out;
    height: 100%;
    /* Prevents the tile from expanding past its grid track when child images have larger
       intrinsic sizes than the column width on narrow mobile viewports. */
    min-width: 0;
    max-width: 100%;
}
.dept-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border-color: var(--c-tan);
}
.dept-tile__image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}
.dept-tile__image img {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.dept-tile__name {
    font-weight: bold;
    color: var(--c-navy-deep);
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.2;
}

/* ----- department / category listing ----- */

.dept-listing { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.dept-listing li {
    border-bottom: 1px solid var(--c-rule);
    padding: 0.75rem 0;
}
.dept-listing a {
    font-weight: bold;
    color: var(--c-navy-deep);
    text-decoration: none;
}
.dept-listing a:hover { color: var(--c-navy-dark); text-decoration: underline; }
.dept-listing__meta { display: block; font-weight: normal; color: var(--c-muted); font-size: 0.85rem; }

/* ----- product detail ----- */

.product-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.product-detail__gallery {
    background: #fff;
    border: 1px solid var(--c-rule);
    padding: 1rem;
    text-align: center;
}
.product-detail__gallery img {
    /* Global img rule uses display:block which breaks parent text-align centering.
       margin auto centres a block element within its container. */
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* ----- search autosuggest dropdown ----- */

.suggest-dropdown {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border: 1px solid var(--c-rule);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 360px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.suggest-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--c-navy);
    text-decoration: none;
    border-bottom: 1px solid var(--c-rule);
    font-size: 0.9rem;
}
.suggest-item:last-child { border-bottom: 0; }
.suggest-item:hover, .suggest-item--active { background: var(--c-tan-soft); color: var(--c-navy-deep); }
.suggest-kind {
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: #e3e7ee;
    color: #2a3548;
    flex-shrink: 0;
}
.suggest-kind--category   { background: #d8efce; color: #2d5d10; }
.suggest-kind--department { background: #fbe9e7; color: #6b1f0c; }
.suggest-kind--brand      { background: #fff7e0; color: #5a4400; }
.suggest-label { flex: 1; }
.suggest-ctx { color: var(--c-muted); font-size: 0.8rem; }
.suggest-thumb {
    width: 40px; height: 40px;
    object-fit: contain;
    background: var(--c-cream);
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    flex: 0 0 40px;
}
.suggest-thumb--placeholder { background: var(--c-cream); }
.suggest-item__text { display: inline-flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.suggest-item__text .suggest-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.did-you-mean {
    list-style: none; padding: 0; margin: 0.5rem 0;
    display: flex; flex-wrap: wrap; gap: 0.4rem;
}
.did-you-mean li a {
    display: inline-block;
    background: var(--c-tan-soft);
    border: 1px solid var(--c-tan);
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--c-navy-deep);
}
.did-you-mean li a:hover { background: var(--c-tan); }

/* ----- category tiles on department pages ----- */

.cat-tiles-section { margin-bottom: 2rem; }
.cat-tiles {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 480px)  { .cat-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .cat-tiles { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (min-width: 1024px) { .cat-tiles { grid-template-columns: repeat(5, 1fr); } }

.cat-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    overflow: hidden;
    color: inherit;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, border-color 0.15s ease-out;
    height: 100%;
    min-width: 0;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.12); border-color: var(--c-tan); }
.cat-tile__image {
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.cat-tile__image img { max-width: 90%; max-height: 90%; object-fit: contain; }
.cat-tile__no-image { color: var(--c-muted); font-size: 2rem; }
.cat-tile__body { padding: 0.5rem 0.75rem; text-align: center; }
.cat-tile__name { display: block; font-weight: bold; color: var(--c-navy-deep); font-size: 0.95rem; }
.cat-tile__count { display: block; color: var(--c-muted); font-size: 0.8rem; margin-top: 0.15rem; }

.dept-intro { color: var(--c-navy-text); max-width: 800px; margin: 0 0 1.5rem; }

/* ----- browse toolbar (sort + page size on dept/cat pages) ----- */

.browse-toolbar {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
    gap: 0.5rem; margin-bottom: 0.75rem;
}
.browse-toolbar h2 { margin: 0; }
.browse-toolbar__count { margin: 0; }
.browse-toolbar__controls { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.9rem; }
.browse-toolbar__controls select {
    padding: 0.3em 0.5em;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    font: inherit; font-size: 0.9rem;
    background: #fff;
}

/* ----- product detail thumbs + related ----- */

.product-detail__thumbs {
    list-style: none; padding: 0; margin: 1rem 0 0;
    display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
}
.product-detail__thumb {
    display: block;
    width: 64px; height: 64px;
    padding: 0; border: 2px solid var(--c-rule); background: #fff;
    cursor: pointer; border-radius: var(--radius); overflow: hidden;
}
.product-detail__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-detail__thumb:hover { border-color: var(--c-tan); }
.product-detail__thumb--active { border-color: var(--c-navy-deep); }

.related-products { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--c-rule); }
.related-products h2 { margin-bottom: 1rem; }

.site-footer__sell { background: rgba(255,255,255,0.04); padding: 0.75rem 1rem; border-radius: var(--radius); }
.site-footer__sell h3 { color: var(--c-tan); margin-top: 0; }
.site-footer__sell-link { color: #fff; font-weight: bold; text-decoration: underline; }
.site-footer__sell-link:hover { color: var(--c-tan); }

.lead { font-size: 1.05rem; color: var(--c-navy-text); line-height: 1.6; }
.product-detail__price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--c-navy-deep);
    margin: 0.5rem 0;
}
.product-detail__vat-note { font-size: 0.8rem; color: var(--c-muted); }
.product-detail__meta { font-size: 0.9rem; color: var(--c-muted); margin: 1rem 0; }
.product-detail__meta dt { font-weight: bold; display: inline-block; min-width: 6em; }
.product-detail__meta dd { display: inline; margin: 0 0 0.25em; }
.product-detail__meta dd::after { content: "\A"; white-space: pre; }

.product-detail__stock { font-size: 0.95rem; margin: 0.5rem 0; }
.product-detail__stock--in   { color: #1f6f3a; }
.product-detail__stock--low  { color: #a3601f; }
.product-detail__stock--out  { color: #a33333; }

@media (min-width: 768px) {
    .product-detail { grid-template-columns: 1fr 1fr; }
}

/* ----- buttons ----- */

.btn {
    display: inline-block;
    padding: 0.6em 1.2em;
    background: var(--c-navy-deep);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
}
.btn:hover { background: var(--c-navy-dark); color: #fff; }
.btn--secondary { background: var(--c-tan-warm); color: var(--c-navy-deep); }
.btn--secondary:hover { background: var(--c-tan); color: var(--c-navy-deep); }
.btn--disabled, .btn[disabled] {
    background: var(--c-muted); cursor: not-allowed; opacity: 0.7;
}

/* ----- account + cart icons in header ----- */

/* Group account+cart so they wrap together as a unit (cart never separates from
   account onto its own row when the signed-in "Hi, FirstName" pushes the row wide). */
.site-header__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.site-header__account {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4em 0.75em;
    color: var(--c-navy-deep);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    background: #fff;
}
.site-header__account:hover { background: var(--c-tan-soft); color: var(--c-navy-dark); }
.site-header__account-icon { font-size: 1.1em; line-height: 1; }

.site-header__cart {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4em 0.75em;
    color: var(--c-navy-deep);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    background: #fff;
    position: relative;
}
.site-header__cart:hover { background: var(--c-tan-soft); color: var(--c-navy-dark); }
.site-header__cart-icon { font-size: 1.25em; line-height: 1; }
.site-header__cart-count {
    display: inline-block;
    background: var(--c-tan);
    color: var(--c-navy-deep);
    border-radius: 999px;
    padding: 0.05em 0.55em;
    font-size: 0.8em;
    line-height: 1.4;
    margin-left: 0.25em;
}

/* ----- cart page ----- */

.cart-form { margin: 1rem 0; }
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 1rem;
}
.cart-table th, .cart-table td {
    border-bottom: 1px solid var(--c-rule);
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    text-align: left;
}
.cart-table thead th { background: var(--c-tan-soft); color: var(--c-navy-deep); }
.cart-table__col--num    { text-align: right; white-space: nowrap; }
.cart-table__col--qty    { text-align: center; white-space: nowrap; }
.cart-table__col--actions{ text-align: right; }
.cart-table__item {
    display: flex; align-items: center; gap: 0.75rem;
}
.cart-table__thumb {
    width: 60px; height: 60px; object-fit: contain; background: var(--c-cream);
    border: 1px solid var(--c-rule); border-radius: var(--radius);
    flex: 0 0 60px;
}
.cart-table__qty-input {
    width: 4.5em; padding: 0.3em; font-family: inherit; font-size: 0.95rem;
    border: 1px solid var(--c-rule); border-radius: var(--radius); text-align: center;
}
.cart-table__update, .cart-table__remove {
    background: var(--c-navy);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    padding: 0.4em 0.75em;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
}
.cart-table__update { background: var(--c-navy); }
.cart-table__remove { background: #a33333; }
.cart-table__update:hover { background: var(--c-navy-dark); }
.cart-table__remove:hover { background: #7a1f1f; }
.cart-table__row--unavailable { opacity: 0.6; }
.cart-table__total th, .cart-table__total td { font-size: 1.1rem; font-weight: bold; }

.cart-actions {
    display: flex; flex-wrap: wrap; gap: 1rem;
    align-items: center; margin-top: 1.5rem;
}

.add-to-cart-form {
    display: flex; gap: 0.5rem; align-items: center; margin: 0.75rem 0;
}
.add-to-cart-form__qty {
    width: 4.5em; padding: 0.4em; font-family: inherit; font-size: 1rem;
    border: 1px solid var(--c-rule); border-radius: var(--radius); text-align: center;
}

/* ----- pagination ----- */

.pager {
    margin: 2rem 0 1rem;
    text-align: center;
}
.pager__list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.pager__link {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: #fff;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    color: var(--c-navy);
    text-decoration: none;
    font-weight: bold;
    min-width: 2.4em;
}
.pager__link:hover { background: var(--c-tan-soft); color: var(--c-navy-dark); }
.pager__link--current {
    background: var(--c-navy-deep);
    border-color: var(--c-navy-deep);
    color: #fff;
}
.pager__link--disabled {
    color: var(--c-muted);
    background: transparent;
    border-color: transparent;
    cursor: not-allowed;
}
.pager__gap { padding: 0.4rem 0.25rem; color: var(--c-muted); }
.pager__summary { color: var(--c-muted); font-size: 0.85rem; margin: 0; }

/* ----- testimonials ----- */

.testimonials { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
@media (min-width: 768px) {
    .testimonials { grid-template-columns: repeat(2, 1fr); }
}
.testimonial {
    background: #fff;
    border-left: 4px solid var(--c-tan);
    padding: 1rem;
    font-size: 0.9rem;
}
.testimonial__quote { font-style: italic; margin: 0 0 0.5rem; }
.testimonial__by    { font-weight: bold; color: var(--c-muted); font-size: 0.85rem; }

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

.site-footer {
    background: var(--c-navy-deep);
    color: #cfd4e0;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}
.site-footer__inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 0.5em; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin: 0.25em 0; }
.site-footer__legal { font-size: 0.8rem; color: #9aa0b0; }

@media (min-width: 768px) {
    .site-footer__inner { grid-template-columns: 2fr 1fr 1fr; align-items: flex-start; }
}

/* ----- checkout ----- */

.checkout__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 900px) {
    .checkout__layout { grid-template-columns: 2fr 1fr; align-items: start; }
}

.checkout__form { background: #fff; padding: 1.25rem; border: 1px solid var(--c-rule); border-radius: var(--radius); }
.checkout__form h2 { margin-top: 1.5rem; }
.checkout__form h2:first-child { margin-top: 0; }

.checkout__summary {
    background: var(--c-cream);
    padding: 1.25rem;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    position: sticky;
    top: 1rem;
}

.checkout-summary__items {
    list-style: none; padding: 0; margin: 0 0 1rem;
    border-bottom: 1px solid var(--c-rule);
}
.checkout-summary__items li {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}
.checkout-summary__totals {
    margin: 0 0 1rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem 1rem;
    font-size: 0.95rem;
}
.checkout-summary__totals dt { margin: 0; }
.checkout-summary__totals dd { margin: 0; text-align: right; }
.checkout-summary__total { font-size: 1.1rem; font-weight: bold; padding-top: 0.5rem; border-top: 1px solid var(--c-rule); }

.checkout__pay-btn { width: 100%; padding: 0.85em 1em; font-size: 1.05rem; }

.pre-contract {
    background: var(--c-tan-soft);
    border-left: 4px solid var(--c-tan);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin: 1rem 0;
}

.form-row { margin: 0.75rem 0; }
.form-row label { display: block; font-weight: bold; margin-bottom: 0.25rem; }
.form-row textarea,
.form-row input[type=text], .form-row input[type=email], .form-row input[type=search],
.form-row input[type=password], .form-row input[type=number], .form-row input[type=tel],
.form-row input:not([type]), .form-row select {
    width: 100%;
    padding: 0.5em 0.7em;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.form-row textarea { resize: vertical; min-height: 4em; }
.form-row--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
/* Checkbox row: input is fixed-size, label text takes the rest and wraps as a single unit
   (we wrap the text + any inline links in a <span> so they don't break apart as flex items). */
.form-row--check label {
    display: flex; gap: 0.5rem; align-items: flex-start; font-weight: normal;
}
.form-row--check label > span { flex: 1; min-width: 0; }
.form-row--check input[type=checkbox] { margin-top: 0.25rem; flex-shrink: 0; }

/* ----- policy / long-form content pages ----- */

.policy { max-width: 760px; }
.policy h1 { margin-top: 0; }
.policy h2 { margin-top: 1.5em; }
.policy table {
    border-collapse: collapse;
    margin: 1em 0;
    width: 100%;
}
.policy th, .policy td {
    border: 1px solid var(--c-rule);
    padding: 0.4em 0.6em;
    text-align: left;
    vertical-align: top;
}
.policy th { background: var(--c-tan-soft); }

.cancellation-form {
    background: #fff;
    border: 1px solid var(--c-rule);
    padding: 1rem;
    font-family: Consolas, monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    border-radius: var(--radius);
}

.contact-details {
    max-width: 500px;
    margin: 1.5rem 0;
}
.contact-details dt { font-weight: bold; margin-top: 0.5em; }
.contact-details dd { margin: 0 0 0.5em 0; }

/* ----- alerts ----- */

.alert {
    padding: 0.75rem 1rem;
    margin: 0 0 1rem;
    border-radius: var(--radius);
    border: 1px solid;
}
.alert--info    { background: var(--c-tan-soft); border-color: var(--c-tan); color: var(--c-navy-deep); }
.alert--warning { background: #fff8e1; border-color: #ffc107; color: #5a4400; }
.alert--error   { background: #fbe9e7; border-color: #d84315; color: #6b1f0c; }

/* ----- search results: facet sidebar + sort toolbar ----- */

.search-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .search-layout {
        grid-template-columns: 220px 1fr;
    }
}

.search-facets__group { margin-bottom: 1.25rem; }
.search-facets__heading {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-muted);
    margin: 0 0 0.4rem;
}
.facet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.facet-list li { margin: 0.15rem 0; }
.facet-list a {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--c-navy);
    text-decoration: none;
    padding: 0.2rem 0;
}
.facet-list a:hover { text-decoration: underline; }
.facet-count { color: var(--c-muted); font-size: 0.85em; flex-shrink: 0; }

.filter-chips { list-style: none; padding: 0; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--c-tan-soft);
    border: 1px solid var(--c-tan);
    color: var(--c-navy-deep);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
}
.chip:hover { background: var(--c-tan); }

.price-filter__row { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; }
.price-filter input[type=number] {
    width: 5rem;
    padding: 0.35em 0.5em;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
}
.btn--small { padding: 0.35em 0.85em; font-size: 0.85rem; }

.search-results__toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.search-results__count { margin: 0; }
.sort-control { display: flex; align-items: center; gap: 0.5rem; }
.sort-control select {
    padding: 0.4em 0.5em;
    border: 1px solid var(--c-rule);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    background: #fff;
}

/* ----- utilities ----- */

.muted    { color: var(--c-muted); }
.sr-only  {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* Sign-in prompt at the top of /checkout. Soft tan box to draw attention without dominating. */
.checkout-signin-prompt {
    background: var(--c-tan-soft);
    border: 1px solid var(--c-tan);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin: 0 0 1.25rem;
}
.checkout-signin-prompt p { margin: 0; }
.checkout-signin-prompt a { font-weight: bold; }

/* ============================================================================
   MOBILE / NARROW VIEWPORT (frontend)
   The site is mobile-first so most things work down to 320px, but several
   layouts I've layered on since (cart table, split form rows, browse toolbar)
   still try to share a row at any width. This block addresses the worst
   offenders: anything that crammed more than ~3 items horizontally on a phone.
   ============================================================================ */

/* Two product cards per row from ~360px so the page doesn't feel like
   reviewing one item at a time. Below 360px (folded phones, very narrow
   chrome) it cleanly drops to one column. */
@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
        gap: 0.6rem;
    }
    .product-card__title { font-size: 0.85rem; padding: 0.4em 0.5em; min-height: 2.4em; }
    .product-card__image-wrap { min-height: 130px; padding: 0.3rem; }
    .product-card__image-wrap img { max-height: 140px; }
    .product-card__body { padding: 0.4em 0.5em; font-size: 0.8rem; }
    .product-card__footer { padding: 0.4em 0.5em; }
    .product-card__price { font-size: 0.95rem; }
    .product-card__cta   { font-size: 0.75rem; }
    .product-card__status { font-size: 0.65rem; padding: 0.1em 0.4em; }
}

/* Split form rows (First name / Last name etc.) become single column on phones
   so each field gets the full width and labels don't sit awkwardly stacked. */
@media (max-width: 480px) {
    .form-row--split { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Browse toolbar: stack heading above controls; make Sort / Show selects
   each take half the row so they're easy to tap. */
@media (max-width: 600px) {
    .browse-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .browse-toolbar__controls { width: 100%; }
    .browse-toolbar__controls label { flex: 1 1 0; display: flex; align-items: center; gap: 0.4rem; }
    .browse-toolbar__controls select { flex: 1; min-width: 0; }
}

/* ----- Cart table: card-per-row layout on phones -----
   Same pattern as the admin tables (--responsive modifier + data-label per
   td). Each row becomes its own card; the image + product link stay anchored
   at the top, then Price / Quantity / Line total / Remove stack underneath
   with their column names as left labels. Totals rows render the same way. */
@media (max-width: 600px) {
    .cart-table--responsive,
    .cart-table--responsive thead,
    .cart-table--responsive tbody,
    .cart-table--responsive tfoot,
    .cart-table--responsive tr,
    .cart-table--responsive td,
    .cart-table--responsive th {
        display: block;
        width: 100%;
    }
    .cart-table--responsive thead { position: absolute; left: -9999px; }
    .cart-table--responsive tr {
        background: #fff;
        border: 1px solid var(--c-rule);
        border-radius: var(--radius);
        margin-bottom: 0.6rem;
        padding: 0.4rem 0.6rem;
    }
    .cart-table--responsive td {
        padding: 0.35rem 0;
        border: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        font-size: 0.95rem;
        text-align: left;
    }
    .cart-table--responsive td::before {
        content: attr(data-label) ":";
        color: var(--c-muted);
        font-weight: bold;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex: 0 0 auto;
    }
    /* "Item" cell -- image + link -- gets full width with the label hidden so
       the product can present prominently like a small card header. */
    .cart-table--responsive td.cart-table__item {
        flex-direction: row;
        align-items: flex-start;
        border-bottom: 1px solid var(--c-rule);
        padding-bottom: 0.5rem;
        margin-bottom: 0.4rem;
    }
    .cart-table--responsive td.cart-table__item::before { display: none; }
    .cart-table--responsive td.cart-table__col--actions {
        justify-content: flex-end;
        padding-top: 0.5rem;
        margin-top: 0.4rem;
        border-top: 1px solid var(--c-rule);
    }
    .cart-table--responsive td.cart-table__col--actions::before { display: none; }
    /* Hide empty padding td in the totals tfoot rows on mobile. */
    .cart-table--responsive tfoot td:empty { display: none; }
    /* Totals row gets a darker top accent. */
    .cart-table--responsive tr.cart-table__total {
        background: var(--c-tan-soft);
        border-color: var(--c-tan);
        font-weight: bold;
    }
    .cart-table--responsive tr.cart-table__total td { font-size: 1.1rem; }
}

/* Buttons + form inputs: bigger tap targets on small screens (Apple/Google
   accessibility guidance suggests 44px minimum). Default padding already
   gets us close but bump the input/select heights so number spinners + form
   selects are easier to tap. */
@media (max-width: 600px) {
    .form-row input, .form-row select, .form-row textarea {
        font-size: 16px;          /* avoid iOS zoom on focus */
    }
    .btn { padding: 0.7em 1.1em; font-size: 0.95rem; }
}

/* Cart actions: stack Continue + Checkout buttons full-width below the
   threshold where they'd otherwise share a row awkwardly. */
@media (max-width: 480px) {
    .cart-actions { flex-direction: column; align-items: stretch; }
    .cart-actions .btn { width: 100%; text-align: center; }
}

/* Search layout sort toolbar: don't let the count + sort select fight for
   the same row on narrow phones. */
@media (max-width: 600px) {
    .search-results__toolbar { flex-direction: column; align-items: stretch; gap: 0.5rem; }
    .sort-control { display: flex; align-items: center; gap: 0.4rem; }
    .sort-control select { flex: 1; min-width: 0; }
}

/* Footer columns get a bit of breathing room at the smallest sizes. */
@media (max-width: 480px) {
    .site-footer { padding: 1.5rem 0 0.5rem; }
    .site-footer__inner { gap: 1rem; }
    .site-footer__legal { font-size: 0.75rem; }
}
