* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #242424;
    background: #f7f5f0;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }

.topbar {
    background: var(--accent-dark);
    color: #fff;
    text-align: center;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
}
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #e6e1d7;
}
.header-inner {
    max-width: 1240px;
    min-height: 82px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: auto 1fr minmax(220px, 320px) auto;
    align-items: center;
    gap: 22px;
}
.brand { display: grid; gap: 3px; }
.brand-mark {
    color: var(--accent);
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
}
.brand-payoff { font-size: 12px; color: #6b655d; }
.main-nav { display: flex; justify-content: center; gap: 22px; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.main-nav a:hover, .text-link:hover { color: var(--accent); }
.search-form {
    display: flex;
    border: 1px solid #ded8cc;
    background: #fff;
    height: 42px;
}
.search-form input {
    min-width: 0;
    width: 100%;
    border: 0;
    padding: 0 12px;
    outline: 0;
}
.search-form button {
    width: 44px;
    border: 0;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}
.search-form svg { width: 20px; height: 20px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; }
.header-actions { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 700; }
.cart-link { background: #1f1f1f; color: #fff; padding: 12px 15px; }
.cart-link span { color: #fff; }
.icon-button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.mobile-menu-toggle { display: none; width: 40px; height: 40px; }
.mobile-menu-toggle span { display: block; height: 2px; background: #222; margin: 6px 4px; }

.hero-slider {
    min-height: 470px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(26,37,27,.88), rgba(26,37,27,.4)),
        radial-gradient(circle at 78% 20%, rgba(255,255,255,.23), transparent 27%),
        linear-gradient(135deg, #476a36, #c9b56d 52%, #f4efe5);
}
.hero-slide {
    display: none;
    min-height: 470px;
    max-width: 1240px;
    margin: 0 auto;
    padding: 70px 24px;
    align-items: center;
}
.hero-slide.is-active { display: flex; }
.hero-copy { max-width: 540px; color: #fff; }
.hero-copy p, .eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}
.hero-copy p { color: #f5db81; }
.hero-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: .95;
    letter-spacing: 0;
}
.hero-copy span { display: block; max-width: 420px; margin-bottom: 28px; font-size: 20px; line-height: 1.45; }
.slider-dots { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 8px; }
.slider-dots button { width: 34px; height: 4px; border: 0; background: rgba(255,255,255,.45); cursor: pointer; }
.slider-dots button.active { background: #fff; }

.section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 56px 24px 0;
}
.intro-section {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 40px;
    align-items: end;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
.section h2, .intro-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}
.intro-section > p { margin: 0; color: #625e56; font-size: 18px; line-height: 1.65; }
.section-head {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: end;
    margin-bottom: 22px;
}
.text-link { color: #2d2d2d; font-weight: 800; text-decoration: underline; text-underline-offset: 5px; }
.category-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.category-strip a {
    min-width: 210px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e3ded4;
    font-weight: 900;
}
.category-strip a.active { border-color: var(--accent); box-shadow: inset 0 -4px 0 var(--accent); }
.category-strip small { display: block; margin-top: 5px; color: #777; font-weight: 600; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}
.product-card { background: #fff; border: 1px solid #e4ded2; display: flex; flex-direction: column; min-width: 0; }
.product-media { position: relative; aspect-ratio: 1 / 1; background: #eee9df; overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.product-card:hover .product-media img { transform: scale(1.04); }
.badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 900; }
.badge.danger { background: #a53b32; }
.product-body { padding: 16px; display: grid; gap: 10px; flex: 1; }
.product-cat, .sku { margin: 0; color: #777; font-size: 12px; }
.product-body h3 { margin: 0; font-size: 16px; line-height: 1.35; min-height: 44px; }
.product-body h3 a:hover { color: var(--accent); }
.price { color: #1f1f1f; font-size: 18px; font-weight: 900; }
.price del { color: #8f8a82; font-weight: 600; margin-right: 6px; }
.price ins { color: var(--accent); text-decoration: none; }
.price.big { font-size: 32px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.button.ghost { background: #fff; color: #222; border-color: #222; }
.button.disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; }
.button.full { width: 100%; }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.news-card { background: #fff; border-top: 4px solid var(--accent); padding: 22px; }
.news-card time { color: #777; font-size: 13px; font-weight: 800; }
.news-card h3 { margin: 10px 0; line-height: 1.25; }
.news-card p, .muted { color: #68635b; line-height: 1.55; }
.empty-state { background: #fff; border: 1px dashed #d8d0c2; padding: 48px; text-align: center; }
.catalog-loader {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #68635b;
    font-weight: 800;
}
.catalog-loader[hidden] { display: none; }
.catalog-loader span {
    width: 24px;
    height: 24px;
    border: 3px solid #d8d0c2;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
.catalog-loader p { margin: 0; }
.catalog-sentinel { height: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.breadcrumbs { display: flex; gap: 9px; color: #746f67; margin-bottom: 22px; font-size: 14px; }
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr); gap: 42px; align-items: start; }
.main-image { background: #fff; border: 1px solid #e4ded2; aspect-ratio: 1 / 1; }
.main-image img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.thumbs button { width: 82px; height: 82px; border: 1px solid #d8d0c2; background: #fff; padding: 0; cursor: pointer; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { background: #fff; border: 1px solid #e4ded2; padding: 32px; }
.product-info h1 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; }
.availability { display: inline-flex; padding: 7px 10px; margin: 0 0 20px; font-weight: 900; }
.availability.ok { background: #e8f2e3; color: #2f6d2e; }
.availability.ko { background: #f5e5e1; color: #9d3129; }
.select-label { display: block; margin: 8px 0; font-weight: 900; }
select, .buy-row input {
    border: 1px solid #d8d0c2;
    background: #fff;
    min-height: 46px;
    padding: 0 12px;
}
select { width: 100%; margin-bottom: 18px; }
.short-description { color: #4f4a43; line-height: 1.6; }
.buy-row { display: flex; gap: 12px; margin-top: 24px; }
.buy-row input { width: 82px; }
.description-panel { margin-top: 34px; background: #fff; border: 1px solid #e4ded2; padding: 30px; line-height: 1.65; }

.site-footer { margin-top: 70px; background: #242421; color: #fff; }
.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
}
.footer-grid h2, .footer-grid h3 { margin: 0 0 14px; }
.footer-grid p { color: #cbc6bd; line-height: 1.6; }
.footer-grid a { display: block; color: #e8e2d8; margin: 8px 0; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.14);
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #c9c3ba;
    font-size: 13px;
}

.cart-drawer { position: fixed; inset: 0; z-index: 40; display: none; }
.cart-drawer.open { display: block; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.cart-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: #fff; padding: 22px; display: flex; flex-direction: column; }
.cart-head, .cart-total, .cart-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.cart-items { flex: 1; overflow: auto; padding: 18px 0; }
.cart-item { border-bottom: 1px solid #ece6dc; padding: 12px 0; }
.cart-item img { width: 58px; height: 58px; object-fit: cover; background: #eee9df; }
.cart-item strong { display: block; font-size: 14px; }
.cart-item button { border: 0; background: transparent; color: #9d3129; cursor: pointer; }
.cart-total { border-top: 1px solid #ece6dc; padding: 18px 0; font-size: 18px; }

@media (max-width: 980px) {
    .header-inner { grid-template-columns: auto 1fr auto; }
    .mobile-menu-toggle { display: block; justify-self: end; }
    .main-nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }
    .main-nav.open { display: flex; }
    .search-form { grid-column: 1 / -1; }
    .header-actions { justify-self: end; }
    .header-link { display: none; }
    .intro-section, .product-layout { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
}
@media (max-width: 620px) {
    .header-inner { padding: 0 16px; gap: 12px; }
    .brand-mark { font-size: 27px; }
    .hero-slide { min-height: 410px; padding: 54px 18px; }
    .hero-copy span { font-size: 17px; }
    .section { padding: 42px 16px 0; }
    .section-head { display: block; }
    .product-grid { grid-template-columns: 1fr; }
    .product-info, .description-panel, .empty-state { padding: 22px; }
    .buy-row { flex-direction: column; }
    .buy-row input { width: 100%; }
}
