/* --- Skrytí výchozího nadpisu stránky --- */
.page-template-template-product-grid h1.page-title {
    display: none;
}

:root {
    --orange: #FC5220;
    --blue: #0055a4;
    --title-blue: #2c4364; 
    --text: #333333;
    --muted: #666666;
    --border: #e0e0e0;
    --bg-soft: #f5f8fa;
    --radius: 4px;
}

body { 
    background-color: #fff; 
    font-family: Arial, sans-serif; 
    overflow-x: hidden;
}

.shop-container { 
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 30px 20px; 
    display: grid; 
    grid-template-columns: 260px 1fr; 
    gap: 30px; 
    align-items: start;
    padding-right: 250px; 
}

/* --- Postranní panel --- */
.shop-container .shop-sidebar { 
    background-color: var(--bg-soft); 
    padding: 20px; 
}
.shop-container .filter-section + .filter-section { 
    margin-top: 30px; 
}
.shop-container .filter-title {
    position: relative;
    font-weight: 900;
    font-size: 14px;
    color: var(--title-blue);
    margin-bottom: 20px;
    padding-left: 15px;
    text-transform: uppercase;
}
.shop-container .filter-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 20px;
    background-color: var(--orange);
}

/* --- Sestavení slideru cen --- */
.shop-container .price-inputs {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
    font-weight: bold;
}
.shop-container .price-prefix {
    color: var(--orange);
}
.shop-container .luko-price-slider {
    height: 6px;
    background: #e0e0e0;
    border: none;
    border-radius: 3px;
    margin: 25px 8px;
    position: relative;
}
.shop-container .luko-price-slider .ui-slider-range {
    background: var(--orange);
    height: 100%;
    border-radius: 3px;
    position: absolute;
    z-index: 1;
}
.shop-container .luko-price-slider .ui-slider-handle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--blue);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    outline: none;
    z-index: 2;
    margin-left: -10px;
}
.shop-container .luko-price-slider .ui-slider-handle:focus {
    box-shadow: 0 0 0 3px rgba(0, 85, 164, 0.4);
}

/* --- Styly pro živé vyhledávání --- */
.shop-container .search-wrapper { 
    position: relative; 
}
.shop-container #live-search-input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 40px 0 15px;
    font-size: 14px;
    background-color: #fff;
    box-sizing: border-box;
}
.shop-container .search-button {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--orange) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>') center no-repeat;
    border-radius: 0 var(--radius) var(--radius) 0;
    pointer-events: none;
    box-sizing: border-box;
}
.shop-container #my-custom-search-results { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); box-shadow: 0 5px 15px rgba(0,0,0,0.1); z-index: 100; max-height: 400px; overflow-y: auto; border-radius: 0 0 var(--radius) var(--radius); }
.shop-container #my-custom-search-results ul { list-style: none; margin: 0; padding: 0; }
.shop-container #my-custom-search-results li a { display: flex; align-items: center; padding: 8px 10px; text-decoration: none; color: var(--text); border-bottom: 1px solid #f0f0f0; }
.shop-container #my-custom-search-results li:last-child a { border-bottom: none; }
.shop-container #my-custom-search-results li a:hover { background-color: var(--bg-soft); }
.shop-container #my-custom-search-results img { width: 40px; height: 40px; object-fit: contain; margin-right: 10px; flex-shrink: 0; }
.shop-container .product-info { display: flex; flex-direction: column; }
.shop-container .product-title { font-weight: bold; font-size: 13px; line-height: 1.3; margin-bottom: 2px; }
.shop-container .product-price { font-size: 12px; color: var(--muted); }
.shop-container .no-results { padding: 15px; text-align: center; color: var(--muted); }

.shop-container #my-custom-search-results::-webkit-scrollbar { width: 6px; }
.shop-container #my-custom-search-results::-webkit-scrollbar-track { background: #f1f1f1; }
.shop-container #my-custom-search-results::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 6px; }
.shop-container #my-custom-search-results::-webkit-scrollbar-thumb:hover { background: #e64a19; }

/* --- Hlavní obsah --- */
.shop-container .shop-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 20px; padding: 15px 20px; background-color: var(--bg-soft); margin-bottom: 25px; }
.shop-container .shop-breadcrumbs { font-size: 18px; font-weight: 900; color: var(--title-blue); flex-grow: 1; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-container .shop-breadcrumbs a { text-decoration: none; color: inherit; }
.shop-container .shop-breadcrumbs .breadcrumb-separator { color: var(--orange); }
.shop-container .sort-form { display: flex; align-items: center; gap: 10px; font-size: 14px; flex-shrink: 0; }
.shop-container .shop-category-description {
    margin: -8px 0 25px;
    padding: 16px 20px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}
.shop-container .shop-category-description > *:first-child { margin-top: 0; }
.shop-container .shop-category-description > *:last-child { margin-bottom: 0; }
.shop-category-description {
    margin: -5px 0 20px;
}
/* --- Mřížka produktů --- */
.shop-container .products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin: 0; list-style: none; padding: 0; }

.shop-container .product-card { border: 1px solid var(--border); transition: all .2s ease; display: flex; flex-direction: column; background: #fff; height: 100%; }
.shop-container .product-card:hover { border-color: var(--blue); box-shadow: 0 8px 26px rgba(32,95,190,.15); }
.shop-container .product-card .thumb { display: block; height: 120px; padding: 15px; }
.shop-container .product-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.shop-container .card-content { text-align: center; padding: 20px 15px; display: flex; flex-direction: column; flex-grow: 1; }
.shop-container .product-card .title { font-size: 14px; margin: 0; font-weight: bold; text-transform: initial;}
.shop-container .product-card .title a { color: var(--title-blue); text-decoration: none; }
.shop-container .product-card .excerpt { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; flex-grow: 1; }
.shop-container .card-footer { text-align: center; padding: 0 15px 20px 15px; margin-top: auto; }
.shop-container .price-wrap { margin-bottom: 15px; }
.shop-container .price-main { display: block; font-size: 18px; font-weight: bold; color: var(--title-blue); }
.shop-container .price-sub {
    font-size: 13px;
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.shop-container .price-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.shop-container .price-on-request { font-size: 18px; color: var(--title-blue); font-weight: bold; }
.shop-container .product-card .actions .button { background-color: var(--orange); color: #fff; height: 48px; padding: 0 24px; font-size: 15px; font-weight: bold; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; border: none; transition: background-color .2s ease; text-transform: uppercase; width: 100%; box-sizing: border-box; }
.shop-container .product-card:hover .actions .button { background-color: var(--blue); }
.shop-container .product-card .actions .ajax_add_to_cart::before { content: ''; display: inline-block; width: 24px; height: 24px; background: url('/wp-content/uploads/2025/10/cart-1.png') center / contain no-repeat; margin-right: 8px; filter: brightness(0) invert(1); }
.shop-container .product-card .added_to_cart { display: none; }

/* --- Stránkování --- */
.shop-container .pagination { margin: 30px 0 0; padding: 0; }
.shop-container .pagination ul { display: flex; justify-content: flex-start; list-style: none; padding: 0; margin: 0; gap: 8px; }
.shop-container .pagination li { margin: 0; padding: 0; }
.shop-container .pagination a, .shop-container .pagination span { width: 40px; height: 40px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--text); background: #fff; font-weight: bold; transition: all .2s ease; border-radius: var(--radius); }
.shop-container .pagination .current { background: var(--orange); color: #fff; border-color: var(--orange); }
.shop-container .pagination a:hover { background-color: var(--blue); color: #fff; border-color: var(--blue); }

/* --- Vlastní řazení --- */
.shop-container .sort-form { position: relative; }
.shop-container .custom-sort-dropdown { width: 250px; }
.shop-container .sort-current { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0 15px; height: 42px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; }
.shop-container .sort-current span { color: var(--muted); }
.shop-container .sort-current::after { content: ''; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 5px solid var(--title-blue); transition: transform .2s ease; }
.shop-container .custom-sort-dropdown.is-open .sort-current::after { transform: rotate(180deg); }
.shop-container .sort-options { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); list-style: none; margin: 0; padding: 5px; z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.shop-container .custom-sort-dropdown.is-open .sort-options { display: block; }
.shop-container .sort-options li { padding: 10px 15px; cursor: pointer; border-radius: var(--radius); transition: background-color .2s ease; }
.shop-container .sort-options li:hover { background-color: var(--bg-soft); }
.shop-container .sort-options li.is-active { font-weight: bold; color: var(--orange); }

/* --- Styly pro akordeon kategorií --- */
.shop-container .cats-wrap ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.shop-container .wc-cat-item a {
    display: block;
    padding: 6px 0;
    text-decoration: none;
    font-size: 15px;
    border-bottom: 2px solid transparent;
    transition: color .2s ease;
    color: var(--text);
}
.shop-container .wc-cat-item a:hover {
    color: var(--orange);
}
.shop-container .wc-cat-item-level-0 > a {
    font-weight: bold;
    font-size: 16px;
    color: var(--title-blue);
}
.shop-container .wc-cat-level-1 {
    padding-left: 20px; 
}
.shop-container .wc-cat-level-2 {
    padding-left: 20px;
}
.shop-container .wc-cat-level-2 a {
    font-size: 14px;
    color: var(--muted);
}
.shop-container .wc-cat-item.is-active > a {
    border-bottom-color: var(--orange);
    color: var(--orange);
    font-weight: bold;
}
.shop-container .wc-cat-item.current-cat-ancestor > a {
    color: var(--orange);
}
.shop-container .wc-cat-item ul {
    display: none;
}
.shop-container .wc-cat-item.current-cat-ancestor > ul,
.shop-container .wc-cat-item.is-open > ul {
    display: block;
}
.shop-container .toggle {
    display: none; 
}

/* ========================================================================
   Стили для карточки контакта в сайдбаре
   ======================================================================== */
.luko-contact-card {
    background-color: var(--luko-orange, #fc5220); 
    color: #fff; 
    padding: 25px 10px; 
    text-align: center;
    border-radius: 10px; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); 
}
.luko-contact-card .card-title {
    font-size: 18px; 
    font-weight: 700; 
    margin-bottom: 10px;
    line-height: 1.2;
    color: inherit; 
}
.luko-contact-card .card-text {
    font-size: 14px; 
    line-height: 1.4;
    margin-bottom: 25px;
    color: inherit; 
}
.luko-contact-button {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    background-color: var(--luko-blue, #233c73); 
    color: #fff!important; 
    padding: 15px 25px;
    border-radius: 8px; 
    text-decoration: none;
    font-size: 16px; 
    font-weight: 700; 
    transition: background-color 0.3s ease;
    gap: 10px; 
}
.luko-contact-button:hover {
    background-color: #1a2e5f; 
    color: #fff; 
}
.luko-contact-button svg {
    width: 14px; 
    height: 14px; 
    fill: currentColor; 
    flex-shrink: 0; 
}

/* ========================================================================
   RESPONSIVITA (MÉDIA) - OPRAVA PRO MOBIL
   ======================================================================== */
@media (max-width: 1475px) {
    .shop-container .products-grid{
        grid-template-columns: 1fr 1fr 1fr;
    }
    .shop-container{
        padding-right: 20px;
    }
}
@media (max-width: 1260px) {
    .shop-container .products-grid{
        grid-template-columns: 1fr 1fr;
    }
    .shop-container{
        padding-right: 20px;
    }
}
@media (max-width: 1024px) { 
    .shop-container { 
        display: flex; 
        flex-direction: column;
        padding-right: 20px; 
        padding-left: 20px;
    }
    .shop-container .shop-sidebar {
        width: 100%; 
        box-sizing: border-box;
        margin-bottom: 20px;
    }
    .shop-container .products-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

@media (max-width: 900px) { 
    .shop-container .products-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
}

@media (max-width: 768px) {
    /* Скрываем фильтр цены */
    .shop-container .shop-sidebar .filter-section:nth-of-type(2) {
        display: none;
    }
    
    /* Скрываем оранжевую карточку */
    .luko-contact-card {
        display: none;
    }

    /* --- НОВОЕ: Скрываем шапку (Doporucene + Sort) --- */
    .shop-container .shop-head {
        display: none;
    }

    /* --- НОВОЕ: Размеры кнопки поиска --- */
    .shop-container .search-button {
        width: 50px;
        height: 50px;
        top: 0;
        right: 0;
    }

    /* --- НОВОЕ: Уменьшаем отступы между сайдбаром и товарами --- */
    .shop-container {
        gap: 15px; /* Уменьшили gap */
    }
    .shop-container .shop-sidebar {
        margin-bottom: 0; /* Убрали отступ снизу у сайдбара */
        padding-bottom: 0;
    }

    /* Сетка товаров */
    .shop-container .products-grid { 
        grid-template-columns: 1fr; 
        gap: 15px;
    }

    .shop-container .shop-category-description {
        margin: 0 0 18px;
        padding: 14px 16px;
        font-size: 14px;
        line-height: 1.6;
    }
}
.shop-sidebar .cats-wrap .wc-cat-item-level-0 > a{
    font-size: 14px !important;
}