/* ==========================================================================
   RESPONSIVE STYLES - KRASNYI RAK
   ========================================================================== */

/* ===== BREAKPOINT: 1440px (Large Desktops) ===== */
@media (max-width: 1440px) {
    .hero__title {
        font-size: 64px;
    }
}

/* ===== BREAKPOINT: 1200px (Laptops) ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
    }

    .hero__title {
        font-size: 56px;
    }

    .topbar__center {
        gap: 20px;
    }

    .nav__list {
        gap: 20px;
    }

    .products__grid {
        gap: 25px;
    }

    .product-detail__wrapper {
        gap: 40px;
    }

    .profile__content {
        gap: 30px;
    }

    /* About */
    .values__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contacts */
    .contacts-info__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Delivery */
    .conditions__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== BREAKPOINT: 1024px (Tablets & Small Laptops) ===== */
@media (max-width: 1024px) {
    body {
        padding-top: 80px;
    }

    .topbar {
        padding: 17px 0;
    }

    .topbar__center {
        display: none; /* Hide address and hours for more space */
    }

    .topbar__right .btn--topbar,
    .topbar__right .topbar__phone {
        display: none; /* These move to the burger menu via JS/CSS */
    }

    .header {
        top: 0;
        height: 0;
        padding: 0;
        border: none;
        overflow: visible;
    }

    .header__content {
        padding: 0;
    }

    .burger {
        display: flex; /* Show burger */
        z-index: 1100;
    }

    .burger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--color-primary);
    }

    .burger.active span:nth-child(2) {
        opacity: 0;
    }

    .burger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--color-primary);
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: #1a1a1a;
        z-index: 1050;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 100px 30px 40px;
        display: block;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav__list li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav__link {
        display: block;
        padding: 15px 0;
        font-size: 18px;
        width: 100%;
    }

    .nav__link::after {
        display: none;
    }

    /* Mobile Contact Info (added via JS) */
    .mobile-contact-info {
        margin-top: 20px;
        width: 100%;
    }

    .mobile-menu-divider {
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
        margin: 20px 0;
    }

    .mobile-menu-info {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 12px;
        color: rgba(255, 255, 255, 0.8);
        font-size: 14px;
    }

    .mobile-menu-item svg {
        color: var(--color-primary);
        flex-shrink: 0;
    }

    .mobile-menu-item a {
        font-weight: 600;
        font-size: 16px;
    }

    .mobile-menu-actions {
        margin-top: 20px;
    }

    .btn--mobile-login {
        width: 100%;
        border-radius: 8px;
    }

    /* Hero Section Adjustments */
    .hero {
        margin-top: -80px;
        min-height: 80vh;
    }

    .hero__title {
        font-size: 48px;
    }

    .hero__subtitle {
        font-size: 18px;
    }

    .hero__usp {
        padding: 15px 20px;
    }

    .hero__usp-title {
        font-size: 20px;
    }

    /* Category & Info Pages */
    .category-header {
        padding: 60px 0 40px;
    }

    .page-hero {
        margin-top: -80px;
        padding: 130px 0 40px;
    }

    .page-hero__title {
        font-size: 42px;
    }

    /* Product Detail */
    .product-detail__wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-detail__gallery {
        max-width: 100%;
        position: static;
    }

    /* Profile Page */
    .profile__content {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .profile__sidebar {
        width: 100%;
        position: static;
    }

    /* About page */
    .about-story__content {
        gap: 40px;
    }

    .about-story__title {
        font-size: 34px;
    }

    .values__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Delivery page */
    .delivery-zones__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .conditions__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contacts page */
    .contacts-info__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-form-wrapper {
        gap: 40px;
    }

    .contact-form-info__title {
        font-size: 34px;
    }

    .social-links {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Cart page */
    .cart__content {
        gap: 30px;
    }

    /* Breadcrumbs — хедер скрыт, топбар ~50px, body padding-top: 80px → поднимаем на 30px */
    .breadcrumbs {
        margin-top: -5px;
        padding: 12px 0;
    }

    .breadcrumbs + .page-hero {
        margin-top: 0;
        padding-top: 40px;
    }

    .breadcrumbs + .category-header {
        margin-top: 0;
        padding-top: 40px;
    }

    /* Profile sidebar */
    .profile__main {
        min-width: 0;
    }
}

/* ===== BREAKPOINT: 768px (Mobile Landscapes) ===== */
@media (max-width: 768px) {
    /* Breadcrumbs — топбар ~50px, body padding-top: 80px → margin-top: -30px */
    .breadcrumbs {
        margin-top: -5px;
        padding: 12px 0;
    }

    .breadcrumbs + .page-hero {
        margin-top: 0;
        padding-top: 40px;
    }

    .breadcrumbs + .category-header {
        margin-top: 0;
        padding-top: 40px;
    }

    .section__title {
        font-size: 32px;
        margin-bottom: 40px;
    }

    .hero__content {
        padding: 80px 0 60px;
    }

    .hero__title {
        font-size: 38px;
    }

    .hero__buttons {
        gap: 15px;
    }

    .btn--hero-primary,
    .btn--hero-secondary {
        width: 100%;
        padding: 15px 30px;
        font-size: 16px;
        justify-content: center;
    }

    .hero__trust {
        gap: 15px;
    }

    .hero__trust-item {
        font-size: 12px;
    }

    /* Product Grid */
    .products__grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }

    .product-card__content {
        padding: 20px;
    }

    .product-card__title {
        font-size: 18px;
    }

    /* How We Work */
    .steps {
        flex-direction: column;
        gap: 30px;
    }

    .step {
        max-width: 100%;
        text-align: center;
    }

    /* Delivery Info */
    .delivery-info__content {
        flex-direction: column-reverse;
        gap: 40px;
    }

    .delivery-info__text {
        text-align: center;
    }

    .delivery-info__list {
        align-items: center;
    }

    .delivery-info__image {
        max-width: 400px;
        margin: 0 auto;
    }

    /* CTA Section */
    .cta__content {
        text-align: center;
    }

    .cta__features {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .cta__actions {
        flex-direction: column;
        width: 100%;
    }

    .btn--cta-primary,
    .btn--cta-secondary {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer__content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer__column {
        align-items: center !important;
    }

    .footer__social {
        justify-content: center;
    }

    /* Category Filters */
    .category-products__filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Cart Items Transformation */
    .cart__content {
        flex-direction: column;
        gap: 30px;
    }

    .cart__summary {
        width: 100%;
        position: static;
    }

    .cart-item {
        display: grid;
        grid-template-columns: 100px 1fr auto;
        grid-template-areas: 
            "img info close"
            "img qty price";
        gap: 15px;
        padding: 20px;
        align-items: center;
    }

    .cart-item__image {
        grid-area: img;
        width: 100px;
        height: 100px;
        object-fit: cover;
    }

    .cart-item__info {
        grid-area: info;
        padding: 0;
    }

    .cart-item__price {
        grid-area: price;
        margin: 0;
        font-weight: 700;
    }

    .cart-item__quantity {
        grid-area: qty;
        margin: 0;
    }

    .cart-item__remove {
        grid-area: close;
        margin: 0;
        justify-self: end;
    }

    /* Product Tabs */
    .product-tabs__nav {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }

    .product-tabs__btn {
        padding: 10px 20px;
    }

    /* Reviews — 2 слайда */
    .reviews-slider__slide {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .review-card {
        padding: 20px;
    }

    .review-card__name {
        font-size: 15px;
    }

    .review-card__text {
        font-size: 14px;
    }

    /* Product Detail — 768px */
    .product-detail {
        padding: 40px 0;
    }

    .product-detail__title {
        font-size: 28px;
    }

    .product-detail__price {
        font-size: 28px;
    }

    .product-detail__actions {
        flex-direction: column;
        gap: 12px;
    }

    .product-detail__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .product-detail__thumbnails {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    /* Product Tabs — 768px */
    .product-tabs {
        margin-top: 40px;
    }

    .product-tabs__panel h3 {
        font-size: 20px;
    }

    /* Related Products — 768px */
    .related-products {
        margin-top: 50px;
        padding-top: 40px;
    }

    .related-products .products__grid {
        grid-template-columns: 1fr;
    }

    /* About page — 768px */
    .about-story__content {
        flex-direction: column;
        gap: 30px;
    }

    .about-story__text,
    .about-story__image {
        flex: 1 1 auto;
    }

    .about-story__title {
        font-size: 28px;
    }

    .page-hero__title {
        font-size: 36px;
    }

    .about-story__paragraph {
        font-size: 15px;
    }

    .values__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .value-card {
        padding: 30px 20px;
    }

    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .why-card {
        padding: 30px 20px;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-card__number {
        font-size: 42px;
    }

    /* Delivery page — 768px */
    .delivery-zones__grid {
        grid-template-columns: 1fr;
    }

    .zone-card {
        padding: 30px 20px;
    }

    .conditions__grid {
        grid-template-columns: 1fr;
    }

    .condition-card {
        padding: 30px 20px;
    }

    /* Contacts page — 768px */
    .contacts-info__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .contact-card {
        padding: 30px 20px;
    }

    .contact-form-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .contact-form-info,
    .contact-form {
        flex: 1 1 auto;
        width: 100%;
    }

    .contact-form-info__title {
        font-size: 28px;
    }

    .contact-form {
        padding: 30px;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .map-container iframe {
        height: 300px;
    }

    /* Profile page — 768px */
    .profile__header {
        margin-bottom: 20px;
    }

    .profile__title {
        font-size: 28px;
    }

    .profile__content {
        flex-direction: column;
        gap: 20px;
    }

    .profile__sidebar {
        width: 100%;
    }

    .profile__nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .profile__nav-link {
        padding: 10px 14px;
        font-size: 13px;
    }

    .profile__tab-title {
        font-size: 22px;
    }

    .profile__form-row {
        grid-template-columns: 1fr;
    }

    .profile__favorite-item {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
    }

    .profile__favorite-image {
        width: 140px;
        height: 140px;
        flex-shrink: 0;
    }

    .profile__favorite-info {
        flex: 1;
    }

    .profile__favorite-actions {
        padding: 20px 20px 20px 0;
        display: flex;
        align-items: flex-end;
    }

    /* Profile orders — 768px */
    .profile__order-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .profile__order-status {
        align-self: flex-start;
    }

    .profile__order-item {
        flex-direction: column;
        gap: 10px;
    }

    .profile__order-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Profile promo — 768px */
    .profile__promo-input {
        flex-direction: column;
    }

    .profile__promo-input .btn,
    .profile__promo-field {
        width: 100%;
    }
}

/* ===== BREAKPOINT: 480px (Phones) ===== */
@media (max-width: 480px) {
    /* Breadcrumbs — топбар ~50px, body padding-top: 80px → margin-top: -30px */
    .breadcrumbs {
        margin-top: -5px;
        padding: 12px 0;
    }

    .breadcrumbs + .page-hero {
        margin-top: 0;
        padding-top: 35px;
    }

    .breadcrumbs + .category-header {
        margin-top: 0;
        padding-top: 35px;
    }

    .container {
        padding: 0 15px;
    }

    .hero__title {
        font-size: 32px;
    }

    .hero__usp {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .hero__usp-icon svg {
        width: 40px;
        height: 40px;
    }

    .products__tabs {
        gap: 8px;
    }

    .products__tab {
        padding: 10px 20px;
        font-size: 13px;
    }

    .product-card__footer--buttons {
        flex-direction: column;
        gap: 10px;
    }

    .product-card__footer .btn {
        width: 100%;
    }

    .product-card__price {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .section__title {
        font-size: 28px;
    }

    .delivery-info__title {
        font-size: 26px;
    }

    .cta__title {
        font-size: 24px;
    }

    /* Mobile Menu Full Width */
    .nav {
        max-width: 100%;
    }

    /* Advantages Grid */
    .advantages__grid {
        grid-template-columns: 1fr;
    }

    .advantage-card {
        padding: 30px 20px;
    }

    /* Profile Forms */
    .profile__form-row {
        flex-direction: column;
        gap: 0;
    }

    /* Profile Dashboard Mobile */
    .profile__tab {
        padding: 20px 0;
    }

    .profile__address {
        padding: 15px;
    }

    .profile__address-header {
        flex-direction: column;
        gap: 10px;
    }

    .profile__bonus-card {
        padding: 20px;
    }

    /* Reviews — 1 слайд */
    .reviews-slider__slide {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .review-card {
        padding: 20px 15px;
    }

    /* Product Detail — 480px */
    .product-detail__title {
        font-size: 24px;
    }

    .product-detail__price {
        font-size: 24px;
    }

    .product-detail__price-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .product-detail__select,
    .product-detail__quantity-controls {
        width: 100%;
    }

    .product-detail__delivery {
        padding: 15px;
    }

    .product-detail__delivery h3 {
        font-size: 16px;
    }

    .product-tabs__btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .product-tabs__panel h3 {
        font-size: 18px;
    }

    .product-tabs__panel h4 {
        font-size: 16px;
    }

    .product-characteristics td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .related-products .products__grid {
        grid-template-columns: 1fr;
    }

    /* About page — 480px */
    .values__grid {
        grid-template-columns: 1fr;
    }

    .why-us__grid {
        grid-template-columns: 1fr;
    }

    .stat-card__number {
        font-size: 36px;
    }

    .about-story__title {
        font-size: 24px;
    }

    .page-hero__title {
        font-size: 30px;
    }

    /* Delivery page — 480px */
    .zone-card__title {
        font-size: 20px;
    }

    .condition-card__title {
        font-size: 18px;
    }

    /* Contacts page — 480px */
    .contacts-info__grid {
        grid-template-columns: 1fr;
    }

    .contact-card__link {
        font-size: 16px;
    }

    .contact-form-info__title {
        font-size: 24px;
    }

    .contact-form {
        padding: 20px;
    }

    /* Profile page — 480px */
    .profile__user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .profile__nav-list {
        flex-direction: column;
    }

    .profile__nav-link {
        width: 100%;
    }

    .profile__addresses {
        grid-template-columns: 1fr;
    }

    .profile__favorites {
        grid-template-columns: 1fr;
    }

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

    .profile__favorite-image {
        width: 100%;
        height: 200px;
    }

    .profile__favorite-actions {
        padding: 0 20px 20px;
    }

    .profile__tab {
        padding: 20px 15px;
    }

    .profile__bonus-amount {
        font-size: 2.5rem;
    }

    .profile__promo-input {
        flex-direction: column;
    }

    .profile__promo-input .btn,
    .profile__promo-field {
        width: 100%;
    }
}

/* ===== BREAKPOINT: 320px (Smallest Devices) ===== */
@media (max-width: 320px) {
    /* Body padding — topbar ~50px на 320px, header скрыт */
    body {
        padding-top: 55px;
    }

    .hero__title {
        font-size: 28px;
    }

    .topbar__name {
        font-size: 18px;
    }

    .topbar__logo-img {
        height: 30px;
    }

    .product-card__title {
        font-size: 16px;
    }

    /* Слайдер отзывов — одна карточка */
    .reviews-slider__slide {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 4px;
    }

    .reviews-slider__dot.active {
        width: 24px;
        border-radius: 4px;
    }

    /* ===== PAGE HERO (Корзина, Доставка, О нас и др.) ===== */
    .page-hero {
        margin-top: -55px;
        padding: 80px 0 30px;
        min-height: auto;
    }

    .page-hero__title {
        font-size: 28px;
        letter-spacing: -0.5px;
        margin-bottom: 10px;
    }

    .page-hero__subtitle {
        font-size: 15px;
    }

    /* ===== BREADCRUMBS ===== */
    /* топбар ~50px, body padding-top: 55px → margin-top: -5px */
    .breadcrumbs {
        padding: 10px 0;
        margin-top: 20px;
        font-size: 13px;
    }

    .breadcrumbs + .page-hero {
        margin-top: 0;
        padding-top: 30px;
    }

    .breadcrumbs + .category-header {
        margin-top: 0;
        padding-top: 30px;
    }

    /* ===== CART ===== */
    .cart-section {
        padding: 30px 0;
    }

    .cart__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .cart__title {
        font-size: 18px;
    }

    .cart__clear {
        font-size: 13px;
    }

    /* Cart item — стек в колонку */
    .cart-item {
        grid-template-columns: 70px 1fr;
        grid-template-areas:
            "img info"
            "img qty"
            "price price"
            "close close";
        gap: 8px;
        padding: 15px;
    }

    .cart-item__image {
        width: 70px;
        height: 70px;
    }

    .cart-item__price {
        font-size: 16px;
        text-align: right;
    }

    .cart-item__remove {
        justify-self: start;
    }

    /* Cart summary */
    .cart__summary-content {
        padding: 15px;
    }

    .cart__summary-title {
        font-size: 17px;
    }

    .cart__summary-row {
        font-size: 14px;
    }

    .cart__summary-total {
        font-size: 16px;
    }

    /* Promo */
    .cart__promo {
        flex-direction: column;
        gap: 8px;
    }

    .cart__promo-input,
    .cart__promo .btn {
        width: 100%;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 20px 10px;
    }

    .stat-card__number {
        font-size: 32px;
    }

    .stat-card__label {
        font-size: 13px;
    }

    /* ===== PROFILE PAGE ===== */
    .profile__content {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .profile__sidebar {
        width: 100%;
        padding: 15px;
    }

    .profile__user-info {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .profile__avatar {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .profile__user-details h3 {
        font-size: 15px;
    }

    .profile__user-details p {
        font-size: 12px;
    }

    .profile__nav-link {
        padding: 10px 12px;
        font-size: 14px;
    }

    .profile__title {
        font-size: 24px;
    }

    /* Main tabs */
    .profile__tab {
        padding: 16px 12px;
    }

    .profile__tab-title {
        font-size: 18px;
    }

    .profile__tab-subtitle {
        font-size: 13px;
    }

    /* Forms */
    .profile__form-row {
        grid-template-columns: 1fr;
    }

    .profile__form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .profile__form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Orders */
    .profile__order {
        padding: 15px;
    }

    .profile__order-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .profile__order-number {
        font-size: 15px;
    }

    .profile__order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    .profile__order-item-image {
        width: 50px;
        height: 50px;
    }

    .profile__order-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .profile__order-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .profile__order-actions .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
    }

    /* Addresses */
    .profile__addresses {
        grid-template-columns: 1fr;
    }

    .profile__address {
        padding: 15px;
    }

    .profile__address-header {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .profile__address-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .profile__address-actions .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        justify-content: center;
    }

    /* Favorites */
    .profile__favorites {
        grid-template-columns: 1fr;
    }

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

    .profile__favorite-image {
        height: 160px;
        width: 100%;
    }

    .profile__favorite-actions {
        padding: 0 15px 15px;
    }

    /* Bonuses */
    .profile__bonus-card {
        padding: 20px 15px;
    }

    .profile__bonus-amount {
        font-size: 2rem;
    }

    .profile__bonus-progress {
        max-width: 100%;
    }

    .profile__bonus-transaction {
        flex-direction: column;
        gap: 4px;
    }

    .profile__bonus-transaction-amount {
        font-size: 14px;
    }

    /* Promo codes */
    .profile__promo-input {
        flex-direction: column;
        gap: 10px;
    }

    .profile__promo-field,
    .profile__promo-input .btn {
        width: 100%;
        box-sizing: border-box;
    }

    .profile__promo-item {
        flex-direction: column;
        gap: 6px;
    }

    /* ===== CONTACTS FORM ===== */
    .contact-form-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .contact-form-info,
    .contact-form {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .contact-form-info__title {
        font-size: 24px;
    }

    .contact-form-info__text {
        font-size: 14px;
    }

    .contact-form {
        padding: 20px 15px;
    }

    .form-input,
    .form-textarea {
        padding: 12px 14px;
        font-size: 14px;
        box-sizing: border-box;
        width: 100%;
    }

    .form-group {
        margin-bottom: 16px;
    }

    /* ===== CATEGORY FILTERS ===== */
    .category-products__filters {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .filter-select {
        width: 100%;
        box-sizing: border-box;
    }

    /* Hero section (главная) */
    .hero {
        margin-top: -55px;
    }

    /* ===== TOPBAR — убираем переполнение ===== */
    .topbar__name {
        font-size: 16px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar__phone {
        display: none;
    }

    .btn--topbar {
        display: none;
    }

    /* ===== CATEGORY HEADER ===== */
    .category-header {
        padding: 80px 0 30px;
    }

    .category-header__title {
        font-size: 26px;
    }

    .category-header__description {
        font-size: 14px;
    }

    /* ===== ABOUT PAGE ===== */
    .about-story__content {
        flex-direction: column;
        gap: 20px;
    }

    .about-story__text,
    .about-story__image {
        flex: 1 1 auto;
        min-width: 0;
    }

    .about-story__title {
        font-size: 24px;
    }

    .values__grid {
        grid-template-columns: 1fr;
    }

    .why-us__grid {
        grid-template-columns: 1fr;
    }

    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    /* ===== CONTACTS PAGE ===== */
    .contacts-info__grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    /* ===== PROFILE PAGE ===== */
    .profile__content {
        grid-template-columns: 1fr;
    }

    .profile__sidebar {
        width: 100%;
    }

    .profile__user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* ===== PRODUCT DETAIL ===== */
    .product-detail {
        padding: 25px 0;
    }

    .product-detail__thumbnails {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .product-detail__thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .product-detail__title {
        font-size: 20px;
    }

    .product-detail__price {
        font-size: 22px;
    }

    .product-detail__price-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .product-detail__features {
        flex-direction: column;
        gap: 8px;
    }

    .product-detail__select,
    .product-detail__quantity-controls {
        width: 100%;
    }

    .product-detail__delivery {
        padding: 12px;
    }

    .product-detail__delivery h3 {
        font-size: 15px;
    }

    .product-detail__delivery li {
        font-size: 13px;
    }

    /* Product tabs 320px */
    .product-tabs {
        margin-top: 25px;
    }

    .product-tabs__btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .product-tabs__panel h3 {
        font-size: 16px;
    }

    .product-tabs__panel h4 {
        font-size: 14px;
    }

    .product-tabs__panel p,
    .product-tabs__panel li {
        font-size: 13px;
    }

    .product-characteristics td {
        padding: 10px 6px;
        font-size: 13px;
        word-break: break-word;
    }

    /* Related products 320px */
    .related-products {
        margin-top: 30px;
        padding-top: 25px;
    }

    .related-products .products__grid {
        grid-template-columns: 1fr;
    }

    /* ===== DELIVERY PAGE ===== */
    .delivery-zones__grid {
        grid-template-columns: 1fr;
    }

    .conditions__grid {
        grid-template-columns: 1fr;
    }

    .zone-card {
        padding: 20px 15px;
    }

    .zone-card__title {
        font-size: 18px;
    }

    .zone-card__time {
        font-size: 15px;
    }

    .zone-card__icon {
        width: 60px;
        height: 60px;
    }

    .condition-card {
        padding: 25px 15px;
    }

    .condition-card__title {
        font-size: 16px;
    }

    .condition-card__text {
        font-size: 13px;
    }

    /* ===== CONTACTS PAGE — 320px ===== */
    .contacts-info__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-card {
        padding: 20px 15px;
    }

    .contact-card__icon {
        width: 60px;
        height: 60px;
    }

    .contact-card__title {
        font-size: 18px;
    }

    .contact-card__link {
        font-size: 15px;
    }

    .social-link-large {
        padding: 20px 15px;
        gap: 15px;
    }

    .social-link-large__icon {
        width: 50px;
        height: 50px;
    }

    .social-link-large__title {
        font-size: 18px;
    }

    .map-container iframe {
        height: 220px;
    }

    /* ===== ABOUT PAGE — 320px extra ===== */
    .value-card {
        padding: 20px 15px;
    }

    .value-card__icon {
        width: 60px;
        height: 60px;
    }

    .value-card__title {
        font-size: 18px;
    }

    .why-card {
        padding: 25px 15px;
    }

    .why-card__title {
        font-size: 16px;
    }

    .about-story__paragraph {
        font-size: 14px;
    }

    /* ===== CART PAGE — 320px extra ===== */
    .cart__empty-title {
        font-size: 18px;
    }

    .cart__empty-text {
        font-size: 14px;
    }

    /* ===== GLOBAL OVERFLOW FIX ===== */
    .container {
        padding: 0 12px;
        max-width: 100%;
        overflow-x: hidden;
    }

    * {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent any fixed-width elements from overflowing */
    .topbar__content,
    .header__content,
    .footer__content {
        overflow: hidden;
    }
}

/* ===== UTILITIES FOR RESPONSIVENESS ===== */
.no-scroll {
    overflow: hidden;
}

/* Fix for horizontal scroll issues */
.hero, .products, .delivery-info, .reviews, .advantages, .cta, .footer {
    width: 100%;
    overflow-x: hidden;
}
