/*
 * Doladění motivu Teno: vlastnosti, které Luma nastavuje na stejných prvcích a M1 CSS je nepřepisuje.
 * Vše ostatní pro hlavičku/menu/patičku je v teno-m1.css (vygenerované z ostrého M1).
 */

/*
 * Open Sans z Lumy obsahuje jen základní latinku – č, ř, ž, š… prohlížeč kreslil náhradním písmem.
 * Úplné Open Sans (z balíčku endroid/qr-code) se načte jen pro rozšířenou latinku; tučné si prohlížeč dopočítá.
 */
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/opensans/opensans-latin-ext.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Obalové kontejnery Lumy kolem portované hlavičky a patičky */
.page-wrapper > .page-header { border: 0; margin: 0; padding: 0; background: #fff; }
.page-wrapper > .page-footer { background: transparent; margin: 0; padding: 0; }
.teno-m1 { font-family: sans-serif; font-size: 13px; color: #383838; line-height: 1.5; }
.teno-m1 .page-header { border: 0; margin: 0; background: transparent; }
.teno-m1 a:visited { color: inherit; }

/* Logo: Luma mu dává okraje a z-index */
.teno-m1 .logo { margin: 0; z-index: auto; max-width: 300px; }

/* Odkazy na sesterské e-shopy nad logem (v M1 inline styly) */
.teno-m1 .teno-brand-links { width: 100%; text-align: center; font-size: 12px; padding: 3px 0; margin: 0; }
.teno-m1 .teno-brand-links a { color: #0a5c7a; text-decoration: none; margin-right: 20px; font-weight: bold; }
.teno-m1 .teno-brand-links a:last-child { margin-right: 0; }

/* Luma resetuje seznamy a odstavce jinak než M1 */
.teno-m1 ol, .teno-m1 ul { margin: 0; padding: 0; list-style: none; }
.teno-m1 li { margin: 0; }
.teno-m1 address { font-style: normal; }

/* Šířka obsahu jako M1 (.main-container max-width 1345px) */
.page-main { max-width: 1345px; }
/* .page-wrapper je ve Lumě flex sloupec – bez šířky by se obal smrštil na obsah a vycentroval */
.teno-breadcrumbs-wrap { width: 100%; max-width: 1345px; margin: 0 auto; padding: 15px 20px 0; box-sizing: border-box; }
.teno-breadcrumbs-wrap .breadcrumbs { max-width: none; margin: 0 0 15px; }

.teno-breadcrumbs-wrap { text-align: left; }
/* Levý sloupec 270 px jako M1 (.col-left), Luma by dala 25 % */
@media (min-width: 768px) {
    .columns.teno-m1.col2-left-layout .sidebar-main { width: 270px; padding-right: 10px; box-sizing: border-box; }
    .columns.teno-m1.col2-left-layout .column.main { width: calc(100% - 270px); padding-left: 10px; box-sizing: border-box; }
}
.teno-breadcrumbs-wrap .breadcrumbs { display: block; width: 100% !important; box-sizing: border-box; margin-left: 0 !important; margin-right: 0 !important; }

/* Kategorie: karty produktů. Inline <style> z M1 catalog/product/list.phtml (cena a tlačítko v řádku). */
.teno-m1 .catalog-card-addtocart form { margin: 0; }
.teno-m1 .category-products .catalog-card-purchase-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.teno-m1 .category-products .catalog-card-purchase-row .price-box { margin: 0; flex: 1 1 auto; }
.teno-m1 .category-products .catalog-card-addtocart { flex: 0 0 auto; text-align: right; width: auto !important; }
.teno-m1 .category-products .catalog-card-addtocart .catalog-btn-cart { display: inline-block !important; width: auto !important; max-width: none !important; font-size: 10px; line-height: 1; min-height: 0; white-space: nowrap; float: none !important; vertical-align: middle; }
.teno-m1 .category-products .catalog-card-addtocart .catalog-btn-cart span { background: #1b67b2 !important; border: 0 !important; display: inline-block !important; float: none !important; width: auto !important; max-width: none !important; height: auto !important; box-shadow: none !important; }
.teno-m1 .category-products .catalog-card-addtocart .catalog-btn-cart span span { background: transparent !important; border: 0 !important; display: inline-block !important; float: none !important; width: auto !important; max-width: none !important; height: auto !important; line-height: 1; padding: 5px 10px; box-shadow: none !important; }
.teno-m1 .category-products .catalog-card-addtocart .catalog-btn-cart:hover span { background: #155694 !important; }
/* Luma dává tlačítkům .action vlastní pozadí, rámeček a stín */
.teno-m1 .catalog-card-addtocart button.action.tocart { background: none; border: 0; padding: 0; box-shadow: none; }

/* Detail produktu: rozměry jako M1 (.product-img-box 530 px vlevo, .product-shop zbytek vpravo) */
@media (min-width: 768px) {
    .teno-m1 .product-view .product.media.product-img-box { width: 530px; margin: 0; float: left; position: relative; }
    .teno-m1 .product-view .product-info-main.product-shop { width: calc(100% - 545px); float: right; padding: 0 0 0 15px; box-sizing: border-box; }
}
.teno-m1 .product-view .manufacturer-logo { position: absolute; top: 12px; right: 12px; z-index: 5; display: flex; align-items: center; justify-content: center; width: 92px; height: 54px; background: #fff; border-radius: 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.teno-m1 .product-view .manufacturer-logo img { width: auto; height: auto; max-width: 38px; max-height: 38px; }
/* Odkazy „Přeskočit galerii“ Lumy jen pro čtečky (M1 reset je zviditelnil) */
.teno-m1 .action.skip:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.teno-m1 .product-view .teno-product-trust-strip { clear: both; padding-top: 30px; }

/*
 * Našeptávač vyhledávání (funkce jako Papírnictví, barvy teno.cz):
 * modrá #0184c2 (záložky menu), tlačítko hledání #009cce, text #383838, odkazy #0a5c7a,
 * skladem #297842 a tlumený #71808b (karty produktů), linky #d5e5eb a podklad #f3f8fa (patička).
 */
.teno-m1 #search_mini_form { position: relative; }
.teno-m1 .teno-suggest { position: absolute; z-index: 10070; top: 100%; left: 50%; transform: translateX(-50%); width: min(820px, 96vw); margin-top: 6px; border: 1px solid #d5e5eb; border-top: 3px solid #0184c2; border-radius: 0 0 9px 9px; background: #fff; box-shadow: 0 16px 40px rgba(20, 70, 91, .18); text-align: left; }
.teno-m1 .teno-suggest[hidden] { display: none; }
.teno-m1 .teno-suggest h4 { margin: 0 0 10px; color: #0a5c7a; font-size: 14px; font-weight: 700; }
.teno-m1 .teno-suggest a { text-decoration: none; }
.teno-m1 .teno-suggest__inner { position: relative; display: flex; max-height: 75vh; overflow: auto; }
.teno-m1 .teno-suggest__side { flex: 0 0 260px; padding: 16px; background: #f3f8fa; border-right: 1px solid #d5e5eb; box-sizing: border-box; }
.teno-m1 .teno-suggest__side h4 + * { margin-bottom: 16px; }
.teno-m1 .teno-suggest__main { flex: 1 1 auto; min-width: 0; padding: 16px; }
.teno-m1 .teno-suggest__close { position: absolute; top: 8px; right: 8px; z-index: 1; width: 28px; height: 28px; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; }
.teno-m1 .teno-suggest__close:before, .teno-m1 .teno-suggest__close:after { content: ''; position: absolute; top: 13px; left: 6px; width: 16px; height: 2px; background: #71808b; transform: rotate(45deg); }
.teno-m1 .teno-suggest__close:after { transform: rotate(-45deg); }
.teno-m1 .teno-suggest__close:hover:before, .teno-m1 .teno-suggest__close:hover:after { background: #0184c2; }
.teno-m1 .teno-suggest__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.teno-m1 .teno-suggest__chip { padding: 3px 9px; border: 1px solid #9fd3ea; border-radius: 4px; color: #0184c2; font-size: 12px; background: #fff; }
.teno-m1 .teno-suggest__chip:hover { background: #0184c2; border-color: #0184c2; color: #fff; }
.teno-m1 .teno-suggest__popular { padding-top: 14px; border-top: 1px solid #d5e5eb; }
.teno-m1 .teno-suggest__cats { list-style: none; margin: 0; padding: 0; }
.teno-m1 .teno-suggest__cats a { display: flex; align-items: center; gap: 9px; padding: 6px 0; color: #383838; font-size: 13px; line-height: 1.3; }
.teno-m1 .teno-suggest__cats a:hover { color: #0184c2; }
.teno-m1 .teno-suggest__cats svg { flex: none; width: 18px; height: 18px; fill: #dff1f9; stroke: #0184c2; stroke-width: 1.6; stroke-linejoin: round; }
.teno-m1 .teno-suggest__products { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; list-style: none; margin: 0; padding: 0; }
.teno-m1 .teno-suggest__products li { border-bottom: 1px solid #eef3f5; }
.teno-m1 .teno-suggest__products a { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.teno-m1 .teno-suggest__products a:hover { background: #f3f8fa; }
.teno-m1 .teno-suggest__products a:hover .teno-suggest__name { color: #0184c2; }
.teno-m1 .teno-suggest__products img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.teno-m1 .teno-suggest__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.teno-m1 .teno-suggest__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #243c4b; font-size: 13px; line-height: 1.3; }
.teno-m1 .teno-suggest__meta { display: flex; gap: 10px; font-size: 12px; }
.teno-m1 .teno-suggest__price { color: #243c4b; font-weight: 700; }
.teno-m1 .teno-suggest__stock { color: #297842; font-weight: 600; }
.teno-m1 .teno-suggest__stock.is-out { color: #aa621d; }
.teno-m1 .teno-suggest__empty { margin: 0; color: #71808b; font-size: 13px; }
.teno-m1 .teno-suggest__all { display: inline-block; margin-top: 12px; }
.teno-m1 #search_mini_form.is-loading #search { background: #fff url("../images/opc-ajax-loader.gif") no-repeat right 90px center; }
@media (max-width: 770px) {
    /* M1 custom-autocomplete.css dává poli pevných 350 px → na mobilu se s tlačítkem nevešlo a stránka přetékala */
    .teno-m1 form#search_mini_form input#search { width: auto !important; flex: 1 1 auto; min-width: 0; }
    .teno-m1 #search_mini_form .search-button { flex: 0 0 auto; }
    .teno-m1 .teno-suggest { left: 0; right: 0; transform: none; width: auto; }
    /* produkty nahoře přes order (column-reverse by panel otevíral odscrollovaný na konec) */
    .teno-m1 .teno-suggest__inner { flex-direction: column; }
    .teno-m1 .teno-suggest__main { order: -1; }
    .teno-m1 .teno-suggest__side { flex: none; border-right: 0; border-top: 1px solid #d5e5eb; }
    .teno-m1 .teno-suggest__products { grid-template-columns: 1fr; }
}

/*
 * Přidání do košíku: zákazník zůstává na stránce (checkout/cart/redirect_to_cart=0) a nahoře na obrazovce
 * vyjede zelené oznámení, které po 6 s samo zmizí (každé nové přidání vykreslí nový prvek → animace znovu).
 */
.page.messages .messages .message-success {
    position: fixed; top: 16px; left: 50%; z-index: 10100; box-sizing: border-box;
    width: max-content; max-width: min(560px, calc(100vw - 32px)); margin: 0; padding: 14px 20px 14px 50px;
    border-radius: 10px; background: #297842; color: #fff; font-size: 14px; line-height: 1.45;
    box-shadow: 0 12px 32px rgba(20, 70, 40, .28); transform: translateX(-50%);
    animation: teno-toast 6s ease forwards; pointer-events: auto;
}
.page.messages .messages .message-success > *:first-child::before {
    content: ''; position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; margin: -11px 0 0;
    border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 7' fill='none' stroke='%23297842' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/15px no-repeat;
    font-family: inherit; font-size: 0; line-height: 0; color: transparent;
}
.page.messages .messages .message-success a { color: #fff; font-weight: 700; text-decoration: underline; }
@keyframes teno-toast {
    0% { opacity: 0; transform: translate(-50%, -14px); }
    6% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -14px); visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .page.messages .messages .message-success { animation: teno-toast-static 6s linear forwards; }
    @keyframes teno-toast-static { 0%, 90% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; visibility: hidden; transform: translateX(-50%); } }
}

/*
 * Obchodní podmínky (CMS „op“: ul.disc s odkazy #answerN + dl s dt/dd z M1) – stejný vzhled jako PDF příloha
 * k potvrzení objednávky: obsah v kartě, číslované kapitoly s modrým čtverečkem, mezinadpisy (<strong>) modře.
 */
.cms-op .column.main.std { max-width: 920px; margin: 0 auto; padding-bottom: 48px; color: #344b57; }
.cms-op .page-title-wrapper { max-width: 920px; margin: 0 auto; }
.cms-op .page-title-wrapper .page-title { margin: 8px 0 18px; color: #1c3761; font-size: 32px; font-weight: 800; }
.cms-op .column.main.std > ul.disc {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 18px;
    margin: 0 0 12px; padding: 20px 22px; border-radius: 12px; background: #f3f8fa; list-style: none; counter-reset: op-toc;
}
.cms-op .column.main.std > ul.disc li { margin: 0; padding: 0; background: none; counter-increment: op-toc; }
.cms-op .column.main.std > ul.disc li a { display: flex; gap: 8px; padding: 5px 0; color: #243c4b; font-size: 14px; text-decoration: none; }
.cms-op .column.main.std > ul.disc li a::before { content: counter(op-toc) "."; min-width: 18px; color: #0184c2; font-weight: 700; }
.cms-op .column.main.std > ul.disc li a:hover { color: #0184c2; }
.cms-op .column.main.std > dl { margin: 0; counter-reset: op-sec; }
.cms-op .column.main.std > dl > dt {
    display: flex; align-items: center; gap: 12px; margin: 34px 0 14px; padding: 0 0 12px; border-bottom: 1px solid #d5e5eb;
    color: #1c3761; font-size: 21px; font-weight: 700; line-height: 1.3; counter-increment: op-sec; scroll-margin-top: 16px;
}
.cms-op .column.main.std > dl > dt::before {
    content: counter(op-sec); display: flex; flex: 0 0 32px; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; background: #0184c2; color: #fff; font-size: 15px; font-weight: 700;
}
.cms-op .column.main.std > dl > dd { margin: 0 0 0 44px; font-size: 15px; line-height: 1.75; }
.cms-op .column.main.std > dl > dd strong { display: inline-block; margin-top: 4px; color: #0a5c7a; font-size: 16px; }
@media (max-width: 640px) {
    .cms-op .page-title-wrapper .page-title { font-size: 26px; }
    .cms-op .column.main.std > dl > dt { font-size: 18px; }
    .cms-op .column.main.std > dl > dd { margin-left: 0; }
}

/* Vyhledávací pole: Luma mění box-shadow a výšku vstupů */
.teno-m1 #search { box-shadow: none; }
.teno-m1 #search_mini_form button.search-button { box-shadow: none; }
