/**
 * TUF Featured Products — front-end styles
 * All rules scoped under .tuf-fp to avoid theme collisions.
 */

.tuf-fp {
    --red: #DC0000;
    --dark: #454545;
    --mid: #666666;
    --light-bg: #f4f4f4;
    --border: #e5e5e5;
    --white: #ffffff;
    --star: #D4A500;
    --gap: 12px;
    --visible: 5;
}

.tuf-fp * {
    box-sizing: border-box;
}

.tuf-fp.prod-section {
    background: var(--light-bg);
    padding: 40px 60px 36px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Header row */
.tuf-fp .prod-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    gap: 16px;
}

.tuf-fp .section-header {
    flex: 1 1 auto;
    min-width: 0;
}

.tuf-fp .eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--red);
    margin-bottom: 6px;
}

.tuf-fp .section-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 6px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.tuf-fp .section-header p {
    font-size: 14px;
    color: var(--mid);
    margin: 0 0 10px;
    line-height: 1.5;
}

.tuf-fp .accent-line {
    width: 40px;
    height: 3px;
    background: var(--red);
}

/* Slider arrow buttons */
.tuf-fp .slider-arrows {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    padding-bottom: 4px;
}

.tuf-fp .arrow-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--white);
    color: var(--dark);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    user-select: none;
    font-family: inherit;
    line-height: 1;
}

.tuf-fp .arrow-btn:hover:not(:disabled) {
    border-color: var(--red);
    color: var(--red);
}

.tuf-fp .arrow-btn:disabled {
    opacity: 0.3;
    cursor: default;
    border-color: var(--border);
    color: var(--mid);
}

/* Slider track */
.tuf-fp .slider-outer {
    overflow: hidden;
    margin-bottom: 24px;
}

.tuf-fp .slider-track {
    display: flex;
    gap: var(--gap);
    transition: transform 0.35s ease;
    will-change: transform;
}

/* Cards: 5 visible on desktop. 5 cards = 4 gaps. */
.tuf-fp .prod-card {
    flex: 0 0 calc((100% - 4 * var(--gap)) / 8);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    color: inherit;
}

.tuf-fp .prod-card:hover,
.tuf-fp .prod-card:focus {
    border-color: var(--red);
    box-shadow: 0 4px 16px rgba(220, 0, 0, 0.08);
    text-decoration: none;
}

/* Product image */
.tuf-fp .prod-img {
    width: 100%;
    height: 160px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tuf-fp .prod-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    display: block;
    transition: transform 0.3s ease;
}

.tuf-fp .prod-card:hover .prod-img img {
    transform: scale(1.05);
}

.tuf-fp .prod-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.tuf-fp .prod-brand {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mid);
    margin-bottom: 4px;
}

.tuf-fp .prod-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 7px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tuf-fp .prod-stars {
    color: var(--star);
    font-size: 12px;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 2px;
    line-height: 1.2;
}

.tuf-fp .prod-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    gap: 6px;
}

.tuf-fp .prod-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.tuf-fp .prod-price .woocommerce-Price-amount {
    font-weight: 700;
}

.tuf-fp .prod-price-old {
    font-size: 12px;
    color: var(--mid);
    text-decoration: line-through;
    margin-left: 4px;
    font-weight: 400;
    display: inline-block;
}

.tuf-fp .prod-price-old .woocommerce-Price-amount {
    font-weight: 400;
}

.tuf-fp .badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    line-height: 1.4;
}

.tuf-fp .badge-green {
    background: #E1F5EE;
    color: #0F6E56;
}

.tuf-fp .badge-red {
    background: var(--red);
    color: #fff;
}

.tuf-fp .badge-grey {
    background: var(--light-bg);
    color: var(--mid);
}

/* Progress dots */
.tuf-fp .slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
}

.tuf-fp .slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s, width 0.2s;
    border: none;
    padding: 0;
}

.tuf-fp .slider-dot.active {
    background: var(--red);
    width: 20px;
    border-radius: 3px;
}

/* View all */
.tuf-fp .view-all-wrap {
    text-align: center;
}

.tuf-fp .btn-browse {
    display: inline-block;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.tuf-fp .btn-browse:hover,
.tuf-fp .btn-browse:focus {
    border-color: var(--red);
    color: var(--red);
    text-decoration: none;
}

/* Editor notice */
.tuf-fp-notice {
    padding: 12px 16px;
    background: #FAEEDA;
    border-left: 3px solid #EF9F27;
    color: #854F0B;
    font-size: 13px;
    line-height: 1.5;
}

/* ── LARGER TABLET (1200px and below) — 4 cards visible ── */
@media (max-width: 1200px) {
    .tuf-fp .prod-card {
        flex: 0 0 calc((100% - 3 * var(--gap)) / 4);
    }
}

/* ── TABLET (900px and below) — 2 cards visible ──────── */
@media (max-width: 900px) {
    .tuf-fp.prod-section {
        padding: 32px 20px 28px;
    }

    .tuf-fp .prod-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tuf-fp .slider-arrows {
        align-self: flex-end;
    }

    .tuf-fp .prod-card {
        flex: 0 0 calc((100% - var(--gap)) / 2);
    }

    .tuf-fp .section-header h2 {
        font-size: 24px;
    }
}

/* ── MOBILE (560px and below) — 1 full card + peek ──── */
@media (max-width: 560px) {
    .tuf-fp.prod-section {
        padding: 24px 16px 24px;
    }

    .tuf-fp .prod-card {
        flex: 0 0 80%;
    }

    .tuf-fp .prod-img {
        height: 180px;
    }

    .tuf-fp .section-header h2 {
        font-size: 22px;
    }

    .tuf-fp .arrow-btn {
        width: 36px;
        height: 36px;
    }
}

/* ── EXTRA SMALL (380px and below) ──────────────────── */
@media (max-width: 380px) {
    .tuf-fp .prod-card {
        flex: 0 0 85%;
    }
}