/* Ehtiyat hissələri — kataloq səhifəsi */

.sp-page {
    --sp-ink: var(--secondary, #2c3e50);
    --sp-muted: var(--gray-700, #555);
    --sp-surface: #fff;
    --sp-rail: linear-gradient(135deg, #1e2a36 0%, #2c3e50 55%, #3a4f63 100%);
    background:
        radial-gradient(ellipse 80% 40% at 10% -10%, rgba(247, 151, 28, 0.08), transparent 50%),
        radial-gradient(ellipse 60% 30% at 90% 0%, rgba(44, 62, 80, 0.06), transparent 45%),
        var(--gray-50, #f4f6f8);
    padding-bottom: var(--space-12, 48px);
}

.sp-page .main-container {
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
    padding: 0 var(--space-5, 20px);
}

/* --- Hero band --- */
.sp-hero {
    position: relative;
    margin: 0 0 var(--space-6, 24px);
    padding: var(--space-8, 32px) var(--space-5, 20px) var(--space-7, 28px);
    background: var(--sp-rail);
    color: #fff;
    overflow: hidden;
}

.sp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.5;
    pointer-events: none;
}

.sp-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(247, 151, 28, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.sp-hero__inner {
    position: relative;
    z-index: 1;
    max-width: var(--container-max, 1200px);
    margin: 0 auto;
}

.sp-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 var(--space-3, 12px);
    font-size: var(--fs-xs, 12px);
    font-weight: var(--fw-bold, 700);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

.sp-hero__eyebrow i {
    color: var(--primary);
}

.sp-hero__title {
    margin: 0 0 var(--space-2, 8px);
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    font-weight: var(--fw-extrabold, 800);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.sp-hero__lead {
    margin: 0;
    max-width: 36rem;
    font-size: var(--fs-sm, 14px);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.78);
}

.sp-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: var(--space-5, 20px);
}

.sp-hero__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill, 999px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.sp-hero__chip strong {
    color: var(--primary);
    font-weight: 800;
}

/* --- Kateqoriya zolağı --- */
.sp-cats {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 14px;
    margin-bottom: var(--space-5, 20px);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.sp-cats::-webkit-scrollbar {
    display: none;
}

.sp-cat {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 104px;
    text-decoration: none;
    color: var(--sp-ink);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-cat:hover {
    transform: translateY(-4px);
}

.sp-cat__icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--sp-surface);
    border: 1.5px solid var(--border, #e8ecf0);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
    font-size: 1.45rem;
    color: var(--sp-ink);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease, background 0.25s ease;
    overflow: hidden;
}

.sp-cat__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-cat__icon--tone-engine { color: #c45c12; background: #fff7f0; }
.sp-cat__icon--tone-hydro { color: #1a6b8a; background: #f0f8fb; }
.sp-cat__icon--tone-tire { color: #3d4a5c; background: #f3f5f7; }
.sp-cat__icon--tone-filter { color: #5a6b2f; background: #f5f7ef; }
.sp-cat__icon--tone-parts { color: #8a4b12; background: #fff8f0; }
.sp-cat__icon--tone-all { color: var(--primary); background: rgba(247, 151, 28, 0.1); }

.sp-cat:hover .sp-cat__icon,
.sp-cat.is-active .sp-cat__icon {
    border-color: var(--primary);
    box-shadow: 0 8px 22px rgba(247, 151, 28, 0.22);
    color: var(--primary);
}

.sp-cat.is-active .sp-cat__icon {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.sp-cat.is-active .sp-cat__icon--tone-engine,
.sp-cat.is-active .sp-cat__icon--tone-hydro,
.sp-cat.is-active .sp-cat__icon--tone-tire,
.sp-cat.is-active .sp-cat__icon--tone-filter,
.sp-cat.is-active .sp-cat__icon--tone-parts,
.sp-cat.is-active .sp-cat__icon--tone-all {
    background: var(--primary);
    color: #fff;
}

.sp-cat__label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    max-width: 100%;
    color: var(--sp-muted);
}

.sp-cat.is-active .sp-cat__label {
    color: var(--primary);
    font-weight: 800;
}

/* --- Filter --- */
.sp-filter {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    padding: 16px 18px;
    margin-bottom: var(--space-5, 20px);
    background: var(--sp-surface);
    border: 1px solid var(--border, #e8ecf0);
    border-radius: var(--radius-lg, 14px);
    box-shadow: var(--shadow-sm, 0 2px 10px rgba(0, 0, 0, 0.04));
}

.sp-filter__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sp-filter__field label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--sp-ink);
}

.sp-filter__field input,
.sp-filter__field select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border, #e5e8ec);
    border-radius: 10px;
    background: var(--gray-50, #f8f9fb);
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-ink);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-filter__field input:focus,
.sp-filter__field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring, rgba(247, 151, 28, 0.2));
    background: #fff;
}

.sp-filter__actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.sp-filter__actions .btn {
    white-space: nowrap;
    min-height: 44px;
}

.sp-specs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin: -8px 0 var(--space-5, 20px);
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed var(--border, #dde2e8);
    border-radius: 12px;
}

/* --- Toolbar --- */
.sp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: var(--space-4, 16px);
}

.sp-toolbar__count {
    margin: 0;
    font-size: 14px;
    color: var(--sp-muted);
}

.sp-toolbar__count strong {
    color: var(--sp-ink);
    font-weight: 800;
}

.sp-toolbar__sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--sp-muted);
}

.sp-toolbar__sort select {
    padding: 8px 12px;
    border: 1.5px solid var(--border, #e5e8ec);
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    color: var(--sp-ink);
}

/* --- Empty --- */
.sp-empty {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 40px 24px;
    text-align: center;
    background:
        linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border: 1px dashed var(--border, #dde2e8);
    border-radius: 16px;
    animation: sp-empty-in 0.45s ease both;
}

@keyframes sp-empty-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.sp-empty__visual {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    border-radius: 24px;
    background: rgba(247, 151, 28, 0.1);
    color: var(--primary);
    font-size: 2rem;
    position: relative;
}

.sp-empty__visual::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 28px;
    border: 1px dashed rgba(247, 151, 28, 0.35);
    animation: sp-pulse 2.4s ease-in-out infinite;
}

@keyframes sp-pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

.sp-empty__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--sp-ink);
}

.sp-empty__text {
    margin: 0;
    max-width: 28rem;
    font-size: 14px;
    line-height: 1.55;
    color: var(--sp-muted);
}

.sp-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.sp-page .product-grid {
    margin-top: 0;
}

.sp-page .product-card {
    animation: sp-card-in 0.4s ease both;
}

.sp-page .product-card:nth-child(1) { animation-delay: 0.02s; }
.sp-page .product-card:nth-child(2) { animation-delay: 0.05s; }
.sp-page .product-card:nth-child(3) { animation-delay: 0.08s; }
.sp-page .product-card:nth-child(4) { animation-delay: 0.11s; }

@keyframes sp-card-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 992px) {
    .sp-filter {
        grid-template-columns: 1fr 1fr;
    }

    .sp-filter__actions {
        grid-column: 1 / -1;
    }

    .sp-filter__actions .btn {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .sp-hero {
        padding: var(--space-6, 24px) var(--space-5, 20px);
    }

    .sp-filter {
        grid-template-columns: 1fr;
    }

    .sp-cat {
        width: 88px;
    }

    .sp-cat__icon {
        width: 64px;
        height: 64px;
        border-radius: 16px;
        font-size: 1.25rem;
    }

    .sp-empty {
        padding: 32px 18px;
    }
}
