:root {
    --black: #000000;
    --white: #FFFFFF;
    --gray-bg: #F5F5F5;
    --gray-light: #EEEEEE;
    --gray-text: #555555;
    --gray-border: #DDDDDD;
    --font: 'Montserrat', Helvetica, Arial, sans-serif;
    --container: 1200px;
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--white);
    color: var(--black);
    line-height: 1.5;
    font-size: 15px;
    font-weight: 400;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* ── Ticker ── */
.ticker {
    background: var(--black);
    color: var(--white);
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ticker__track {
    display: flex;
    animation: ticker 30s linear infinite;
}

.ticker__track span { padding-right: 0; flex-shrink: 0; }

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ── Marquee ── */
.marquee {
    overflow: hidden;
    padding: 18px 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.marquee--black {
    background: var(--black);
    color: var(--white);
}

.marquee__track {
    display: flex;
    animation: ticker 25s linear infinite;
    white-space: nowrap;
}

.marquee__track span { flex-shrink: 0; padding-right: 0; }

/* ── Header ── */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: clamp(8px, 1.5vw, 24px);
    flex-wrap: nowrap;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.logo {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);
    font-weight: 700;
    font-size: clamp(11px, 1.1vw, 13px);
    letter-spacing: 0.12em;
    flex: 0 1 auto;
    min-width: 0;
    max-width: clamp(140px, 22vw, 220px);
    overflow: hidden;
}

.logo__mark {
    width: 36px;
    height: 36px;
    max-width: 36px;
    max-height: 36px;
    flex: 0 0 36px;
    background: var(--black);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
}

.logo__mark img,
img.logo__mark {
    width: 36px !important;
    height: 36px !important;
    max-width: 36px;
    max-height: 36px;
    min-width: 0;
    object-fit: cover;
    display: block;
    background: var(--white);
}

.logo__text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.nav { display: flex; gap: clamp(10px, 1.8vw, 32px); min-width: 0; flex-shrink: 1; }
.nav a {
    font-size: clamp(12px, 1.05vw, 14px);
    font-weight: 500;
    transition: opacity var(--transition);
    white-space: nowrap;
}
.nav a:hover { opacity: 0.6; }

.header__actions { display: flex; align-items: center; gap: clamp(6px, 1.2vw, 20px); min-width: 0; flex-shrink: 1; }
.header-link { font-size: clamp(12px, 1.05vw, 14px); font-weight: 500; white-space: nowrap; }

.search-form { position: relative; min-width: 0; flex-shrink: 1; }
.search-form input {
    border: 1px solid var(--gray-border);
    padding: 8px 14px;
    font-family: var(--font);
    font-size: 13px;
    width: clamp(100px, 12vw, 160px);
    max-width: 100%;
    background: var(--white);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-border);
    display: none;
    z-index: 50;
}
.search-suggestions.visible { display: block; }
.search-suggestions div {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
}
.search-suggestions div:hover { background: var(--gray-bg); }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity var(--transition);
    text-align: center;
}

.btn:hover { opacity: 0.85; }

.btn--black {
    background: var(--black);
    color: var(--white);
    border-radius: 12px;
}

.btn--outline {
    background: var(--gray-bg);
    color: var(--black);
    border: 1px solid var(--black);
}

.btn--full { width: 100%; }
.btn--half { flex: 1; }
.btn--sm { padding: 8px 20px; font-size: 13px; border-radius: 8px; }

/* ── Hero ── */
.hero {
    position: relative;
    background: var(--gray-bg);
    min-height: 520px;
    overflow: hidden;
}

.hero__slides { position: relative; height: 520px; }

.hero__slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.hero__slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero__content {
    padding: 60px 0 60px 60px;
}

.hero__content h1 {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 32px;
}

.hero__image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 20px;
}

.hero__image img {
    max-height: 480px;
    width: auto;
    object-fit: contain;
}

.hero__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.7);
    color: var(--gray-text);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }

.hero__dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.hero__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    padding: 0;
}

.hero__dot.active { background: var(--black); }

/* ── Products Grid ── */
.products-section { padding: 48px 0 64px; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    text-align: center;
}

.product-card__image {
    position: relative;
    background: var(--gray-bg);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
}

/* ── Product card mini slider (catalog cards) ── */
.product-card__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-card__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.product-card__slide.active {
    opacity: 1;
    pointer-events: auto;
}

.product-card__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: var(--black);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
    padding: 0;
}

.product-card__slides:hover .product-card__arrow { opacity: 1; }

.product-card__arrow--prev { left: 8px; }
.product-card__arrow--next { right: 8px; }

.product-card__arrow:hover { background: var(--white); }

.product-card__dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.product-card__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
    transition: background var(--transition);
}

.product-card__dot.active { background: var(--black); }

.product-card__title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-card__desc {
    font-size: 12px;
    color: var(--gray-text);
    margin-bottom: 12px;
    line-height: 1.5;
    min-height: 36px;
}

.product-card .btn--outline { margin-bottom: 8px; border-radius: 0; padding: 12px; }

.product-card__market {
    display: flex;
    gap: 8px;
}

.product-card__market .btn--black {
    border-radius: 0;
    padding: 12px 8px;
    font-size: 13px;
}

/* ── Promo Block ── */
.promo-block {
    padding: 64px 0;
    background: var(--white);
}

.promo-block__inner h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.35;
    max-width: 700px;
}

/* ── Ingredients / Accordion ── */
.ingredients-section {
    padding: 64px 0;
    background: var(--white);
}

.ingredients-section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.ingredients-section__text h2 {
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 20px;
}

.ingredients-section__text p {
    color: var(--gray-text);
    font-size: 14px;
    line-height: 1.7;
}

.accordion__item { border-bottom: 1px solid var(--gray-light); }

.accordion__header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.accordion__icon {
    font-size: 20px;
    font-weight: 400;
    transition: transform var(--transition);
}

.accordion__item.open .accordion__icon { transform: rotate(45deg); }

.accordion__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 13px;
    color: var(--gray-text);
    line-height: 1.6;
}

.accordion__item.open .accordion__body {
    max-height: 200px;
    padding-bottom: 16px;
}

/* ── How-to ── */
.howto-section { background: var(--white); }
.howto-section__img { width: 100%; }

/* ── Product Page ── */
.product-hero { padding: 48px 0; }

.product-hero__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.product-hero__image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--gray-bg);
    min-height: 480px;
    overflow: hidden;
}

.product-hero__image img {
    max-height: 420px;
    max-width: 100%;
    width: auto;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
    object-fit: contain;
}

/* ── Product gallery (detail page) ── */
.product-gallery {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.product-gallery__main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--gray-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-gallery__slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 32px;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.product-gallery__slide.active {
    opacity: 1;
    pointer-events: auto;
}

.product-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: var(--black);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background var(--transition);
}

.product-gallery__arrow:hover { background: var(--white); }

.product-gallery__arrow--prev { left: 12px; }
.product-gallery__arrow--next { right: 12px; }

.product-gallery__thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.product-gallery__thumb {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    background: var(--gray-bg);
    cursor: pointer;
    overflow: hidden;
    transition: border-color var(--transition);
}

.product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery__thumb.active {
    border-color: var(--black);
}

.product-hero__info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-hero__subtitle {
    font-size: 14px;
    color: var(--gray-text);
    margin-bottom: 4px;
}

.product-hero__pack {
    font-size: 14px;
    margin-bottom: 24px;
}

.product-specs {
    list-style: none;
    margin-bottom: 24px;
}

.product-specs li {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.product-specs strong { font-weight: 700; }

.product-hero__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.product-hero__buttons .btn--black { border-radius: 8px; }

.product-hero__shop {
    border-top: 1px solid var(--gray-light);
    padding-top: 20px;
}

.product-hero__price {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.product-hero__price s {
    color: var(--gray-text);
    font-size: 1rem;
    margin-right: 8px;
}

/* ── Catalog ── */
.catalog-page { padding: 48px 0 64px; }
.catalog-page .container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 48px;
}

.catalog-filters h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.catalog-filters ul { list-style: none; }
.catalog-filters a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-text);
}
.catalog-filters a.active,
.catalog-filters a:hover { color: var(--black); font-weight: 600; }

.products-grid--catalog { grid-template-columns: repeat(3, 1fr); }

/* ── Reviews ── */
.reviews-section { padding: 48px 0 64px; border-top: 1px solid var(--gray-light); }
.section-heading { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; }
.review-item { padding: 16px 0; border-bottom: 1px solid var(--gray-light); }
.review-stars { color: var(--black); margin-bottom: 8px; letter-spacing: 2px; }

/* ── Page layouts (cart, auth, account) ── */
.page-section {
    padding: 64px 0;
    min-height: 50vh;
}

.page-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 32px;
}

.page-narrow { max-width: 480px; margin: 0 auto; }

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-border);
    font-family: var(--font);
    font-size: 14px;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--black);
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--gray-light);
}

.auth-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.auth-tab.active { border-bottom-color: var(--black); }

.oauth-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ── Tables ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    font-size: 14px;
}

.data-table th {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-total {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 24px 0;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px;
    color: var(--gray-text);
}

/* ── Admin ── */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.admin-card {
    border: 1px solid var(--gray-light);
    padding: 24px;
}

.admin-card h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-nav {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--gray-light);
}

.account-nav button {
    padding: 12px 24px;
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.account-nav button.active { border-bottom-color: var(--black); }

.order-card {
    border: 1px solid var(--gray-light);
    padding: 20px;
    margin-bottom: 12px;
}

.success-page {
    text-align: center;
    padding: 80px 0;
}

.success-page h1 { margin-bottom: 16px; }
.success-page p { color: var(--gray-text); margin-bottom: 24px; }

/* ── Footer ── */
.footer {
    background: var(--white);
    padding: 40px 0 48px;
    border-top: 1px solid var(--gray-light);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer__brand {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.footer__text { font-size: 13px; color: var(--gray-text); }

.footer__links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer__links a {
    font-size: 13px;
    font-weight: 500;
    transition: opacity var(--transition);
}

.footer__links a:hover { opacity: 0.6; }

/* ── Lazy load ── */
.lazy.loaded { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .container { padding: 0 24px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .products-grid--catalog { grid-template-columns: repeat(2, 1fr); }
    .hero__slide { grid-template-columns: 1fr; }
    .hero__content { padding: 40px 32px 20px; }
    .hero__image { max-height: 300px; }
    .ingredients-section__grid { grid-template-columns: 1fr; gap: 32px; }
    .product-hero__grid { grid-template-columns: 1fr; }
    .catalog-page .container { grid-template-columns: 1fr; }
    .search-form input { width: 130px; }
}

@media (max-width: 860px) {
    .header__actions .search-form { display: none; }
    .header__actions { gap: 12px; }
    .header-link { font-size: 13px; }
}

@media (max-width: 720px) {
    .nav { display: none; }
}

@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .header__inner { gap: 8px; min-height: 56px; }
    .logo__mark { width: 30px; height: 30px; }
    .products-grid,
    .products-grid--catalog { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .marquee { font-size: 20px; }
    .header__actions { gap: 8px; }
    .header__actions .btn--sm { padding: 6px 14px; font-size: 12px; }
}

/* ── Admin UI ── */
.header-link--admin {
    color: var(--black);
    border: 1px solid var(--black);
    background: var(--white);
    text-decoration: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.header-link--admin:hover { background: var(--black); color: var(--white); }

.admin-toolbar-strip {
    background: #fff8e1;
    border-bottom: 2px solid #f0c000;
    padding: 10px 0;
}
.admin-toolbar-strip__label {
    font-size: 12px;
    color: #8a6d00;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-right: 16px;
}
.admin-toolbar-strip .container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-badge.status-active, .status-badge.status-admin, .status-badge.status-seller { background: #d1f4d8; color: #14532d; }
.status-badge.status-pending, .status-badge.status-draft { background: #fef3c7; color: #92400e; }
.status-badge.status-rejected, .status-badge.status-customer { background: #fee2e2; color: #991b1b; }
