/* ==========================================================================
   Sortiment a ceny (/sortiment)
   ========================================================================== */

/* ---------- praktické rady ---------- */
.tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding-top: 24px;
    padding-bottom: 32px;
}

.tip {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tip .icon {
    color: var(--green);
}

.tip strong {
    font-size: 17px;
    color: var(--forest);
}

.tip span {
    font-size: 15px;
    color: var(--muted);
}

/* ---------- filtr ---------- */
.filter-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(246, 244, 238, .96);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}

.filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    scrollbar-width: none;
}

.filter::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1.5px solid #C9D3C6;
    background: var(--paper);
    color: var(--forest);
    font: inherit;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--forest);
}

.filter-btn.is-active {
    background: var(--forest);
    border-color: var(--forest);
    color: var(--paper);
    font-weight: 700;
}

/* ---------- druhy ---------- */
.product-list {
    padding-top: 8px;
    padding-bottom: 40px;
}

.product {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 48px;
    padding: 56px 0;
    border-bottom: 1px solid #DDD9CC;
    scroll-margin-top: 80px;
}

.product[hidden] {
    display: none;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.product h2 {
    font-size: clamp(30px, 3.6vw, 38px);
}

.product h2 .latin {
    font-style: italic;
    font-weight: 500;
    font-size: .6em;
    color: var(--muted);
    white-space: nowrap;
}

.product-desc {
    color: var(--body);
    line-height: 1.65;
}

.table-box {
    overflow-x: auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
}

.price-table th,
.price-table td {
    padding: 13px 16px;
    text-align: right;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.price-table thead th {
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    background: var(--mint);
    border-bottom: 0;
}

.price-table th:first-child {
    text-align: left;
}

.price-table tbody th {
    font-weight: 600;
    color: var(--ink);
}

.price-table tbody td:nth-child(2) {
    font-weight: 700;
    color: var(--forest);
}

.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td {
    border-bottom: 0;
}

.product-note {
    font-size: 14px;
    color: var(--muted);
}

.product-note strong {
    color: var(--ink);
}

.product-highlight {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: #F3E6D3;
    color: #3A2A14;
    font-size: 15px;
}

/* ---------- galerie ---------- */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-main,
.gallery-thumb {
    display: block;
    padding: 0;
    border: 0;
    background: var(--mint);
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
}

.gallery-main img {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 560px;
    object-fit: cover;
    transition: transform .5s ease;
}

.gallery-main:hover img {
    transform: scale(1.03);
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.gallery-thumb {
    border-radius: 10px;
}

.gallery-thumb img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.gallery-thumb:hover img {
    opacity: .85;
}

.thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(15, 42, 32, .72);
    color: var(--paper);
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-sources {
    display: none;
}

.footnote {
    margin-top: 28px;
    font-size: 14px;
    color: var(--muted);
}

/* ---------- pruh pro odběratele ---------- */
.b2b-strip {
    margin: 8px 0 88px;
    background: var(--forest);
    color: var(--on-dark-2);
    border-radius: 18px;
    padding: 28px 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
}

.b2b-strip div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.b2b-strip strong {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--paper);
}

/* ---------- lightbox ---------- */
.lightbox {
    /* framework nastavuje všem prvkům position: relative – modální okno musí být fixní k viewportu */
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 20, 15, .94);
    color: var(--paper);
}

.lightbox::backdrop {
    background: rgba(8, 20, 15, .6);
}

.lightbox-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 72px;
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox-title {
    position: absolute;
    top: 20px;
    left: 24px;
    right: 80px;
    font-family: var(--font-display);
    font-size: 22px;
}

.lightbox-count {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--on-dark-3);
    font-size: 15px;
}

.lightbox-btn {
    position: absolute;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .06);
    color: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, .16);
}

.lightbox-close { top: 14px; right: 16px; }
.lightbox-prev  { left: 12px; top: 50%; margin-top: -26px; }
.lightbox-next  { right: 12px; top: 50%; margin-top: -26px; }

/* ---------- responzivita ---------- */
@media screen and (max-width: 900px) {
    .product {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding: 44px 0;
    }

    .product-gallery {
        order: -1;
    }

    .gallery-main img {
        aspect-ratio: 4 / 3;
    }
}

@media screen and (max-width: 560px) {
    .lightbox-inner {
        padding: 64px 8px 72px;
    }

    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 12px;
        margin-top: 0;
    }

    .price-table th,
    .price-table td {
        padding: 12px 10px;
        font-size: 15px;
    }

    .b2b-strip {
        padding: 24px 20px;
    }
}
