/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* ── Custom Properties ─────────────────────────────────── */
:root {
    /* Colour palette */
    --col-bg:          #FAF8F4;
    --col-surface:     #FFFFFF;
    --col-dark:        #1A1A1A;
    --col-mid:         #3D3D3D;
    --col-subtle:      #7A7A7A;
    --col-border:      #E0DBD3;
    --col-accent:      #C0392B;   /* bold red – Alf's brand red */
    --col-accent-dark: #922B21;
    --col-accent-light:#F9EBEA;
    --col-cta:         #f8b305;   /* orange call to action */
    --col-green:       #1E8449;   /* open status */
    --col-amber:       #D35400;   /* closing soon */
    --col-red-status:  #C0392B;   /* closed */

    /* Typography */
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body:    'Libre Franklin', system-ui, sans-serif;
    --font-serif:   'DM Serif Text', Georgia, serif;

    /* Spacing scale */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  2rem;
    --space-lg:  4rem;
    --space-xl:  7rem;

    /* Misc */
    --radius:    6px;
    --shadow:    0 2px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --transition: 0.22s ease;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--col-bg);
    color: var(--col-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Screen-reader only utility ────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Typography – Visual Hierarchy ────────────────────── */
/* FIX: Headings made prominent through size, weight and font pairing */

h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    font-weight: 400;           /* display serif already has presence */
    line-height: 1.1;
    color: var(--col-dark);
    letter-spacing: -0.02em;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--col-dark);
    margin-bottom: var(--space-md);
}

h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--col-mid);
    margin-bottom: var(--space-xs);
}

p { margin-bottom: var(--space-sm); max-width: 70ch; }

a {
    color: var(--col-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}
a:hover, a:focus { color: var(--col-accent-dark); }
a:focus-visible {
    outline: 3px solid var(--col-accent);
    outline-offset: 3px;
    border-radius: 2px;
}

ul { list-style: none; }
address { font-style: normal; line-height: 2; }

/* ── Header & Nav ──────────────────────────────────────── */
header {
    background: var(--col-surface);
    border-bottom: 1px solid var(--col-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--space-md);
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem var(--space-md);
}

.logo-link { display: flex; align-items: center; margin-left: auto; order: 2; }
.logo-link img { height: 90px; width: auto; }

nav label[for="menu-toggle"] { order: 1; }

/* Hamburger – hidden on desktop */
nav input[type="checkbox"],
nav label[for="menu-toggle"] {
    display: none;
}

nav ul {
    display: flex;
    gap: var(--space-md);
    margin-left: 0;
}

nav ul li a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--col-mid);
    text-decoration: none;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

nav ul li a:hover,
nav ul li a[aria-current="page"] {
    color: var(--col-accent);
    border-bottom-color: var(--col-accent);
}

/* ── Mobile Nav ────────────────────────────────────────── */
@media (max-width: 700px) {
    nav {
        position: relative;
        width: 100%;
    }

    nav label[for="menu-toggle"] {
        display: block;
        margin-left: auto;
        font-size: 2rem;
        cursor: pointer;
        color: var(--col-mid);
        padding: 0.25rem 0.5rem;
        line-height: 1.1;
    }

    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--col-surface);
        border-top: 1px solid var(--col-border);
        padding: var(--space-sm) var(--space-md);
        box-shadow: var(--shadow);
    }

    nav input[type="checkbox"]:checked ~ ul { display: flex; }

    nav ul li a {
        display: block;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--col-border);
    }

    header {
        position: static;
        box-shadow: none;
    }
}

/* ── Shared layout wrapper ─────────────────────────────── */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg) var(--space-md);
}

main > section,
main > div {
    margin-bottom: var(--space-xl);
}

/* ── Hero / Page Hero ──────────────────────────────────── */
.hero, .page-hero {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.75), rgba(44, 24, 16, 0.70)),
        url('images/webp_images/bg.webp') center / cover no-repeat;
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: var(--space-xl);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1, .page-hero h1 { color: #fff; }

.hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    margin: var(--space-sm) auto var(--space-md);
    max-width: 55ch;
}

/* ── CTA Buttons ───────────────────────────────────────── */
.cta-btn {
    display: inline-block;
    background: var(--col-cta);
    color: #fff !important;
    text-decoration: none;
    padding: 0.85rem 2rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background var(--transition), transform var(--transition);
    margin-top: var(--space-sm);
}
.cta-btn:hover { background: #d67c0f; transform: translateY(-2px); }
.cta-btn.cta-secondary {
    background: transparent;
    color: var(--col-accent) !important;
    border: 2px solid var(--col-accent);
}
.cta-btn.cta-secondary:hover { background: var(--col-accent-light); }

/* ── Bike Category Cards (index.html) ──────────────────── */
/* FIX: article → figure; descendant selector targets figure img */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--space-md);
}

/* Descendant selector: .card-grid figure img */
.card-grid figure {
    background: var(--col-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card-grid figure:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-grid figure img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.card-grid figure figcaption {
    padding: var(--space-sm) var(--space-sm) var(--space-md);
}

.card-grid figure figcaption h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--col-dark);
    margin-bottom: 0.4rem;
}

.card-grid figure figcaption p {
    font-size: 0.9rem;
    color: var(--col-subtle);
    margin: 0;
}

/* ── Brand Logos ───────────────────────────────────────── */
.brand-grid {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Descendant selector: .brand-grid figure img */
.brand-grid figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.brand-grid figure img {
    width: 160px;
    height: 100px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.65;
    transition: filter var(--transition), opacity var(--transition);
}
.brand-grid figure img:hover { filter: grayscale(0); opacity: 1; }

.brand-grid figure figcaption {
    font-size: 0.8rem;
    color: var(--col-subtle);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Why Choose Us ─────────────────────────────────────── */
.why-us ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-sm);
    list-style: none;
}

.why-us ul li {
    background: var(--col-surface);
    border: 1px solid var(--col-border);
    border-left: 4px solid var(--col-accent);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--col-mid);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.why-us ul li .icon {
    color: var(--col-accent);
    font-size: 0.9rem;
}

/* ── Opening Hours ─────────────────────────────────────── */
.opening-hours, .hours-section { }

.hours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-bottom: var(--space-sm);
}

.hours-table th {
    background: var(--col-dark);
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.75rem 1rem;
    text-align: left;
}

.hours-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--col-border);
    color: var(--col-mid);
}

.hours-table tr.today td {
    background: var(--col-accent-light);
    font-weight: 700;
    color: var(--col-accent-dark);
}

.open-status {
    font-weight: 600;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    font-size: 1rem;
    margin-top: var(--space-sm);
}
.status-open   { background: #eafaf1; color: var(--col-green); border: 1px solid #abebc6; }
.status-closing{ background: #fef9f0; color: var(--col-amber); border: 1px solid #f8c471; }
.status-closed { background: #fdedec; color: var(--col-red-status); border: 1px solid #f1948a; }

/* ── Map ───────────────────────────────────────────────── */
.map-section .address {
    margin-bottom: var(--space-sm);
    font-size: 1rem;
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe { display: block; width: 100%; }

/* ── Services page ─────────────────────────────────────── */
/* FIX: No wrapping <section> on services – each service is its own section */
.services-page { max-width: 1200px; margin: 0 auto; padding: var(--space-lg) var(--space-md); }

.services-page > .page-hero {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.75), rgba(44, 24, 16, 0.70)),
        url('images/webp_images/services.webp') center / cover no-repeat;
    color: #fff;
    border-radius: var(--radius);
    margin-bottom: var(--space-xl);
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.services-page > .page-hero h1,
.services-page > .page-hero p { color: #fff; }

/* Service items */
.service-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: var(--space-sm) var(--space-md);
    align-items: start;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--col-border);
}

.service-item:last-child { border-bottom: none; }

.service-item h2 {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    position: relative;
    padding-bottom: 0.75rem;
    margin-bottom: var(--space-sm);
}

.service-item h2::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 48px; height: 3px;
    background: var(--col-accent);
    border-radius: 2px;
}

/* FIX: Descendant selector – .service-item img */
.service-item img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    grid-row: 2;
    grid-column: 2;
    align-self: start;
}

.service-item p {
    grid-row: 2;
    grid-column: 1;
    margin-bottom: var(--space-sm);
    line-height: 1.6;
    font-size: 1.05rem;
}

.service-item ul {
    grid-row: 3;
    grid-column: 1;
    list-style: disc;
    padding-left: 1.2em;
    color: var(--col-mid);
    margin-top: 0;
    line-height: 1.5;
}
.service-item ul li {
    margin-bottom: 0.4rem;
    font-size: 1.05rem;
}
.service-item ul li strong {
    color: var(--col-accent);
    font-weight: 600;
}

/* Alternate image sides */
.service-item:nth-child(even) img { grid-column: 1; }
.service-item:nth-child(even) p,
.service-item:nth-child(even) ul { grid-column: 2; }

@media (max-width: 700px) {
    .service-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    .service-item img,
    .service-item:nth-child(even) img {
        grid-column: 1;
        grid-row: 3;
    }
    .service-item p,
    .service-item:nth-child(even) p {
        grid-column: 1;
        grid-row: 2;
    }
    .service-item ul,
    .service-item:nth-child(even) ul {
        grid-column: 1;
        grid-row: 4;
    }
}

/* ── About Us page ─────────────────────────────────────── */
.aboutus {
  padding: 2.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.aboutus section {
  display: flex;
  flex-direction: column; /* mobile stack */
  gap: 1.5rem;
}

.aboutus figure {
  margin: 0;
}

.aboutus img {
  width: 100%;
  border-radius: 14px;
  display: block;
}

.aboutus section figure,
.aboutus section div {
  flex: 1;
}

@media (min-width: 768px) {
  .aboutus section {
    flex-direction: row;
  }
  .aboutus section:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* ── Locate Us page ────────────────────────────────────── */
.locate-page > .page-hero {
    background: 
        linear-gradient(135deg, rgba(26, 26, 26, 0.75), rgba(44, 24, 16, 0.70)),
        url('images/webp_images/locateus.webp') center / cover no-repeat;
}

.store-info {
    background: var(--col-surface);
    border: 1px solid var(--col-border);
    border-left: 5px solid var(--col-accent);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: var(--space-xl);
}

/* ── Accessibility page ────────────────────────────────── */
.a11y-section {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--col-border);
}
.a11y-section:last-child { border-bottom: none; }
.a11y-section h2 { font-size: clamp(1.3rem, 2vw, 1.9rem); }
.a11y-section ul { list-style: disc; padding-left: 1.4em; color: var(--col-mid); }
.a11y-section ul li { margin-bottom: 0.5rem; }
code {
    background: var(--col-accent-light);
    color: var(--col-accent-dark);
    padding: 0.1em 0.4em;
    border-radius: 3px;
    font-size: 0.88em;
    font-family: 'Courier New', monospace;
}

/* ── Error / 404 page ──────────────────────────────────── */
.error-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.error-content {
    text-align: center;
    padding: var(--space-lg);
}

.error-code {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(5rem, 15vw, 12rem);
    color: var(--col-border);
    line-height: 1;
    margin-bottom: -0.2em;
    position: relative;
    z-index: 0;
}

.error-content h1 {
    position: relative;
    z-index: 1;
    margin-bottom: var(--space-sm);
}

.error-links {
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin: var(--space-md) 0;
}

.error-help {
    color: var(--col-subtle);
    font-size: 0.9rem;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
    background: #1a1a1a;
    color: #d8d7d7;
    padding: var(--space-lg) var(--space-md);
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

footer nav {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

footer nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

footer nav ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer nav ul li a {
    display: inline-block;
    color: #979696 !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    transition: all var(--transition);
    border: 2px solid transparent;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

footer nav ul li a:hover,
footer nav ul li a:focus,
footer nav ul li a[aria-current="page"] {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    text-decoration: underline;
}

footer nav ul li a:focus-visible {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

footer p {
    margin: 0;
    padding: 0;
    color: #e8e8e8;
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.6;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
}

footer a,
footer span,
footer strong,
footer small,
footer em {
    color: #e8e8e8 !important;
}

.footer-logo {
    display: block;
    height: 70px;
    width: auto;
    margin: var(--space-sm) auto;
    filter: brightness(0) invert(1);
}

/* Mobile footer – max-width: 700px */
@media (max-width: 700px) {
    footer {
        padding: var(--space-md);
        gap: var(--space-md);
        width: 100%;
        min-height: auto;
    }

    footer nav {
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        padding: 0;
        margin: 0;
        order: 1;
    }

    footer nav ul {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
    }

    footer nav ul li {
        flex: 0 1 auto;
        width: auto;
        padding: 0;
        margin: 0;
    }

    footer nav ul li a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
        font-weight: 600;
        min-height: 48px;
        background: rgba(255, 215, 0, 0.08);
        color: #e6e4e4 !important;
        border: 1px solid rgba(255, 215, 0, 0.3);
        border-radius: 6px;
        width: auto;
        transition: all var(--transition);
    }

    footer nav ul li a:hover,
    footer nav ul li a:focus {
        background: rgba(255, 215, 0, 0.2);
        color: #ffd700 !important;
        border-color: #ffd700;
        text-decoration: underline;
    }

    footer nav ul li a:active {
        background: rgba(255, 215, 0, 0.3);
        color: #ffd700 !important;
    }

    .footer-content {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    footer p {
        margin: 0;
        padding: 0;
        color: #e8e8e8;
        width: 100%;
        max-width: 100%;
        font-size: 0.8rem;
        line-height: 1.4;
        text-align: center;
        display: block;
        visibility: visible;
        opacity: 1;
    }

    footer p:first-of-type {
        margin-bottom: 0.25rem;
    }

    footer p:last-of-type {
        margin-bottom: 0;
    }

    .footer-logo {
        margin: var(--space-md) auto 0;
        height: 60px;
    }
}

/* ── Responsive tweaks ─────────────────────────────────── */
@media (max-width: 900px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .card-grid { grid-template-columns: 1fr; }
    .why-us ul { grid-template-columns: 1fr; }
    .brand-grid { gap: var(--space-sm); }
}

@media (max-width: 700px) {
    main > section,
    main > div {
        padding: var(--space-md) var(--space-sm);
    }
}
