/*
Theme Name: RideKitLab
Description: A lightweight storefront for cycling and e-bike accessories.
Version: 0.1.2
Requires at least: 6.8
Requires PHP: 8.2
Text Domain: ridekitlab
*/

:root {
    --rkl-forest: #182a22;
    --rkl-paper: #f6f5f0;
    --rkl-ink: #252525;
    --rkl-lime: #c5d94d;
    --rkl-line: #deded4;
    --rkl-muted: #4f5a51;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--rkl-paper);
    color: var(--rkl-ink);
    font: 1rem/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, summary:focus-visible, :is(input, textarea, select):focus-visible {
    outline: 3px solid #467752;
    outline-offset: 4px;
}
:is(.rkl-hero, .rkl-fit-panel, .rkl-footer) :focus-visible { outline-color: var(--rkl-lime); }
h1, h2, h3 { margin: 0; color: var(--rkl-forest); line-height: 1.07; letter-spacing: -0.045em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 780; }
h2 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 760; }
h3 { font-size: 1.34rem; }
p { margin: 0 0 1rem; }
.rkl-shell { width: min(calc(100% - 2rem), 78rem); margin-inline: auto; }
.rkl-skip {
    position: absolute;
    z-index: 20;
    padding: 0.65rem 1rem;
    background: var(--rkl-lime);
    transform: translateY(-140%);
}
.rkl-skip:focus { transform: translateY(0); }

.rkl-header { position: relative; z-index: 5; border-bottom: 1px solid var(--rkl-line); }
.rkl-header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 4.25rem; gap: 0.75rem; }
.rkl-brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    color: var(--rkl-forest);
    font-size: 1.36rem;
    font-weight: 850;
    letter-spacing: -0.065em;
    line-height: 1;
    text-decoration: none;
}
.rkl-brand > span:last-child { font-weight: 650; }
.rkl-brand-mark {
    display: grid;
    width: 1.75rem;
    aspect-ratio: 1;
    place-items: center;
    margin-inline-end: 0.5rem;
    border-radius: 5px;
    background: var(--rkl-lime);
}
.rkl-brand-mark::before {
    width: 0.95rem;
    height: 0.7rem;
    border: solid var(--rkl-forest);
    border-width: 3px 3px 0 0;
    transform: skew(-18deg);
    content: "";
}
.rkl-header-actions { display: flex; align-items: center; gap: 0.5rem; font-size: 0.86rem; font-weight: 720; }
.rkl-header-actions a { text-decoration: none; }
.rkl-desktop-menu, .rkl-account-link { display: none; }
.rkl-nav-list { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.rkl-nav-list a { display: block; padding: 0.55rem 0; text-decoration: none; }
.rkl-nav-list a:hover, .rkl-header-actions a:hover { text-decoration: underline; }
.rkl-cart-link, .rkl-mobile-menu summary {
    display: grid;
    place-items: center;
    min-height: 2.75rem;
    padding-inline: 0.65rem;
    border-radius: 5px;
}
.rkl-cart-link { border: 1px solid #c7c9bd; }
.rkl-mobile-menu summary { background: var(--rkl-forest); color: white; cursor: pointer; list-style: none; }
.rkl-mobile-menu summary::-webkit-details-marker { display: none; }
.rkl-mobile-menu nav {
    position: absolute;
    inset: calc(100% + 1px) 0 auto;
    padding: 0.6rem 1rem 1.1rem;
    border-bottom: 1px solid var(--rkl-line);
    background: var(--rkl-paper);
}
.rkl-mobile-account { display: block; margin-top: 0.45rem; padding-top: 0.6rem; border-top: 1px solid var(--rkl-line); }

.rkl-hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 34rem; overflow: hidden; background: var(--rkl-forest); }
.rkl-hero::after, .rkl-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; }
.rkl-hero-image { z-index: -2; object-fit: cover; object-position: 82% center; }
.rkl-hero::after { z-index: -1; background: linear-gradient(90deg, #101d17ed, #112018ad 53%, #131c1640); content: ""; }
.rkl-hero-inner { padding-block: 4rem; color: var(--rkl-paper); }
.rkl-kicker { margin-bottom: 1.15rem; color: var(--rkl-lime); font-size: 0.77rem; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; }
.rkl-hero h1 { color: var(--rkl-paper); font-size: clamp(3.25rem, 9vw, 6.25rem); line-height: 0.98; letter-spacing: -0.065em; }
.rkl-hero h1 span { color: var(--rkl-lime); }
.rkl-hero-copy { max-width: 26rem; margin: 1.4rem 0 1.7rem; font-size: clamp(1rem, 2.1vw, 1.2rem); }
.rkl-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.rkl-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 3.15rem;
    padding: 0.6rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 5px;
    background: var(--rkl-lime);
    color: var(--rkl-forest);
    font-size: 0.9rem;
    font-weight: 780;
    text-decoration: none;
}
.rkl-button:hover { background: #d7e783; }
.rkl-button-outline { border-color: #e4ead6; background: transparent; color: var(--rkl-paper); }
.rkl-button-outline:hover { background: #ffffff22; }

.rkl-section { margin-block: clamp(2.6rem, 6vw, 4.65rem); }
.rkl-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 0.7rem; margin-bottom: 1.25rem; }
.rkl-text-link { color: var(--rkl-forest); font-weight: 750; }
.rkl-section-heading .rkl-text-link { flex: none; font-size: 0.88rem; }
.rkl-categories { display: grid; gap: 1rem; }
.rkl-category { overflow: hidden; border: 1px solid var(--rkl-line); border-radius: 9px; background: #fff; text-decoration: none; }
.rkl-category:hover h3 { text-decoration: underline; }
.rkl-category img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #e4e2d7; }
.rkl-category-copy { position: relative; padding: 1.1rem 2.9rem 1.05rem 1.05rem; }
.rkl-category-copy p { margin: 0.4rem 0 0; color: var(--rkl-muted); font-size: 0.9rem; }
.rkl-category-arrow { position: absolute; inset: 1rem 0.9rem auto auto; display: grid; width: 1.85rem; aspect-ratio: 1; place-items: center; border-radius: 50%; background: var(--rkl-paper); color: var(--rkl-forest); }
.rkl-featured > h2 { margin-bottom: 1.1rem; }
.rkl-empty { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.25rem; padding: 1.25rem; border: 1px solid var(--rkl-line); border-radius: 7px; color: var(--rkl-muted); }
.rkl-empty p { margin: 0; }
.rkl-featured .woocommerce ul.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.rkl-featured .woocommerce ul.products::before, .rkl-featured .woocommerce ul.products::after { display: none; }
.rkl-featured .woocommerce ul.products li.product { float: none; width: auto; margin: 0; }
.woocommerce ul.products li.product img { aspect-ratio: 1; border-radius: 6px; object-fit: contain; background: #fff; }
.rkl-card-attribute { margin: 0.4rem 0; color: var(--rkl-muted); font-size: 0.84rem; }
.rkl-product-search summary { padding: 0.45rem; cursor: pointer; list-style: none; }
.rkl-product-search summary::-webkit-details-marker { display: none; }
.rkl-product-search form {
    position: absolute;
    inset: calc(100% + 1px) max(1rem, (100% - 78rem) / 2) auto auto;
    z-index: 2;
    width: min(calc(100% - 2rem), 24rem);
    padding: 1rem;
    border: 1px solid var(--rkl-line);
    border-radius: 5px;
    background: var(--rkl-paper);
}
.rkl-product-search form > div { display: flex; gap: 0.5rem; margin-top: 0.45rem; }
.rkl-product-search input { flex: 1; min-width: 0; }
.rkl-product-search :is(input, button), .rkl-price-filter :is(input, button) {
    min-height: 2.65rem; padding: 0.4rem 0.65rem; border: 1px solid var(--rkl-line); border-radius: 5px; font: inherit;
}
.rkl-product-search button, .rkl-price-filter button { background: var(--rkl-forest); color: white; cursor: pointer; }
.rkl-price-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 0.65rem; margin-block: 1.1rem; font-size: 0.85rem; }
.rkl-price-filter label { display: grid; gap: 0.15rem; }
.rkl-price-filter input { width: 7rem; }
.rkl-price-filter > a { align-self: center; }
.rkl-fit-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; padding: clamp(1.4rem, 5vw, 2.75rem); border-radius: 9px; background: var(--rkl-forest); color: var(--rkl-paper); }
.rkl-fit-panel h2 { color: var(--rkl-paper); }
.rkl-fit-panel p, .rkl-resource-grid p { margin: 0.65rem 0 0; }
.rkl-resource-grid { display: grid; gap: 1.15rem; }
.rkl-resource-grid section { padding: clamp(1.25rem, 3.5vw, 2rem); border: 1px solid var(--rkl-line); border-radius: 9px; background: #fff; }
.rkl-resource-grid .rkl-text-link { display: inline-block; margin-top: 1rem; }

.rkl-footer { margin-top: 3rem; padding-block: 2.75rem 1rem; background: var(--rkl-forest); color: var(--rkl-paper); }
.rkl-footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
.rkl-footer-grid > div:first-child { grid-column: 1 / -1; }
.rkl-footer .rkl-brand, .rkl-footer h2 { color: var(--rkl-paper); }
.rkl-footer p { margin: 0.75rem 0 0; color: #d9ded4; }
.rkl-footer h2 { margin-bottom: 0.65rem; font-size: 1rem; letter-spacing: 0; }
.rkl-footer nav a { display: block; width: fit-content; margin: 0.35rem 0; font-size: 0.9rem; text-decoration: none; }
.rkl-footer nav a:hover { text-decoration: underline; }
.rkl-footer-end { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 2rem; padding-top: 0.8rem; border-top: 1px solid #4c5b51; color: #d9ded4; }

.rkl-content, .rkl-commerce { min-height: 49vh; padding-block: 1.4rem 2.5rem; }
.rkl-content h1, .rkl-commerce h1 { margin: 0 0 1.3rem; }
.rkl-content article > :is(h2, h3) { margin: 1.8rem 0 0.65rem; }
.rkl-content article > :is(p, ul, ol, dl) { max-width: 64ch; }
.rkl-breadcrumb, .woocommerce .woocommerce-breadcrumb { display: flex; flex-wrap: wrap; gap: 0.45em; margin-bottom: 1rem; color: var(--rkl-muted); font-size: 0.85rem; }
.rkl-breadcrumb a, .woocommerce .woocommerce-breadcrumb a { color: var(--rkl-forest); }
.rkl-fit-checks dt { margin-top: 1rem; font-weight: 750; }
.rkl-fit-checks dd { margin-left: 0; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--rkl-forest); font-size: 1.14rem; letter-spacing: -0.02em; }
.woocommerce ul.products li.product .price, .woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--rkl-forest); font-weight: 720; }
.woocommerce :is(a, button, input).button, .wc-block-components-button:not(.is-link) {
    min-height: 2.75rem;
    border-radius: 5px;
    background: var(--rkl-forest);
    color: white;
    font-weight: 720;
}
.woocommerce :is(a, button, input).button:hover, .wc-block-components-button:not(.is-link):hover { background: #30493b; color: white; }
.woocommerce :is(a, button, input).button.alt { background: var(--rkl-lime); color: var(--rkl-forest); }
.woocommerce :is(a, button, input).button.alt:hover { background: #d7e783; color: var(--rkl-forest); }
.woocommerce input.input-text { min-height: 2.65rem; padding: 0.4rem 0.65rem; }

@media (min-width: 44rem) {
    .rkl-shell { width: min(calc(100% - 4rem), 78rem); }
    .rkl-hero-image { object-position: 66% center; }
    .rkl-category img { aspect-ratio: 10 / 7; }
    .rkl-featured .woocommerce ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .rkl-categories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rkl-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rkl-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .rkl-footer-grid > div:first-child { grid-column: auto; }
}
@media (min-width: 65rem) {
    .rkl-header-inner { min-height: 4.8rem; }
    .rkl-desktop-menu, .rkl-account-link { display: block; }
    .rkl-mobile-menu { display: none; }
    .rkl-nav-list { flex-direction: row; align-items: center; gap: clamp(0.8rem, 1.65vw, 1.75rem); font-size: 0.86rem; font-weight: 680; }
    .rkl-header-actions { gap: 1.05rem; }
    .rkl-hero { min-height: clamp(36rem, 47vw, 43rem); }
    .rkl-hero::after { background: linear-gradient(90deg, #101d17ed, #112018a6 38%, #131c160d 80%); }
}
@media (max-width: 23rem) {
    .rkl-header-inner { gap: 0.4rem; }
    .rkl-header .rkl-brand { font-size: 1.13rem; }
    .rkl-header .rkl-brand-mark { width: 1.45rem; margin-inline-end: 0.33rem; }
    .rkl-header-actions { gap: 0.25rem; }
    .rkl-cart-link, .rkl-mobile-menu summary { padding-inline: 0.45rem; }
}
