* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: #222;
    background: #faf8fc;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* Бегемот */
.logo-mascot {
    height: 70px;
    width: auto;
}

/* Блок текста */
.logo-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Основной логотип */
.logo-main {
    height: 40px;
    width: auto;
}

/* Подпись */
.logo-sub {
    font-size: 16px;
    color: #777;
    margin-top: 2px;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    font-weight: 700;
    color: #3f3f3f;
    line-height: 1;
}

.nav-link:hover {
    color: #702282;
}

.nav-icon-link {
    position: relative;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    line-height: 1;
    color: #3f3f3f;
    transition: 0.2s ease;
}

.nav-icon-link:hover .nav-icon {
    color: #702282;
}

.site-search {
    position: relative;
    display: flex;
    align-items: center;
}

.search-toggle {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #702282;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.search-toggle:hover {
    transform: scale(1.08);
}

.search-box {
    position: absolute;
    top: 50%;
    right: 42px;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    overflow: visible;
    transition: 0.25s ease;
    pointer-events: none;
    z-index: 1000;
}

.site-search.open .search-box {
    width: 320px;
    opacity: 1;
    pointer-events: auto;
}

#site-search-input {
    width: 100%;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 2px solid #222;
    background: #fff;
    font-size: 15px;
    outline: none;
}

#site-search-results {
    position:absolute;
    top:70px;
    left:50%;
    transform:translateX(-50%);
    width:calc(100vw - 30px);
    max-width:340px;
    background:#111;
    border-radius:18px;
    overflow:hidden;
    z-index:9999;
}

.search-result-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.search-result-item:hover {
    background: #f7f0fb;
}

.search-result-item img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
}

.search-result-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.search-result-price {
    color: #702282;
    font-size: 13px;
    margin-top: 4px;
}

.favorite-icon.active {
    color: #e94a87;
}

.favorites-link,
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.cart-icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.favorites-count,
.cart-count {
    position: absolute;
    top: -5px;
    right: -14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d9d9d9;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    z-index: 2;
}

.favorites-count.has-items {
    background: #e94a87;
    color: #fff;
}

.cart-count.has-items {
    background: #702282;
    color: #fff;
}

.cart-bump {
    animation: cartBump 0.45s ease;
}

@keyframes cartBump {
    0%   { transform: scale(1) translateY(0); }
    30%  { transform: scale(1.18) translateY(-6px); }
    60%  { transform: scale(0.95) translateY(0); }
    100% { transform: scale(1) translateY(0); }
}

.mobile-menu-toggle {
    display: none;
}

.mobile-menu-panel {
    display: contents;
}

.mobile-visible-icons {
    display: contents;
}

@media (max-width: 768px) {
    .main-nav {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px;
        align-items: center;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 48px;
        border: none;
        border-radius: 16px;
        background: #702282;
        color: #fff;
        font-size: 17px;
        font-weight: 700;
        cursor: pointer;
    }

    .mobile-visible-icons {
        display: flex;
        gap: 10px;
    }

    .mobile-visible-icons .nav-icon-link {
        width: 54px;
        height: 48px;
        border-radius: 16px;
        background: #f7f1fa;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .mobile-menu-panel {
        grid-column: 1 / -1;
        display: none;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-menu-panel.open {
        display: flex;
    }

    .mobile-menu-panel .nav-link {
        min-height: 48px;
        border-radius: 16px;
        background: #f7f1fa;
        justify-content: center;
        font-size: 17px;
        font-weight: 700;
    }
}

.site-main {
    min-height: calc(100vh - 140px);
    padding: 32px 0 48px;
}

.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 0;
    color: #666;
    font-size: 14px;
}

.hero {
    background: linear-gradient(135deg, #702282, #9b4db0);
    color: #fff;
    border-radius: 24px;
    padding: 40px 32px;
    margin-bottom: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.15;
}

.hero p {
    margin: 0;
    font-size: 18px;
    max-width: 720px;
}

.section-title {
    margin: 0 0 20px;
    font-size: 28px;
    color: #222;
    text-align: center;
}

.home-slider {
    position: relative;
    margin: 0 0 32px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.home-slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6;
    min-height: 260px;
}

.home-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-slide.active {
    opacity: 1;
    visibility: visible;
}

 .home-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #702282;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.home-slider-prev {
    left: 16px;
}

.home-slider-next {
    right: 16px;
}

.home-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.home-slider-dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
}

.home-slider-dot.active {
    background: #702282;
}

@media (max-width: 768px) {
    .home-slider-track {
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }

    .home-slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
}

/* .home-slider {
    position: relative;
    margin: 0 0 32px;
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.home-slider-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 5.8;
    min-height: 220px;
    max-height: 460px;
}

.home-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 64px;
    background: #fff;
}

.home-slide.active {
    opacity: 1;
    visibility: visible;
}

.home-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.home-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #702282;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.home-slider-prev {
    left: 16px;
}

.home-slider-next {
    right: 16px;
}

.home-slider-dots {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.home-slider-dot {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    padding: 0;
}

.home-slider-dot.active {
    background: #702282;
}

@media (max-width: 1024px) {
    .home-slider-track {
        aspect-ratio: 16 / 7;
        min-height: 220px;
        max-height: none;
    }

    .home-slide {
        padding: 0 56px;
    }
}

@media (max-width: 768px) {
    .home-slider {
        border-radius: 20px;
        margin-bottom: 24px;
    }

    .home-slider-track {
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }

    .home-slide {
        padding: 0 44px;
    }

    .home-slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .home-slider-prev {
        left: 10px;
    }

    .home-slider-next {
        right: 10px;
    }

    .home-slider-dots {
        bottom: 10px;
        gap: 8px;
    }

    .home-slider-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .home-slider-track {
        aspect-ratio: 4 / 3;
        min-height: 150px;
    }

    .home-slide {
        padding: 0 36px;
    }

    .home-slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 22px;
    }
} */

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.category-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.category-card-image {
    aspect-ratio: 1 / 1;
    background: #f3f3f3;
    overflow: hidden;
}

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

.category-card-body {
    padding: 16px;
}

.category-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.empty-message {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    color: #555;
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        justify-content: center;
        padding: 12px 0;
    }

    .hero {
        padding: 28px 20px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }
}

.page-section {
    margin-bottom: 40px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.breadcrumbs a {
    color: #702282;
    font-weight: 600;
}

.category-header {
    display: grid;
    grid-template-columns: 1.4fr 320px;
    gap: 24px;
    align-items: center;
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.category-header-image {
    border-radius: 18px;
    overflow: hidden;
    background: #f6f6f6;
    aspect-ratio: 1 / 1;
}

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

.category-subtitle {
    margin: 0;
    color: #666;
    font-size: 16px;
    text-align: center;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.product-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-media {
    position: relative;
    padding: 18px 18px 0;
}

.product-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 240px;
    background: transparent;
    overflow: hidden;
}

.product-card-image img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.product-card-body {
    padding: 12px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.product-card-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    min-height: 50px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-title a {
    color: #222;
    display: block;
}

.product-card-expiry {
    margin-top: 12px;
    color: #6f6f6f;
    font-size: 15px;
    font-weight: 600;
    min-height: 20px;

    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-desc {
    margin: 0 0 18px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    flex-grow: 1;
}

.product-card-bottom {
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-card-actions {
    display: flex;
    gap: 10px;
}

.product-back-row {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.product-card-actions .button {
    flex: 1;
    min-height: 44px;
    justify-content: center;
    text-align: center;
    padding: 0 12px;
}

.product-price {
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    color: #702282;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 700;
    transition: 0.2s ease;
}

.button-outline {
    border: 1px solid #702282;
    color: #702282;
    background: transparent;
}

.button-outline:hover {
    background: #702282;
    color: #fff;
}

@media (max-width: 900px) {
    .category-header {
        grid-template-columns: 1fr;
    }

    .category-header-image {
        max-width: 320px;
    }
}

.product-page {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: start;
}

.product-image {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    max-height: 420px;
    object-fit: contain;
}

.product-info h1 {
    margin-top: 0;
    font-size: 28px;
    text-align: center;
}

.product-price-big {
    font-size: 26px;
    font-weight: 700;
    color: #702282;
    margin: 10px 0 20px;
    text-align: center;
}

.product-description {
    color: #444;
    line-height: 1.6;
}

.product-actions {
    margin-top: 24px;
}

.button-primary {
    background: #702282;
    color: #fff;
    border: none;
    cursor: pointer;
}

.button-primary:hover {
    background: #5a1b6a;
}

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

.cart-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: min(360px, calc(100% - 32px));
    background: #702282;
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cart-toast-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 16px 14px;
}

.cart-toast-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-toast-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.cart-toast-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    color: #702282;
    font-size: 14px;
    font-weight: 700;
}

.cart-toast-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.cart-toast-close:hover {
    background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 768px) {
    .cart-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
    }
}

@keyframes cartBump {
    0%   { transform: scale(1) translateY(0); }
    30%  { transform: scale(1.18) translateY(-6px); }
    60%  { transform: scale(0.95) translateY(0); }
    100% { transform: scale(1) translateY(0); }
}

.cart-page-header {
    margin-bottom: 24px;
}

.cart-page-subtitle {
    margin: -8px 0 0;
    color: #666;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1.5fr 360px;
    gap: 24px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 18px;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: #f4f4f4;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cart-item-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.4;
}

.cart-item-price {
    color: #702282;
    font-weight: 700;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #f7f4fa;
    border-radius: 999px;
    padding: 8px 12px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #702282;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

.cart-item-total {
    font-weight: 700;
    white-space: nowrap;
}

.cart-remove {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f3e7f6;
    color: #702282;
    font-size: 18px;
    cursor: pointer;
}

.cart-summary {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 92px;
}

.cart-summary h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 22px;
}

.cart-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: #555;
}

.cart-summary-total {
    font-size: 20px;
    color: #222;
    padding-top: 12px;
    border-top: 1px solid #eee;
    margin-top: 12px;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.cart-summary-actions .button,
.cart-summary-actions button {
    width: 100%;
}

@media (max-width: 980px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .cart-item-image {
        width: 100%;
        height: 220px;
    }

    .cart-item-total {
        font-size: 18px;
    }
}

.button-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.cart-min-warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 10px;
}

.cart-min-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 10px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.checkout-form,
.checkout-summary,
.checkout-success {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.checkout-success h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 14px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #702282;
    box-shadow: 0 0 0 3px rgba(112, 34, 130, 0.1);
}

.delivery-block {
    margin-bottom: 18px;
}

.checkout-submit {
    width: 100%;
    min-height: 52px;
    font-size: 17px;
}

.checkout-summary h3 {
    margin-top: 0;
    margin-bottom: 18px;
    font-size: 22px;
}

.checkout-summary-item {
    padding: 10px 0;
}

.checkout-summary-item-title {
    font-weight: 700;
    line-height: 1.45;
}

.checkout-summary-item-meta {
    margin-top: 4px;
    color: #666;
    font-size: 14px;
}

.checkout-summary-divider {
    height: 1px;
    background: #eee;
    margin: 12px 0 16px;
}

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

    .checkout-summary {
        position: static;
    }
}

.form-errors {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-error-item {
    background: #fdecea;
    color: #9b1c1c;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
}

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

.np-autocomplete {
    position: relative;
}

.np-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
    display: none;
}

.np-suggestion-item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: #fff;
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
}

.np-suggestion-item:hover {
    background: #f7f1fa;
}

.success-card {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 28px;
}

.success-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.success-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: linear-gradient(135deg, #702282, #9b4db0);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 700;
    box-shadow: 0 14px 34px rgba(112, 34, 130, 0.22);
}

.success-title {
    margin: 0 0 14px;
    font-size: 34px;
    line-height: 1.2;
    color: #222;
}

.success-text {
    margin: 0 auto 20px;
    max-width: 540px;
    color: #5f5f5f;
    font-size: 17px;
    line-height: 1.6;
}

.success-order-box {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #f7f1fa;
    border: 1px solid #eadcf1;
    border-radius: 20px;
    padding: 18px 26px;
    margin: 0 auto 20px;
}

.success-order-label {
    color: #6b6270;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.success-order-number {
    color: #702282;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.success-note {
    margin: 0 auto 28px;
    max-width: 560px;
    color: #666;
    font-size: 15px;
    line-height: 1.6;
}

.success-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.success-actions .button {
    min-width: 220px;
}

@media (max-width: 768px) {
    .success-card {
        padding: 28px 18px;
    }

    .success-title {
        font-size: 28px;
    }

    .success-text {
        font-size: 16px;
    }

    .success-order-number {
        font-size: 26px;
    }

    .success-actions .button {
        width: 100%;
    }
}

.favorites-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #ddd;
    color: #333;
    font-size: 11px;
    font-weight: 700;
}

.product-card-media {
    position: relative;
}

.favorite-toggle {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #8b8b8b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.favorite-toggle.active {
    color: #e94a87;
}

.favorite-toggle-product {
    border: 1px solid #702282;
    position: static;
    width: auto;
    height: auto;
    border-radius: 999px;
    box-shadow: none;
    font-size: 15px;
    padding: 0 18px;
    background: transparent;
}

.product-actions-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.favorites-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.favorites-layout {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.auth-page {
    display: flex;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-submit {
    width: 100%;
    min-height: 52px;
    margin-top: 8px;
}

.auth-bottom-text {
    margin-top: 18px;
    color: #666;
    text-align: center;
}

.auth-bottom-text a {
    color: #702282;
    font-weight: 700;
}

.profile-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.profile-row {
    padding: 14px 0;
    border-bottom: 1px solid #eee;
}

.profile-row:last-child {
    border-bottom: none;
}

.profile-actions {
    width: 100%;
    display: flex;
    justify-content: center;
}

.profile-info-grid {
    display: flex;
    align-items: stretch;
    gap: 30px;
}

.profile-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.profile-divider {
    width: 1px;
    background: #ddd;
}

.profile-item {
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    line-height: 1.5;
}

.profile-actions-split {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%; /* важно */
}

.profile-actions-split .button {
    width: auto;
    min-width: 220px;
    text-align: center;
}

.profile-actions-split .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(112, 34, 130, 0.25);
}

@media (max-width: 768px) {
    .profile-info-grid {
        flex-direction: column;
        gap: 18px;
    }

    .profile-divider {
        display: none;
    }

    .profile-actions-split {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-actions-split .button {
        max-width: none;
    }
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.order-card {
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.order-card-top,
.order-card-main,
.order-item-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.order-card-top {
    margin-bottom: 16px;
    color: #777;
}

.order-card-id {
    font-weight: 800;
    color: #222;
}

.order-card-main {
    align-items: center;
    margin-bottom: 18px;
}

.order-card-sum {
    font-size: 20px;
    font-weight: 800;
}

.order-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

.status-cancelled {
    background: #e60000;
    color: #fff;
}

.status-delivered {
    background: #7df08a;
    color: #0f3b12;
}

.status-new {
    background: #e8dcff;
    color: #702282;
}

.status-accepted {
    background: #d9ecff;
    color: #155a9c;
}

.status-processing {
    background: #fff0c7;
    color: #8a5a00;
}

.status-confirmed {
    background: #d9ecff;
    color: #155a9c;
}

.status-shipped {
    background: #dff6ff;
    color: #0b5f7a;
}

.status-ready {
    background: #e1ffd9;
    color: #1e6b1e;
}

.status-default {
    background: #eee7f2;
    color: #702282;
}

.order-block {
    margin-top: 14px;
    color: #444;
}

.delivery-date {
    margin-top: 15px;
}

.order-items {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 768px) {
    .auth-card,
    .profile-card,
    .order-card {
        padding: 20px;
    }
}

.auth-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px 0;
    color: #777;
    font-size: 14px;
}

.auth-divider span {
    position: relative;
    padding: 0 12px;
    background: #fff;
}

.google-login-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.order-actions {
    margin-top: 18px;
}

.button-cancel-order {
    background: #fff;
    color: #c40000;
    border: 1px solid #e0a0a0;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

.button-cancel-order:hover {
    background: #fff3f3;
}

.address-autocomplete {
    position: relative;
}

#address-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    z-index: 1000;
    display: none;
    max-height: 320px;
    overflow-y: auto;
}

.address-autocomplete {
    position: relative;
}

.address-suggestion-item {
    width: 100%;
    border: none;
    background: #fff;
    padding: 14px 18px;
    text-align: left;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f1f1;
}

.address-suggestion-item:last-child {
    border-bottom: none;
}

.address-suggestion-item:hover {
    background: #f7f0fb;
}

.address-fields-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.private-house-row {
    margin-top: 12px;
}

.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
}

.switch-label input {
    display: none;
}

.switch-slider {
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 26px;
    background: #d7d7d7;
    border-radius: 999px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.switch-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.switch-label input:checked + .switch-slider {
    background: #7b1fa2;
}

.switch-label input:checked + .switch-slider::before {
    transform: translateX(22px);
}

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

.private-house-row input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.private-house-row .switch-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.private-house-row .switch-slider {
    display: inline-block;
    position: relative;
    width: 48px;
    height: 26px;
    min-width: 48px;
    background: #d7d7d7;
    border-radius: 999px;
}

.private-house-row .switch-slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.private-house-row input[type="checkbox"]:checked + .switch-slider {
    background: #702282;
}

.private-house-row input[type="checkbox"]:checked + .switch-slider::before {
    transform: translateX(22px);
}

#scrollTopBtn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #702282;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(112, 34, 130, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: 0.25s ease;
    z-index: 9999;
}

#scrollTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    transform: scale(1.08);
    background: #842c97;
}

@media (max-width: 768px) {
    #scrollTopBtn {
        width: 52px;
        height: 52px;
        right: 16px;
        bottom: 16px;
        font-size: 24px;
    }
}

@media (max-width: 768px){

    .main-nav{
        display:grid;
        grid-template-columns: 1fr 54px 54px 54px;
        gap:10px;
        align-items:center;
        width:100%;
    }

    .mobile-menu-toggle{
        grid-column:1;
        height:54px;
        width:100%;
    }

    .site-search{
        grid-column:2;
        grid-row:1;
        position:relative;
        display:flex;
        justify-content:center;
    }

    .mobile-visible-icons{
        grid-column:3 / 5;
        grid-row:1;
        display:flex;
        gap:10px;
        justify-content:flex-end;
    }

    .mobile-menu-panel{
        grid-column:1 / -1;
        display:none;
        flex-direction:column;
        gap:10px;
    }

    .mobile-menu-panel.open{
        display:flex;
    }

    .search-toggle{
        width:54px;
        height:54px;
        border-radius:16px;
        background:#f7f1fa;
    }

    .search-box{
        left:50%;
        top:64px;
        transform:translateX(-50%);
        width:calc(100vw - 30px);
        max-width:340px;
    }

    .site-search.open .search-box{
        display:block;
    }

    #scrollTopBtn {
        right: 20px;
        bottom: 15px;
        width: 52px;
        height: 52px;
    }
}