html {
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #000 #fff;
}

/* Брутальный скроллбар и выделение текста */
::selection {
    background: #000;
    color: #fff;
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #fff;
    border-left: 1px solid #000;
}

::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    :root {
        --container-padding-x: 1rem;
    }
}

body {
    font-family: var(--font-family);
    line-height: var(--line-height);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

a {
    text-decoration: none;
    position: relative;
}

header {
    background: var(--color-header-bg);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
    max-width: var(--max-width-content);
    margin: 0 auto;
    padding: 1.25rem var(--container-padding-x);
    padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
    padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-family: var(--font-family-logo);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: var(--font-logo-spacing);
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-fast);
}

.brand-logo:hover {
    opacity: 0.85;
}

.cart-icon {
    position: relative;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
    transition: opacity var(--transition-fast);
}

.cart-icon:hover {
    opacity: 0.8;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    background: #e53935;
    color: white;
    border-radius: 0;
}

main {
    flex: 1;
    padding: var(--spacing-xl) var(--container-padding-x);
    padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
    padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
}

.hero,
.success {
    text-align: center;
    padding: 4rem 2rem;
}

/* Главный баннер */
.hero-home {
    position: relative;
    padding: 8rem var(--container-padding-x);
    background-color: var(--color-hero-bg);

    /* Индустриальная сетка на фоне (как на миллиметровке) */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;

    color: white;
    margin: 0 calc(-1 * var(--container-padding-x)) 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Огромный брутальный логотип */
.brand-logo-massive {
    font-family: var(--font-family-logo);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: var(--font-logo-spacing);
    margin: 0 0 1rem 0;
    line-height: 1;
}

/* Строгий машинописный текст под логотипом */
.hero-manifesto {
    font-family: var(--font-family-mono);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    line-height: 1.6;
    letter-spacing: 0.05em;
}

.hero h1,
.success h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-tagline {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 480px;
    margin: 0 auto 1.5rem;
    line-height: 1.7;
}


.btn-hero {
    font-size: 1rem;
    padding: 0.9rem 2rem;
}

.success-status {
    font-family: var(--font-family-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.success-order-block {
    max-width: 320px;
    margin: 0 auto 1.5rem;
    border: 1px solid var(--color-border);
    padding: 1rem 1.5rem;
    background: var(--color-bg-alt);
}

.success-order-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 1rem;
}

.success-order-row:not(:last-child) {
    border-bottom: 1px solid var(--color-border-light);
}

.success-order-label {
    color: var(--color-text-muted);
}

.success-order-value {
    font-family: var(--font-family-mono);
    font-weight: 700;
}

.success-desc {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.success-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.success-actions .btn {
    margin-top: 0;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1.5rem;
    background: #000000;
    color: #ffffff;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: 0;
    border: 1px solid #000;
    margin-top: 1rem;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #ffffff;
    color: #000000;
}

.btn-outline {
    background: transparent;
    color: #000;
    margin-left: 0.5rem;
}

.btn-outline:hover {
    background: #000;
    color: #fff;
}

button.btn {
    border: 1px solid #000;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Каталог и коллекции */
.catalog-section {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.catalog-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

.collection {
    margin-bottom: 3rem;
}

.collection-name {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.03em;
}

.collection-desc {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.collection-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.collection-link:hover {
    color: var(--color-text);
    text-decoration: underline;
}

.catalog-section-home {
    padding-top: 2rem;
}

.collection-coming {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.coming-soon-block {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-bg-muted);
    border-radius: var(--radius-md);
}

.coming-soon-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.coming-soon-desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* Карточки товаров */
.products-section {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.products-section h1 {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.products-intro {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* --- COLLECTION CAROUSEL: БРУТАЛЬНЫЙ РЕДИЗАЙН --- */

.collection-carousel {
    position: relative;
    padding: 1.5rem 0 2rem;
    background-color: #fff;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    border: 1px solid #000;
}

.carousel-container {
    overflow: hidden;
    padding-left: max(calc(var(--container-padding-x) + 1.5rem), env(safe-area-inset-left));
    padding-right: max(calc(var(--container-padding-x) + 1.5rem), env(safe-area-inset-right));
}

.collection-carousel-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.collection-carousel-track::-webkit-scrollbar {
    display: none;
}

.products-grid-carousel {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.5rem;
    padding: 0.25rem 0;
    min-width: min-content;
    flex-shrink: 0;
}

.products-grid-carousel .product-card {
    flex: 0 0 auto;
    min-width: 260px;
    max-width: 260px;
    scroll-snap-align: start;
    scroll-margin-left: calc(var(--container-padding-x) + 1.5rem);
}

.products-grid-carousel .products-empty {
    flex: 1 1 100%;
    min-width: 100%;
}

.collection-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    border-radius: 0;
    font-family: var(--font-family-mono);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 1);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
    z-index: 10;
}

.collection-carousel-btn:hover {
    background-color: #000;
    color: #fff;
    box-shadow: 3px 3px 0px rgba(0, 0, 0, 1);
}

.collection-carousel-btn:active {
    transform: translateY(-50%) translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 1);
}

.collection-carousel-btn.prev {
    left: max(var(--container-padding-x), env(safe-area-inset-left));
}

.collection-carousel-btn.next {
    right: max(var(--container-padding-x), env(safe-area-inset-right));
}

.product-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.product-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 1);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-image {
    aspect-ratio: 1;
    background: var(--color-bg-alt);
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

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

.product-info {
    padding: 1rem;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-price,
.product-detail-price,
.cart-item-price {
    font-family: var(--font-family-mono);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: var(--color-text);
}

.btn-add-cart {
    margin: 0 1rem 1rem;
}

.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem;
}

/* Страница товара */
.product-detail {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

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

@media (max-width: 640px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

.product-detail-image {
    aspect-ratio: 1;
    background: #f0f0f0;
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
}

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

.product-detail-info h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

.product-detail-price {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cart-item-price {
    font-size: 0.9rem;
}

.product-detail-description {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    white-space: pre-line;
}

.product-detail-form {
    max-width: 280px;
}

.product-size-select {
    margin-bottom: 1rem;
}

.product-size-select label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.size-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-btn {
    min-width: 48px;
    padding: 0.6rem 1rem;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.size-btn:hover {
    background: var(--color-bg-alt);
}

.size-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.product-detail-form .btn {
    margin-top: 0;
    width: 100%;
}

.product-detail-form .btn-add-cart {
    margin: 0 0 1rem 0;
}

.cart-message {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
    min-height: 1.5em;
}

.cart-message--error {
    color: #c62828;
    font-weight: 500;
}

.cart-message--success {
    color: var(--color-text);
    font-weight: 500;
}

.btn--loading {
    opacity: 0.8;
    cursor: wait;
}

.error-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.error-404-code {
    font-family: var(--font-family-mono);
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 700;
    line-height: 1;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.error-404 h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-404-desc {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.error-404 .btn {
    margin-top: 0;
}

.product-back {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.product-back:hover {
    text-decoration: underline;
}

.product-care {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.product-care-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.product-care-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.product-care-list li::before {
    content: "•";
    margin-right: 0.5rem;
    color: var(--color-text-muted);
}

footer {
    background: var(--color-footer-bg);
    margin-top: auto;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: var(--spacing-xl) var(--container-padding-x);
    padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
    padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
    padding-bottom: max(var(--spacing-xl), env(safe-area-inset-bottom));
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.footer-brand {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 0.5rem;
    padding: 0.15em 0.25em;
    margin-left: -0.25em;
    margin-right: -0.25em;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.footer-logo:hover {
    background-color: #fff;
    color: #000;
}

.footer-ip {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.25rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    padding: 0.15em 0.25em;
    margin: -0.15em -0.25em;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.footer-section a:hover {
    text-decoration: none;
    background-color: #fff;
    color: #000;
}

.footer-telegram-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #333;
    border-radius: 0;
    color: #fff;
    transition: background-color var(--transition-fast);
    margin-left: auto;
    flex-shrink: 0;
}

.footer-telegram-icon:hover {
    background: #555;
}

/* Юридические страницы */
.legal-page {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.legal-page h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.legal-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.legal-page section {
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.legal-page ul,
.legal-page ol {
    margin: 0.5rem 0 0 1.5rem;
}

.legal-page li {
    margin-bottom: 0.25rem;
}

/* Страница помощи */
.help-page {
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

.help-page h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.help-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.help-section:last-child {
    border-bottom: none;
}

.help-section h2 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.help-section p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.help-link {
    display: inline-block;
    font-size: 0.9rem;
    color: var(--color-text);
    text-decoration: none;
    margin-top: 0.5rem;
    transition: color var(--transition-fast);
}

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

.help-section + .help-section .help-link {
    margin-top: 0.75rem;
}

.help-contact-list {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
}

.help-contact-list li {
    margin-bottom: 0.25rem;
}

.help-contact-list a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
}

.help-contact-list a:hover {
    text-decoration: underline;
}

.help-legal {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-note {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.requisites-block {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

/* Корзина */
.cart-section {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.cart-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cart-empty {
    text-align: center;
    padding: 3rem;
}

.cart-empty .btn {
    margin-top: 1rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 0;
    gap: 1rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-size {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.cart-item-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cart-item-total {
    font-weight: 600;
    min-width: 80px;
    text-align: right;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 0;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color var(--transition-fast);
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-value {
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 0;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: background-color var(--transition-fast);
}

.cart-item-remove:hover {
    background: #e0e0e0;
}

.cart-summary {
    padding: 1rem 0;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.btn-checkout {
    max-width: 320px;
    text-align: center;
}

/* Оформление заказа */
.checkout-section {
    max-width: var(--max-width-content);
    margin: 0 auto;
}

.checkout-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.checkout-empty {
    text-align: center;
    padding: 3rem;
}

.notify-intro {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Модальное окно «уведомить о появлении» при клике на карточку */
.notify-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast), visibility var(--transition-fast);
}

.notify-modal.notify-modal-open {
    opacity: 1;
    visibility: visible;
}

.notify-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.notify-modal-content {
    position: relative;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 1);
}

.notify-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--color-border);
    background: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.notify-modal-close:hover {
    background: var(--color-bg-alt);
}

.notify-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.notify-modal-product {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.notify-modal-form .form-group {
    margin-bottom: 1rem;
}

.notify-modal-form .btn-submit {
    width: 100%;
    margin-top: 0.5rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-main h2,
.checkout-sidebar h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.checkout-main h2 {
    margin-top: 1.5rem;
}

.checkout-main h2:first-child {
    margin-top: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.form-hint a {
    color: #1a1a1a;
}

.pvz-map {
    width: 100%;
    height: 450px;
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.pvz-map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 60px;
    background: #f5f5f5;
    color: var(--color-text-light);
    font-size: 0.9rem;
    padding: 1rem;
    text-align: center;
}

.pvz-map-placeholder a {
    color: #1a1a1a;
}

.pvz-list-wrap {
    margin-top: 1rem;
}

.pvz-list-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.pvz-list-wrap select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--color-border);
    font-family: inherit;
}

.form-group-autocomplete {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-item {
    padding: 0.5rem 0.6rem;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.autocomplete-item:hover {
    background: #f5f5f5;
}

.checkout-summary {
    background: var(--color-bg-alt);
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    margin-bottom: 1rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.checkout-totals {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.checkout-row {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.checkout-total {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
}

.checkout-sidebar {
    position: sticky;
    top: 2rem;
    align-self: start;
}

/* ============================================
   АДАПТИВНОСТЬ ПОД ВСЕ УСТРОЙСТВА
   ============================================ */

/* Маленькие телефоны (до 480px) */
@media (max-width: 480px) {
    main {
        padding: var(--spacing-lg) var(--container-padding-x);
        padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
        padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
    }

    .hero-home {
        padding-top: 3rem;
        padding-bottom: 3rem;
        padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
        padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
    }

    .brand-logo-massive {
        font-size: 2.5rem;
    }

    .hero-manifesto {
        font-size: 0.75rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-detail-grid {
        gap: 1.5rem;
    }

    .product-detail-form {
        max-width: 100%;
    }

    .footer-main {
        flex-direction: column;
        gap: 1.5rem;
        padding: var(--spacing-lg) var(--container-padding-x);
        padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
        padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
        padding-bottom: max(var(--spacing-lg), env(safe-area-inset-bottom));
    }

    .footer-brand {
        min-width: unset;
    }

    .footer-telegram-icon {
        margin-left: 0;
    }

    .cart-item {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }

    .cart-item-total {
        text-align: left;
        min-width: unset;
    }

    .qty-btn,
    .cart-item-remove {
        min-width: 44px;
        min-height: 44px;
    }

    .btn-checkout {
        max-width: 100%;
    }

    .pvz-map {
        height: 300px;
    }

    .checkout-sidebar {
        position: static;
    }
}

/* Телефоны (480px — 640px) */
@media (max-width: 640px) {
    .header-inner {
        padding: 1rem var(--container-padding-x);
    }

    .brand-logo {
        font-size: 1rem;
    }

    .hero-home {
        padding-top: 4rem;
        padding-bottom: 4rem;
        padding-left: max(var(--container-padding-x), env(safe-area-inset-left));
        padding-right: max(var(--container-padding-x), env(safe-area-inset-right));
    }

    .hero,
    .success {
        padding: 3rem 1rem;
    }

    .hero h1,
    .success h1 {
        font-size: 1.75rem;
    }

    .success-order-block {
        max-width: 100%;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .btn {
        width: 100%;
        text-align: center;
    }

    .success-actions .btn-outline {
        margin-left: 0;
    }

    .catalog-title {
        font-size: var(--font-size-2xl);
        margin-bottom: 1.5rem;
    }

    .collection-name {
        font-size: 1.15rem;
    }

    .products-section h1 {
        font-size: var(--font-size-2xl);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }

    .products-grid-carousel .product-card {
        min-width: 180px;
        max-width: 180px;
    }

    .collection-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-price,
    .product-detail-price {
        font-size: 1rem;
    }

    .btn-add-cart {
        margin: 0 0.5rem 0.5rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .product-detail-info h1 {
        font-size: 1.5rem;
    }

    .product-detail-price {
        font-size: 1.25rem;
    }

    .size-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .cart-section h1,
    .checkout-section h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .legal-page h1 {
        font-size: 1.5rem;
    }

    .help-page h1 {
        font-size: 1.5rem;
    }

    .help-section {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .coming-soon-block {
        padding: 2rem 1rem;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-actions {
        flex-wrap: wrap;
    }
}

/* Планшеты (640px — 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-main {
        gap: 1.5rem;
    }
}

/* Планшеты и малые десктопы (768px — 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .checkout-grid {
        grid-template-columns: 1fr 280px;
    }
}

/* Большие мониторы (1440px+) */
@media (min-width: 1440px) {
    :root {
        --max-width-content: 1320px;
        --container-padding-x: 2rem;
    }

    .hero-home {
        padding: 10rem var(--container-padding-x);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.75rem;
    }

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

    .checkout-grid {
        grid-template-columns: 1fr 360px;
        gap: 2.5rem;
    }
}

/* Очень большие мониторы (1920px+) */
@media (min-width: 1920px) {
    :root {
        --max-width-content: 1520px;
        --container-padding-x: 2.5rem;
    }

    .hero-home {
        padding: 12rem var(--container-padding-x);
    }

    .brand-logo-massive {
        font-size: clamp(4rem, 8vw, 9rem);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
    }

    .product-card {
        box-shadow: 6px 6px 0px rgba(0, 0, 0, 1);
    }

    .product-card:hover {
        box-shadow: 8px 8px 0px rgba(0, 0, 0, 1);
    }

    .footer-main {
        padding: var(--spacing-2xl) var(--container-padding-x);
    }
}

/* Десктоп: тонкий скроллбар на тач-устройствах */
@media (hover: none) and (pointer: coarse) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
}

/* Уменьшение движения для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .product-card:hover {
        transform: none;
        box-shadow: 4px 4px 0px rgba(0, 0, 0, 1);
    }

    * {
        transition-duration: 0.01ms !important;
    }
}
