/* =========================
   KAMIEL COMPONENTS CSS
   full clean replacement
   header / search / cards / footer / wishlist / cart drawer
   ========================= */

/* ---------- Buttons ---------- */

.btn {
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid var(--camel);
    border-radius: 7px;
    background: transparent;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--tr);
    letter-spacing: .01em;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--camel);
    color: #fff;
}

.btn-primary {
    background: var(--camel);
    color: #fff;
}

.btn-primary:hover {
    background: var(--camel-dark);
    border-color: var(--camel-dark);
}

.btn-ghost {
    border-color: transparent;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-full {
    width: 100%;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(184, 150, 130, .96);
    backdrop-filter: blur(12px);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 2px 16px rgba(63, 48, 41, .06);
}

.header-inner {
    height: 66px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 18px;
    width: min(1220px, calc(100% - 64px));
    margin: auto;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 15px;
    font-weight: 500;
}

.header-nav a,
.header-nav button,
.catalog-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    opacity: .96;
    transition: opacity .18s ease, transform .18s ease;
}

.header-nav a::after,
.header-nav button::after,
.catalog-trigger::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .2s ease;
}

.header-nav a:hover,
.header-nav button:hover,
.catalog-trigger:hover {
    opacity: .72;
    transform: translateY(-1px);
}

.header-nav a:hover::after,
.header-nav button:hover::after,
.catalog-trigger:hover::after {
    transform: scaleX(1);
}

.logo {
    font-family: var(--serif);
    font-size: 31px;
    letter-spacing: .38em;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transform: translateX(.19em);
}

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
}

.icon-btn,
.header-icon-btn {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;
    border: 0;
    background: transparent;
    color: #fff;
    display: inline-grid;
    place-items: center;
    position: relative;
    cursor: pointer;
    opacity: .96;
    transition: opacity .18s ease, transform .18s ease;
}

.icon-btn:hover,
.header-icon-btn:hover {
    opacity: .7;
    transform: translateY(-1px);
    color: #fff;
}

.header-icon {
    width: 25px;
    height: 25px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.header-icon-search {
    background-image: url("data:image/svg+xml,%3Csvg width='35' height='35' viewBox='0 0 35 35' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='15' cy='15' r='9' stroke='white' stroke-width='2.4'/%3E%3Cpath d='M22 22L30 30' stroke='white' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

.header-icon-heart {
    background-image: url("data:image/svg+xml,%3Csvg width='35' height='35' viewBox='0 0 35 35' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.5 28.5C17.5 28.5 6.5 21.8 6.5 13.8C6.5 9.9 9.2 7.4 12.6 7.4C14.8 7.4 16.4 8.6 17.5 10.2C18.6 8.6 20.2 7.4 22.4 7.4C25.8 7.4 28.5 9.9 28.5 13.8C28.5 21.8 17.5 28.5 17.5 28.5Z' stroke='white' stroke-width='2.2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.header-icon-bag {
    background-image: url("data:image/svg+xml,%3Csvg width='35' height='35' viewBox='0 0 35 35' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.5 13H25.5L27 29H8L9.5 13Z' stroke='white' stroke-width='2.2' stroke-linejoin='round'/%3E%3Cpath d='M13.2 13C13.2 8.8 15 6.5 17.5 6.5C20 6.5 21.8 8.8 21.8 13' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.counter {
    position: absolute;
    right: -2px;
    top: -3px;
    background: var(--text);
    color: #fff;
    border-radius: 50%;
    font-size: 10px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    line-height: 1;
}

.header-svg {
    display: none !important;
}

.burger {
    display: none;
}

/* ---------- Mega catalog ---------- */

.mega-wrap {
    position: fixed;
    z-index: 90;
    left: 50%;
    top: 66px;
    transform: translateX(-50%);
    width: min(980px, calc(100vw - 120px));
    background: var(--bg-light);
    border: 1px solid var(--border);
    box-shadow: 0 18px 55px rgba(63, 48, 41, .14);
    display: none;
    color: var(--text);
    overflow: hidden;
}

.mega-wrap.is-open {
    display: block;
    animation: megaFade .16s ease;
}

.mega-body {
    display: flex;
    align-items: stretch;
    min-height: 330px;
    max-height: 430px;
    overflow: hidden;
}

.mega-col {
    width: 245px;
    min-width: 245px;
    max-width: 245px;
    border-right: 1px solid var(--border);
    padding: 14px 0;
    max-height: 430px;
    overflow-y: auto;
    background: var(--bg-light);
}

.mega-col:last-child {
    border-right: 0;
}

.mega-item {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border: 0;
    background: transparent;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.2;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.mega-item:hover,
.mega-item.active {
    background: var(--camel);
    color: #fff;
}

.mega-arrow {
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1;
    opacity: .9;
}

.mega-close {
    position: absolute;
    right: 12px;
    top: 8px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.mega-close:hover {
    color: var(--text);
}

.mega-preview,
[data-mega-preview] {
    display: none !important;
}

/* ---------- Header search ---------- */

.header-search-overlay {
    position: fixed;
    left: 50%;
    top: 66px;
    z-index: 95;
    width: min(760px, calc(100vw - 180px));
    max-height: calc(100vh - 110px);
    transform: translateX(-50%);
    display: none;
    background: rgba(255, 247, 241, .96);
    border: 1px solid rgba(216, 191, 175, .72);
    box-shadow: 0 18px 48px rgba(63, 48, 41, .12);
    color: var(--text);
    overflow: hidden;
}

.header-search-overlay.is-open {
    display: block;
    animation: searchDrop .16s ease;
}

.header-search-panel {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 110px);
    overflow: auto;
    background: transparent;
    padding: 22px 30px 30px;
}

.header-search-label {
    display: none;
}

.header-search-input {
    width: calc(100% - 54px);
    height: 42px;
    border: 1px solid rgba(216, 191, 175, .72);
    border-radius: 8px;
    background: rgba(234, 216, 203, .48);
    color: var(--text);
    padding: 0 16px;
    font-family: var(--serif);
    font-size: 20px;
    outline: none;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.header-search-input:focus {
    background: rgba(255, 250, 247, .94);
    border-color: var(--camel);
    box-shadow: 0 0 0 3px rgba(184, 150, 130, .11);
}

.header-search-input::placeholder {
    color: rgba(63, 48, 41, .45);
}

.header-search-input::-webkit-search-cancel-button,
.header-search-input::-webkit-search-decoration {
    appearance: none;
    -webkit-appearance: none;
    display: none;
}

.header-search-close {
    position: absolute;
    right: 10px;
    top: 22px;
    z-index: 5;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: rgba(63, 48, 41, .62);
    font-size: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .85;
    transition: opacity .18s ease, color .18s ease;
}

.header-search-close:hover {
    opacity: 1;
    color: var(--text);
}

.header-search-subtitle {
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    margin: 24px 0 18px;
    color: var(--text);
}

.header-search-results {
    min-height: 120px;
}

.search-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.search-product-card {
    background: rgba(255, 250, 247, .78);
    border: 1px solid rgba(216, 191, 175, .58);
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.search-product-card:hover {
    border-color: var(--camel);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(63, 48, 41, .08);
}

.search-product-img {
    display: block;
    height: 128px;
    background: rgba(255, 255, 255, .68);
    overflow: hidden;
}

.search-product-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: transform .18s ease;
}

.search-product-card:hover .search-product-img img {
    transform: scale(1.035);
}

.search-product-body {
    padding: 11px 13px 13px;
}

.search-product-code {
    min-height: 15px;
    margin-bottom: 5px;
    font-size: 10px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.search-product-title {
    display: block;
    min-height: 38px;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 1.18;
    color: var(--text);
    text-decoration: none;
}

.search-product-title:hover {
    color: var(--camel-dark);
}

.search-product-price {
    margin: 8px 0 10px;
    font-size: 15px;
    font-weight: 600;
}

.search-product-actions {
    display: grid;
    grid-template-columns: 1fr 36px;
    gap: 8px;
}

.search-buy-btn,
.search-wish-btn {
    height: 36px;
    border: 0;
    border-radius: 7px;
    background: var(--camel);
    color: #fff;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.search-buy-btn:hover,
.search-wish-btn:hover {
    background: var(--camel-dark);
    transform: translateY(-1px);
}

.search-wish-btn {
    background: rgba(234, 216, 203, .9);
    color: var(--text);
    font-size: 18px;
}

.search-wish-btn.active {
    background: var(--camel);
    color: #fff;
}

.search-empty {
    min-height: 160px;
    display: grid;
    place-items: center;
    align-content: center;
    text-align: center;
    gap: 10px;
    border: 1px solid rgba(216, 191, 175, .56);
    background: rgba(255, 250, 247, .62);
}

.search-empty h3 {
    font-family: var(--serif);
    font-size: 27px;
    font-weight: 400;
    margin: 0;
}

.search-empty p {
    max-width: 360px;
    margin: 0;
    color: var(--muted);
}

/* ---------- Old overlays / drawer / modal ---------- */

.search-overlay,
.drawer-overlay,
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(63, 48, 41, .34);
    z-index: 100;
    display: none;
}

.search-overlay.is-open,
.drawer-overlay.is-open,
.modal-overlay.is-open {
    display: block;
}

.drawer {
    position: fixed;
    z-index: 110;
    right: 0;
    top: 0;
    height: 100vh;
    width: min(430px, 100vw);
    background: var(--bg-light);
    transform: translateX(100%);
    transition: .24s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.drawer.is-open {
    transform: none;
}

.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.drawer-body {
    padding: 18px;
    overflow: auto;
}

.mobile-menu {
    display: grid;
    gap: 10px;
}

.mobile-menu a,
.mobile-menu button {
    padding: 13px;
    border: 1px solid var(--border);
    background: #fff;
    text-align: left;
}

/* ---------- Product cards ---------- */

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

.product-card {
    background: #fdf8f3;
    border: 1px solid rgba(216, 191, 175, .75);
    transition: var(--tr);
    position: relative;
    min-width: 0;
    overflow: visible;
}

.product-card:hover {
    border-color: var(--camel);
    transform: translateY(-2px);
}

.product-link {
    color: inherit;
    text-decoration: none;
}

.product-media {
    aspect-ratio: 1 / 1;
    background: #fffaf7;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--tr);
}

.product-card:hover img {
    transform: scale(1.04);
}

.product-info {
    padding: 12px;
}

.brand {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.product-title {
    font-family: var(--serif);
    font-size: 17px;
    line-height: 1.1;
    margin: 5px 0;
    min-height: 38px;
}

.product-path {
    font-size: 10.5px;
    color: var(--muted);
    min-height: 32px;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
}

.price {
    font-weight: 600;
}

.old-price {
    text-decoration: line-through;
    color: var(--muted);
    font-size: 13px;
}

.badge {
    display: inline-flex;
    font-size: 11px;
    padding: 3px 7px;
    background: var(--camel);
    color: #fff;
}

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

.product-card .wishlist-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 30;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 247, 241, .72);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    opacity: 1;
    visibility: visible;
    transform: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease, opacity .18s ease;
}

.product-card .wishlist-btn:hover {
    background: rgba(184, 150, 130, .9);
    color: #fff;
    transform: translateY(-1px);
}

.product-card .wishlist-btn.active,
.product-card .wishlist-btn.is-active {
    background: var(--camel);
    color: #fff;
}

.product-card .wishlist-btn::before,
.product-card .wishlist-btn::after {
    content: none !important;
    display: none !important;
}

/* ---------- Wishlist drawer ---------- */

.drawer-open,
body.drawer-open {
    overflow: hidden;
}

.wishlist-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 890;
    background: rgba(43, 32, 27, .34);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
}

.wishlist-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.wishlist-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 900;
    width: min(760px, 72vw);
    height: 100vh;
    background: var(--bg);
    border-left: 1px solid rgba(216, 191, 175, .9);
    box-shadow: -20px 0 60px rgba(63, 48, 41, .14);
    transform: translateX(100%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.wishlist-drawer.is-open {
    transform: translateX(0);
}

.wishlist-drawer-head {
    flex: 0 0 auto;
    min-height: 118px;
    padding: 30px 42px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid rgba(216, 191, 175, .82);
}

.wishlist-drawer-head span {
    display: block;
    margin-bottom: 8px;
    color: var(--camel-dark);
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.wishlist-drawer-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 46px;
    line-height: .95;
    font-weight: 400;
    color: var(--text);
}

.wishlist-drawer-head button {
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 38px;
    line-height: 1;
    font-weight: 300;
    cursor: pointer;
}

.wishlist-drawer-body {
    flex: 1 1 auto;
    padding: 32px 42px;
    overflow-y: auto;
    overflow-x: hidden;
}

.wishlist-drawer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.wishlist-drawer .product-card {
    background: rgba(255, 247, 241, .72);
    border: 1px solid rgba(216, 191, 175, .82);
    overflow: hidden;
}

.wishlist-drawer .product-media {
    padding: 0;
    margin: 0;
    border: 0;
    aspect-ratio: 1 / 1.02;
    background: #f6ebe4;
    display: block;
    overflow: hidden;
}

.wishlist-drawer .product-media img {
    width: 100%;
    height: 100%;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
}

.wishlist-drawer-empty {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.wishlist-drawer-empty span {
    margin-bottom: 14px;
    color: var(--camel-dark);
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.wishlist-drawer-empty h3 {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 36px;
    line-height: 1;
    font-weight: 400;
}

.wishlist-drawer-empty p {
    max-width: 360px;
    margin: 0 0 24px;
    color: var(--muted);
    line-height: 1.5;
}

/* ---------- Cart drawer ---------- */

.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(63, 48, 41, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s ease, visibility .24s ease;
}

.cart-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.cart-drawer-side {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 999;
    width: min(680px, 46vw);
    height: 100vh;
    background: #fbf1ec;
    border-left: 1px solid rgba(216, 191, 175, .85);
    box-shadow: -18px 0 42px rgba(63, 48, 41, .10);
    transform: translateX(100%);
    transition: transform .28s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-drawer-side.is-open {
    transform: translateX(0);
}

.cart-drawer-head {
    flex: 0 0 auto;
    min-height: 96px;
    padding: 24px 40px 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(255, 247, 241, .72);
    border-bottom: 1px solid rgba(216, 191, 175, .75);
}

.cart-drawer-head span {
    display: block;
    margin-bottom: 5px;
    color: var(--camel-dark);
    font-size: 11px;
    line-height: 1;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.cart-drawer-head h2 {
    margin: 0;
    font-family: var(--serif);
    font-size: 38px;
    line-height: .95;
    font-weight: 400;
    color: var(--text);
}

.cart-drawer-head button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.cart-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 26px 40px;
    overflow-y: auto;
    overflow-x: hidden;
}

.cart-drawer-body::-webkit-scrollbar {
    width: 4px;
}

.cart-drawer-body::-webkit-scrollbar-thumb {
    background: rgba(184, 150, 130, .52);
}

.cart-drawer-list {
    display: grid;
    gap: 14px;
}

.cart-drawer-item {
    position: relative;
    min-height: 112px;
    padding: 14px 46px 14px 14px;
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 16px;
    background: rgba(255, 250, 247, .82);
    border: 1px solid rgba(216, 191, 175, .82);
    box-shadow: none;
}

.cart-drawer-img {
    width: 86px;
    height: 86px;
    display: block;
    overflow: hidden;
    background: #d8b7a8;
}

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

.cart-drawer-info {
    min-width: 0;
    padding: 0;
    display: grid;
    align-content: start;
}

.cart-drawer-brand {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.cart-drawer-title {
    display: block;
    margin: 0 0 8px;
    color: var(--text);
    text-decoration: none;
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.12;
    font-weight: 400;
}

.cart-drawer-title:hover {
    color: var(--camel-dark);
}

.cart-drawer-category,
.cart-drawer-option {
    display: none;
}

.cart-drawer-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    margin: 2px 0 0;
    padding: 0;
}

.cart-drawer-qty {
    width: 96px;
    height: 30px;
    display: grid;
    grid-template-columns: 30px 36px 30px;
    border: 1px solid rgba(216, 191, 175, .9);
    background: rgba(255, 247, 241, .64);
}

.cart-drawer-qty button,
.cart-drawer-qty span {
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-right: 1px solid rgba(216, 191, 175, .9);
    background: transparent;
    color: var(--text);
    font-size: 14px;
    line-height: 1;
    font-weight: 500;
}

.cart-drawer-qty button:last-child {
    border-right: 0;
}

.cart-drawer-qty button {
    cursor: pointer;
}

.cart-drawer-qty button:hover {
    background: rgba(184, 150, 130, .14);
}

.cart-drawer-bottom strong {
    color: var(--text);
    font-size: 17px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.cart-drawer-remove {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0;
    line-height: 1;
}

.cart-drawer-remove::before {
    content: "🗑";
    font-size: 14px;
    line-height: 1;
}

.cart-drawer-remove:hover {
    color: var(--text);
}

.cart-drawer-footer {
    flex: 0 0 auto;
    min-height: 136px;
    padding: 22px 40px 26px;
    background: rgba(255, 247, 241, .72);
    border-top: 1px solid rgba(216, 191, 175, .75);
}

.cart-drawer-summary {
    width: 100%;
    max-width: 300px;
    margin: 0;
}

.cart-drawer-total {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 20px;
    margin: 0 0 16px;
}

.cart-drawer-total span {
    font-family: var(--serif);
    font-size: 26px;
    line-height: 1;
    font-weight: 400;
    color: var(--text);
}

.cart-drawer-total strong {
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}

.cart-drawer-summary .btn,
.cart-drawer-footer .btn {
    width: 238px;
    height: 46px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 500;
}

.cart-drawer-empty {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.cart-drawer-empty span {
    margin-bottom: 10px;
    color: var(--camel-dark);
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.cart-drawer-empty h3 {
    margin: 0 0 12px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 400;
    color: var(--text);
}

.cart-drawer-empty p {
    max-width: 320px;
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.45;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 44px 0 34px;
    margin-top: 60px;
}

.footer-grid {
    width: min(1040px, calc(100% - 80px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 36px;
    align-items: start;
}

.footer-brand p {
    margin: 6px 0;
    color: var(--muted);
}

.footer-logo {
    display: inline-block;
    font-family: var(--serif);
    letter-spacing: .33em;
    font-size: 30px;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 12px;
}

.footer-col {
    border-left: 1px solid var(--border);
    padding-left: 24px;
}

.footer-col h3 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
    margin: 0 0 12px;
    color: var(--text);
}

.footer-col a {
    display: block;
    margin: 7px 0;
    color: var(--muted);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-col p {
    margin: 7px 0;
    color: var(--muted);
}

.footer-dev-link {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    transition: opacity .18s ease;
}

.footer-dev-link:hover {
    opacity: .65;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.footer-social-link {
    width: 24px;
    height: 24px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    text-decoration: none;
    color: var(--text);
    opacity: .9;
    transition: opacity .18s ease, transform .18s ease;
}

.footer-social-link:hover {
    opacity: .6;
    transform: translateY(-1px);
}

.footer-social-link img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

/* ---------- Toast / modal / form ---------- */

.toast-root {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 200;
    display: grid;
    gap: 10px;
}

.toast {
    background: var(--text);
    color: #fff;
    padding: 12px 16px;
    box-shadow: var(--shadow);
}

.modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-light);
    border: 1px solid var(--border);
    z-index: 130;
    width: min(460px, calc(100vw - 30px));
    padding: 24px;
    display: none;
}

.modal.is-open {
    display: block;
}

.form-field {
    display: grid;
    gap: 6px;
    margin-bottom: 14px;
}

.form-field label {
    font-size: 13px;
    color: var(--muted);
}

.input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #fff;
    padding: 12px;
    color: var(--text);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.error {
    color: var(--danger);
    font-size: 12px;
}

.qty {
    display: inline-flex;
    border: 1px solid var(--border);
}

.qty button,
.qty span {
    width: 38px;
    height: 36px;
    border: 0;
    background: #fff;
    display: grid;
    place-items: center;
}

.qty span {
    border-inline: 1px solid var(--border);
}

/* ---------- Animations ---------- */

@keyframes megaFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes searchDrop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
    .cart-drawer-side {
        width: min(680px, 58vw);
    }
}

@media (max-width: 900px) {
    .header-inner {
        width: min(100% - 28px, 1220px);
        grid-template-columns: 1fr auto 1fr;
    }

    .header-nav {
        display: none;
    }

    .burger {
        display: inline-grid;
        gap: 4px;
        width: 35px;
        height: 35px;
        place-items: center;
        border: 0;
        background: transparent;
    }

    .burger span {
        width: 20px;
        height: 1px;
        background: #fff;
        display: block;
    }

    .mega-wrap {
        width: calc(100vw - 28px);
        top: 66px;
    }

    .mega-body {
        overflow-x: auto;
    }

    .mega-col {
        width: 230px;
        min-width: 230px;
        max-width: 230px;
    }

    .header-search-overlay {
        width: calc(100vw - 44px);
    }

    .search-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .wishlist-drawer {
        width: min(86vw, 620px);
    }

    .footer-grid {
        width: min(100% - 36px, 1040px);
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
}

@media (max-width: 820px) {
    .cart-drawer-side,
    .wishlist-drawer {
        width: 100vw;
    }

    .cart-drawer-head {
        min-height: 86px;
        padding: 22px 22px 16px;
    }

    .cart-drawer-head h2 {
        font-size: 34px;
    }

    .cart-drawer-body {
        padding: 20px 22px;
    }

    .cart-drawer-footer {
        min-height: 136px;
        padding: 20px 22px 24px;
    }

    .cart-drawer-item {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 13px;
        padding: 13px 40px 13px 13px;
    }

    .cart-drawer-img {
        width: 76px;
        height: 76px;
    }

    .cart-drawer-title {
        font-size: 17px;
    }

    .cart-drawer-bottom {
        gap: 12px;
    }

    .cart-drawer-summary {
        max-width: none;
    }

    .cart-drawer-summary .btn,
    .cart-drawer-footer .btn {
        width: 100%;
    }

    .wishlist-drawer-head {
        padding: 24px 22px 20px;
    }

    .wishlist-drawer-head h2 {
        font-size: 34px;
    }

    .wishlist-drawer-body {
        padding: 22px;
    }

    .wishlist-drawer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .logo {
        font-size: 24px;
    }

    .header-actions {
        gap: 6px;
    }

    .mega-wrap {
        left: 14px;
        right: 14px;
        transform: none;
        width: auto;
    }

    .mega-col {
        width: 210px;
        min-width: 210px;
        max-width: 210px;
    }

    .mega-item {
        font-size: 15px;
    }

    .header-search-overlay {
        left: 14px;
        right: 14px;
        width: auto;
        transform: none;
    }

    .header-search-overlay.is-open {
        animation: none;
    }

    .header-search-panel {
        padding: 18px 16px 22px;
    }

    .header-search-input {
        width: calc(100% - 46px);
        height: 42px;
        font-size: 17px;
    }

    .header-search-subtitle {
        font-size: 22px;
    }

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

    .search-product-img {
        height: 170px;
    }

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

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

    .footer-col {
        border-left: 0;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 18px;
    }
}

/* цена внутри карточки корзины */
.cart-drawer-item .cart-drawer-bottom strong,
.cart-drawer-item .cart-drawer-meta strong,
.cart-drawer-item .cart-drawer-price,
.cart-drawer-item strong {
    color: #2f241f !important;
    background: transparent !important;
    text-shadow: none !important;
}



.api-offline-banner {
  padding: 14px 24px;
  background: #fff4e8;
  color: #5f3f32;
  border-bottom: 1px solid rgba(95, 63, 50, 0.18);
  font-size: 14px;
  text-align: center;
}

.api-offline-banner b {
  font-weight: 700;
}

.api-online-banner,
.api-offline-banner {
  padding: 10px 18px;
  font-size: 14px;
  text-align: center;
  line-height: 1.45;
}

.api-online-banner {
  background: #eef7ef;
  color: #2f5e35;
}

.api-offline-banner {
  background: #fff3e7;
  color: #8a4b22;
}

/* =========================================================
   FIX: drawers must not create horizontal scroll
   cart / wishlist visible only after click
   ========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body.drawer-open {
    overflow: hidden;
}

/* overlays не должны ловить клики, пока закрыты */
.wishlist-drawer-overlay,
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.wishlist-drawer-overlay.is-open,
.cart-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* wishlist drawer */
.wishlist-drawer {
    position: fixed !important;
    top: 0;
    right: 0;
    left: auto !important;
    height: 100dvh;
    max-height: 100dvh;
    transform: translate3d(100%, 0, 0) !important;
    visibility: hidden;
    pointer-events: none;
    will-change: transform;
}

.wishlist-drawer.is-open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible;
    pointer-events: auto;
}

/* cart drawer */
.cart-drawer-side {
    position: fixed !important;
    top: 0;
    right: 0;
    left: auto !important;
    height: 100dvh;
    max-height: 100dvh;
    transform: translate3d(100%, 0, 0) !important;
    visibility: hidden;
    pointer-events: none;
    will-change: transform;
}

.cart-drawer-side.is-open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible;
    pointer-events: auto;
}

/* чтобы body/header не расширялись из-за fixed элементов */
.site-header,
.app-shell,
.main {
    max-width: 100%;
    overflow-x: clip;
}

/* мобильный размер drawer */
@media (max-width: 760px) {
    .wishlist-drawer,
    .cart-drawer-side {
        width: 100vw !important;
    }
}
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(184, 150, 130, .96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 2px 16px rgba(63, 48, 41, .06);
}

/* =========================================================
   FINAL FIX: fixed header must not cover page content
   ========================================================= */

:root {
    --header-height: 66px;
}

html {
    scroll-padding-top: var(--header-height);
}

body {
    padding-top: var(--header-height) !important;
}

/* header остается fixed */
.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: var(--header-height) !important;
    z-index: 1000 !important;
}

/* чтобы dropdown catalog/search начинались ниже header */
.mega-wrap,
.header-search-overlay {
    top: var(--header-height) !important;
}

/* если где-то есть sticky-блоки справа/слева */
.summary,
.checkout-summary,
.offer-side,
.returns-note,
.privacy-note {
    top: calc(var(--header-height) + 22px) !important;
}

@media (max-width: 900px) {
    :root {
        --header-height: 66px;
    }

    body {
        padding-top: var(--header-height) !important;
    }

    .mega-wrap,
    .header-search-overlay {
        top: var(--header-height) !important;
    }
}

/* =========================================================
   CART DRAWER FIX — option color + trash icon
   ========================================================= */

.cart-drawer-side {
    overflow-x: hidden !important;
}

.cart-drawer-body {
    overflow-x: hidden !important;
}

.cart-drawer-item {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;

    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) 34px !important;
    gap: 22px !important;
    align-items: start !important;
}

.cart-drawer-info {
    min-width: 0 !important;
}

.cart-drawer-title {
    color: var(--text) !important;
    word-break: break-word !important;
}

.cart-drawer-option-line {
    color: var(--muted) !important;
    font-size: 15px !important;
    line-height: 1.3 !important;
    margin: 8px 0 10px !important;
    opacity: 1 !important;
}

.cart-drawer-remove {
    width: 28px !important;
    height: 28px !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    background: transparent !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    cursor: pointer !important;
    opacity: .75 !important;
    transition: opacity .18s ease, transform .18s ease !important;
}

.cart-drawer-remove:hover {
    opacity: 1 !important;
    transform: translateY(-1px) !important;
}

.cart-drawer-remove img {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    object-fit: contain !important;
    pointer-events: none !important;
}

.cart-drawer-img {
    width: 120px !important;
    height: 120px !important;
    background: #fff !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;
}

.cart-drawer-img img {
    width: 100% !important;
    height: 100% !important;

    object-fit: contain !important;
    object-position: center !important;

    padding: 12px !important;
    background: #fff !important;
}

/* =========================================================
   CART DRAWER REMOVE ICON — ONLY ONE SVG
   ========================================================= */

.cart-drawer-remove {
    width: 34px !important;
    height: 34px !important;

    padding: 0 !important;
    margin: 0 !important;

    border: 0 !important;
    background: transparent !important;
    background-image: none !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    font-size: 0 !important;
    line-height: 0 !important;

    cursor: pointer !important;
    opacity: .72 !important;
    transition: opacity .18s ease, transform .18s ease !important;
}

.cart-drawer-remove::before,
.cart-drawer-remove::after {
    display: none !important;
    content: none !important;
    background: none !important;
    background-image: none !important;
}

.cart-drawer-remove:hover {
    opacity: 1 !important;
    transform: translateY(-1px) !important;
}

.cart-drawer-remove img {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    object-fit: contain !important;
    pointer-events: none !important;
}

/* =========================================================
   WISHLIST EMPTY TEXT COLOR FIX
   ========================================================= */

.wishlist-drawer-empty h3 {
    color: var(--text) !important;
}

.wishlist-drawer-empty p {
    color: var(--muted) !important;
}

.wishlist-drawer-empty span {
    color: var(--camel-dark) !important;
}


/* =========================
   FOOTER LEGAL DETAILS
   ========================= */

.footer-revision,
.footer-technical-note {
    font-size: 12px;
    line-height: 1.55;
    opacity: .78;
}

.footer-technical-note .footer-dev-link {
    display: inline;
}
.service-alert {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 20px;
  color: #4a2f28;
  background: #fff2e8;
  border-bottom: 1px solid #e8cdbf;
  text-align: center;
}

.service-alert .btn {
  flex: 0 0 auto;
}

@media (max-width: 640px) {
  .service-alert {
    align-items: stretch;
    flex-direction: column;
  }
}
