/* Przio — flat, editorial retail UI */

:root {
    --paper: #f3efe8;
    --paper-2: #ebe4da;
    --ink: #1f1f1f;
    --muted: #5c5854;
    --line: #d6cfc5;
    --accent: #b54b2c;
    --accent-ink: #fff8f3;
    --card: #fffdf9;
    --shadow: 0 1px 0 rgba(31, 31, 31, 0.06);
    --radius: 10px;
    --font-sans: "DM Sans", system-ui, sans-serif;
    --font-display: "Fraunces", Georgia, serif;
    --max: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent);
}

.shell {
    width: min(100% - 2.5rem, var(--max));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--ink);
    color: var(--accent-ink);
    z-index: 100;
}

.skip-link:focus {
    left: 0.5rem;
}

/* Header */

.site-header {
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0;
}

.logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav a {
    text-decoration: none;
}

.nav a:hover {
    text-decoration: underline;
}

.header-actions {
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    justify-content: flex-end;
}

.header-user {
    font-size: 0.88rem;
    color: var(--muted);
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

@media (min-width: 720px) {
    .header-user {
        display: inline-block;
    }
}

.nav-account {
    font-size: 0.92rem;
    text-decoration: none;
    font-weight: 600;
}

.nav-account:hover {
    text-decoration: underline;
}

.btn-small {
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
}

.btn-header-register {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-header-register:hover {
    background: var(--accent);
    color: var(--accent-ink);
}

.cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper);
}

.cart-link:hover {
    border-color: var(--accent);
}

.cart-badge {
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.75rem;
    min-width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 0.35rem;
}

/* Hero */

.hero {
    padding: 3rem 0 2.25rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 65%);
}

.hero-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 820px) {
    .hero-grid {
        grid-template-columns: 2fr 1fr;
        align-items: end;
    }
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    max-width: 22ch;
}

.hero-lede {
    margin: 0;
    color: var(--muted);
    max-width: 52ch;
    font-size: 1.05rem;
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    min-height: 120px;
}

.hero-panel-inner {
    padding: 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-kicker {
    font-size: 0.8rem;
    color: var(--muted);
}

.hero-stat {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
}

/* Catalog */

.catalog {
    padding: 2.5rem 0 4rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.label-text {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.search-field input,
.select-field select,
.qty-field input {
    font: inherit;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    min-width: 12rem;
}

.search-field input {
    min-width: min(100%, 22rem);
}

.select-field select {
    cursor: pointer;
}

.product-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.product-card {
    border-radius: var(--radius);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
    border-color: #c9bfb2;
    transform: translateY(-2px);
}

.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.product-thumb {
    aspect-ratio: 1;
    background: var(--paper-2);
    overflow: hidden;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb-fallback {
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        -45deg,
        var(--paper-2),
        var(--paper-2) 10px,
        #e3dcd3 10px,
        #e3dcd3 20px
    );
}

.product-card-body {
    padding: 1rem 1.05rem 1.15rem;
}

.product-cat {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.product-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.product-price {
    margin: 0;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.product-price.large {
    font-size: 1.65rem;
    margin-bottom: 1rem;
}

.empty-state {
    color: var(--muted);
    margin-top: 2rem;
}

/* Product detail */

.section {
    padding: 2.5rem 0 4rem;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
}

.product-detail-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 880px) {
    .product-detail-grid {
        grid-template-columns: 1.1fr 1fr;
        align-items: start;
    }
}

.product-hero-img,
.product-hero-fallback {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    width: 100%;
    background: var(--paper-2);
}

.product-hero-fallback {
    aspect-ratio: 1;
    background: repeating-linear-gradient(
        45deg,
        var(--paper-2),
        var(--paper-2) 14px,
        #e5ddd4 14px,
        #e5ddd4 28px
    );
}

.product-detail-title {
    margin-bottom: 0.35rem;
}

.prose {
    margin: 0 0 1.25rem;
    color: var(--muted);
    max-width: 52ch;
}

.add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
}

.qty-field input {
    width: 5rem;
}

.fine-print {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 1.25rem;
}

.narrow {
    max-width: 560px;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 1.15rem;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
}

.btn:hover {
    border-color: #b8aea3;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}

.btn-primary:hover {
    filter: brightness(1.05);
    color: var(--accent-ink);
}

.btn-ghost {
    background: transparent;
}

.btn-text {
    border: none;
    background: none;
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
}

.btn-text:hover {
    color: var(--ink);
}

/* Cart */

.cart-form {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-table th,
.cart-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.cart-table thead {
    background: var(--paper-2);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.cart-table tbody tr:last-child td {
    border-bottom: none;
}

.cart-item-inner {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}

.cart-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    flex-shrink: 0;
    background: var(--paper-2);
}

.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-thumb-fallback {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--paper-2);
}

.cart-item-name {
    font-weight: 600;
    text-decoration: none;
}

.cart-item-meta {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.cart-qty-input {
    width: 4rem;
    font: inherit;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--line);
}

.cart-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
}

.cart-total {
    margin: 0;
    font-size: 1.1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--paper-2);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
    color: var(--muted);
}

.footer-meta {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink);
}

.footer-note a {
    text-decoration: none;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* Home */

.home-hero {
    padding: 3.25rem 0 3rem;
    background: linear-gradient(135deg, var(--paper-2) 0%, var(--paper) 55%, #e8e2d8 100%);
    border-bottom: 1px solid var(--line);
}

.home-hero-inner {
    display: grid;
    gap: 2.5rem;
    align-items: end;
}

@media (min-width: 900px) {
    .home-hero-inner {
        grid-template-columns: 1.35fr 1fr;
    }
}

.home-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
    max-width: 18ch;
}

.home-hero-lede {
    margin: 0 0 1.75rem;
    color: var(--muted);
    font-size: 1.08rem;
    max-width: 42ch;
}

.home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.home-hero-aside {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--shadow);
}

.home-stats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.home-stats li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.home-stat-num {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.home-stat-label {
    font-size: 0.9rem;
    color: var(--muted);
}

.home-pillars {
    padding: 2.75rem 0;
    border-bottom: 1px solid var(--line);
}

.pillars-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .pillars-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pillar-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.pillar-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.section-tight {
    padding: 2.75rem 0;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
}

.section-link {
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.section-link:hover {
    text-decoration: underline;
}

.product-grid--featured {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.home-departments {
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.dept-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.dept-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--card);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.dept-card:hover {
    border-color: #c9bfb2;
    transform: translateY(-2px);
}

.dept-card-visual {
    aspect-ratio: 16 / 10;
    background: var(--paper-2);
    overflow: hidden;
}

.dept-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dept-card-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ddd6cc 0%, var(--paper-2) 100%);
}

.dept-card-body {
    padding: 1rem 1.1rem 1.15rem;
}

.dept-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.35rem;
}

.dept-card-meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.home-cta {
    padding: 2.75rem 0 3.5rem;
    border-top: 1px solid var(--line);
}

.home-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--card);
}

.home-cta-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    margin: 0 0 0.35rem;
}

.home-cta-text {
    margin: 0;
    color: var(--muted);
}

/* Breadcrumbs & page chrome */

.breadcrumb {
    padding: 1rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.breadcrumb a {
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.bc-sep {
    color: var(--line);
    user-select: none;
}

.bc-current {
    color: var(--ink);
    font-weight: 600;
}

.breadcrumb--inline {
    padding: 0 0 1rem;
}

.page-intro {
    padding: 0.5rem 0 1.5rem;
}

.page-intro-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.page-title--compact {
    margin-bottom: 0.35rem;
}

.page-intro-text {
    margin: 0;
    color: var(--muted);
}

/* Category page */

.category-hero {
    padding: 0.5rem 0 2rem;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 70%);
}

.category-hero-inner {
    display: grid;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 880px) {
    .category-hero-inner {
        grid-template-columns: 1.2fr 0.9fr;
    }
}

.category-lede {
    margin: 0 0 0.75rem;
    color: var(--muted);
    max-width: 48ch;
    font-size: 1.05rem;
}

.category-count {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ink);
}

.category-hero-visual {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    overflow: hidden;
    background: var(--paper-2);
    max-width: 520px;
    justify-self: end;
    width: 100%;
}

.category-hero-visual img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1;
    object-fit: cover;
}

.filters--narrow {
    max-width: 42rem;
}

.search-field--grow input {
    min-width: min(100%, 18rem);
    flex: 1;
}

.filter-summary {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.category-cross {
    border-top: 1px solid var(--line);
    padding-bottom: 3rem;
}

.category-cross-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cross-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin: 0;
}

.cross-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Auth & account */

.auth-section {
    padding-top: 1rem;
}

.auth-shell {
    max-width: 420px;
}

.auth-error {
    background: #fdecea;
    border: 1px solid #f0c9c4;
    color: #6b2e28;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.92rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.25rem;
}

.auth-field .label-text {
    margin-bottom: 0.35rem;
}

.auth-field input {
    width: 100%;
    font: inherit;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--card);
}

.auth-submit {
    margin-top: 0.25rem;
}

.auth-switch {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.account-dl {
    margin: 1.25rem 0 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem 1.25rem;
    font-size: 0.95rem;
}

.account-dl dt {
    margin: 0;
    font-weight: 600;
    color: var(--muted);
}

.account-dl dd {
    margin: 0;
}

.account-hint {
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--muted);
}

.account-code {
    font-size: 0.85rem;
    word-break: break-all;
    background: var(--paper-2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.account-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
