/* ============================================================
   SELECTORIZED SECTION PLUGIN — frontend.css
   v1.0.0
   Handles: /product-category/strength/selectorized/
            /product-category/strength/plate-loaded/
   ============================================================ */


/* ── Wrapper ────────────────────────────────────────────── */

.ssp-wrapper {
    width: 100%;
    padding: 0 0 60px;
}


/* ── Section Block ──────────────────────────────────────── */

.ssp-section {
    padding: 32px 0 48px;
    border-bottom: 1px solid #ebebeb;
    scroll-margin-top: 160px;
}

.ssp-section:first-child {
    padding-top: 8px;
}

.ssp-section:last-child {
    border-bottom: none;
}


/* ── Heading Row ─────────────────────────────────────────── */

.ssp-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.ssp-heading-left {
    display: flex;
    align-items: center;   /* center so '01' lines up with logo middle */
    gap: 14px;
}

.ssp-num {
    font-family: 'Barlow', 'Oswald', Arial, sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #f6c515;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
}


/* ── BRAND LOGO TITLE ──────────────────────────────────────
   All logos render at EXACTLY 60px tall on desktop.
   object-fit: contain means non-4:1 aspect ratios still look
   uniform — they just sit centered within their own width.
   ────────────────────────────────────────────────────────── */

.ssp-logo-wrap {
    display: inline-flex !important;
    align-items: center;
    line-height: 0 !important;
    /* Reset default <h2> browser styles */
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    font-weight: normal !important;
    background: none !important;
    border: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ssp-logo {
    display: block;
    height: 60px;           /* FIXED — all logos same height */
    width: auto;
    max-width: 280px;       /* cap on very wide logos */
    object-fit: contain;
    -webkit-user-drag: none;
    user-select: none;
}


/* ── Fallback text title (when logo not uploaded yet) ───── */

.ssp-title {
    font-family: 'Barlow', 'Oswald', Arial, sans-serif !important;
    font-size: clamp(22px, 2.6vw, 36px) !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    color: #0d0d0d !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ── "View All" Button ─────────────────────────────────── */

.ssp-viewall {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Barlow', Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1a1a1a;
    text-decoration: none !important;
    border: 1.5px solid #1a1a1a;
    border-radius: 6px;
    padding: 9px 18px;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.ssp-viewall svg {
    width: 14px;
    height: 14px;
    transition: transform 0.22s ease;
}

.ssp-viewall:hover {
    background: #1a1a1a;
    color: #f6c515 !important;
    border-color: #1a1a1a;
}

.ssp-viewall:hover svg {
    transform: translateX(4px);
}


/* ── Divider ─────────────────────────────────────────────── */

.ssp-divider {
    height: 2px;
    background: linear-gradient(to right, #f6c515 0%, #f6c515 40px, #ebebeb 40px);
    margin: 16px 0 28px;
    border-radius: 2px;
}


/* ── Products Grid ───────────────────────────────────────── */

.ssp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}


/* ============================================================
   CARD — bulletproof "image-only zoom" hover.
   Card itself stays 100% static (no shadow, no lift, no border
   change). ONLY the equipment image inside scales on hover.
   All hover rules use !important to defeat any theme overrides.
   ============================================================ */

.ssp-grid .ssp-card,
a.ssp-card {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}

/* HOVER STATE — card itself stays IDENTICAL to default.
   Force-override anything the theme might inject. */
.ssp-grid .ssp-card:hover,
.ssp-grid .ssp-card:focus,
.ssp-grid .ssp-card:active,
a.ssp-card:hover,
a.ssp-card:focus,
a.ssp-card:active {
    background: #ffffff !important;
    border-color: #e5e5e5 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
    transform: none !important;
    translate: none !important;
    top: auto !important;
    z-index: auto !important;
    color: #1a1a1a !important;
    text-decoration: none !important;
    outline: none !important;
}

/* Defensive: kill any inner-wrapper hover effects too */
.ssp-card:hover *,
.ssp-card:focus * {
    box-shadow: none !important;
    transform: none !important;
}


/* ── Image area — clips overflow so zoom stays inside ──── */

.ssp-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;       /* important — clips the zoomed image */
    background: #ffffff;
    position: relative;
}

.ssp-card-img img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    transform: scale(1);
    transition: transform 0.4s ease !important;
    will-change: transform;
}

/* THE ONE THING THAT MOVES ON HOVER — the equipment image */
.ssp-card:hover .ssp-card-img img,
.ssp-card:focus .ssp-card-img img {
    transform: scale(1.08) !important;
}


/* ── Card info area ─────────────────────────────────────── */

.ssp-card-info {
    padding: 14px 18px 18px;
    border-top: 1px solid #ebebeb;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #ffffff;
}

.ssp-card-title {
    font-family: 'Barlow', Arial, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
    letter-spacing: 0.01em !important;
    background: none !important;
}

.ssp-card-cta {
    font-family: 'Barlow', Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #888;
}


/* ── Mobile "View All" button ───────────────────────────── */

.ssp-mobile-viewall {
    display: none;
    margin-top: 24px;
    text-align: center;
}

.ssp-viewall-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Barlow', Arial, sans-serif;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1a1a1a;
    text-decoration: none !important;
    border: 1.5px solid #1a1a1a;
    border-radius: 6px;
    padding: 11px 22px;
    transition: background 0.22s ease, color 0.22s ease;
}

.ssp-viewall-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.22s ease;
}

.ssp-viewall-btn:hover {
    background: #1a1a1a;
    color: #f6c515 !important;
}

.ssp-viewall-btn:hover svg {
    transform: translateX(4px);
}


/* ── Hide default WooCommerce loop on managed pages ───── */

body.term-selectorized .products.elements-grid.woodmart-products-holder,
body.term-selectorized .woocommerce-pagination,
body.term-selectorized .products-footer,
body.term-plate-loaded .products.elements-grid.woodmart-products-holder,
body.term-plate-loaded .woocommerce-pagination,
body.term-plate-loaded .products-footer {
    display: none !important;
}


/* ── Responsive ─────────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
    .ssp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .ssp-logo {
        height: 52px;
        max-width: 240px;
    }
    .ssp-title {
        font-size: clamp(20px, 3.4vw, 30px) !important;
    }
}

/* Small tablet & mobile */
@media (max-width: 767px) {
    .ssp-section {
        padding: 28px 0 40px;
    }
    .ssp-section:first-child {
        padding-top: 6px;
    }
    .ssp-heading-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .ssp-viewall {
        display: none;
    }
    .ssp-mobile-viewall {
        display: block;
    }
    .ssp-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .ssp-card-info {
        padding: 10px 12px 14px;
    }
    .ssp-card-title {
        font-size: 12px !important;
    }
    .ssp-logo {
        height: 44px;
        max-width: 200px;
    }
}

/* Phone */
@media (max-width: 480px) {
    .ssp-title {
        font-size: 20px !important;
    }
    .ssp-logo {
        height: 38px;
        max-width: 170px;
    }
    .ssp-card-img {
        padding: 14px;
    }
}
