/* =========================================================
   ДЕЛОВАЯ КОЛБАСА — CLIENT SHOP V3
   ========================================================= */

:root {
    --cream: #f5efe6;
    --paper: #fffaf4;
    --brown: #291713;
    --brown2: #3c2019;
    --wine: #9b2d24;
    --wine-dark: #742019;
    --gold: #d59b57;
    --text: #2d211d;
    --muted: #796b63;
    --line: rgba(74,47,38,.12);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 0%, rgba(213,155,87,.10), transparent 30rem),
        var(--cream);
}

/* ================= HEADER ================= */

.top {
    height: 78px;
    padding: 0 max(20px, calc((100% - 1180px) / 2));
    background: linear-gradient(90deg, #291713, #351c16);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 5px 25px rgba(35,20,16,.15);
}

.top > div {
    display: flex;
    flex-direction: column;
}

.top b {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    line-height: 1.05;
}

.top span {
    margin-top: 5px;
    color: #cfbeb5;
    font-size: 11px;
    letter-spacing: .5px;
}

.top .cartbtn {
    min-height: 45px;
    padding: 10px 17px;
    background: #fffaf4;
    color: var(--brown);
    border: 0;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(0,0,0,.13);
}

.cartbtn i {
    display: inline-grid;
    place-items: center;
    min-width: 25px;
    height: 25px;
    margin-left: 5px;
    padding: 0 7px;
    background: var(--wine);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-style: normal;
}

/* ================= PAGE ================= */

.shop {
    max-width: 1180px;
    margin: auto;
    padding: 28px 20px 80px;
}

/* ================= SHOWCASE ================= */

.showcase {
    height: 390px;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, .92fr);
    grid-template-areas: "hero mascot";
    gap: 18px;
    margin-bottom: 18px;
}

/* ================= HERO ================= */

.shop .hero {
    grid-area: hero;
    position: relative;
    overflow: hidden;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 46px 48px;
    display: flex;
    align-items: center;

    background:
        radial-gradient(circle at 92% 50%, rgba(184,85,48,.24), transparent 24rem),
        linear-gradient(135deg, #271511 0%, #3a1d17 58%, #54271d 100%);

    color: white;
    border-radius: 28px;
    box-shadow: 0 16px 45px rgba(52,32,25,.13);
}

.shop .hero::before {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    right: -170px;
    top: -190px;
    border: 1px solid rgba(213,155,87,.16);
    border-radius: 50%;
}

.shop .hero::after {
    content: "";
    display: block;
    position: absolute;
    width: 250px;
    height: 250px;
    right: -100px;
    bottom: -130px;
    border: 1px solid rgba(213,155,87,.12);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: #e7a85f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-style: italic;
}

.shop .hero h1 {
    margin: 0 0 17px;
    color: white;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(43px, 5vw, 67px);
    line-height: .94;
    letter-spacing: -1.5px;
}

.shop .hero p {
    max-width: 480px;
    margin: 0;
    color: #e5d7cf;
    font-size: 16px;
    line-height: 1.55;
}

.hero-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 20px;
    margin-top: 30px;
    color: #ddc9bd;
    font-size: 12px;
}

.hero-benefits span {
    white-space: nowrap;
}

/* ================= MASCOT ================= */

.mascot-panel {
    grid-area: mascot;
    position: relative;
    overflow: hidden;
    height: 100%;
    padding: 0;
    background: #ead8c7;
    border: 1px solid rgba(73,43,33,.08);
    border-radius: 28px;
    box-shadow: 0 16px 45px rgba(52,32,25,.11);
}

.mascot-panel img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    transition: transform .35s ease;
}

.mascot-panel:hover img {
    transform: scale(1.025);
}

/* ================= CATEGORY NAV ================= */

.category-nav {
    position: sticky;
    top: 78px;
    z-index: 15;

    display: flex;
    gap: 9px;
    margin: 0 0 34px;
    padding: 10px 2px;

    overflow-x: auto;
    scrollbar-width: none;

    background: rgba(245,239,230,.93);
    backdrop-filter: blur(12px);
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    flex: 1 0 auto;
    min-width: 112px;
    padding: 12px 17px;

    color: var(--brown);
    background: rgba(255,250,244,.92);

    border: 1px solid rgba(73,43,33,.08);
    border-radius: 999px;

    text-align: center;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;

    box-shadow: 0 4px 14px rgba(60,38,30,.045);
    transition:
        background .16s ease,
        color .16s ease,
        transform .16s ease;
}

.category-nav a:hover,
.category-nav a.active {
    background: linear-gradient(135deg, #a33329, #81231c);
    color: white;
    transform: translateY(-1px);
}

/* ================= CATEGORIES ================= */

.product-category {
    scroll-margin-top: 150px;
    margin-bottom: 47px;
}

.product-category > h2 {
    display: flex;
    align-items: center;
    gap: 15px;

    margin: 0 0 18px;

    color: var(--brown);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
}

.product-category > h2::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(
        90deg,
        rgba(81,50,40,.20),
        rgba(81,50,40,0)
    );
}

/* ================= PRODUCT GRID ================= */

.shop .grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
}

/* ================= PRODUCT CARD ================= */

.shop .card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;

    min-width: 0;
    padding: 0 0 15px;

    background: rgba(255,252,247,.96);
    border: 1px solid rgba(79,50,40,.08);
    border-radius: 19px;

    box-shadow: 0 6px 20px rgba(56,34,27,.055);

    cursor: pointer;

    transition:
        transform .20s ease,
        box-shadow .20s ease;
}

.shop .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(56,34,27,.11);
}

.shop .pic {
    width: 100%;
    height: 190px;
    overflow: hidden;

    display: grid;
    place-items: center;

    background:
        radial-gradient(circle, #f2e8dd, #e8ddd2);

    border-radius: 0;
    font-size: 46px;
}

.shop .pic img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.shop .card:hover .pic img {
    transform: scale(1.035);
}

.shop .card h3 {
    min-height: 43px;
    margin: 14px 15px 3px;

    color: #2d231f;

    font-size: 13px;
    line-height: 1.35;
}

.shop .card > strong {
    margin: 2px 15px 9px;

    color: #922b23;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
}

/* ================= QUANTITY ================= */

.shop .qty {
    width: calc(100% - 30px);
    height: 41px;

    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 3px;

    margin: auto 15px 0;
    padding: 3px;

    background: #f0e8df;
    border: 1px solid rgba(69,42,34,.06);
    border-radius: 13px;
}

.shop .qty button {
    width: 34px;
    height: 33px;

    display: grid;
    place-items: center;

    padding: 0;
    border: 0;
    border-radius: 10px;

    background: #fffdf9;
    color: var(--brown);

    font-size: 20px;
    cursor: pointer;
}

.shop .qty button:hover {
    background: var(--wine);
    color: white;
}

.shop .qty span {
    min-width: 0;
    text-align: center;
    color: var(--brown);
    font-size: 14px;
    font-weight: 700;
}

/* ================= MODALS ================= */

.modal {
    background: rgba(26,15,12,.72);
    backdrop-filter: blur(5px);
}

.dialog {
    width: min(560px, 100%);
    padding: 27px;

    background: #fffaf4;
    border-radius: 24px;

    box-shadow: 0 30px 80px rgba(0,0,0,.28);
}

.dialog > h2 {
    margin: 0 45px 20px 0;
    color: var(--brown);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
}

.dialog .x {
    top: 13px;
    right: 14px;

    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    background: #f0e7de;
    border-radius: 50%;
    cursor: pointer;
}

.cartrow {
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #e9ddd3;
}

.cartrow small {
    color: var(--muted);
}

.form {
    margin-top: 14px;
}

.form input,
.form select,
.form textarea {
    margin: 5px 0;
    padding: 13px 14px;

    background: white;
    border: 1px solid #ded1c7;
    border-radius: 12px;

    outline: none;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: rgba(145,43,35,.55);
    box-shadow: 0 0 0 3px rgba(145,43,35,.08);
}

.total {
    margin: 17px 0;
    padding: 15px 0;

    border-top: 1px solid #eadfd6;
    border-bottom: 1px solid #eadfd6;
}

.dialog .primary {
    width: 100%;
    min-height: 49px;

    background: linear-gradient(135deg, #9b2d24, #702019);
    border-radius: 13px;

    color: white;
    font-size: 15px;
}

.delivery-note {
    display: block;
    margin-top: 11px;

    color: var(--muted);

    text-align: center;
    line-height: 1.45;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .showcase {
        height: 340px;
        grid-template-columns: minmax(0, 1.65fr) minmax(250px, .9fr);
    }

    .shop .hero {
        padding: 35px;
    }

    .shop .hero h1 {
        font-size: 48px;
    }

    .hero-benefits {
        margin-top: 22px;
    }

    .shop .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   MOBILE
   Маскот СНАЧАЛА, баннер ПОД НИМ
   ========================================================= */

@media (max-width: 700px) {

    .top {
        height: 65px;
        padding: 0 12px;
    }

    .top b {
        font-size: 18px;
    }

    .top span {
        max-width: 180px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 9px;
    }

    .top .cartbtn {
        min-height: 39px;
        padding: 8px 11px;
        font-size: 12px;
    }

    .cartbtn i {
        min-width: 22px;
        height: 22px;
    }

    .shop {
        padding: 12px 10px 60px;
    }

    .showcase {
        height: auto;

        display: flex;
        flex-direction: column;

        gap: 10px;
        margin-bottom: 8px;
    }

    /* Маскот первый */

    .mascot-panel {
        order: 1;

        width: 100%;
        height: auto;
        aspect-ratio: 1.45 / 1;

        border-radius: 21px;
    }

    .mascot-panel img {
        object-fit: cover;
        object-position: center 24%;
    }

    /* Баннер второй */

    .shop .hero {
        order: 2;

        width: 100%;
        height: auto;
        min-height: 225px;

        padding: 28px 23px;

        border-radius: 21px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-kicker {
        margin-bottom: 8px;
        font-size: 15px;
    }

    .shop .hero h1 {
        margin-bottom: 12px;
        font-size: 37px;
        line-height: .98;
    }

    .shop .hero p {
        max-width: 300px;
        font-size: 13px;
    }

    .hero-benefits {
        display: grid;
        gap: 5px;
        margin-top: 18px;
        font-size: 10px;
    }

    /* Категории */

    .category-nav {
        top: 65px;

        gap: 7px;

        margin: 0 -10px 25px;
        padding: 10px;

        scroll-padding-left: 10px;
    }

    .category-nav a {
        flex: 0 0 auto;

        min-width: auto;
        padding: 10px 15px;

        font-size: 11px;
    }

    .product-category {
        scroll-margin-top: 125px;
        margin-bottom: 34px;
    }

    .product-category > h2 {
        margin-bottom: 12px;
        font-size: 24px;
    }

    /* 2 товара в ряд */

    .shop .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .shop .card {
        padding-bottom: 10px;
        border-radius: 15px;
    }

    .shop .pic {
        height: 135px;
        font-size: 38px;
    }

    .shop .card h3 {
        min-height: 39px;
        margin: 10px 10px 3px;

        font-size: 12px;
        line-height: 1.3;
    }

    .shop .card > strong {
        margin: 1px 10px 7px;

        font-size: 15px;
    }

    .shop .qty {
        width: calc(100% - 20px);
        height: 38px;

        grid-template-columns: 32px 1fr 32px;

        margin: auto 10px 0;
    }

    .shop .qty button {
        width: 30px;
        height: 30px;

        font-size: 18px;
    }

    .shop .qty span {
        font-size: 12px;
    }

    /* Корзина */

    .modal {
        padding: 7px;
    }

    .dialog {
        max-height: 95vh;
        padding: 20px 16px;
        border-radius: 20px;
    }

    .dialog > h2 {
        font-size: 25px;
    }
}

/* =========================================================
   VERY SMALL PHONE
   ========================================================= */

@media (max-width: 380px) {

    .mascot-panel {
        aspect-ratio: 1.35 / 1;
    }

    .shop .hero h1 {
        font-size: 33px;
    }

    .shop .pic {
        height: 120px;
    }

    .shop .card h3 {
        font-size: 11px;
    }

    .shop .card > strong {
        font-size: 14px;
    }
}

/* =========================================================
   МОДАЛЬНЫЕ ОКНА ВСЕГДА ПОВЕРХ ШАПКИ И КАТЕГОРИЙ
   ========================================================= */

.modal {
    z-index: 1000 !important;
}

.modal .dialog {
    position: relative;
    z-index: 1001;
}

.modal .x {
    position: absolute;
    z-index: 1002;
}

/* =========================================================
   MOBILE — МАСКОТ ПОКАЗЫВАЕМ ЦЕЛИКОМ БЕЗ ОБРЕЗКИ
   ========================================================= */

@media (max-width: 700px) {

    .mascot-panel {
        width: 100%;
        height: auto;
        aspect-ratio: auto;
        background: #ead8c7;
    }

    .mascot-panel img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
        object-position: center;
    }
}

@media (max-width: 380px) {
    .mascot-panel {
        aspect-ratio: auto;
    }
}

/* Скругление фотографий товаров */
.card .pic {
    border-radius: 14px;
    overflow: hidden;
}

.card .pic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
}


/* Квадратные фотографии товаров без обрезания */
.shop .card .pic {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.shop .card .pic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================================================
   КОНТАКТЫ
   ========================================================= */

.contacts {
    margin-top: 56px;
    margin-bottom: 28px;
    padding: 38px;
    background: linear-gradient(135deg, #2c1710 0%, #432218 100%);
    border-radius: 24px;
    color: #fff8ef;
    box-shadow: 0 14px 36px rgba(47, 24, 16, 0.16);
}

.contacts-inner {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 36px;
    align-items: center;
}

.contacts-kicker {
    display: block;
    margin-bottom: 7px;
    color: #e2b784;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.contacts-text h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 30px;
    line-height: 1.1;
}

.contacts-text p {
    margin: 0;
    max-width: 390px;
    color: rgba(255, 248, 239, 0.72);
    font-size: 15px;
    line-height: 1.5;
}

.contacts-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 78px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 17px;
    background: rgba(255,255,255,0.07);
    color: #fff;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.contact-link:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.22);
}

.contact-icon {
    display: flex;
    flex: 0 0 45px;
    width: 45px;
    height: 45px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.11);
    font-size: 21px;
}

.contact-link > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.contact-link small {
    color: rgba(255,255,255,0.60);
    font-size: 11px;
}

.contact-link strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.25;
}

.contact-whatsapp {
    background: rgba(255,255,255,0.10);
}

@media (max-width: 850px) {

    .contacts-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 700px) {

    .contacts {
        margin-top: 38px;
        margin-bottom: 18px;
        padding: 25px 18px;
        border-radius: 20px;
    }

    .contacts-text h2 {
        font-size: 26px;
    }

    .contacts-actions {
        grid-template-columns: 1fr;
    }

    .contact-link {
        min-height: 72px;
    }

    .contact-link strong {
        font-size: 16px;
    }
}

/* =========================================================
   ECO-НАКЛЕЙКА НА КАРТОЧКАХ ТОВАРОВ
   ========================================================= */

.shop .card .pic {
    position: relative;
}

.shop .card .eco-badge {
    position: absolute;
    z-index: 3;

    left: 9px;
    top: 62%;
    transform: translateY(-50%) rotate(-6deg);

    width: 54px;
    height: 54px;
    border-radius: 50%;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #2f6f3e;
    color: #fffdf3;

    border: 0;
    box-shadow:
        0 3px 9px rgba(0,0,0,.22),
        inset 0 0 0 2px rgba(255,255,255,.12);

    line-height: 1;
    pointer-events: none;
}

.shop .card .eco-badge .eco-leaf {
    font-size: 10px;
    line-height: 9px;
    margin-bottom: 2px;
}

.shop .card .eco-badge strong {
    margin: 0;
    color: inherit;
    font-family: Arial, sans-serif;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .5px;
}

.shop .card .eco-badge small {
    display: block;
    margin-top: 3px;
    color: inherit;
    font-family: Arial, sans-serif;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .25px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .shop .card .eco-badge {
        left: 6px;
        width: 46px;
        height: 46px;
        border-width: 0;
    }

    .shop .card .eco-badge .eco-leaf {
        font-size: 10px;
    }

    .shop .card .eco-badge strong {
        font-size: 15px;
    }

    .shop .card .eco-badge small {
        font-size: 6px;
    }
}


/* Поднимаем содержимое ECO-наклейки немного выше */
.shop .card .eco-badge > * {
    position: relative;
    top: -3px;
}

/* Чуть уменьшаем расстояние перед надписью "БЕЗ ХИМИИ" */
.shop .card .eco-badge small {
    margin-top: 2px;
}

