/* ═══════════════════════════════════════════════════
   ESHOP — Affiliate katalog
   BEM konvence, tokeny z tokens.css
   ═══════════════════════════════════════════════════ */

/* ── Admin eshop form ── */

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.admin-form-grid label {
    display: block;
    margin-bottom: 4px;
}

.admin-form-grid .capacity-input,
.admin-form-grid select {
    width: 100%;
}

.admin-stat-rating {
    flex-wrap: wrap;
    padding: 12px 16px;
    background: var(--pastel-amber);
    border-left: 3px solid color-mix(in oklch, var(--pastel-amber) 90%, black);
}

.admin-stat-rating .capacity-input-sm {
    width: 65px;
}

.admin-stat-rating .capacity-input-md {
    width: 85px;
}

.admin-status-msg {
    font-size: var(--text-sm);
}

.eshop-active-filters {
    padding: 0 0 var(--space-md);
}

/* ── Hero / Rozcestník ── */

.eshop-hero {
    padding: var(--space-2xl) 0;
}

.eshop-hero__title {
    font-size: var(--text-3xl);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.eshop-hero__subtitle {
    text-align: center;
    color: var(--color-steel);
    font-size: var(--text-l);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.eshop-hero__cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    max-width: 900px;
    margin: 0 auto;
}

.eshop-hero__card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 280px;
    border-radius: var(--radius-md-plus);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-white);
    transition: transform var(--transition-fast);
    box-shadow: 0 4px 20px var(--shadow-md);
}

.eshop-hero__card:hover {
    transform: translateY(-4px);
}

.eshop-hero__card--svatebni-dary {
    background: linear-gradient(135deg, var(--color-teal), var(--color-teal-dark));
}

.eshop-hero__card--rozlucka {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
}

.eshop-hero__card-content {
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
}

.eshop-hero__card-title {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-xs);
    color: var(--color-white);
}

.eshop-hero__card-desc {
    font-size: var(--text-md);
    opacity: 0.9;
    margin-bottom: var(--space-md);
}

.eshop-hero__card-cta {
    font-weight: 600;
    font-size: var(--text-md);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Featured sekce ── */

.eshop-featured {
    padding: var(--space-2xl) 0;
}

.eshop-featured__title {
    font-size: var(--text-2xl);
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* ── Product Grid ── */

.eshop-grid {
    display: grid;
    gap: var(--space-lg);
}

.eshop-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.eshop-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ── Product Card ── */

.product-card {
    background: var(--color-snow);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 1px 4px var(--shadow-xs);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.product-card:hover {
    box-shadow: 0 4px 16px var(--shadow-lg);
}

.product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-card__image-wrap {
    position: relative;
    aspect-ratio: 1;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: var(--space-md);
    border: 1px solid var(--color-silver);
    border-radius: var(--radius-sm);
    padding: var(--space-lg);
}

.product-card__image {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.product-card__brand-logo {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    height: 22px;
    object-fit: contain;
    z-index: 2;
}

.product-card__no-image {
    color: var(--color-ash);
}

.product-card__badges {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    display: flex;
    gap: var(--space-xs);
    z-index: 2;
}

.product-card__name {
    font-size: var(--text-2xl);
    padding: var(--space-md) var(--space-md) 0;
    line-height: 1.3;
    margin: 0;
}

.product-card__price-row {
    padding: var(--space-sm) var(--space-md) var(--space-md);
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.product-card__price {
    font-size: var(--text-3xl);
    font-weight: 600;
}

.product-card__original-price {
    font-size: var(--text-sm);
    color: var(--color-stone);
    text-decoration: line-through;
}

.product-card__rating {
    padding: var(--space-xs) var(--space-md) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.product-card__rating-value {
    font-size: var(--text-md);
    font-weight: 600;
    color: var(--color-iron);
}

.product-card__rating-stars {
    display: inline-flex;
    gap: 0;
}

.product-card__rating-stars svg {
    display: block;
}

.product-detail__shop .card-google-rating {
    padding: 0;
    background: none;
    box-shadow: none;
    font-size: var(--text-l);
    font-family: var(--font-heading);
}

.product-detail__shop .card-google-rating svg {
    width: 18px;
    height: 18px;
}

.product-detail__shop .card-google-rating-count {
    margin-left: var(--space-xs);
    font-weight: 300;
    font-size: inherit;
}

/* ── Badges ── */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge--top-tip {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #6b4e00;
}

.badge--new {
    background: var(--color-green-light);
    color: #065f46;
}

.badge--discount {
    background: #fee2e2;
    color: var(--color-red);
}

/* ── Section Layout ── */

.eshop-section {
    padding: var(--space-xl) 0 var(--space-2xl);
}

.eshop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

/* ── Breadcrumbs ── */

.eshop-breadcrumbs {
    font-size: var(--text-sm);
    color: var(--color-stone);
}

.eshop-breadcrumbs a {
    color: var(--color-teal);
    text-decoration: none;
}

.eshop-breadcrumbs a:hover {
    text-decoration: underline;
}

.eshop-breadcrumbs__sep {
    margin: 0 var(--space-xs);
}

/* Filtr + řazení: v catalog-header-actions, styly ze style.css */
.catalog-header-actions .btn-map-toggle {
    padding: 0.6rem 0.9rem 0.6rem 1.25rem;
}

/* ── Filters sidebar ── */

.eshop-filters {
    background: var(--color-white);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-silver);
    padding: var(--space-md);
}


/* Filter modal: používá existující .filter-modal ze style.css */

.eshop-filters__section {
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-silver);
}

.eshop-filters__section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}


/* ── Jednoduchý filtrový checkbox (bez animace) ── */

label.checkbox-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: var(--text-md);
    color: var(--color-iron);
    line-height: 1.4;
}

label.checkbox-filter input[type="checkbox"] {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    appearance: none;
    border: 2px solid var(--color-ash);
    border-radius: 4px;
    background: var(--color-white);
    transition: background-color 0.15s, border-color 0.15s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 0;
    background-position: center;
    background-repeat: no-repeat;
}

label.checkbox-filter input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-size: 14px;
}

.eshop-filters__count {
    color: var(--color-stone);
    font-size: var(--text-sm);
}

/* ── Section bar (radio + search) ── */

.eshop-section-bar {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.eshop-section-bar .eshop-search {
    flex: 1;
    margin-bottom: 0;
}

/* ── Search bar ── */

.eshop-search {
    position: relative;
    margin-bottom: var(--space-md);
}

.eshop-search__input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--color-silver);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    background: var(--color-white);
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.eshop-search__input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.eshop-search__icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-stone);
    pointer-events: none;
}

.eshop-suggest {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-silver);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 4px 16px var(--shadow-md);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

.eshop-suggest.active {
    display: block;
}

.eshop-suggest__item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 14px;
    text-decoration: none;
    color: var(--color-iron);
    transition: background-color var(--transition-fast);
}

.eshop-suggest__item:hover,
.eshop-suggest__item.highlighted {
    background: var(--color-snow);
}

.eshop-suggest__img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.eshop-suggest__name {
    flex: 1;
    font-size: var(--text-sm);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.eshop-suggest__price {
    font-weight: 600;
    font-size: var(--text-sm);
    white-space: nowrap;
    color: var(--color-iron);
}

/* ── Tag chips ── */

.eshop-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid var(--color-silver);
    border-radius: 20px;
    background: var(--color-white);
    font-size: 13px;
    color: var(--color-iron);
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
    line-height: 1.3;
}

.tag-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tag-chip.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.tag-chip small {
    font-size: 11px;
    opacity: 0.7;
}

.tag-chip:disabled,
.tag-chip.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ── Filter section heading ── */

.eshop-filters__heading {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-steel);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

/* Price slider: používá existující .capacity-range-* třídy ze style.css */


/* Aktivní filtry: používá existující .active-filter-tag + .remove-tag ze style.css */

/* ── Main content ── */

.eshop-load-more {
    text-align: center;
    padding: var(--space-xl) 0;
}

.eshop-empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--color-stone);
}

/* ── Product Detail ── */

.eshop-product {
    padding: var(--space-xl) 0 var(--space-2xl);
}

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.product-detail__image-wrap {
    position: relative;
    background: var(--color-snow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: var(--space-lg);
}

.product-detail__no-image {
    color: var(--color-ash);
}

.product-detail__badges {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    display: flex;
    gap: var(--space-xs);
}

.product-detail__name {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.product-detail__price-row {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.product-detail__price {
    font-size: 32px;
    font-weight: 600;
}

.product-detail__original-price {
    font-size: var(--text-xl);
    color: var(--color-stone);
    text-decoration: line-through;
}

.product-detail__shop {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-silver);
}

.product-detail__shop-logo {
    height: 22px;
    object-fit: contain;
}

.product-detail__desc {
    margin-bottom: var(--space-lg);
}

.product-detail__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-l);
}

.product-detail__meta {
    font-size: var(--text-sm);
    color: var(--color-stone);
    margin-top: var(--space-md);
}

/* ── SEO text ── */

.eshop-seo-text {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-silver);
}

.eshop-seo-text h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-md);
}

.eshop-seo-text p {
    color: var(--color-steel);
    line-height: 1.7;
}

/* ── Related ── */

.eshop-related {
    margin-top: var(--space-2xl);
}

.eshop-related h2 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-lg);
}

/* ── Disclosure ── */

.eshop-disclosure {
    background: var(--color-teal-light);
    padding: var(--space-md) 0;
    text-align: center;
}

.eshop-disclosure p {
    font-size: var(--text-sm);
    color: var(--color-teal-dark);
    margin: 0;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */

@media (min-width: 1440px) {
    .eshop-grid--3 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1880px) {
    .eshop-grid--3 {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .eshop-grid--3,
    .eshop-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .eshop-hero__cards {
        grid-template-columns: 1fr;
    }

    .eshop-hero__card {
        min-height: 180px;
    }

    .eshop-grid--3,
    .eshop-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .eshop-layout {
        grid-template-columns: 1fr;
    }

    /* Sidebar skrýt na mobilu — filtry přes filter-modal */
    .eshop-filters {
        display: none;
    }

    /* Product detail */
    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail__price {
        font-size: var(--text-2xl);
    }

    .catalog-header.container {
        padding: 0 20px 40px;
    }

    .eshop-breadcrumbs.container {
        padding: 20px 20px 0;
        margin-bottom: 11px;
    }
}

@media (max-width: 480px) {
    .eshop-grid--3,
    .eshop-grid--4 {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .product-card__name {
        font-size: var(--text-sm);
        padding: var(--space-xs) var(--space-sm) 0;
    }

    .product-card__price-row {
        padding: var(--space-xs) var(--space-sm);
    }

    .product-card__price {
        font-size: var(--text-l);
    }

    .product-card__shop {
        padding: var(--space-xs) var(--space-sm) var(--space-sm);
    }
}
