/*
Theme Name: Pedal Project
Theme URI: http://pedal.localhost:8080
Author: Pedal Project
Description: Theme for the Pedal Project website and shop. Shares its menus with the booking system.
Version: 1.0.0
Requires PHP: 8.1
Text Domain: pedal
WC requires at least: 9.0
*/

:root {
    --pp-grey: #434343;
    --pp-grey-dark: #363636;
    --pp-orange: #FF9902;
    --pp-green: #70BFAE;
    --pp-purple: #B78FC1;
    --pp-blue: #44A7F4;
    --pp-link: #CC7600;
    --pp-text: #374151;
    --pp-heading: #434343;
    --pp-max: 72rem;
}

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

body {
    margin: 0;
    font-family: 'Lato', Arial, sans-serif;
    color: var(--pp-text);
    background: #fff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    --wc-primary: #FF9902;
    --wc-primary-text: #000;
}

img { max-width: 100%; height: auto; }
a { color: var(--pp-link); }
a:hover { color: #995800; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.pp-container {
    width: 100%;
    max-width: var(--pp-max);
    margin: 0 auto;
    padding: 0 1rem;
}

.pp-main { flex: 1 0 auto; }

/* ---------- Logo and banner ---------- */

.pp-brand { display: flex; width: 100%; }
.pp-brand__logo { flex: 0 0 33.3333%; display: block; }
.pp-brand__logo img { display: block; width: 100%; height: auto; }
.pp-brand__logo:hover img { opacity: .9; }
.pp-brand__banner {
    flex: 0 0 66.6667%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ---------- Main navigation ---------- */

.pp-nav { background: var(--pp-grey); color: #fff; position: relative; z-index: 50; }
.pp-nav__inner { max-width: var(--pp-max); margin: 0 auto; padding: 0 1rem; }
.pp-nav__panel { display: flex; justify-content: space-between; align-items: stretch; }
.pp-nav ul { list-style: none; margin: 0; padding: 0; }
.pp-menu, .pp-account { display: flex; align-items: stretch; }
.pp-menu > li, .pp-account > li { position: relative; }

.pp-menu a, .pp-account a {
    display: flex;
    align-items: center;
    height: 4rem;
    padding: 0 .85rem;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}
.pp-menu a:hover, .pp-menu a:focus,
.pp-account a:hover, .pp-account a:focus,
.pp-menu .current-menu-item > a,
.pp-menu .current-menu-parent > a,
.pp-menu .current-menu-ancestor > a,
.pp-menu .current_page_item > a,
.pp-menu .current_page_parent > a,
.pp-menu .current_page_ancestor > a,
.pp-menu li:focus-within > a,
.pp-menu li:hover > a {
    background: var(--pp-orange);
    color: #000;
}

/* Chevrons for items with dropdowns */
.pp-menu .menu-item-has-children > a::after {
    content: "";
    width: .4em; height: .4em;
    margin-left: .5em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-25%) rotate(45deg);
}

.pp-menu .sub-menu {
    position: absolute;
    left: 0; top: 100%;
    min-width: 12rem;
    background: var(--pp-grey);
    box-shadow: 0 8px 16px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.pp-menu li:hover > .sub-menu,
.pp-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; }
.pp-menu .sub-menu a { height: auto; padding: .6rem 1rem; }

.pp-basket__count {
    display: inline-block;
    margin-left: .35rem;
    min-width: 1.4rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--pp-orange);
    color: #000;
    font-size: .8rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.4rem;
}
.pp-account a:hover .pp-basket__count { background: #fff; }

.pp-nav__toggle {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    height: 4rem;
    padding: 0 .75rem;
    cursor: pointer;
}
.pp-nav__toggle-bars,
.pp-nav__toggle-bars::before,
.pp-nav__toggle-bars::after {
    display: block;
    width: 1.5rem; height: 2px;
    background: currentColor;
    position: relative;
}
.pp-nav__toggle-bars::before, .pp-nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.pp-nav__toggle-bars::before { top: -7px; }
.pp-nav__toggle-bars::after { top: 7px; }

@media (max-width: 767px) {
    .pp-nav__inner { padding: 0; }
    .pp-nav__toggle { display: flex; align-items: center; margin-left: auto; }
    .pp-nav__panel { display: none; flex-direction: column; background: var(--pp-grey-dark); padding: .5rem 0; }
    .pp-nav.is-open .pp-nav__panel { display: flex; }
    .pp-menu, .pp-account { flex-direction: column; }
    .pp-account { border-top: 1px solid var(--pp-grey); margin-top: .5rem; padding-top: .5rem; }
    .pp-menu a, .pp-account a { height: auto; padding: .7rem 1rem; }
    .pp-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: transparent;
    }
    .pp-menu .sub-menu a { padding-left: 2rem; }
    .pp-menu .menu-item-has-children > a::after { display: none; }
}

/* ---------- Shop bar ---------- */

.pp-shopbar { background: #fff; border-bottom: 1px solid #e5e5e5; }
.pp-shopbar__inner {
    max-width: var(--pp-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem 1.5rem;
}
.pp-shopbar__title { font-weight: 700; color: var(--pp-heading); padding: .85rem 0; }
.pp-shopbar__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.pp-shopbar__menu a {
    display: block;
    padding: .85rem 0;
    color: var(--pp-text);
    text-decoration: none;
    border-bottom: 3px solid transparent;
}
.pp-shopbar__menu a:hover,
.pp-shopbar__menu .current-menu-item > a { border-bottom-color: var(--pp-orange); color: #000; }

/* ---------- Footer ---------- */

.pp-footer { background: var(--pp-grey); color: #d1d5db; padding: 3rem 0; margin-top: 3rem; }
.pp-footer__inner {
    max-width: var(--pp-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.pp-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.pp-footer a { color: #d1d5db; text-decoration: none; }
.pp-footer a:hover { color: #fff; }
.pp-footer__copy { margin: 0; }
@media (max-width: 767px) { .pp-footer__inner { flex-direction: column; } }

/* ---------- Page layout ---------- */

.pp-page { padding: 3rem 0; }
.pp-home + .pp-footer, .home .pp-footer { margin-top: 0; }

.pp-band { padding: 4rem 0; }
.pp-band--orange { background: rgba(255, 153, 2, .4); }
.pp-band--green { background: rgba(112, 191, 174, .4); }
.pp-band--purple { background: rgba(183, 143, 193, .4); }
.pp-band--blue { background: rgba(68, 167, 244, .4); }
.pp-band--solid.pp-band--orange { background: var(--pp-orange); }
.pp-band--solid.pp-band--green { background: var(--pp-green); }
.pp-band--solid.pp-band--purple { background: var(--pp-purple); }
.pp-band--solid.pp-band--blue { background: var(--pp-blue); }
.pp-band h1, .pp-band h2 { color: var(--pp-heading); text-align: center; margin-top: 0; }
.pp-band h1 { font-size: clamp(2.25rem, 5vw, 3rem); }
.pp-band h2 { font-size: clamp(1.875rem, 4vw, 2.25rem); margin-bottom: 3rem; }
.pp-lead { font-size: 1.2rem; max-width: 48rem; margin: 0 auto; text-align: center; color: #374151; }

/* Course landing */
.pp-course { color: #fff; text-align: center; }
.pp-course__title { color: #fff !important; font-size: clamp(1.875rem, 6vw, 3.75rem); margin: 0 0 .75rem; }
.pp-course__intro { font-size: 1.15rem; margin-bottom: 2rem; }
.pp-course__intro.content-styles, .pp-course__intro.content-styles p,
.pp-course__intro.content-styles li, .pp-course__intro.content-styles h2,
.pp-course__intro.content-styles h3, .pp-course__intro.content-styles a { color: #fff; }

.pp-button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: .5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.15);
    transition: background-color .2s;
}
.pp-button--white { background: #fff; color: #111827; }
.pp-button--white:hover { background: #f3f4f6; color: #111827; }

.pp-course-links {
    list-style: none;
    padding: 0;
    margin: 2.5rem auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem;
}
.pp-course-links a {
    display: block;
    padding: .75rem 1.25rem;
    border: 2px solid var(--pp-section, var(--pp-orange));
    border-radius: .5rem;
    color: var(--pp-heading);
    font-weight: 700;
    text-decoration: none;
}
.pp-course-links a:hover { background: var(--pp-section, var(--pp-orange)); color: #fff; }

/* Home page pieces */
.pp-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 56rem;
    margin: 0 auto;
    padding: 3rem 1rem;
}
.pp-tile {
    display: block;
    border-radius: .5rem;
    padding: 2rem;
    text-align: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.15);
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.pp-tile:hover { color: #fff; transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,.2); opacity: .92; }
.pp-tile h3 { margin: 0 0 .5rem; font-size: 1.5rem; color: #fff; }
.pp-tile p { margin: 0; font-size: 1.1rem; font-weight: 700; opacity: .9; }
.pp-tile--orange { background: var(--pp-orange); }
.pp-tile--green { background: var(--pp-green); }
.pp-tile--blue { background: var(--pp-blue); }
.pp-tile--purple { background: var(--pp-purple); }
@media (max-width: 600px) { .pp-tile { padding: 1.25rem; } .pp-tile h3 { font-size: 1.15rem; } }

.pp-quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.pp-quote { background: rgba(255,255,255,.8); border-radius: .5rem; padding: 1.5rem; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.pp-quote__star { color: var(--pp-purple); font-size: 1.5rem; line-height: 1; margin: 0 0 1rem; }
.pp-quote blockquote { margin: 0 0 1rem; font-style: italic; }
.pp-quote cite { font-style: normal; font-weight: 700; color: var(--pp-heading); }
@media (max-width: 767px) { .pp-quotes { grid-template-columns: 1fr; } }

.pp-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.pp-feature { display: flex; gap: 1rem; }
.pp-feature::before {
    content: "";
    flex: 0 0 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--pp-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
}
.pp-feature h3 { margin: 0 0 .5rem; font-size: 1.25rem; color: var(--pp-heading); }
.pp-feature p { margin: 0; }
@media (max-width: 767px) { .pp-features { grid-template-columns: 1fr; } }

.pp-mission { max-width: 48rem; margin: 0 auto; text-align: center; font-size: 1.15rem; }

/* ---------- Content styles (mirrors the booking system's CMS) ---------- */

.content-styles { line-height: 1.75; color: var(--pp-text); }
.content-styles h1 { font-size: 2.25rem; font-weight: 700; color: #111827; margin: 2rem 0 1.5rem; }
.content-styles h2 { font-size: 1.875rem; font-weight: 600; color: #1f2937; margin: 1.75rem 0 1.25rem; }
.content-styles h3 { font-size: 1.5rem; font-weight: 600; color: #1f2937; margin: 1.5rem 0 1rem; }
.content-styles h4 { font-size: 1.25rem; font-weight: 600; color: #374151; margin: 1.5rem 0 1rem; }
.content-styles h5 { font-size: 1.125rem; font-weight: 600; color: #374151; margin: 1.25rem 0 .75rem; }
.content-styles h6 { font-size: 1rem; font-weight: 600; color: #374151; margin: 1.25rem 0 .75rem; }
.content-styles > :first-child { margin-top: 0; }
.content-styles p { margin: 0 0 1.5rem; color: #4b5563; }
.content-styles ul, .content-styles ol { margin: 0 0 1.5rem; padding-left: 1.25rem; color: #4b5563; }
.content-styles ul { list-style: disc; }
.content-styles ol { list-style: decimal; }
.content-styles li { margin-bottom: .5rem; }
.content-styles li > p { margin: 0; display: inline; }
.content-styles ul ul, .content-styles ol ul, .content-styles ul ol, .content-styles ol ol { margin: .5rem 0 0; padding-left: 2.5rem; }
.content-styles a { color: var(--pp-link); text-decoration: underline; }
.content-styles a:hover { color: #995800; }
.content-styles blockquote { border-left: 4px solid var(--pp-orange); padding-left: 1rem; margin: 1.5rem 0; font-style: italic; color: #4b5563; }
.content-styles pre { background: #f3f4f6; border-radius: .5rem; padding: 1rem; overflow-x: auto; margin-bottom: 1.5rem; }
.content-styles code { background: #f3f4f6; border-radius: .25rem; padding: .125rem .25rem; font-size: .875em; }
.content-styles table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.content-styles th { background: #f3f4f6; text-align: left; padding: .5rem 1rem; font-weight: 600; border: 1px solid #e5e7eb; }
.content-styles td { padding: .5rem 1rem; border: 1px solid #e5e7eb; }
.content-styles img { border-radius: .5rem; max-width: 100%; height: auto; display: block; margin: 1.5rem 0; }
.content-styles hr { margin: 2rem 0; border: 0; border-top: 1px solid #e5e7eb; }
.content-styles strong { font-weight: 700; }
.content-styles .img-small { max-width: 300px; width: 100%; }
.content-styles .img-medium { max-width: 500px; width: 100%; }
.content-styles .img-large { max-width: 800px; width: 100%; }
.content-styles .float-left { float: left; margin: 0 1rem .5rem 0; }
.content-styles .float-right { float: right; margin: 0 0 .5rem 1rem; }
.content-styles .float-none { display: block; margin: 1rem auto; float: none; }
.content-styles p::after, .content-styles::after { content: ""; display: table; clear: both; }
@media (max-width: 600px) {
    .content-styles .float-left, .content-styles .float-right { float: none; margin: 1rem auto; }
}

/* Combined pages (children's and adults' versions on one page) */
.pp-jump { background: #f9fafb; border-radius: .5rem; padding: .75rem 1rem; }
.pp-version { margin-top: 2.5rem; scroll-margin-top: 1rem; }
.pp-version + .pp-version { border-top: 1px solid #e5e7eb; padding-top: 2.5rem; }
.content-styles .pp-version__title {
    display: inline-block;
    margin: 0 0 1.25rem;
    padding: .35rem 1rem;
    border-radius: 999px;
    background: var(--pp-orange);
    color: #fff;
    font-size: 1.25rem;
}
#learn-to-ride-adults .pp-version__title { background: var(--pp-green); }
#bikeability-children .pp-version__title { background: var(--pp-blue); }
#bikeability-adults .pp-version__title { background: var(--pp-purple); }

/* ---------- Shop ---------- */

.pp-shop-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: stretch;
}
.pp-shop-intro__image { margin: 0; min-height: 20rem; }
.pp-shop-intro__image img { width: 100%; height: 100%; object-fit: cover; border-radius: .5rem; display: block; margin: 0; }
.pp-shop-intro__text h1 { margin-top: 0; }
@media (max-width: 767px) {
    .pp-shop-intro { grid-template-columns: 1fr; }
    .pp-shop-intro__image { min-height: 0; }
}

.woocommerce ul.products li.product a img,
.woocommerce-page ul.products li.product a img {
    aspect-ratio: 1 / 1;
    width: 100%;
    object-fit: contain;
    background: #f3f3f3;
    border-radius: .5rem;
    padding: .75rem;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--pp-heading); font-size: 1.05rem; }
.woocommerce ul.products li.product .price { color: var(--pp-text); font-weight: 700; }
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .star-rating { display: none; }
.woocommerce ul.products li.product a { text-decoration: none; }

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
    background: var(--pp-orange);
    color: #000;
    border-radius: .375rem;
    font-weight: 700;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: #e68a00; color: #000; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--pp-heading); font-weight: 700; }
.woocommerce div.product .stock.out-of-stock { color: #b91c1c; font-weight: 700; }
.woocommerce div.product div.images img { background: #f3f3f3; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
    padding: .5rem .75rem;
    border: 1px solid #d1d5db;
    border-radius: .375rem;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: .5rem 0; }
