:root {
    --bg: #f7f5f0;
    --surface: #ffffff;
    --text: #1a1f1c;
    --muted: #5c6760;
    --line: #e2ddd4;
    --accent: #2d6a4f;
    --accent-hover: #1b4332;
    --shadow: 0 8px 30px rgba(26, 31, 28, 0.08);
    --radius: 12px;
    --font: "DM Sans", system-ui, sans-serif;
    --max: 1200px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0.85rem 1.25rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.site-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-brand:hover {
    color: var(--accent);
    text-decoration: none;
}

.site-brand-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    padding: 0.35rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px 0;
    background: var(--text);
    border-radius: 1px;
}

.site-nav {
    flex: 1;
}

.nav-root,
.nav-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
}

.nav-submenu {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 180px;
    padding: 0.35rem 0;
}

.nav-item {
    position: relative;
}

.nav-link,
.nav-summary {
    display: inline-block;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-category-link:hover {
    background: rgba(45, 106, 79, 0.08);
    color: var(--accent);
    text-decoration: none;
}

.nav-link.is-current,
.nav-category-link.is-current {
    background: rgba(45, 106, 79, 0.12);
    color: var(--accent);
}

.nav-details {
    position: relative;
}

.nav-summary {
    list-style: none;
    cursor: pointer;
}

.nav-summary::-webkit-details-marker {
    display: none;
}

.nav-summary::after {
    content: "▾";
    margin-left: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.nav-details[open] > .nav-summary::after {
    transform: rotate(180deg);
    display: inline-block;
}

.nav-category-link {
    color: inherit;
    text-decoration: none;
}

.nav-details > .nav-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 60;
}

.nav-details:hover > .nav-submenu,
.nav-details[open] > .nav-submenu {
    display: flex;
}

.nav-submenu .nav-link {
    display: block;
    white-space: nowrap;
}

.site-main {
    flex: 1;
    width: min(100%, var(--max));
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
}

.site-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.875rem;
}

.site-footer p {
    margin: 0;
    text-align: center;
}

.page-section {
    width: 100%;
}

.page-head {
    margin-bottom: 1.25rem;
}

.page-head h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.02em;
}

.page-meta {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.muted {
    color: var(--muted);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.35rem;
    color: var(--line);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(26, 31, 28, 0.12);
}

.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-card-link:hover {
    text-decoration: none;
}

.product-card-image {
    aspect-ratio: 1;
    background: #f0ede6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.product-card-placeholder {
    color: var(--muted);
    font-size: 0.85rem;
}

.product-card-title {
    margin: 0;
    padding: 0.85rem 0.9rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-link,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pagination-link {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
}

.pagination-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.pagination-current {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-gallery-main {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.product-gallery-placeholder {
    color: var(--muted);
}

.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.product-gallery-thumbs a {
    width: 64px;
    height: 64px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface);
}

.product-gallery-thumbs img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-detail-info h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    line-height: 1.25;
}

.product-detail-info .product-gtin {
    margin: 0 0 1rem;
}

.product-detail-content {
    width: 100%;
    max-width: 100%;
}

.product-offers,
.product-description {
    font-size: 0.98rem;
    line-height: 1.65;
    white-space: normal;
}

.product-offers {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.product-offers .view-offers a {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: #c1121f;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.2;
    white-space: nowrap;
}

.product-offers .view-offers a:hover {
    background: #9b0f19;
    color: #fff;
}

.product-offers:last-child,
.product-description:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

.product-gtin {
    font-size: 0.875rem;
    color: var(--muted);
}

@media (max-width: 900px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        width: 100%;
        order: 3;
    }

    .site-nav.is-open {
        display: block;
    }

    .nav-root {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-details > .nav-submenu {
        position: static;
        box-shadow: none;
        border: 0;
        border-left: 2px solid var(--line);
        margin-left: 0.75rem;
        padding-left: 0.25rem;
    }

    .nav-details:hover > .nav-submenu {
        display: flex;
    }
}
