/* Magic Coffee — мобільний хедер (2a) і меню (2c). 25.11.2026. Усе мобільне — лише в @media (max-width:767px). */

/* Глобально (десктоп/планшет не бачать нових елементів) */
.mc-logo { display: none; }
.mc-menu-head { display: none; }
.mc-arrow { display: none; }
.cartmodul_count { display: none; }

.mc-logo { flex-direction: column; line-height: 1; color: #fff; text-decoration: none; }
.mc-logo__word { font-family: 'Lobster', cursive; font-size: 26px; }
.mc-logo__sub { font-size: 8px; letter-spacing: .5em; margin-top: 1px; }

@media all and (max-width: 767px) {

/* ---------- ХЕДЕР ---------- */
div.allheader,
div.allheader div.head { background: #3F4A48 !important; }
div.allheader div.head { padding: 0; }
div.allheader div.overhead,
div.allheader div.underhead { display: none; }

div.allheader div.headinfo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 8px 0;
    width: 100%;
    box-sizing: border-box;
}
/* обгортки розкриваємо, щоб елементи (бургер, лого, вхід, кошик, пошук) стали рядом */
div.allheader div.headcolumnlogo,
div.allheader div.headcolumn1,
div.allheader div.headcolumn2,
div.allheader div.headcolumn3,
div.allheader div.headcolumn2row1,
div.allheader div.headcolumn2row2,
div.allheader div.headcolumn3row1,
div.allheader div.headcolumn3row2 { display: contents; }

/* бургер (id seechapters лишається — на ньому ядро відкриває меню) */
div.allheader div.mobiletopchapters {
    order: 1;
    position: static;
    float: none;
    top: auto;
    margin: 0;
    width: 44px;
    height: 44px;
    display: block;
}
div.allheader div.mobiletopchapters #seechapters {
    width: 44px;
    height: 44px;
    background:
        linear-gradient(#fff, #fff) center 14px / 22px 2px no-repeat,
        linear-gradient(#fff, #fff) center 21px / 22px 2px no-repeat,
        linear-gradient(#fff, #fff) center 28px / 22px 2px no-repeat;
}

/* логотип */
div.allheader div.headcolumnlogo > a:not(.mc-logo) { display: none; }
div.allheader a.mc-logo { display: flex; order: 2; margin-right: auto; flex-shrink: 0; }

/* вхід */
div.allheader div.buttonsusers { order: 3; }
div.allheader div.buttonsusers_button2,
div.allheader div.buttonsusers_button4 { display: none; }
div.allheader div.buttonsusers_main { display: block; }
div.allheader div.buttonsusers_button1,
div.allheader div.buttonsusers_button3 { display: block; }
div.allheader div.buttonsusers_button1 input,
div.allheader div.buttonsusers_button1 input:hover,
div.allheader div.buttonsusers_button3 input,
div.allheader div.buttonsusers_button3 input:hover {
    box-sizing: border-box;
    height: 44px;
    padding: 0 10px 0 36px;
    background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 4-6 8-6s8 2 8 6'/></svg>") no-repeat 10px center;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 44px;
    text-transform: none;
    border: 0;
    border-radius: 10px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: none;
}
div.allheader div.buttonsusers_button3:hover::before { display: none !important; }

/* кошик-пігулка */
div.allheader div.cart_block,
div.allheader div.cart_block:hover {
    order: 4;
    display: block;
    position: relative;
    box-sizing: border-box;
    min-width: 44px;
    height: 44px;
    margin: 0;
    padding: 0 12px 0 40px;
    background: #4FA69A url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'><path d='M3 4h2l2.5 11h11L21 7H6.5'/><circle cx='9' cy='20' r='1.5'/><circle cx='17' cy='20' r='1.5'/></svg>") no-repeat 12px center !important;
    border-radius: 10px;
    top: 0;
    right: 0;
    text-align: center;
    z-index: 1;
}
div.allheader div.cart_block:has(.cartmodul_empty),
div.allheader div.cart_block:has(.cartmodul_empty):hover { width: 44px; padding: 0; background-position: center !important; }
div.allheader div.cart_block div.cart_in,
div.allheader div.cart_block div.cart_title { display: none; }
div.allheader div.cart_modul,
div.allheader div.cart_modulinfo { position: static; line-height: 44px; }
div.allheader div.cartmodul_price {
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 44px;
    white-space: nowrap;
}
div.allheader .cartmodul_price:after { display: none; }
div.allheader .cm_lbl { display: none; }
div.allheader div.cartmodul_empty { font-size: 0; padding: 0; }
div.allheader .cartmodul_count {
    display: block;
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #E9A23B;
    color: #22282A;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

/* пошук — друга лінія */
div.allheader div.search-top { display: none; }
div.allheader div.languages { display: none; }
div.allheader div.topchapters { display: none; }
div.allheader div.search-mobile {
    display: block;
    order: 5;
    flex: 0 0 100%;
    width: 100%;
    margin: 0;
    padding: 0 8px 10px;
    box-sizing: border-box;
    position: relative;
}
div.allheader div.search-mobile div.search_input { display: block; width: 100%; max-width: none; }
div.allheader div.search-mobile div.search_input input {
    display: block;
    width: 100%;
    max-width: none;
    height: 42px;
    padding: 0 14px 0 42px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, .12);
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
}
div.allheader div.search-mobile div.search_input input::placeholder { color: rgba(255, 255, 255, .7); opacity: 1; }
div.allheader div.search-mobile div.search_button { left: 8px; right: auto; top: 0; width: 42px; height: 42px; }
div.allheader div.search-mobile div.search_button input {
    left: 0;
    right: auto;
    top: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 0;
}
div.allheader div.search-mobile div.search_button::after {
    left: 0;
    top: 12px;
    width: 42px;
    font-size: 17px;
    pointer-events: none;
}

/* ---------- МЕНЮ ---------- */
div.mobilemenuchapters #leftdivnew.menuchapters {
    width: 320px !important;
    max-width: 85vw;
    border-right: 0;
    background: #fff;
}
div.mobilemenuchapters div.menuchapters_block.mc-oldlogo { display: none; }

div.mc-menu-head { display: block; background: #3F4A48; color: #fff; padding: 20px; }
div.mc-menu-top { display: flex; align-items: center; justify-content: space-between; }
div.mc-menu-head a.mc-logo,
div.mc-menu-head a.mc-logo:hover { display: flex; color: #fff; }
div.mc-menu-head .mc-logo__word { font-size: 28px; }
div.mc-lang {
    display: flex;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 8px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
}
div.mc-lang a { padding: 6px 10px; color: rgba(255, 255, 255, .6); text-decoration: none; }
div.mc-lang a.is-act { background: #4FA69A; color: #fff; }
div.mc-menu-btns { display: flex; gap: 8px; margin-top: 14px; }
div.mc-menu-btns a,
div.mc-menu-btns button {
    flex: 1;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #5E6866;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
div.mc-menu-btns .mc-primary { background: #4FA69A; }

div.mobilemenuchapters div.menuchapters_block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 46px;
    padding: 0 20px 0 17px;
    border-left: 3px solid transparent;
    border-bottom: 1px solid #EEE;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    text-align: left;
}
div.mobilemenuchapters div.menuchapters_block a {
    flex: 1;
    display: flex;
    align-items: center;
    min-height: 46px;
    color: #2B2B2B;
    text-decoration: none;
}
div.mobilemenuchapters div.menuchapters_block.is-active { border-left-color: #4FA69A; }
div.mobilemenuchapters div.menuchapters_block.is-active a { color: #3E8C83; font-weight: 600; }
span.mc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -14px;
    color: #4FA69A;
    font-size: 18px;
    cursor: pointer;
}
span.mc-arrow::before { content: "\25B8"; }
div.has-sub.open span.mc-arrow::before { content: "\25BE"; }
div.mc-sub { display: none; background: #F6F7F7; }
div.mc-sub.open { display: block; }
div.mobilemenuchapters div.menuchapters_block_pod {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 0 20px 0 32px;
    font-size: 14px;
    border-bottom: 1px solid #EEE;
}
div.mobilemenuchapters div.menuchapters_block_pod a { color: #5A6062; text-decoration: none; display: flex; align-items: center; min-height: 40px; flex: 1; }
div.mobilemenuchapters div.menuchapters_block_pod.is-active a { color: #3E8C83; font-weight: 600; }

/* затемнення + хрестик — лише коли відкрите меню */
body.mc-menu-open #backall { background: #1E2324; opacity: .85; }
body.mc-menu-open #backall::after {
    content: "\2715";
    position: fixed;
    top: 24px;
    right: 0;
    width: calc(100vw - min(320px, 85vw));
    text-align: center;
    color: #fff;
    font-size: 22px;
    line-height: 44px;
}

}

/* ---------- КОШИК (сторінка /cart): таблиця → картки, без горизонтального виходу за екран ---------- */
@media (max-width: 767px) {
/* обгортки сторінки кошика: display:table розтягувався за вмістом (405px при екрані 360px) */
div.allcenterblock:has(.cartpage_table),
div.centermain:has(.cartpage_table) { display: block; width: 100%; box-sizing: border-box; }
div.cartpage_table { margin-top: 12px; max-width: 100%; }
div.cartpage_table > table,
div.cartpage_table > table > tbody { display: block; width: 100%; background: transparent; border-spacing: 0; }
div.cartpage_table > table > tbody > tr.carttitlerow:first-child { display: none; }
div.cartpage_table > table > tbody > tr {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas: "img name del" "img attr attr" "img amount sum";
    column-gap: 10px;
    row-gap: 6px;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid #E3E3E3;
    box-sizing: border-box;
    background: #fff;
}
div.cartpage_table > table > tbody > tr > td {
    display: block;
    width: auto !important;
    min-width: 0;
    padding: 0 !important;
    text-align: left;
    background: transparent;
    box-sizing: border-box;
}
div.cartpage_table td.cartcode,
div.cartpage_table td.cartprice { display: none; }
div.cartpage_table td.cartimg { display: block; grid-area: img; align-self: start; }
div.cartpage_table td.cartimg img { max-width: 64px; max-height: 64px; display: block; }
div.cartpage_table td.cartname { grid-area: name; font-size: 14px; line-height: 1.3; color: #2B2B2B; }
div.cartpage_table td.cartname a { color: #2B2B2B; text-decoration: none; }
div.cartpage_table td.cartattr { grid-area: attr; }
div.cartpage_table td.cartattr table.allwidthtest { width: auto; border-spacing: 0; }
div.cartpage_table td.cartattr table.allwidthtest td { padding: 0 8px 0 0 !important; text-align: left; }
div.cartpage_table td.cartattr select { max-width: 100%; height: 36px; }
div.cartpage_table td.cartamount { grid-area: amount; display: flex; align-items: center; gap: 6px; }
div.cartpage_table td.cartamount input { width: 48px; height: 40px; margin: 0; text-align: center; box-sizing: border-box; }
div.cartpage_table td.cartamount .wrap_cart_amount { display: flex; gap: 6px; width: auto; margin: 0; }
div.cartpage_table td.cartamount .minus_cart,
div.cartpage_table td.cartamount .plus_cart { width: 40px; height: 40px; line-height: 38px; font-size: 18px; box-sizing: border-box; border-radius: 6px; }
div.cartpage_table td.cartsumm { grid-area: sum; justify-self: end; font-size: 16px; font-weight: 700; color: #00a99d; white-space: nowrap; }
div.cartpage_table td.cartdelete { grid-area: del; justify-self: end; align-self: start; }
div.cartpage_table td.cartdelete input { width: 40px; height: 40px; padding: 0; border-radius: 6px; }

/* доставка: без фото/кількості */
div.cartpage_table > table > tbody > tr:has(#delivery_name) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name sum";
    background: #F6F7F7;
}
div.cartpage_table tr:has(#delivery_name) td.cartimg,
div.cartpage_table tr:has(#delivery_name) td.cartattr,
div.cartpage_table tr:has(#delivery_name) td.cartamount,
div.cartpage_table tr:has(#delivery_name) td.cartdelete { display: none; }

/* підсумок */
div.cartpage_table > table > tbody > tr.carttitlerow:last-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    background: #fff;
}
div.cartpage_table tr.carttitlerow td.cartalldelete { display: none; }
div.cartpage_table tr.carttitlerow td.cartallnew { flex: 0 1 auto; text-align: left; font-size: 13px; }
div.cartpage_table tr.carttitlerow td.cartall { flex: 1; text-align: left !important; font-size: 16px; }
div.cartpage_table tr.carttitlerow td.cartallsumm { background: #00a99d; color: #fff; padding: 8px 14px !important; border-radius: 8px; font-size: 18px; text-align: center; }

/* валюта: у десктопі є заголовки колонок «Сума грн.», у картках їх немає */
div.cartpage_table td.cartsumm::after,
div.cartpage_table td.cartallsumm::after { content: "\00a0грн"; font-weight: 600; }
div.cartpage_table td.cartsumm::after { font-size: 13px; }

/* решта сторінки кошика не ширша за екран */
div.cartpage_data, div.cartpage_data * { max-width: 100%; box-sizing: border-box; }
div.cartpage_data input[type="text"],
div.cartpage_data input[type="password"],
div.cartpage_data input[type="email"],
div.cartpage_data textarea,
div.cartpage_data select { width: 100%; }
}

/* ---------- ОФОРМЛЕННЯ ЗАМОВЛЕННЯ: заголовки «Доставка»/«Оплата», картки способів оплати ---------- */
@media (max-width: 767px) {
div.cartpage_line:has(#order_delivery) > div.cartpage_blockname,
div.cartpage_line.paymentsblock > div.cartpage_blockname {
    margin: 22px 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #4FA69A;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #3E8C83;
}
div.cartpage_line #order_delivery { height: 44px; font-size: 14px; }

div.cartpage_paymentblock {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    padding: 8px 12px;
    border: 1px solid #E3E3E3;
    border-radius: 10px;
    background: #fff;
    box-sizing: border-box;
}
div.cartpage_paymentblock:has(input[type="radio"]:checked) { border-color: #4FA69A; background: #F1F8F7; box-shadow: 0 0 0 1px #4FA69A inset; }
div.cartpage_paymentinblock1 { display: block; flex: 0 0 auto; margin: 0; }
div.cartpage_paymentinblock2 { display: block; flex: 1 1 auto; min-width: 0; }
div.cartpage_paymentinblock1 input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid #BDBDBD;
    border-radius: 50%;
    background: #fff;
    vertical-align: middle;
}
div.cartpage_paymentinblock1 input[type="radio"]:checked {
    border-color: #4FA69A;
    background: radial-gradient(#4FA69A 0 45%, #fff 50%);
}
div.cartpage_paymentblock input[type="button"],
div.cartpage_paymentblock input[type="button"]:hover {
    display: block;
    width: 100%;
    height: auto;
    min-height: 44px;
    padding: 6px 0 6px 44px !important;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: 0 center;
    background-size: auto 28px;
    box-shadow: none;
    color: #2B2B2B;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    text-transform: none;
    white-space: normal;
    word-break: break-word;
}
div.cartpage_paymentblock input.privatnal,
div.cartpage_paymentblock input.privatnal:hover { background-image: url("/themes/templates/privat244.png"); background-size: auto 26px; }
div.cartpage_paymentblock input[info="11"],
div.cartpage_paymentblock input[info="11"]:hover { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%233E8C83' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M6 2h9l5 5v15H6z'/><path d='M14 2v6h6M9 13h8M9 17h8'/></svg>"); background-size: 28px 28px; }
div.cartpage_paymentblock input[info="12"],
div.cartpage_paymentblock input[info="12"]:hover { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%233E8C83' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='6' width='20' height='12' rx='2'/><circle cx='12' cy='12' r='2.5'/><path d='M6 12h.01M18 12h.01'/></svg>"); background-size: 28px 28px; }
}

/* ---------- Кнопка «Оформити замовлення» ---------- */
@media (max-width: 767px) {
div.cartpage_blockin2 { padding: 8px 12px 16px; box-sizing: border-box; }
div.cartpage_blockin2 input#order_button,
div.cartpage_blockin2 input#order_button:hover {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 54px;
    margin: 0 auto;
    padding: 0 16px;
    border: 0;
    border-radius: 12px;
    background: #4FA69A;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: .01em;
    box-shadow: 0 4px 12px rgba(79, 166, 154, .35);
    box-sizing: border-box;
}
div.cartpage_blockin2 input#order_button:active { background: #3E8C83; box-shadow: none; }
}

/* ---------- Контент не ширший за екран (о_нас та інші текстові сторінки) ---------- */
@media (max-width: 767px) {
div.allcenterblock,
div.centermain { display: block; width: 100%; max-width: 100%; box-sizing: border-box; }
div.centertext { overflow-wrap: anywhere; word-break: break-word; }
div.centertext img,
div.centertext iframe,
div.centertext video { max-width: 100% !important; height: auto; }
div.centertext table { max-width: 100%; }
div.centertext blockquote { margin-left: 0; margin-right: 0; }
}

/* картинки з float у текстових сторінках — на всю ширину колонки, без «вузької смужки» тексту поруч */
@media (max-width: 767px) {
div.centertext img[style*="float"],
div.centertext img[align] { float: none !important; display: block; margin: 12px auto !important; }
}

/* ---------- Блог (/stat4i та розділи статей): превʼю на всю ширину картки ---------- */
@media (max-width: 767px) {
div.pagearticle_img { width: 100%; max-width: 100%; }
div.pagearticle_imgin { width: 100%; max-height: none; height: auto; line-height: 0; }
div.pagearticle_imgin img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
}
@media (max-width: 767px) {
div.pagearticle, div.pagearticle_img, div.pagearticle_info { height: auto; min-height: 0; }
div.pagearticle { margin-bottom: 24px; }
}

/* ---------- Сторінки статей/контенту: вбудовані відео, таблиці, довгі рядки не виходять за екран ---------- */
@media (max-width: 767px) {
div.allcentermain iframe,
div.allcentermain object,
div.allcentermain embed,
div.allcentermain video { max-width: 100% !important; }
div.allcentermain iframe[src*="youtube"],
div.allcentermain iframe[src*="youtu.be"],
div.allcentermain iframe[src*="vimeo"] { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; }
div.allcentermain table[width],
div.allcentermain table.content { width: 100% !important; max-width: 100% !important; table-layout: fixed; }
div.allcentermain p, div.allcentermain li, div.allcentermain a, div.allcentermain em,
div.allcentermain span, div.allcentermain td, div.allcentermain h1, div.allcentermain h2,
div.allcentermain h3, div.allcentermain h4 { overflow-wrap: anywhere; }
div.allcentermain em { white-space: normal; }
}
@media (max-width: 767px) {
div.allcentermain img[width] { max-width: 100% !important; height: auto; }
}
@media (max-width: 767px) {
div.articletext { max-width: 100%; overflow-x: auto; overflow-wrap: anywhere; box-sizing: border-box; }
div.articletext img { max-width: 100% !important; min-width: 0 !important; height: auto; }
div.articletext table { display: block; max-width: 100% !important; overflow-x: auto; }
div.articletext pre { white-space: pre-wrap; }

/* Типографіка: заголовки категорій/контенту і футера — спокійніші на мобільному */
div.centertext h1 { font-size: 18px !important; line-height: 1.3 !important; margin: 10px 0 8px !important; }
div.centertext h2 { font-size: 15px !important; line-height: 1.35 !important; font-weight: 600 !important; margin: 10px 0 8px !important; }
div.centertext h3 { font-size: 14px !important; line-height: 1.35 !important; }
div.centertext, div.centertext p, div.centertext li { font-size: 14px; line-height: 1.5; }
div.footer-content p:first-child, div.footer-content div > p:first-child { font-size: 17px !important; }
}
