* {
    box-sizing: border-box;
}

:root {
    --bg: #fbf6ef;
    --card: #ffffff;
    --text: #2d241c;
    --muted: #7a6b5e;
    --brand: #9b5f2e;
    --brand-dark: #75451f;
    --brand-soft: #f0dfcc;
    --line: #eadfd4;
    --success-bg: #e6f6e8;
    --success-text: #1f7a35;
    --error-bg: #ffe8e3;
    --error-text: #a3291d;
    --info-bg: #eef3ff;
    --info-text: #3452a3;
    --shadow: 0 12px 30px rgba(80, 48, 22, 0.10);
    --radius: 22px;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

input,
textarea,
select,
button {
    font: inherit;
}
.account-addresses-hidden {
    display: none !important;
}
.wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px;
}

h1 {
    margin: 8px 0 18px;
    font-size: 32px;
    line-height: 1.1;
}

h2 {
    
    font-size: 24px;
    line-height: 1.15;
}

h3 {
    margin: 18px 0 12px;
    font-size: 19px;
}

/* HEADER */

.site-header {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 380px;
    margin: 0;
    padding: 0;
    background: #000;
}

.site-header__bg {
    position: absolute;
    inset: 0;
    background-image: url('/assets/components/bakery/img/header-bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.site-header__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.02),
        rgba(0,0,0,0.28)
    );
}
.cart-panel {display:none;}
.site-header__content {
    position: relative;
    z-index: 2;
    height: 380px;
    padding: 0 22px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.site-header__logo-image {
    width: 100%;
    max-width: 470px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 18px rgba(0,0,0,0.45));
}

/* MENU */

.site-nav {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin: -30px 0 30px;
}

.site-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    min-height: 50px;
    padding: 12px 20px;
    border-radius: 12px;
    background: #9b5f2e;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    transition: 0.2s;
}

.site-nav a:hover,
.site-nav a:active {
    background: var(--brand-dark);
}

/* HOME */

.bakery-home {
    display: grid;
    gap: 18px;
}

.home-hero,
.home-section {
    background: var(--card);
    border: 1px solid rgba(234,223,212,0.8);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.home-hero {
    padding: 28px 22px;
    position: relative;
    overflow: hidden;
}

.home-hero::after {
    content: "🥖";
    position: absolute;
    right: -8px;
    top: -8px;
    font-size: 92px;
    opacity: 0.08;
    transform: rotate(-15deg);
}

.home-hero h1 {
    max-width: 520px;
    margin-top: 0;
    font-size: 38px;
}

.home-hero__text {
    max-width: 560px;
    color: var(--muted);
    font-size: 20px;
    margin: 0 0 24px;
}

.home-actions {
    display: grid;
    gap: 12px;
}

.home-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 16px 18px;
    border-radius: 18px;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.home-btn--primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
}

.home-btn--secondary {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.home-section {
    padding: 22px;
}

.home-section p {
    margin: 0;
    color: var(--muted);
}

.home-steps {
    display: grid;
    gap: 12px;
}

.home-step {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff9f1;
    border-radius: 18px;
    padding: 14px;
}

.home-step strong {
    width: 42px;
    height: 42px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.home-step span {
    font-weight: 700;
}

.home-villages {
    display: grid;
    gap: 10px;
}

.home-villages div {
    background: var(--brand-soft);
    color: var(--brand-dark);
    padding: 15px;
    border-radius: 16px;
    font-weight: 800;
}

/* FORMS */

label {
    display: block;
    margin: 0 0 7px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 13px;
    background: #fff;
    color: var(--text);
    outline: none;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(155,95,46,0.12);
}

textarea {
    min-height: 105px;
    resize: vertical;
}

button {
    width: 100%;
    border: none;
    border-radius: 5px;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    padding: 16px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
}

/* SECTIONS */

.bakery-auth,
.bakery-account section,
.bakery-cart section {
    background: var(--card);
    border: 1px solid rgba(234,223,212,0.85);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 18px;
}

.bakery-auth {
    max-width: 520px;
    margin: 18px auto;
}

/* MESSAGES */

.message,
.bakery-auth__message {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}

.message:empty,
.bakery-auth__message:empty {
    display: none;
}

.message--success,
.bakery-auth__message--success {
    background: var(--success-bg);
    color: var(--success-text);
}

.message--error,
.bakery-auth__message--error {
    background: var(--error-bg);
    color: var(--error-text);
}

.message--info,
.bakery-auth__message--info {
    background: var(--info-bg);
    color: var(--info-text);
}

/* CATALOG */

.products-list {
    display: grid;
    gap: 18px;
}

.product-card {
    background: var(--card);
    border: 1px solid rgba(234,223,212,0.85);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-card__photo {
    min-width: 0;
}

.product-card__image {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.product-card__noimage {
    height: 220px;
    display: grid;
    place-items: center;
    font-size: 48px;
    background: var(--brand-soft);
}

.product-gallery {
    position: relative;
}

.product-gallery__slider {
    position: relative;
}

.product-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(45,36,28,0.64);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    z-index: 5;
    padding: 0 0 4px;
}

.product-gallery__arrow--left {
    left: 12px;
}

.product-gallery__arrow--right {
    right: 12px;
}

.product-card__body,
.product-card__main {
    padding: 18px;
}

.product-card h2 {
    margin-bottom: 8px;
}

.product-card p {
    margin: 10px 0;
    color: var(--muted);
}

.product-card__description {
    color: var(--muted);
    margin: 0 0 18px;
}

.product-card__price {
    display: inline-flex;
    width: fit-content;
    margin: 8px 0 18px;
    padding: 9px 13px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 20px;
    font-weight: 900;
}

.product-card__controls {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    gap: 10px;
    margin-top: 18px;
}

.product-card__controls input {
    height: 54px;
    margin: 0;
    text-align: center;
    font-size: 20px;
    font-weight: 900;
}

.product-card__controls button {
    height: 54px;
    padding: 0;
}

.product-card__controls button:last-child {
    grid-column: 1 / -1;
    height: 58px;
    font-size: 18px;
}

.product-card__side {
    display: none;
}

/* CART */

.cart-product-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    background: #fff;
    border: 1px solid rgba(234, 223, 212, 0.9);
    border-radius: 20px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 8px 20px rgba(80, 48, 22, 0.06);
}

.cart-product-card__image {
    width: 92px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    background: #f3e8dc;
}

.cart-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-product-card__noimage {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 34px;
}

.cart-product-card__content {
    min-width: 0;
}

.cart-product-card__top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.cart-product-card__title {
    font-size: 17px;
    font-weight: 900;
    line-height: 1.25;
}

.cart-product-card__weight {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
}

.cart-product-card__remove {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    padding: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    font-size: 24px;
    line-height: 1;
}

.cart-product-card__bottom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.cart-product-card__qty {
    width: 150px;
    display: grid;
    grid-template-columns: 42px 56px 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.cart-product-card__qty button {
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: var(--text) !important;
    box-shadow: none !important;
    font-size: 26px;
}

.cart-product-card__qty input {
    width: 56px !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-left: 1px solid var(--line) !important;
    border-right: 1px solid var(--line) !important;
    border-radius: 0 !important;
    text-align: center;
    font-weight: 900;
    font-size: 18px;
    box-shadow: none !important;
}

.cart-product-card__qty input::-webkit-outer-spin-button,
.cart-product-card__qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-product-card__qty input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-product-card__price {
    white-space: nowrap;
    font-size: 18px;
    font-weight: 900;
    color: var(--text);
}

.cart-total-line {
    display: block;
    margin-top: 16px;
    padding: 18px;
    border-radius: 20px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 22px;
}

/* RECEIVE OPTIONS */

.receive-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.bakery-cart .receive-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    margin: 0;
    padding: 14px;
    border-radius: 18px;
    background: #fff9f1;
    border: 2px solid var(--line);
    font-weight: 900;
    cursor: pointer;
}

.bakery-cart .receive-option input {
    width: auto;
    margin: 0 8px 0 0;
}

.bakery-cart .receive-option:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    color: var(--brand-dark);
}

/* TOAST */

#catalogMessage {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    max-width: 320px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.18);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
}

#catalogMessage:not(:empty) {
    transform: translateY(0);
    opacity: 1;
}

/* ADDRESS CHECKBOX */

.address-default {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 22px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.address-default input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 7px;
    border: 2px solid var(--brand);
    background: #fff;
    position: relative;
    cursor: pointer;
    transition: 0.2s ease;
    flex-shrink: 0;
}

.address-default input[type="checkbox"]:checked {
    background: var(--brand);
}

.address-default input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    font-weight: 900;
}

/* DESKTOP */

@media (min-width: 768px) {
 
.home-actions {
        grid-template-columns: repeat(2, 1fr);
        max-width: 560px;
    }

    .home-villages {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* FINAL PRODUCT LISTING */

@media (min-width: 900px) {
    .products-list {
        grid-template-columns: 1fr;
    }

    .product-card--listing {
        display: grid;
        grid-template-columns: 1fr 1.25fr 300px;
        gap: 24px;
        padding: 18px;
        align-items: stretch;
    }

    .product-card--listing .product-card__photo {
        min-width: 0;
    }

    .product-card--listing .product-card__image {
        width: 100%;
        height: 100%;
        min-height: 260px;
        border-radius: 20px;
        object-fit: cover;
    }

    .product-card--listing .product-card__main {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0;
        min-width: 0;
    }

    .product-card--listing .product-card__main h2 {
        margin: 0 0 12px;
        font-size: 26px;
    }

    .product-card__description {
        margin: 0 0 14px;
        color: var(--muted);
    }

    .product-card__price {
        margin: 0 0 24px;
    }

    .product-card--listing .product-card__controls {
        display: grid;
        grid-template-columns: 52px 95px 52px minmax(170px, 1fr);
        gap: 10px;
        max-width: 520px;
        margin-top: auto;
    }

    .product-card--listing .product-card__controls button:last-child {
        grid-column: auto;
        height: 54px;
    }

    .product-card__side {
        display: flex;
        align-items: center;
        
        padding-left: 17px;
    }

    .product-card__features {
        display: grid;
        gap: 10px;
        width: 100%;
    }

    .product-feature {
        background: #fff9f1;
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 12px 14px;
    }

    .product-feature span {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 14px;
    }

    .product-feature strong {
        display: block;
        font-size: 15px;
        line-height: 1.35;
    }
}

/* MOBILE PRODUCT FEATURES */

@media (max-width: 700px) {
    .product-card__side {
        display: block;
        padding: 0 14px 14px;
        border-left: none;
    }

    .product-card__features {
        display: grid;
        gap: 8px;
    }

    .product-feature {
        padding: 10px 12px;
        border-radius: 14px;
        background: #fff9f1;
        border: 1px solid var(--line);
    }

    .product-feature span {
        display: block;
        color: var(--muted);
        font-size: 13px;
        margin-bottom: 2px;
    }

    .product-feature strong {
        display: block;
        font-size: 14px;
        line-height: 1.35;
    }
}
/* MOBILE HEADER FIX */

@media (max-width: 700px) {
    .site-header {
        height: 150px;
        min-height: 150px;
    }

    .site-header__bg {
        background-size: cover;
        background-position: center top;
    }

    .site-header__overlay {
        background: linear-gradient(
            to bottom,
            rgba(0,0,0,0.02),
            rgba(0,0,0,0.22)
        );
    }

    .site-header__content {
        height: 150px;
        min-height: 150px;
        padding: 6px 10px 8px;
        justify-content: space-between;
    }

    .site-header__logo-image {
        max-width: 125px;
        margin: 0 auto;
    }

    .site-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin: 0;
    }

    .site-nav a {
        min-width: 0;
        min-height: 36px;
        padding: 6px 4px;
        border-radius: 7px;
        background: #9b5f2e;
        color: #fff;
        font-size: 11px;
        font-weight: 800;
    }
}
.home-step span {
    word-break: normal;
}

@media (max-width: 700px) {
    .home-step {
        gap: 12px;
        padding: 14px 12px;
    }

    .home-step strong {
        width: 38px;
        height: 38px;
        min-width: 38px;
        font-size: 18px;
    }

    .home-step span {
        flex: 1;
        font-size: 16px;
        line-height: 1.35;
    }
}
/* MOBILE CART FIX */

@media (max-width: 700px) {

    .bakery-cart section {
        padding: 14px;
    }

    .cart-product-card {
        display: flex;
        flex-direction: column;

        gap: 14px;

        padding: 14px;

        border-radius: 22px;
    }

    .cart-product-card__top {
        display: grid;
        grid-template-columns: 92px 1fr 34px;

        align-items: start;

        gap: 12px;

        margin-bottom: 0;
    }

    .cart-product-card__image {
        width: 92px;
        height: 92px;

        border-radius: 16px;
    }

    .cart-product-card__content {
        min-width: 0;
    }

    .cart-product-card__title {
        font-size: 18px;
        line-height: 1.2;

        margin-bottom: 4px;
    }

    .cart-product-card__weight {
        font-size: 15px;
    }

    .cart-product-card__remove {
        margin-top: -2px;
    }

    .cart-product-card__bottom {
        display: flex;

        align-items: center;
        justify-content: space-between;

        gap: 12px;
    }

    .cart-product-card__qty {
        width: 170px;

        grid-template-columns: 52px 66px 52px;

        height: 52px;
    }

    .cart-product-card__qty button {
        width: 52px !important;
        height: 52px !important;

        font-size: 28px;
    }

    .cart-product-card__qty input {
        width: 66px !important;
        height: 52px !important;

        font-size: 22px;
    }

    .cart-product-card__price {
        font-size: 20px;

        text-align: right;
    }

    .cart-total-line {
        font-size: 22px;

        padding: 18px;
    }
}
/* MOBILE CART CARD */

@media (max-width: 700px) {

    .cart-product-card {
        position: relative;

        display: flex;
        flex-direction: column;

        gap: 16px;

        padding: 16px;

        border-radius: 24px;
    }

    /* ВЕРХ */

    .cart-product-card__top {
        display: grid;
        grid-template-columns: 92px 1fr;
        gap: 14px;

        align-items: start;

        margin-bottom: 0;
    }

    .cart-product-card__image {
        width: 92px;
        height: 92px;

        border-radius: 16px;

        overflow: hidden;

        flex-shrink: 0;
    }

    .cart-product-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .cart-product-card__content {
        min-width: 0;
    }

    .cart-product-card__title {
        font-size: 18px;
        font-weight: 900;
        line-height: 1.2;

        margin: 0 34px 6px 0;
    }

    .cart-product-card__weight {
        font-size: 15px;
        color: var(--muted);

        margin: 0;
    }

    /* КРЕСТИК */

    .cart-product-card__remove {
        position: absolute;

        top: 14px;
        right: 14px;

        width: 34px !important;
        height: 34px !important;

        display: flex;
        align-items: center;
        justify-content: center;

        padding: 0 !important;

        background: transparent !important;
        color: var(--muted) !important;

        border-radius: 50% !important;

        font-size: 28px;
        line-height: 1;

        box-shadow: none !important;
    }

    /* НИЗ */

    .cart-product-card__bottom {
        display: flex;

        align-items: center;
        justify-content: space-between;

        gap: 12px;
    }

    .cart-product-card__qty {
        flex: 1;

        max-width: 180px;

        height: 52px;

        display: grid;
        grid-template-columns: 52px 1fr 52px;

        border-radius: 16px;

        overflow: hidden;

        border: 1px solid var(--line);

        background: #fff;
    }

    .cart-product-card__qty button {
        width: 52px !important;
        height: 52px !important;

        padding: 0 !important;

        border-radius: 0 !important;

        background: #fff !important;

        color: var(--text) !important;

        font-size: 30px;

        box-shadow: none !important;
    }

    .cart-product-card__qty input {
        width: 100% !important;
        height: 52px !important;

        margin: 0 !important;
        padding: 0 !important;

        border: none !important;

        border-left: 1px solid var(--line) !important;
        border-right: 1px solid var(--line) !important;

        border-radius: 0 !important;

        text-align: center;

        font-size: 20px;
        font-weight: 900;

        box-shadow: none !important;
    }

    .cart-product-card__price {
        white-space: nowrap;

        font-size: 20px;
        font-weight: 900;

        color: var(--text);
    }
}
.bakery-auth button + button {
    margin-top: 12px;
}

@media (max-width: 700px) {
    .cart-product-card {
        position: relative;
        display: grid;
        grid-template-columns: 92px 1fr;
        gap: 14px;
        padding: 14px;
    }

    .cart-product-card__image {
        grid-column: 1;
        grid-row: 1;
        width: 92px;
        height: 92px;
    }

    .cart-product-card__content {
        display: contents;
    }

    .cart-product-card__top {
        grid-column: 2;
        grid-row: 1;
        display: block;
        margin: 0;
        padding-right: 34px;
    }

    .cart-product-card__title {
        font-size: 18px;
        line-height: 1.2;
        margin: 0 0 6px;
    }

    .cart-product-card__weight {
        font-size: 15px;
        margin: 0;
    }

    .cart-product-card__remove {
        position: absolute;
        top: 12px;
        right: 12px;
    }

    .cart-product-card__bottom {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 8px;
    }

    .cart-product-card__qty {
        width: 180px;
        height: 52px;
        grid-template-columns: 52px 76px 52px;
    }

    .cart-product-card__price {
        font-size: 20px;
        white-space: nowrap;
    }

    .receive-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bakery-cart .receive-option {
        width: 100%;
        justify-content: flex-start;
    }
}