/* Stolmar Featured Products — Frontend CSS */

.stfeat-section {
    padding: 60px 0;
}
.stfeat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Nagłówek sekcji ───────────────────────────────────── */
.stfeat-section-header { text-align: center; margin-bottom: 40px; }
.stfeat-section-title { font-size: clamp(24px,3vw,36px); font-weight: var(--font-heading-weight, 800); font-family: var(--font-heading, inherit); color: var(--stfeat-title-color, #1e2a0e); margin: 0 0 8px; letter-spacing: -.02em; }
.stfeat-section-subtitle { font-size: 16px; font-family: var(--font-body, inherit); font-weight: var(--font-body-weight, 400); color: var(--stfeat-subtitle-color, #6a7a5a); margin: 0; }

/* ═══════════════════════════════════════════════════════
   LAYOUT: GRID
═══════════════════════════════════════════════════════ */
.stfeat-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.stfeat-grid--2 { grid-template-columns: repeat(2,1fr); }
.stfeat-grid--3 { grid-template-columns: repeat(3,1fr); }
.stfeat-grid--4 { grid-template-columns: repeat(4,1fr); }

/* ═══════════════════════════════════════════════════════
   LAYOUT: HERO
═══════════════════════════════════════════════════════ */
.stfeat-hero-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: stretch;
}

/* ── Carousel wrapper ── */
.stfeat-hero-carousel {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    align-items: stretch;
}

/* Lewa kolumna: hero */
.stfeat-hero-col {
    overflow: hidden;
    position: relative;
}
.stfeat-hslide { display: none; }
.stfeat-hslide--active { display: block; }
.stfeat-hslide .stfeat-hero-featured { height: 100%; }

/* Prawa kolumna: strony siatki + nawigacja */
.stfeat-grid-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stfeat-gpages {
    overflow: hidden;
    position: relative;
}
.stfeat-gpage { display: none; }
.stfeat-gpage--active { display: block; }

/* Nawigacja carousel */
.stfeat-cnav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 4px;
}
.stfeat-cnav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e8e4d8;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #1e2a0e;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
    flex-shrink: 0;
}
.stfeat-cnav-btn:hover {
    background: #6ab04c;
    border-color: #6ab04c;
    color: #fff;
    transform: scale(1.08);
}
.stfeat-cnav-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}
.stfeat-cnav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #d4d0c8;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}
.stfeat-cnav-dot--active {
    background: #6ab04c;
    transform: scale(1.3);
}
.stfeat-hero-featured {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8e4d8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.stfeat-hero-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f3ee;
}
.stfeat-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.stfeat-hero-featured:hover .stfeat-hero-img { transform: scale(1.03); }
.stfeat-hero-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.stfeat-hero-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: #1e2a0e;
}
.stfeat-hero-name a { color: inherit; text-decoration: none; }
.stfeat-hero-name a:hover { color: #6ab04c; }
.stfeat-hero-price {
    font-size: 22px;
    font-weight: 800;
    color: #1e2a0e;
}
.stfeat-hero-price .price { font-size: inherit; font-weight: inherit; color: inherit; }
.stfeat-hero-price ins { text-decoration: none; color: #0fb32a; }
.stfeat-hero-price del { font-size: 14px; font-weight: 400; color: #aaa; opacity: 1; }
.stfeat-hero-btn {
    margin-top: 4px;
    width: 100%;
    justify-content: center;
    font-size: 15px;
    padding: 12px 20px;
}

/* Promo banner z timerem */
.stfeat-hero-promo {
    background: #f4c430;
    padding: 14px 20px;
    text-align: center;
}
.stfeat-promo-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #1e2a0e;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.stfeat-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.stfeat-countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.stfeat-countdown-val {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: #1e2a0e;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
}
.stfeat-countdown-lbl {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #1e2a0e;
    text-transform: uppercase;
}
.stfeat-countdown-sep {
    font-size: 22px;
    font-weight: 800;
    color: #1e2a0e;
    margin-bottom: 12px;
    line-height: 1;
}

/* Siatka po prawej w hero */
.stfeat-hero-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    align-content: stretch;
    height: 100%;
}
.stfeat-hero-grid.stfeat-grid--2 { grid-template-columns: repeat(2,1fr); }
.stfeat-hero-grid.stfeat-grid--3 { grid-template-columns: repeat(3,1fr); }

/* Karty w siatce hero muszą wypełniać komórkę grid */
.stfeat-hero-grid .stfeat-product-card,
.stfeat-hero-grid .stfeat-product-card article {
    height: 100%;
}
.stfeat-hero-grid .stfeat-product-card .stfeat-product-img-wrap {
    aspect-ratio: unset;
    flex: 1;
    min-height: 120px;
}

/* ═══════════════════════════════════════════════════════
   LAYOUT: LIST
═══════════════════════════════════════════════════════ */
.stfeat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stfeat-list-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e4d8;
    overflow: hidden;
    padding: 0;
    transition: box-shadow .2s, transform .2s;
}
.stfeat-list-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    transform: translateX(3px);
}
.stfeat-list-img-wrap {
    display: block;
    width: 100px;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f5f3ee;
    position: relative;
    flex-shrink: 0;
}
.stfeat-list-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stfeat-list-body {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.stfeat-list-footer {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.stfeat-list-footer .stfeat-product-price { font-size: 19px; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════
   LAYOUT: WIDE (2 kolumny)
═══════════════════════════════════════════════════════ */
.stfeat-wide-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 20px;
}
.stfeat-wide-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8e4d8;
    overflow: hidden;
    display: flex;
    gap: 0;
    transition: box-shadow .25s, transform .25s;
}
.stfeat-wide-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.09);
    transform: translateY(-2px);
}
.stfeat-wide-img-wrap {
    width: 160px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    background: #f5f3ee;
}
.stfeat-wide-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}
.stfeat-wide-card:hover .stfeat-wide-img-wrap img { transform: scale(1.04); }
.stfeat-wide-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.stfeat-wide-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0ede5;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   WSPÓLNE ELEMENTY KART
═══════════════════════════════════════════════════════ */
.stfeat-product-card article {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e4d8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow .25s, transform .25s;
}
.stfeat-product-card article:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.09);
    transform: translateY(-3px);
}

/* Zdjęcie */
.stfeat-product-link { display: block; }
.stfeat-product-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f5f3ee;
}
.stfeat-product-card--sm .stfeat-product-img-wrap { aspect-ratio: 1/1; }
.stfeat-product-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.stfeat-product-card article:hover .stfeat-product-img { transform: scale(1.04); }
.stfeat-product-img--placeholder { display: flex; align-items: center; justify-content: center; }

/* Badge */
.stfeat-badge {
    position: absolute; top: 10px; left: 10px;
    font-size: 10px; font-weight: 800; letter-spacing: .08em;
    padding: 4px 10px; border-radius: 100px; line-height: 1; z-index: 2;
}
.stfeat-badge--sale { background: #e74c3c; color: #fff; }
.stfeat-badge--out  { background: #888;    color: #fff; }

/* Treść karty */
.stfeat-product-body {
    padding: 14px 16px 16px;
    display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.stfeat-product-cat {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: #6ab04c;
}
.stfeat-product-name { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35; color: #1e2a0e; }
.stfeat-product-name a { color: inherit; text-decoration: none; transition: color .2s; }
.stfeat-product-name a:hover { color: #6ab04c; }

/* Gwiazdki */
.stfeat-product-rating { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.stfeat-stars { display: flex; gap: 1px; line-height: 1; }
.stfeat-star { font-size: 13px; }
.stfeat-star--full  { color: #f4a11a; }
.stfeat-star--half  { color: #f4a11a; opacity: .6; }
.stfeat-star--empty { color: #ddd; }
.stfeat-rating-count { font-size: 12px; color: #999; }

/* Cena + przycisk */
.stfeat-product-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid #f0ede5;
}
.stfeat-product-price { font-size: 17px; font-weight: 800; color: #1e2a0e; line-height: 1; }
.stfeat-product-price .price { font-size: inherit; font-weight: inherit; color: inherit; }
.stfeat-product-price ins { text-decoration: none; }
.stfeat-product-price del { font-size: 12px; font-weight: 400; color: #aaa; opacity: 1; }

/* Przycisk dodaj do koszyka */
.stfeat-add-to-cart {
    display: inline-flex; align-items: center; gap: 6px;
    background: #6ab04c; color: #fff !important;
    border: none; border-radius: 8px; padding: 9px 16px;
    font-size: 13px; font-weight: 700; text-decoration: none !important;
    cursor: pointer; transition: background .2s, transform .15s;
    white-space: nowrap; min-height: 40px;
}
.stfeat-add-to-cart:hover { background: #5a9940; transform: scale(1.03); }
.stfeat-add-to-cart.loading { opacity: .7; pointer-events: none; }
.stfeat-add-to-cart.added { background: #3d7a24; }
.stfeat-out-of-stock { font-size: 12px; color: #aaa; font-style: italic; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .stfeat-hero-layout { grid-template-columns: 320px 1fr; }
    .stfeat-hero-carousel { grid-template-columns: 320px 1fr; }
}
@media (max-width: 900px) {
    .stfeat-hero-layout { grid-template-columns: 1fr; }
    .stfeat-hero-carousel { grid-template-columns: 1fr; }
    .stfeat-hero-grid { grid-template-columns: repeat(3,1fr) !important; }
    .stfeat-wide-grid { grid-template-columns: 1fr; }
    .stfeat-grid--4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
    .stfeat-section { padding: 40px 0; }
    .stfeat-section-header { margin-bottom: 28px; }
    .stfeat-grid--3 { grid-template-columns: repeat(2,1fr); }
    .stfeat-hero-grid { grid-template-columns: repeat(2,1fr) !important; }
    .stfeat-list-item { grid-template-columns: 80px 1fr; }
    .stfeat-list-footer { grid-column: 1/-1; flex-direction: row; justify-content: space-between; padding: 0 12px 12px; }
    .stfeat-wide-img-wrap { width: 120px; }
}
@media (max-width: 480px) {
    .stfeat-grid--2,.stfeat-grid--3,.stfeat-grid--4 { grid-template-columns: 1fr; }
    .stfeat-hero-grid { grid-template-columns: repeat(2,1fr) !important; }
    .stfeat-product-footer { flex-direction: column; align-items: flex-start; }
    .stfeat-add-to-cart { width: 100%; justify-content: center; }
    .stfeat-list-item { grid-template-columns: 70px 1fr; }
    .stfeat-wide-card { flex-direction: column; }
    .stfeat-wide-img-wrap { width: 100%; aspect-ratio: 16/9; }
    .stfeat-countdown-val { width: 38px; height: 38px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .stfeat-product-card article,.stfeat-product-img,.stfeat-add-to-cart,
    .stfeat-hero-featured,.stfeat-hero-img,.stfeat-list-item,.stfeat-wide-card { transition: none !important; transform: none !important; }
}

/* ── Nadtytuł sekcji ──────────────────────────────── */
.stfeat-supertitle {
    font-size: 11px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--color-primary, #5a9a2e);
    margin: 0 0 8px;
}

/* ── Header align variants ───────────────────────── */
.stfeat-section-header--left   { text-align: left; }
.stfeat-section-header--center { text-align: center; }
.stfeat-section-header--right  { text-align: right; }

/* ── Taby filtrowania ─────────────────────────────── */
.stfeat-filter-tabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 24px;
}
.stfeat-filter-tab {
    padding: 7px 18px; font-size: 13px; font-weight: 600;
    border: 2px solid #ddd; border-radius: 100px;
    background: #fff; color: #555; cursor: pointer;
    transition: border-color .18s, color .18s, background .18s;
    white-space: nowrap;
}
.stfeat-filter-tab:hover {
    border-color: var(--color-primary, #5a9a2e);
    color: var(--color-primary, #5a9a2e);
}
.stfeat-filter-tab--active {
    background: var(--color-primary, #5a9a2e);
    border-color: var(--color-primary, #5a9a2e);
    color: #fff;
}

/* ── Odznaki ulepszone ────────────────────────────── */
.stfeat-badge--bestseller {
    background: #f59e0b; color: #fff;
}
.stfeat-badge--new {
    background: #10b981; color: #fff;
}
.stfeat-badge--pct {
    background: #ef4444; color: #fff;
}

/* ── Przycisk "Zobacz wszystkie" ──────────────────── */
.stfeat-view-all-wrap {
    text-align: center; margin-top: 32px;
}
.stfeat-view-all {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 32px; font-size: 15px; font-weight: 600;
    text-decoration: none; border-radius: 100px;
    border: 2px solid var(--color-primary, #5a9a2e);
    color: var(--color-primary, #5a9a2e);
    background: transparent;
    transition: background .18s, color .18s;
}
.stfeat-view-all:hover {
    background: var(--color-primary, #5a9a2e);
    color: #fff;
}
