/* ═══════════════════════════════════════════════════════════════
   AKCIÓS CÍMKE OLDAL — sale.css
   Színvilág: piros / narancs (akció)
   A generátor oldalakkal megegyező struktúra
   ═══════════════════════════════════════════════════════════════ */

/* ═══ SALE PAGE COLOR VARIABLES ═══ */
.page-sale {
    --sale-primary: #e53935;
    --sale-primary-dark: #c62828;
    --sale-gradient: linear-gradient(135deg, #e53935, #ff5722);
    --sale-glare: rgba(229, 57, 53, 0.15);
    --sale-glow: rgba(229, 57, 53, 0.25);
    --sale-subtle: rgba(229, 57, 53, 0.06);
}

[data-theme="dark"].page-sale,
.page-sale [data-theme="dark"] {
    --sale-subtle: rgba(229, 57, 53, 0.12);
    --sale-glare: rgba(229, 57, 53, 0.2);
    --sale-glow: rgba(229, 57, 53, 0.35);
}

/* ═══ PAGE THEME OVERRIDES ═══ */
body.page-sale {
    --primary-color: #e53935;
    --primary-dark: #c62828;
    --primary-gradient: linear-gradient(135deg, #e53935, #ff5722);
    --primary-glare: rgba(229, 57, 53, 0.15);
    --primary-glow: rgba(229, 57, 53, 0.25);
    --primary-subtle: rgba(229, 57, 53, 0.06);
}

[data-theme="dark"] body.page-sale {
    --primary-subtle: rgba(229, 57, 53, 0.12);
    --primary-glare: rgba(229, 57, 53, 0.2);
    --primary-glow: rgba(229, 57, 53, 0.35);
    --shadow-glow: 0 8px 30px rgba(229, 57, 53, 0.2);
}

/* Az upload-area / tab-btn.active / footer-links hover szabályok
   a közös generátor-téma blokkban élnek (main/01-tokens.css),
   a színt a fenti --primary-color token adja. */

/* ═══ TABLE GRID — 9 oszlop (Készlet oszloppal) ═══ */
.page-sale .table-header,
.page-sale .table-row {
    grid-template-columns: 4fr 1.5fr 1.5fr 1fr 1.5fr 1.5fr 1fr 1fr 0.8fr;
}

/* ═══ DISCOUNT PANEL ═══ */
.sale-discount-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.sale-discount-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.sale-discount-header i {
    color: var(--sale-primary);
    font-size: 18px;
}

.sale-discount-hint {
    font-size: 12px;
    color: var(--text-light, #64748b);
    margin: 0 0 8px 0;
    padding-left: 28px;
}

.sale-discount-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.sale-discount-slider-wrap {
    flex: 1;
    min-width: 200px;
}

.sale-discount-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e53935 0%, #ff5722 var(--slider-pct, 20%), #e2e8f0 var(--slider-pct, 20%), #e2e8f0 100%);
    outline: none;
    cursor: pointer;
}

[data-theme="dark"] .sale-discount-slider {
    background: linear-gradient(to right, #e53935 0%, #ff5722 var(--slider-pct, 20%), #334155 var(--slider-pct, 20%), #334155 100%);
}

.sale-discount-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--sale-gradient);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.35);
    border: 2px solid #fff;
    transition: transform 0.15s ease;
}

.sale-discount-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.sale-discount-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--sale-gradient);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.35);
    border: 2px solid #fff;
}

.sale-discount-number-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sale-discount-number {
    width: 72px;
    padding: 0.5rem 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    color: var(--sale-primary);
    background: var(--bg-color);
    transition: border-color 0.2s;
}

.sale-discount-number:focus {
    border-color: var(--sale-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--sale-glare);
}

.sale-discount-suffix {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
}

.sale-discount-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--sale-subtle);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(229, 57, 53, 0.15);
}

.sale-discount-preview-icon {
    font-size: 1.5rem;
    color: var(--sale-primary);
}

.sale-discount-preview-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
}

.sale-discount-preview-text strong {
    color: var(--sale-primary);
}

.sale-discount-preview-example {
    margin-left: auto;
    text-align: right;
}

.sale-discount-preview-example .original {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.sale-discount-preview-example .discounted {
    color: var(--sale-primary);
    font-weight: 800;
    font-size: 1.1rem;
}

/* ═══ SALE LABEL CARD STYLES ═══ */
.label-sale {
    position: relative;
    overflow: hidden;
}

/* A klasszikus stílus fix piros keretet kap; az egyedi stílusú
   (.label-sale-custom) kártyák inline-ban kapják a keret színét. */
.label-sale:not(.label-sale-custom) {
    border-color: #c62828 !important;
}

.label-sale .label-header {
    background: #ffebee;
    color: #c62828;
}

[data-theme="dark"] .label-sale .label-header {
    background: rgba(229, 57, 53, 0.15);
    color: #ef5350;
}

/* AKCIÓ ribbon */
.label-sale-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--sale-gradient);
    color: #fff;
    font-size: 7px;
    font-weight: 800;
    padding: 1.5px 6px 1.5px 8px;
    border-radius: 0 3px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    z-index: 2;
    box-shadow: -1px 1px 3px rgba(229, 57, 53, 0.3);
}

/* Original price strikethrough */
.label-sale-original-price {
    text-align: center;
    color: #9e9e9e;
    font-size: 0.75em;
    font-weight: 600;
    text-decoration: line-through;
    margin-bottom: 0.5mm;
}

/* Discounted price */
.label-sale-discounted-price {
    text-align: center;
    color: #c62828;
    font-weight: 900;
    font-size: 1.2em;
    line-height: 1.05;
    margin: 0.5mm 0;
}

.label-sale-discounted-price .price-amount {
    font-weight: 900;
}

.label-sale-discounted-price .price-currency {
    font-size: 0.65em;
    font-weight: 700;
    opacity: 0.85;
}

/* Discount percentage badge */
.label-sale-percent {
    display: inline-block;
    background: var(--sale-gradient);
    color: #fff;
    font-size: 7px;
    font-weight: 800;
    padding: 0.5px 4px;
    border-radius: 8px;
    text-align: center;
    margin: 0.5mm auto;
    line-height: 1.5;
}

/* Sale label content adjustments */
.label-sale .label-content {
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.label-sale .label-footer-code {
    color: #c62828;
    opacity: 0.7;
}

/* ═══ STYLE SELECTOR — SALE THEME SWATCHES ═══ */
.page-sale .style-preview-classic {
    background: linear-gradient(180deg, #ffebee 40%, #fff 40%);
    border: 1.5px solid #c62828;
}

.page-sale .style-preview-custom {
    background: linear-gradient(180deg, #ffebee 30%, #fff 30%);
    border: 1.5px solid #c62828;
}

/* ═══ PER-ITEM DISCOUNT INPUT ═══ */
.sale-discount-input {
    width: 42px;
    padding: 2px 4px;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #e53935;
    background: var(--card-bg, #fff);
    -moz-appearance: textfield;
}

.sale-discount-input::-webkit-inner-spin-button,
.sale-discount-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sale-discount-input:focus {
    outline: none;
    border-color: #e53935;
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.15);
}

.sale-discount-input-suffix {
    font-size: 11px;
    color: #e53935;
    font-weight: 600;
    margin-left: 1px;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .page-sale .table-header,
    .page-sale .table-row {
        grid-template-columns: 1fr 1fr;
    }

    .page-sale .col:nth-child(8) {
        display: none;
    }
}

@media (max-width: 600px) {
    .sale-discount-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sale-discount-preview {
        flex-direction: column;
        text-align: center;
    }

    .sale-discount-preview-example {
        margin-left: 0;
        text-align: center;
    }
}

/* ═══ OLDAL-SPECIFIKUS BEÁLLÍTÁSOK ═══ */
/* Oszlopok gomb elrejtése - csak polccímke oldalon szükséges */
body.page-sale #btnColumnMapper {
    display: none !important;
}

/* Footer logo text - nagy és vastag, de piros */
body.page-sale .footer-logo-text {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #e53935, #ff5722);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
