/* =========================================================
   MYCO base stylesheet — header, menu, messages, footer
   Fonts: Cormorant (headings) · Instrument Sans (body/labels)
   ========================================================= */

@import url('fonts/cormorant.css');
@import url('fonts/instrument-sans.css');

/* ── Tokens ────────────────────────────────────────────── */
:root {
    /* Base palette */
    --lp-cream:       #e6dfd4;
    --lp-dark:        #1c1917;
    --lp-cat-odd-bg:  #ffffff;
    --lp-cat-even-bg: #ffffff;
    --lp-cat-fg:      #000000;
    --lp-bs-bg:       #1c1917;
    --lp-bs-fg:       var(--lp-cream);

    /* Semantic tokens */
    --lp-on-dark:     #ffffff;
    --lp-border:      rgba(28, 25, 23, 0.12);
    --lp-border-dark: rgba(230, 223, 212, 0.10);
    --lp-muted:       rgba(28, 25, 23, 0.50);
    --lp-muted-dark:  rgba(230, 223, 212, 0.50);
    --lp-card-bg:     rgba(255, 255, 255, 0.06);
    --lp-overlay:     rgba(0, 0, 0, 0.40);
    --lp-shadow:      rgba(0, 0, 0, 0.08);

    --lp-font-display: 'Cormorant', Georgia, serif;
    --lp-font-ui:      'Instrument Sans', system-ui, sans-serif;

    --lp-header-h:   72px;
    --lp-radius:     2px;
    --lp-solid-header-bg: var(--lp-cream);
    --lp-transition: 0.25s ease;
    --lp-max:        1440px;
}

/* ── Accessibility ─────────────────────────────────────── */
.lp-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;
}

/* ── Reset / base ──────────────────────────────────────── */
body { margin: 0; padding: 0; }

.lp *,
.lp *::before,
.lp *::after { box-sizing: border-box; margin: 0; padding: 0; }

.lp {
    background: var(--lp-cream);
    color: var(--lp-dark);
    font-family: var(--lp-font-ui);
    font-size: 1rem;
    line-height: 1.55;
    overflow-x: hidden;
}

/* ── Header ────────────────────────────────────────────── */
.lp-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--lp-header-h);
    transition: background var(--lp-transition), box-shadow var(--lp-transition);
}

.lp-header.is-solid {
    background: var(--lp-solid-header-bg);
    box-shadow: 0 1px 0 var(--lp-shadow);
}

.lp-header__inner {
    max-width: var(--lp-max);
    margin: 0 auto;
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lp-header__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.lp-header__wordmark {
    font-family: var(--lp-font-ui);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--lp-dark);
}

.lp-header__nav {
    display: flex;
    gap: 2rem;
    margin-left: auto;
    align-items: center;
}

.lp-header__nav a {
    font-family: var(--lp-font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--lp-dark);
    transition: color var(--lp-transition), opacity var(--lp-transition);
}

.lp-header__nav a:hover { opacity: 0.65; }

.lp-header.is-solid .lp-header__nav-selected {
    border-bottom: 1.5px solid var(--lp-dark);
    padding-bottom: 1px;
    opacity: 1;
}

.lp-header__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.lp-header__basket {
    position: relative;
    color: var(--lp-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.lp-header__basket-count {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--lp-dark);
    color: var(--lp-cream);
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.lp-header__account {
    font-family: var(--lp-font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--lp-dark);
    letter-spacing: 0.03em;
}

.lp-header__logout {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.lp-header__menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 28px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
}

.lp-header__menu-btn span {
    display: block;
    height: 2px;
    background: var(--lp-dark);
    border-radius: 1px;
    transition: background var(--lp-transition);
}

/* White text only on hero pages before scrolling to solid */
.lp-header--hero:not(.is-solid) .lp-header__wordmark { color: var(--lp-on-dark); }
.lp-header--hero:not(.is-solid) .lp-header__nav a { color: var(--lp-on-dark); }
.lp-header--hero:not(.is-solid) .lp-header__nav a:hover { color: var(--lp-cream); opacity: 1; }
.lp-header--hero:not(.is-solid) .lp-header__basket { color: var(--lp-on-dark); }
.lp-header--hero:not(.is-solid) .lp-header__account { color: var(--lp-on-dark); }
.lp-header--hero:not(.is-solid) .lp-header__menu-btn span { background: var(--lp-on-dark); }

/* ── Mobile menu ───────────────────────────────────────── */
.lp-menu {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border: none;
    padding: 0;
    z-index: 200;
    background: var(--lp-cream);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.lp-menu.is-open { transform: translateX(0); }

.lp-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: var(--lp-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lp-menu-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.lp-menu__inner {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lp-menu__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.lp-menu__brand {
    font-family: var(--lp-font-ui);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: var(--lp-dark);
}

.lp-menu__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--lp-dark);
    padding: 4px;
}

.lp-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.lp-menu__nav a,
.lp-menu__nav-btn {
    font-family: var(--lp-font-display);
    font-size: 2rem;
    font-weight: 400;
    text-decoration: none;
    color: var(--lp-dark);
    line-height: 1.2;
    transition: opacity var(--lp-transition);
}

.lp-menu__nav a:hover,
.lp-menu__nav-btn:hover { opacity: 0.6; }

.lp-menu__nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: left;
}

/* ── Flash messages ────────────────────────────────────── */
.lp-messages {
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: var(--lp-max);
    margin: 1.5rem auto 0;
}

.lp-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--lp-radius);
    font-family: var(--lp-font-ui);
    font-size: 0.9rem;
}

.lp-message--info    { background: #e8f4fd; color: #1a4a6e; }
.lp-message--success { background: #e8f7ee; color: #1a4e30; }
.lp-message--warning { background: #fdf6e3; color: #6b4c00; }
.lp-message--error   { background: #fdecea; color: #6b1a1a; }

.lp-message__close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    color: inherit;
    opacity: 0.6;
    flex-shrink: 0;
}

.lp-message__close:hover { opacity: 1; }

/* ── Shop / quick-add button (shared) ─────────────────── */
.lp-shop-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: #ffffff;
    color: #000000;
    border: none;
    cursor: pointer;
    font-family: var(--lp-font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
    text-decoration: none;
}

.lp-shop-btn svg {
    width: 22px;
    height: 11px;
    flex-shrink: 0;
}

/* ── Footer ────────────────────────────────────────────── */
.lp-footer {
    background-color: var(--lp-dark);
    color: var(--lp-cream);
    padding-top: 4rem;
}

.lp-footer__inner {
    max-width: var(--lp-max);
    margin: 0 auto;
    padding: 0 2rem 3rem;
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.lp-footer__heading {
    font-family: var(--lp-font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lp-muted-dark);
    margin-bottom: 1.25rem;
}

.lp-footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lp-footer__links a {
    font-family: var(--lp-font-ui);
    font-size: 0.9375rem;
    color: var(--lp-cream);
    text-decoration: none;
    transition: opacity var(--lp-transition);
}

.lp-footer__links a:hover { opacity: 0.6; }

.lp-footer__col--brand {
    margin-left: auto;
    text-align: right;
}

.lp-footer__brand-name {
    display: block;
    font-family: var(--lp-font-ui);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.15em;
    margin-bottom: 0.4rem;
    color: var(--lp-cream);
}

.lp-footer__tagline {
    font-size: 0.8125rem;
    color: var(--lp-muted-dark);
}

.lp-footer__bottom {
    border-top: 1px solid var(--lp-border-dark);
    padding: 1.25rem 2rem;
    max-width: var(--lp-max);
    margin: 0 auto;
}

.lp-footer__bottom p {
    font-size: 0.75rem;
    color: var(--lp-muted-dark);
    margin: 0;
}

/* ── Visibility utilities ──────────────────────────────── */
@media (max-width: 640px) {
    .desktop-only { display: none; }
}

@media (min-width: 641px) {
    .mobile-only  { display: none; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
    :root {
        --lp-header-h: 60px;
    }

    .lp-header__nav,
    .lp-header__account { display: none; }

    .lp-header__menu-btn { display: flex; }
    .lp-header__actions { margin-left: auto; }

    .lp-footer__inner { flex-direction: column; gap: 2rem; padding: 0 1.25rem 2.5rem; }
    .lp-footer__col--brand { margin-left: 0; text-align: left; }
    .lp-footer__bottom { padding: 1rem 1.25rem; }
}
