/* ============================================================
   JCD REPAIR -- V3 CATEGORY PAGE STYLES
   File: jcd-v3-category.css (in flatsome-child theme)
   ============================================================ */

/* ── Kill Flatsome defaults on V3 cat pages ──────────────── */
.jcd-v3-cat .page-title,
.jcd-v3-cat .shop-page-title,
.jcd-v3-cat .page-title-inner,
.jcd-v3-cat .term-description,
.jcd-v3-cat .leafCategoryContent,
.jcd-v3-cat .woocommerce-breadcrumb {
    display: none !important;
}

.jcd-v3-cat .main-content,
.jcd-v3-cat .content-area,
.jcd-v3-cat .shop-container {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ── sr-only utility ─────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Title Band ──────────────────────────────────────────── */
.jcd-cat-titleband {
    background: linear-gradient(135deg, #132647 0%, #1e3a5f 40%, #2d4762 100%);
    padding: 32px 20px 28px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.jcd-cat-titleband-glow {
    position: absolute;
    top: -40%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.06) 0%, transparent 65%);
    pointer-events: none;
}

.jcd-cat-titleband-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto;
}

.jcd-cat-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.jcd-cat-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    color: #f0f2f8;
    -webkit-font-smoothing: antialiased;
}

.jcd-cat-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin: 6px 0 0;
    font-weight: 500;
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.jcd-cat-bc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    font-weight: 500;
    margin-top: 12px;
}

.jcd-cat-bc a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s;
}

.jcd-cat-bc a:hover {
    color: #f59e0b;
}

.jcd-cat-bc-sep {
    color: rgba(255, 255, 255, 0.3);
    margin: 0 6px;
}

.jcd-cat-bc-current {
    color: #f0f2f8;
    font-weight: 600;
}

/* ── Content Area ────────────────────────────────────────── */
.jcd-v3-cat-page {
    background: #f8f6f1;
}

.jcd-cat-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

.jcd-cat-count {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    padding: 0 2px 10px;
}

/* ── Product Grid ────────────────────────────────────────── */
.jcd-cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

/* ── Card ────────────────────────────────────────────────── */
.jcd-cat-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e0db;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
    cursor: pointer;
}

.jcd-cat-card:hover {
    box-shadow: 0 6px 24px rgba(30, 58, 95, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.jcd-cat-card:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    text-decoration: none;
    color: inherit;
}

/* Featured card */
.jcd-cat-card--featured {
    border: 2px solid #f59e0b;
}

.jcd-cat-card-banner {
    background: linear-gradient(90deg, #f59e0b, #f6b93b);
    color: #1e3a5f;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    padding: 4px 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Card body */
.jcd-cat-card-body {
    padding: 0;
    display: flex;
    gap: 0;
    flex: 1;
    align-items: stretch;
}

/* Thumbnail */
.jcd-cat-card-thumb {
    width: 150px;
    height: 210px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f5f3ee;
}

.jcd-cat-card-thumb img {
    width: 90% !important;
    height: 90% !important;
    object-fit: cover;
}
.jcd-cat-card-placeholder {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #9ca3af;
}

/* Content */
.jcd-cat-card-content {
    flex: 1;
    min-width: 0;
    padding: 16px 16px 16px 14px;
}

.jcd-cat-card-name {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    margin-bottom: 2px;
}

.jcd-cat-card-price {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #2d4762;
    margin-bottom: 6px;
}

.jcd-cat-card-desc {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12.5px;
    line-height: 1.5;
    color: #6b7280;
    margin: 0 0 8px;
}

/* ── Pills ───────────────────────────────────────────────── */
.jcd-cat-card-pills {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.jcd-pill {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.jcd-pill svg {
    flex-shrink: 0;
}

/* Turnaround — navy tint */
.jcd-pill-turnaround {
    background: #e8eef6;
    color: #1e3a5f;
}

/* Warranty — lifetime: warm amber */
.jcd-pill-warranty-life {
    background: #fef7e8;
    color: #92600e;
}

/* Warranty — 1 year: warm neutral */
.jcd-pill-warranty-yr {
    background: #f3f1ec;
    color: #6b5c3e;
}

/* ── Don't See Your Repair Card ──────────────────────────── */
.jcd-cat-cta-card {
    background: linear-gradient(135deg, #132647, #1e3a5f, #2d4762);
    border-radius: 12px;
    padding: 24px 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.jcd-cat-cta-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
}

.jcd-cat-cta-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 0 14px;
    line-height: 1.5;
}

.jcd-cat-cta-btn {
    display: inline-block;
    background: #f59e0b;
    color: #1e3a5f;
    padding: 8px 20px;
    border-radius: 8px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    align-self: center;
    transition: background 0.15s;
}

.jcd-cat-cta-btn:hover {
    background: #fbbf24;
    color: #1e3a5f;
    text-decoration: none;
}

/* ── SEO Description ─────────────────────────────────────── */
.jcd-cat-seo-desc {
    margin-top: 24px;
    padding: 16px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    line-height: 1.65;
    color: #6b7280;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e2e0db;
}

.jcd-cat-seo-desc p {
    margin: 0 0 8px;
}

.jcd-cat-seo-desc p:last-child {
    margin-bottom: 0;
}

/* ── Mobile Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
    .jcd-cat-grid {
        grid-template-columns: 1fr;
    }

    .jcd-cat-titleband {
        padding: 24px 16px 20px;
    }

    .jcd-cat-title {
        font-size: 22px;
    }

    .jcd-cat-subtitle {
        font-size: 12px;
    }

    .jcd-cat-bc {
        font-size: 11px;
    }

    .jcd-cat-card-thumb {
        width: 90px;
    }

}

/* ── Flatsome cleanup overrides ──────────────────────────── */
.jcd-v3-cat .jcd-v3-cat-page a:hover,
.jcd-v3-cat .jcd-v3-cat-page a:focus {
    text-decoration: none !important;
}

/* Kill any Flatsome product archive wrapper padding */
.jcd-v3-cat #content,
.jcd-v3-cat .page-wrapper {
    padding-top: 0 !important;
}

/* Kill the gap Flatsome leaves for the hidden title bar */
.jcd-v3-cat .shop-page-title.category-page-title {
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.jcd-v3-cat .headerContent {
    display: none !important;
}

.jcd-v3-cat .header-bg-container {
    display: none !important;
}

/* Surface devices: contain landscape images instead of cropping */
body[class*="surface"] .jcd-cat-card-thumb img {
    object-fit: contain !important;
    padding: 8px;
}