.discounts-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 15px;
}

/* === TABS === */
.discounts-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    background: var(--surface-1, #f5f4f1);
    padding: 4px;
    border-radius: var(--radius-sm, 10px);
    border: 1px solid var(--border, #e8e8ed);
    width: fit-content;
}

.discounts-tab {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-xs, 6px);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary, #555770);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.discounts-tab:hover {
    color: var(--text, #1a1a2e);
}

.discounts-tab--active {
    background: white;
    color: var(--text, #1a1a2e);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab-lidl-logo,
.tab-shop-logo {
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.tab-shop-logo--lidl,
.tab-lidl-logo {
    background: #0050aa;
    color: #fff100;
}

.tab-shop-logo--albert {
    background: #00529b;
    color: white;
}

.tracked-help {
    background: var(--surface-1, #f5f4f1);
    border-left: 3px solid var(--primary, #e67e22);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary, #555770);
    margin-bottom: 16px;
}

.shop-updated {
    font-size: 12px;
    color: var(--text-muted, #8e8ea0);
    margin-bottom: 12px;
}

.shop-filter {
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.shop-search,
.shop-category {
    padding: 9px 14px;
    border: 1px solid var(--border, #e8e8ed);
    border-radius: var(--radius-sm, 10px);
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.shop-search {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 400px;
}

.shop-category {
    flex: 0 1 240px;
    cursor: pointer;
}

.shop-search:focus,
.shop-category:focus {
    outline: none;
    border-color: var(--primary, #e67e22);
}

.shop-nonfood-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary, #555770);
    cursor: pointer;
    user-select: none;
}

.shop-nonfood-toggle input {
    cursor: pointer;
}

@media (max-width: 600px) {
    .shop-filter {
        gap: 8px;
    }
    .shop-search,
    .shop-category {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.discount-card {
    position: relative;
}

.discount-card__heart {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border, #e8e8ed);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s ease;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.discount-card__heart:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

.discount-card__heart--active {
    color: #e74c3c;
}

.discount-card__heart--active svg {
    fill: #e74c3c;
}

/* === SECTION HEADER === */
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.lidl-updated {
    font-size: 12px;
    color: var(--text-muted, #8e8ea0);
    margin-bottom: 16px;
}

.discounts-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.discounts-refresh {
    background: white;
    border: 1px solid var(--border, #e8e8ed);
    color: var(--text-secondary, #555770);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs, 6px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.discounts-refresh:hover {
    background: var(--surface-1, #f5f4f1);
    color: var(--text, #1a1a2e);
}

.discounts-refresh:active {
    transform: rotate(180deg);
}

/* === SDÍLENÝ GRID + KARTA === */
.discount-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.discount-card {
    background: white;
    border: 1px solid var(--border, #e8e8ed);
    border-radius: var(--radius-sm, 12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.discount-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    border-color: var(--border-hover, #d0d0d8);
}

.discount-card__image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.discount-card__image img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.discount-card__placeholder {
    font-size: 48px;
    font-weight: 700;
    color: #d0d0d8;
    font-family: 'Playfair Display', serif;
}

.discount-card__discount {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #d32f2f;
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(211,47,47,0.35);
}

.discount-card__shop {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #555;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.discount-card__shop--lidl {
    background: #0050aa;
    color: #fff100;
}

.discount-card__shop--albert {
    background: #00529b;
    color: white;
}

.discount-card__body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.discount-card__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text, #1a1a2e);
    margin: 0;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: capitalize;
}

.discount-card__amount {
    font-size: 12px;
    color: var(--text-muted, #8e8ea0);
}

.discount-card__price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.discount-card__price-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discount-card__price {
    font-size: 20px;
    font-weight: 700;
    color: #d32f2f;
    line-height: 1;
}

.discount-card__price-before {
    font-size: 12px;
    color: var(--text-muted, #8e8ea0);
    text-decoration: line-through;
}

.discount-card__per-unit {
    font-size: 11px;
    color: var(--text-muted, #8e8ea0);
    text-align: right;
    margin-left: auto;
}

.discount-card__validity {
    font-size: 12px;
    color: var(--text-secondary, #555770);
    padding: 4px 8px;
    background: var(--surface-1, #f5f4f1);
    border-radius: 4px;
    align-self: flex-start;
    margin-top: 4px;
}

.discount-card__validity--urgent {
    background: #ffe0e0;
    color: #c62828;
    font-weight: 600;
}

.discount-card__link {
    font-size: 12px;
    color: var(--primary, #e67e22);
    text-decoration: none;
    margin-top: auto;
    padding-top: 6px;
}

.discount-card__link:hover {
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #8e8ea0);
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .discount-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .discount-card__name { font-size: 13px; min-height: 2.4em; }
    .discount-card__price { font-size: 17px; }
    .discount-card__body { padding: 10px 12px 12px; }
    .discount-card__image { aspect-ratio: 1 / 0.9; }
    .discount-card__per-unit { font-size: 10px; }
}

/* === LEGACY (zachováno pro případné jiné stránky) === */
.discounts-list {
    display: grid;
    gap: 12px;
}

.discount-item {
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
