/* ===== RESET ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #ffffff;
    color: #2b2b2b;
    line-height: 1.4;
}



/* ===== HEADER ===== */
.header {
    top: 0;
    z-index: 100;
    background: #d00000;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
    max-width: 1600px;
    margin: auto;
}

.header-text {
margin: auto;
}



.cart-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 8px;
    font-weight: 600;
    background: #ff8282;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.cart-link:hover {
   background: rgb(130, 0, 0);
}

/* ===== CATEGORIES ===== */
.categories {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(130, 0, 0);

  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px;
}

.categories button {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: #eee;
}

.categories button.active {
  background: black;
  color: white;
}

.categories-inner {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    max-width: 1200px;
    margin: auto;
    overflow-x: auto;
}

.category {
    padding: 8px 18px;
    border-radius: 30px;
    background: #ff8282;
    color: #000000;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    transition: 0.2s;
}

.category:hover {
    background: #d00000;
    color: #fff;
}

.category.active {
    background: #d00000;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

/* ===== CONTAINER ===== */
.container {
    /*padding: 20px 16px;*/
    max-width: 1400px;
    margin: auto;
}

/* ===== MENU GRID ===== */
.menu {
    display: grid;
    grid-template-columns:  1fr;
    gap: 18px;
}
.logo {
max-width: 100px;
margin: 5px 10px;
}

/* ===== CARD ===== */
h4 {
color: #fff;
font-size: 13px;
line-height: 1.6;
}

h2 {
    margin: 20px 20px;
    font-size: 2.5rem;
}
.card {
    background: linear-gradient(180deg, #ffffff, #fff7f4);
    border-radius: 18px;
    border: solid rgb(130, 0, 0);
    display: flex;
    
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(0,0,0,.12);
}

.card h3 {
    margin: 0% 4%;
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 700;
}

.card p {
    margin: 0% 4%;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.price {
    margin: 0% 4%;
    font-size: 22px;
    font-weight: 800;
    margin-top: auto;
    margin-bottom: 14px;
}

/* ===== BUTTON ===== */


button:hover {
   background: rgb(241, 0, 0);
}

button:active {
    transform: scale(0.99);
}

/* ===== CART ===== */
.cart-item {
    background: linear-gradient(180deg, #ffffff, #fffdfb);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.cart-badge {
    position: absolute;
    top: -8px;          /* Смещение вверх */
    right: -10px;       /* Смещение вправо */
    background-color: #d00000; /* Ярко-красный цвет */
    color: white;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%; /* Делает элемент круглым */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid white; /* Белая обводка, чтобы выделялся */
}

.cart-item b {
    font-size: 15px;
}

.total {
    font-size: 24px;
    font-weight: 900;
    margin: 20px 0;
    color: #43a047;
}

/* ===== FORM ===== */
form {
    border-radius: 18px;
    width: 100%;
}

form input,
form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-size: 16px;
}

.product-image {
    width: 100%;
    height: 256px;
    margin: 0;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 10px;
    align-self: center;
}




/* ===== MODAL ===== */
#modal.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    padding: 20px;
    z-index: 1000;
}

#modal .modal-content {
    display: flex !important;
    flex-direction: row !important;
    max-width: 820px;
    width: 100%;
    max-height: 88vh;
    background: #fff;
    border-radius: 22px;
    border: 3px solid rgb(130, 0, 0);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,.3);
    position: relative;
}

#modal .modal-media {
    flex: 0 0 42%;
    max-width: 42%;
    background: #f4f4f4;
}
#modal .modal-media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    display: block;
}

#modal .modal-body {
    flex: 1 1 58%;
    padding: 32px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

#modal .modal-body h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #1a1a1a;
}

#modal .modal-body p {
    color: #777;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

#modal .addons h4 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}

#modal .addon-subgroup { margin-bottom: 14px; }
#modal .addon-subgroup h5 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #bbb;
    margin: 8px 0 6px;
}

#modal .addon-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

#modal .addon-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    border: none;
    accent-color: #d00000;
    flex-shrink: 0;
}

#modal .addon-thumb {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

#modal .option-group { margin-bottom: 16px; }
#modal .option-group h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 8px;
}
#modal .toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#modal .toggle-btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 20px;
    border: 2px solid #e2e2e2;
    background: #fafafa;
    color: #444;
    font-size: 13px;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: all .15s;
}
#modal .toggle-btn:hover { border-color: #d00000; color: #d00000; }
#modal .toggle-btn.active {
    background: #d00000 !important;
    border-color: rgb(130, 0, 0) !important;
    color: #fff !important;
    font-weight: 700;
}

#modal .modal-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
}

#modal .qty-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f6fa;
    border-radius: 20px;
    padding: 4px 6px;
    flex-shrink: 0;
}
#modal .qty-group .qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #d00000;
    color: #fff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
#modal .qty-group .qty-btn:hover { background: rgb(241, 0, 0); }
#modal .qty-group .qty-value { min-width: 20px; text-align: center; font-weight: 700; }

#modal .btn-modal {
    flex: 1;
    padding: 14px;
    background: #d00000;
    color: #fff;
    border-radius: 17px;
    border: 3px solid rgb(130, 0, 0);
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .1s, box-shadow .1s;
}

#modal .btn-modal:disabled {
    background: #ccc;
    border-color: #bbb;
    cursor: not-allowed;
}

#modal .close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 18px;
    cursor: pointer;
    color: #fff;
    background: rgba(0,0,0,.45);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    line-height: 1;
}

#modal .modal-composition {
    color: #999;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

#modal .modal-weight {
    display: inline-block;
    background: #f5f6fa;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

@media (max-width: 700px) {
    #modal .modal-content { flex-direction: column !important; overflow-y: auto; max-height: 92vh; }
    #modal .modal-media { flex: 0 0 auto; max-width: 100%; }
    #modal .modal-media img { min-height: 200px; max-height: 240px; }
    #modal .modal-body { overflow-y: visible; }
}


/* ===== FOOTER ===== */
.footer {background: #111; color: #fff; margin-top: 40px;}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    padding: 30px 20px;
}

.footer-col h3,.footer-col h4 {margin-bottom: 10px;}

.footer-col a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 6px;
}

.footer-col a:hover {color: #fff;}

.footer-bottom {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #333;
    font-size: 14px;
    color: #aaa;
}

section {scroll-margin-top: 60px;}

.add-btn {
    width: 101.5%;
    padding: 10px;
    background: #d00000;
    color: white;
    

    border-radius: 17px;
    position: relative;
    border: 3px solid rgb(130, 0, 0);
    margin-bottom: -2px;
    margin-left: -2px;
    
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .1s, box-shadow .1s;
}

.qty-controls {
    width: 101.5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-radius: 17px;
    position: relative;
    border: 3px solid rgb(130, 0, 0);
    margin-bottom: -2px;
    margin-left: -2px;
}

.qty-controls button {
    width: 45px;
    height: 38px;
    border: none;
    background: #d00000;
    color: white;
    border-radius: 14px;
    font-size: 20px;
    
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.qty-controls button:hover {background: rgb(241, 0, 0);}


.qty-controls span {
    font-size: 20px;
    min-width: 20px;
    text-align: center;
    margin: auto;
}



.adressText {text-decoration: none; color: white;}

.adressText:hover {color: rgb(130, 0, 0); transition: 0.3s; }

.numText:hover {color: rgb(130, 0, 0); transition: 0.3s; }


/* ===== BREAKPOINTS ===== */
@media (min-width: 576px) {
    .menu { grid-template-columns: repeat(2, 1fr); }
    .logo { max-width: 100px; }

}

@media (min-width: 768px) {
    .menu { grid-template-columns: repeat(3, 1fr); }
    .logo { max-width: 100px; }
}

@media (min-width: 1024px) {
    .menu { grid-template-columns: repeat(4, 1fr); }
    .logo { max-width: 150px; }
}

@media (min-width: 1200px) {
    .menu { grid-template-columns: repeat(5, 1fr); }
    h4 { color: #fff; font-size: 19px; }
    .logo { max-width: 200px; }
    .cart-link {
    font-size: 18px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 20px;}
}

/* ===================================================================
   ДОПОЛНЕНИЯ: адрес/зоны доставки, поиск, избранное, акции,
   кнопка "наверх", шапка категорий с поиском и корзиной
   =================================================================== */

/* ----- Кнопка адреса в шапке ----- */
.address-btn {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 220px;
}
.address-btn:hover { background: rgba(255,255,255,.28); }
.address-btn span#headerAddressLabel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}

/* ----- Модалка адреса ----- */
.address-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,.6);
    display: none; align-items: center; justify-content: center;
    z-index: 2000; padding: 16px;
}
.address-modal-content {
    background: #fff; border-radius: 20px; border: 3px solid rgb(130,0,0);
    max-width: 520px; width: 100%; padding: 24px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0,0,0,.3);
}
.address-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.address-modal-head h3 { font-size: 20px; font-weight: 800; }
.address-modal-close { cursor: pointer; font-size: 18px; color: #999; }
.address-modal-close:hover { color: #d00000; }
.address-modal-row { display: flex; gap: 8px; margin-bottom: 12px; }
.address-modal-row input {
    flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid #ddd; font-size: 15px;
}
.address-here-btn {
    background: #1a1a1a; color: #fff; border: none; border-radius: 12px;
    padding: 0 18px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.address-here-btn:hover { background: #d00000; }
.address-zone-result { margin-bottom: 12px; font-size: 14px; }
.zone-ok { background: #e8f5e9; color: #2e7d32; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.zone-warning { background: #fff3e0; color: #e65100; padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.address-map-wrap { border-radius: 14px; overflow: hidden; margin-bottom: 16px; border: 1px solid #eee; }
.address-zones-legend {
    background: #fafafa; border-radius: 14px; padding: 14px 16px;
}
.address-zones-legend-title { font-weight: 800; margin-bottom: 8px; font-size: 14px; }
.address-zone-chip {
    display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px;
    border-bottom: 1px solid #eee;
}
.address-zone-chip:last-of-type { border-bottom: none; }
.address-zone-min { color: #d00000; font-weight: 700; }
.address-zones-note { margin-top: 8px; font-size: 12px; color: #999; }

/* ----- Строка категорий: поиск слева, корзина справа ----- */
.categories-bar {
    position: sticky; top: 0; z-index: 100;
    background: rgb(130, 0, 0);
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
}
.icon-btn {
    flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.18); border: none; color: #fff;
    font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,.32); }
.categories { flex: 1; min-width: 0; position: static; padding: 0; }
.search-bar-wrap { flex: 1; display: none; align-items: center; gap: 8px; }
.search-bar-wrap.open { display: flex; }
.search-bar-wrap input {
    flex: 1; padding: 9px 14px; border-radius: 20px; border: none; font-size: 15px;
}
.search-bar-wrap .search-close { color: #fff; cursor: pointer; font-size: 18px; padding: 0 4px; }
.icon-btn .cart-badge { top: -4px; right: -4px; }
.no-results { text-align: center; color: #999; padding: 40px 20px; display: none; }

/* ----- Кнопка "наверх" ----- */
.scroll-top-btn {
    position: fixed; right: 20px; bottom: 24px; z-index: 500;
    width: 48px; height: 48px; border-radius: 50%;
    background: #d00000; color: #fff; border: 3px solid rgb(130,0,0);
    font-size: 20px; cursor: pointer; box-shadow: 0 10px 25px rgba(0,0,0,.25);
    display: none; align-items: center; justify-content: center;
    transition: transform .15s, background .15s;
}
.scroll-top-btn:hover { background: rgb(241,0,0); transform: translateY(-3px); }
.scroll-top-btn.visible { display: flex; }

/* ----- Избранное (сердечко на карточке) ----- */
.card { position: relative; }
.fav-btn {
    position: absolute; top: 10px; right: 10px; z-index: 3;
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255,255,255,.9); border: none; cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
    transition: transform .15s;
}
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.active { color: #d00000; }

/* ----- Баннер акций ----- */
.promo-banner { max-width: 1400px; margin: 16px auto 0; padding: 0 16px; display: grid; gap: 12px; }
.promo-card {
    background: linear-gradient(120deg, #d00000, rgb(130,0,0));
    color: #fff; border-radius: 18px; padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.promo-card-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.promo-card-desc { font-size: 13px; opacity: .9; }
.promo-card-tag {
    background: rgba(255,255,255,.2); padding: 5px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}

@media (min-width: 700px) {
    .promo-banner { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* ----- Тип жилья и детали адреса (кв/подъезд/этаж/домофон) ----- */
.housing-type-switch {
    display: flex; gap: 10px; margin: 12px 0 10px;
}
.housing-type-switch label {
    flex: 1; text-align: center; padding: 10px; border-radius: 12px;
    border: 1px solid #ddd; font-size: 13.5px; cursor: pointer; font-weight: 600;
}
.housing-type-switch input[type="radio"] { margin-right: 4px; }

.address-detail-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 10px;
}
.address-detail-grid input {
    padding: 10px 12px; border-radius: 10px; border: 1px solid #ddd; font-size: 14px; width: 100%;
}
@media (min-width: 480px) {
    .address-detail-grid { grid-template-columns: repeat(4, 1fr); }
}

.check-zone-link {
    cursor: pointer; text-decoration: underline dotted;
    opacity: .9; font-size: 13px;
}
.check-zone-link:hover { opacity: 1; }

/* ----- Поиск адреса с подсказками (геокодер) ----- */
.address-search-wrap { position: relative; margin-bottom: 10px; }
.address-search-wrap input {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #ddd; font-size: 15px;
}
.address-suggestions {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    background: #fff; border: 1px solid #eee; border-radius: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.15);
    z-index: 10; max-height: 240px; overflow-y: auto;
}
.suggestion-item { padding: 12px 14px; cursor: pointer; border-bottom: 1px solid #f2f2f2; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: #fafafa; }
.suggestion-text { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.suggestion-hint { font-size: 11.5px; color: #e65100; margin-top: 2px; }
.suggestion-error { cursor: default; color: #999; font-size: 13px; }
.suggestion-error:hover { background: none; }

.address-here-btn-wide {
    width: 100%; margin: 4px 0 16px; padding: 13px; border-radius: 12px;
}
.address-here-btn-wide:disabled {
    background: #ddd; color: #999; cursor: not-allowed;
}
.address-here-btn-wide:disabled:hover { background: #ddd; }

.save-to-profile-check {
    display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: #555;
    margin-bottom: 14px; cursor: pointer;
}

/* ----- Строка адреса + кнопка "уточнить по карте" (корзина/профиль) ----- */
.address-summary-line {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    background: #fafafa; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px;
    margin-bottom: 10px;
}
.address-summary-text { font-size: 14px; }
.address-summary-text .as-main { font-weight: 700; color: #1a1a1a; }
.address-summary-text .as-sub { font-size: 12px; color: #999; margin-top: 2px; }
.address-summary-empty { color: #999; }
.address-refine-btn {
    flex-shrink: 0; background: #1a1a1a; color: #fff; border: none; border-radius: 10px;
    padding: 9px 14px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.address-refine-btn:hover { background: #d00000; }

/* ----- Бейдж скидки на карточке товара ----- */
.discount-ribbon {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    background: #d00000; color: #fff; font-size: 12px; font-weight: 800;
    padding: 4px 10px; border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,.2);
}
.price-with-discount { display: flex; align-items: baseline; gap: 8px; }
.price-old { text-decoration: line-through; color: #999; font-size: 13px; font-weight: 500; }
.price-new { color: #d00000; font-weight: 800; }

.discount-badge-small {
    background: #d00000; color: #fff; font-size: 10.5px; font-weight: 800;
    padding: 2px 7px; border-radius: 10px; vertical-align: middle; margin-left: 4px;
}

.spicy-mark { font-size: 15px; }

/* ----- Undo-состояние строки корзины при удалении товара ----- */
.cart-item-card { position: relative; }
.removed-overlay {
    display: none; position: absolute; inset: 0; z-index: 5;
    background: rgba(255,255,255,.97); border-radius: inherit;
    align-items: center; justify-content: center; gap: 12px;
    font-size: 14px; color: #777; flex-direction: row;
}
.cart-item-card.is-removed .removed-overlay { display: flex; }
.cart-item-card.is-removed > *:not(.removed-overlay) { visibility: hidden; }
.undo-btn {
    background: #1a1a1a; color: #fff; border: none; border-radius: 10px;
    padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.undo-btn:hover { background: #d00000; }

.order-hours-warning {
    background: #fff3e0; color: #e65100; padding: 14px 16px; border-radius: 12px;
    font-size: 13.5px; line-height: 1.5; text-align: center;
}

/* ----- Подарок за сумму заказа ----- */
.gift-section {
    background: #fff8e1; border: 1px solid #ffe082; border-radius: 14px;
    padding: 16px; margin-bottom: 16px;
}
.gift-section-title { font-weight: 800; font-size: 14.5px; margin-bottom: 10px; }

.gift-picked-row {
    display: flex; align-items: center; gap: 12px; background: #fff;
    border-radius: 12px; padding: 10px; margin-bottom: 10px;
}
.gift-picked-img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.gift-picked-info { flex: 1; }
.gift-picked-name { font-weight: 700; font-size: 13.5px; }
.gift-picked-sub { font-size: 11.5px; color: #999; margin-top: 2px; }
.gift-change-btn {
    background: #1a1a1a; color: #fff; border: none; border-radius: 8px;
    padding: 7px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.gift-change-btn:hover { background: #d00000; }

.gift-picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.gift-option {
    background: #fff; border: 2px solid transparent; border-radius: 12px; padding: 8px;
    text-align: center; cursor: pointer; font-size: 11.5px; font-weight: 600;
}
.gift-option img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.gift-option:hover { border-color: #ffca28; }
.gift-option-selected { border-color: #d00000; }

.gift-locked { font-size: 13px; color: #8d6e00; }
.gift-progress-hint { font-size: 12px; color: #8d6e00; margin-top: 10px; }

.order-comment {
    width: 100%; min-height: 64px; padding: 10px 12px; border-radius: 12px;
    border: 1px solid #ddd; font-size: 13.5px; font-family: inherit; resize: vertical;
    margin-bottom: 12px;
}

/* ===================================================================
   АДАПТИВНАЯ ВЁРСТКА ПОД ТЕЛЕФОН
   =================================================================== */
@media (max-width: 640px) {
    /* ----- Шапка: логотип + текст + кнопки в столбик, без сжатия в кашу ----- */
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
    }
    .logo { max-width: 56px; margin: 0; }
    .header-text { margin: 0; width: 100%; }
    h4 { font-size: 13px; }

    .headet-buttons {
        display: flex; flex-wrap: wrap; gap: 6px; width: 100%;
    }
    .cart-link {
        font-size: 12px; padding: 7px 12px; margin-left: 0;
    }

    /* ----- Строка категорий: чуть компактнее иконки ----- */
    .categories-bar { padding: 8px 10px; gap: 6px; }
    .icon-btn { width: 36px; height: 36px; font-size: 15px; }
    .category { font-size: 15px; padding: 7px 14px; }

    /* ----- Карточки товаров ----- */
    h2 { margin: 16px 12px; font-size: 1.7rem; }
    .container { padding: 0 10px; }

    /* ----- Модалка адреса: меньше отступов, поля в столбик на очень узких ----- */
    .address-modal { padding: 10px; }
    .address-modal-content { padding: 18px; border-radius: 16px; }
    .address-modal-head h3 { font-size: 17px; }
    .address-map-wrap iframe { height: 180px !important; }

    /* ----- Промо-баннер, зоны доставки, легенды — меньше паддингов ----- */
    .promo-banner { padding: 0 10px; }
    .promo-card { padding: 14px 16px; }

    /* ----- Футер ----- */
    .footer-container { padding: 24px 16px; gap: 16px; }
}

@media (max-width: 400px) {
    .headet-buttons { gap: 5px; }
    .cart-link { font-size: 11px; padding: 6px 10px; }
    .address-modal-row { flex-direction: column; align-items: stretch; }
    .address-here-btn { padding: 12px; }
}

/* ----- Товар "Нет в наличии" ----- */
.card-unavailable { opacity: .65; }
.card-unavailable .product-image { filter: grayscale(85%); }

.unavailable-ribbon {
    position: absolute; top: 10px; left: 10px; z-index: 3;
    background: #6b6b6b; color: #fff; font-size: 12px; font-weight: 800;
    padding: 4px 10px; border-radius: 20px; box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

.add-btn-disabled {
    background: #ccc !important; border-color: #aaa !important;
    color: #777 !important; cursor: not-allowed !important;
}

/* ----- Недоступный вариант в конструкторе блюда (напр. закончилось мясо) ----- */
#modal .toggle-btn-disabled {
    opacity: .5; cursor: not-allowed; text-decoration: line-through;
    background: #f0f0f0 !important; color: #999 !important; border-color: #e2e2e2 !important;
}
#modal .toggle-btn-disabled:hover { border-color: #e2e2e2 !important; color: #999 !important; }

/* ----- Баннер "Ресторан закрыт" на главной странице ----- */
.restaurant-closed-banner {
    background: #c62828;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 20px;
    line-height: 1.5;
}
@media (max-width: 640px) {
    .restaurant-closed-banner { font-size: 13.5px; padding: 12px 14px; }
}
