/*
Theme Name: Bright Sports
Template: blocksy
Description: Site styling for Bright Sports, on top of Blocksy. Anything about the shop itself belongs here; the configurator carries its own styling and ignores the theme.
Author: Bright Sports
Version: 1.0.0
*/

:root {
    --bs-ink: #0d1117;
    --bs-ink-soft: #12161d;
    --bs-brand: #ea7c1f;
    --bs-muted: #9aa4b2;
}

/*
 * Blocksy's buttons (WooCommerce's sign-in, register, account and form
 * buttons, and any other plain .button or submit) turned white on white on
 * hover: the customiser has white for both the hover background and text.
 * A darker orange instead, white text on it. Set on body so it wins over
 * Blocksy's own :root values.
 */
body {
    --theme-button-background-hover-color: #c4620f;
    --theme-button-border-hover-color: #c4620f;
    --theme-button-text-hover-color: #ffffff;
}

/*
 * Pages here open with their own designed header, so the theme's page title
 * would be a second, weaker headline directly above it — and a second h1 on
 * the page. Blocksy calls this the hero section; its per-page setting does not
 * hold, so it is removed here instead.
 */
.page .hero-section,
.page .page-title,
.page .entry-header {
    display: none !important;
}

/* A sticky dark bar reads better over a dark hero than a floating one. */
.ct-header [data-sticky] {
    background: rgb(13 17 23 / 0.92);
    backdrop-filter: blur(10px);
}

/* Uppercase, tight, confident — the tone the configurator already sets. */
h1, h2, h3,
.wp-block-heading {
    letter-spacing: -0.01em;
}

.wp-element-button,
.button,
button.wp-block-button__link {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* WooCommerce, so the shop does not fall back to stock styling. */
.woocommerce ul.products li.product .price {
    font-weight: 800;
    color: var(--bs-ink);
}

.woocommerce span.onsale {
    background: var(--bs-brand);
    color: var(--bs-ink);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/*
 * A group that sets its own text colour means it: the theme's global heading
 * colour would otherwise paint a dark navy h1 onto a near-black hero.
 */
.wp-block-group.has-text-color :is(h1, h2, h3, h4, h5, p, li) {
    color: inherit;
}

/* Footer sits on the same ink as the hero. */
/* Blocksy paints the footer from its own palette variable, which outranks a
   plain background declaration here. */
footer.ct-footer {
    background-color: var(--bs-ink) !important;
}

footer.ct-footer,
footer.ct-footer a {
    color: rgb(255 255 255 / 0.6);
}

footer.ct-footer a:hover {
    color: var(--bs-brand);
}

/* ---------------------------------------------------------------------------
 * Header
 *
 * Fixed rather than sticky: the hero has to start at the very top of the page
 * with the bar floating over it. Sticky would reserve space and push the hero
 * down, which is the thing we are trying to avoid.
 * ------------------------------------------------------------------------- */

.bs-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: transparent;
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* Once the hero is behind us the bar needs its own ground to stand on. */
.bs-header.is-stuck {
    background: rgb(13 17 23 / 0.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.08);
}

.bs-header__inner {
    display: flex;
    align-items: center;
    /* Tight enough for logo, seven menu items, account, cart and the button. */
    gap: 1rem;
    padding-block: 1.25rem;
}

.bs-logo {
    display: inline-flex;
    align-items: baseline;
    font-size: clamp(1.25rem, 1.6vw, 1.5rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
}

.bs-logo img {
    max-height: 40px;
    width: auto;
}

.bs-logo__mark {
    color: #fff;
}

.bs-logo__accent {
    color: var(--bs-brand);
}

.bs-nav {
    margin-left: auto;
}

.bs-nav__list {
    display: flex;
    /* Seven items since Zakelijk: narrower steps keep each on one line. */
    /* Capped: the bar is never wider than its container, however wide the screen. */
    gap: clamp(1rem, 1.8vw, 1.5rem);
    margin: 0;
    padding: 0;
    list-style: none;
}

.bs-nav__list a {
    color: rgb(255 255 255 / 0.85);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

@media (max-width: 1180px) {
    .bs-nav__list a {
        font-size: 0.78rem;
        letter-spacing: 0.05em;
    }
}

.bs-nav__list a:hover,
.bs-nav__list .current-menu-item a {
    color: var(--bs-brand);
}

.bs-cta {
    border: 1px solid rgb(255 255 255 / 0.35);
    border-radius: 999px;
    padding: 0.6rem 1.4rem;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bs-cta:hover {
    background: var(--bs-brand);
    border-color: var(--bs-brand);
    color: var(--bs-ink);
}

/*
 * The hero runs under the bar, so nothing above it may reserve vertical
 * space. Blocksy pads its content container by default, which pushed the hero
 * 60px down and left a white strip under the header.
 */
.home .ct-container-full,
.home #main-container > main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.home .wp-block-cover.alignfull:first-child {
    padding-top: 0;
}

/* Mobile menu */
.bs-burger {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: none;
    cursor: pointer;
    position: relative;
}

.bs-burger span[aria-hidden] {
    position: absolute;
    inset: 50% 0.5rem auto;
    height: 2px;
    background: #fff;
    box-shadow: 0 -7px 0 #fff, 0 7px 0 #fff;
}

.bs-mobile {
    background: rgb(13 17 23 / 0.98);
    backdrop-filter: blur(12px);
    padding: 0.5rem clamp(1rem, 3vw, 2.5rem) calc(1.5rem + env(safe-area-inset-bottom));
    /* The rest of the screen under the bar, scrolling on its own if it must. */
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--bs-header-height, 84px));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.bs-mobile[hidden] { display: none; }

html.bs-menu-open, html.bs-menu-open body { overflow: hidden; }

.bs-mobile__actions {
    display: grid;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.bs-mobile__button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    border: 1px solid rgb(255 255 255 / 0.3);
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.bs-mobile__button--primary {
    border-color: var(--bs-brand);
    background: var(--bs-brand);
    color: #0d1117;
}

.bs-mobile__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.bs-mobile__list a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgb(255 255 255 / 0.08);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
}

/* Below a laptop width the menu and the button go into the panel. */
@media (max-width: 1024px) {
    .bs-nav,
    .bs-cta {
        display: none;
    }

    .bs-burger {
        display: block;
        margin-left: auto;
    }
}

/*
 * Pages that do not open with a full-bleed hero still need clearance, or the
 * fixed bar sits on top of their first line.
 */
body:not(.home) #main-container > main {
    padding-top: 5.5rem;
}

/*
 * One column for the whole page. The header logo, the hero headline and every
 * section heading below share a left edge; three slightly different gutters is
 * the kind of thing that reads as sloppy without anyone being able to say why.
 */
:root {
    --bs-column: 1100px;
    --bs-gutter: 1.5rem;
}

/*
 * min() rather than max-width plus padding: the gutter and the cap are one
 * declaration, so the header, the hero and the sections cannot drift apart as
 * soon as one of them gets an extra padding somewhere.
 */
.bs-header__inner {
    width: min(var(--bs-column), 100% - (var(--bs-gutter) * 2));
    margin-inline: auto;
}

/*
 * The cover is a flex container and packs its content to the start, so sizing
 * the inner wrapper does nothing. Padding the cover itself puts that start edge
 * exactly on the shared column, with a real gutter left on narrow screens.
 */
.home .wp-block-cover.alignfull {
    padding-inline: max(var(--bs-gutter), (100% - var(--bs-column)) / 2);
}

/*
 * Full-width sections sit against each other. WordPress gives every top-level
 * block a bottom margin, which on a page of dark bands shows up as a thin white
 * stripe between them.
 */
.home .entry-content > .alignfull {
    margin-block: 0;
}

/*
 * The screenshot is shown whole. It is a finished composition, so it gets a
 * band of its own rather than a column beside a competing headline.
 */
.bs-shot {
    margin: 0;
}

.bs-shot img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgb(13 17 23 / 0.14);
}

/*
 * The bar is only transparent where something dark sits behind it. The home
 * page has its hero; every other page has a light background, and white menu
 * text on white is simply invisible.
 */
body:not(.home) .bs-header {
    background: rgb(13 17 23 / 0.94);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.08);
}

/*
 * The configurator is a dark full-bleed panel. The page background behind it is
 * light, so the clearance under the fixed header would otherwise read as a pale
 * strip wedged between the bar and the panel.
 */
body.bsc-page {
    background: #0d1117;
}

/*
 * The designer is a light workspace, the garment chooser a dark one, and the
 * strip of page showing under the fixed header has to match whichever is on
 * screen. The configurator sets .bsc-designing as the customer picks a garment.
 */
body.bsc-page.bsc-designing {
    background: var(--bsc-workspace-image, none) center / cover no-repeat fixed, #eef1f5;
}

/* ==========================================================================
   The account area
   --------------------------------------------------------------------------
   WooCommerce ships the markup and almost no opinion about it, which on this
   theme comes out as bare lists and system inputs. These rules dress the two
   states it has -- signed out, where the job is to get somebody in, and signed
   in, where the job is to find an order or a saved design fast.
   ========================================================================== */

.bs-account {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    color: rgb(255 255 255 / 0.85);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.bs-account:hover {
    background: rgb(255 255 255 / 0.1);
    color: #fff;
}

.bs-account__icon { display: inline-flex; }

/*
 * The cart, next to the account link: an icon with a count once it holds
 * something. The word is there for screen readers; the bar has no room for it.
 */
.bs-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.6rem;
    border-radius: 999px;
    color: rgb(255 255 255 / 0.85);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.bs-cart:hover,
.bs-cart[aria-current="page"] {
    background: rgb(255 255 255 / 0.1);
    color: #fff;
}

.bs-cart svg { flex: none; }

.bs-cart__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #ea7c1f;
    color: #0d1117;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
}

.bs-cart__count[hidden] { display: none; }

.bs-cart__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Small screens: account and cart to the right, the cart a full-size tap target with its count on the corner. */
@media (max-width: 1024px) {
    .bs-account { margin-left: auto; }
    .bs-burger { margin-left: 0; }
    .bs-cart { padding: 10px; min-width: 44px; min-height: 44px; justify-content: center; }
    .bs-cart__count { position: absolute; top: 2px; right: 0; min-width: 1.15rem; height: 1.15rem; font-size: 0.65rem; }
}

.bs-mobile__account {
    display: block;
    margin-top: 0.75rem;
    padding: 0.85rem 0;
    color: var(--bs-brand, #e9590c);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
}

/* --- Shared shell -------------------------------------------------------- */

.woocommerce-account .woocommerce {
    width: min(var(--bs-column), 100% - (var(--bs-gutter) * 2));
    margin-inline: auto;
    padding-block: 3rem 4rem;
}

.woocommerce-account .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 1.5rem;
}

/* --- Signed out: two cards, sign in and join ----------------------------- */

.woocommerce-account .u-columns.col2-set {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}

.woocommerce-account .u-column1,
.woocommerce-account .u-column2 {
    width: auto;
    float: none;
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid rgb(15 23 42 / 0.1);
    background: #fff;
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.05);
}

.woocommerce-account .u-column1 h2,
.woocommerce-account .u-column2 h2 {
    margin: 0 0 1.25rem;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

/* --- Signed in: a rail and a panel --------------------------------------- */

.woocommerce-account.logged-in .woocommerce {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: 15rem minmax(0, 1fr);
    align-items: start;
}

@media (max-width: 860px) {
    .woocommerce-account.logged-in .woocommerce {
        grid-template-columns: minmax(0, 1fr);
    }
}

.woocommerce-MyAccount-navigation {
    width: auto;
    float: none;
    padding: 0.75rem;
    border-radius: 18px;
    border: 1px solid rgb(15 23 42 / 0.1);
    background: #fff;
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.05);
}

.woocommerce-MyAccount-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

/*
 * Blocksy already styles the active and hovered link, and it does so through
 * two custom properties. Filling those in is a smaller thing to maintain than
 * a rule written to out-specify theirs -- and it keeps working if they change
 * the selector.
 */
.woocommerce-account {
    --account-nav-background-active-color: #e9590c;
    --account-nav-text-active-color: #ffffff;
}

.woocommerce-MyAccount-content {
    width: auto;
    float: none;
    padding: 2rem;
    border-radius: 18px;
    border: 1px solid rgb(15 23 42 / 0.1);
    background: #fff;
    box-shadow: 0 10px 30px rgb(15 23 42 / 0.05);
}

.woocommerce-MyAccount-content > p:first-child { margin-top: 0; }

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

/* --- Forms --------------------------------------------------------------- */

.woocommerce-account .woocommerce-form-row { margin-bottom: 1rem; }

.woocommerce-account label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.woocommerce-account input[type='text'],
.woocommerce-account input[type='email'],
.woocommerce-account input[type='tel'],
.woocommerce-account input[type='password'],
.woocommerce-account select {
    width: 100%;
    height: 3rem;
    padding: 0 1rem;
    border-radius: 12px;
    border: 1px solid rgb(15 23 42 / 0.18);
    background: #fff;
    font-size: 0.95rem;
}

.woocommerce-account input:focus,
.woocommerce-account select:focus {
    outline: none;
    border-color: #e9590c;
    box-shadow: 0 0 0 3px rgb(233 89 12 / 0.15);
}

.woocommerce-account .button,
.woocommerce-account button[type='submit'] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0 1.75rem;
    border: 0;
    border-radius: 999px;
    background: #e9590c;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.woocommerce-account .button:hover,
.woocommerce-account button[type='submit']:hover { filter: brightness(1.07); color: #fff; }

.woocommerce-account .woocommerce-form-login__rememberme {
    font-weight: 500;
    color: #64748b;
}

.woocommerce-account .lost_password { margin-top: 1rem; font-size: 0.85rem; }

/* --- Tables: orders, and the saved designs endpoint ---------------------- */

.woocommerce-account table.shop_table {
    width: 100%;
    border: 0;
    border-collapse: collapse;
}

.woocommerce-account table.shop_table thead th {
    padding: 0 0 0.6rem;
    border-bottom: 1px solid rgb(15 23 42 / 0.12);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    text-align: left;
}

.woocommerce-account table.shop_table tbody td {
    padding: 0.9rem 0;
    border-bottom: 1px solid rgb(15 23 42 / 0.07);
    font-size: 0.92rem;
    vertical-align: middle;
}

.woocommerce-account table.shop_table tbody tr:last-child td { border-bottom: 0; }

.woocommerce-account table.shop_table .button {
    min-height: 2.25rem;
    padding: 0 1rem;
    font-size: 0.8rem;
}

/* Saved designs: one clear action, one quiet one. */
.bs-design-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: flex-end;
}

.bs-design-delete {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: none;
}

.bs-design-delete:hover { color: #b32d2e; text-decoration: underline; }
