/* =========================================
   Product Listing Styles (Premium Reference)
   ========================================= */

/* --- Background Effects --- */
.mesh-gradient {
    background-image:
        radial-gradient(at 0% 0%, hsla(0, 0%, 10%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(354, 70%, 30%, 0.4) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(354, 70%, 20%, 0.6) 0, transparent 50%);
    position: absolute;
    inset: 0;
    opacity: 0.6;
    z-index: 0;
    pointer-events: none;
}

.layout-relative {
    position: relative;
    /* Ensure content is above mesh */
}

/* --- Hero Section --- */
.premium-hero {
    position: relative;
    padding: 4rem 0 3rem;
    padding-top: calc(var(--header-height, 76px) + 2rem);
    overflow: hidden;
}

.hero-badge-pill {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    background: rgba(230, 57, 70, 0.1);
    color: var(--color-accent);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px solid rgba(230, 57, 70, 0.2);
    margin-bottom: 1.5rem;
}

.hero-title-premium {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--color-white);
    margin-bottom: 1rem;
}

.text-gradient-accent {
    background: linear-gradient(to right, var(--color-accent), #ff8a80);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle-premium {
    font-size: 1.25rem;
    color: var(--color-gray-400);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
}

/* 3D Float Animation Wrapper */
.hero-3d-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.hero-glow-bg {
    position: absolute;
    inset: 0;
    background: var(--color-accent);
    opacity: 0.2;
    filter: blur(100px);
    border-radius: 50%;
    transform: scale(0.75);
}

.hero-3d-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.7s ease;
    animation: floatPremium 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.hero-3d-image:hover {
    transform: scale(1.05) rotate(2deg);
}

@keyframes floatPremium {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Sticky Filter Bar (Floating Glass Pill) */
.sticky-filter-bar {
    position: sticky;
    top: 90px;
    z-index: 40;
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    pointer-events: none;
    /* Allow clicks to pass through around the pill */
    transition: all 0.3s ease;
}

.sticky-filter-bar .container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.filter-scroll-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */

    background: rgba(16, 22, 34, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.filter-scroll-container::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    height: 36px;
    padding: 0 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.filter-pill.active {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.filter-pill.inactive {
    background: transparent;
    color: var(--color-gray-400);
}

.filter-pill.inactive:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateY(-1px);
}

/* --- Premium Product Card --- */
.product-card-premium {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: rgba(26, 31, 41, 0.6);
    /* Transparent for glass effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.product-card-premium:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--color-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    background: rgba(26, 31, 41, 0.8);
}

.card-glow {
    position: absolute;
    inset: 0;
    background: rgba(230, 57, 70, 0.05);
    /* Accent Glow */
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card-premium:hover .card-glow {
    opacity: 1;
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #111318;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: #111318;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.25rem;
    z-index: 10;
}

.card-badge.accent {
    background: var(--color-accent);
}

.card-image-bg {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.product-card-premium:hover .card-image-bg {
    transform: scale(1.1);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 10;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    transition: color 0.2s;
}

.product-card-premium:hover .card-title {
    color: var(--color-accent);
}

.card-price {
    font-weight: 600;
    color: white;
}

.card-desc {
    font-size: 0.875rem;
    color: var(--color-gray-400);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-dots {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s ease;
}

.product-card-premium:hover .card-dots {
    opacity: 1;
    transform: translateY(0);
}

.dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dot.dark {
    background: #111318;
}

.dot.light {
    background: #d1d5db;
}

.dot.accent {
    background: var(--color-accent);
}

/* --- Product Card Grid --- */
.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .product-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .product-card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Loaders --- */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 15px rgba(230, 57, 70, 0.1);
}

.spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0%, rgba(230, 57, 70, 0.1) 80%, var(--color-accent) 100%);
    animation: radar-scan 1.5s linear infinite;
    -webkit-mask: radial-gradient(transparent 55%, black 60%);
    mask: radial-gradient(transparent 55%, black 60%);
}

.spinner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent);
}

@keyframes radar-scan {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Section Padding --- */
.section-padding {
    padding: 3rem 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .premium-hero {
        padding: 3rem 0 2rem;
        padding-top: calc(var(--header-height, 76px) + 1.5rem);
    }

    .hero-title-premium {
        font-size: 2rem;
    }

    .hero-3d-wrapper {
        max-width: 300px;
    }

    .hero-subtitle-premium {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .premium-hero .row {
        flex-direction: column-reverse;
    }

    .hero-title-premium {
        font-size: 1.75rem;
        text-align: center;
    }

    .hero-subtitle-premium {
        text-align: center;
    }

    .premium-hero .flex {
        justify-content: center;
    }

    .hero-badge-pill {
        display: block;
        text-align: center;
    }
}

/* --- Comparison Table Section --- */
.compare-table {
    width: 100%;
    margin-bottom: 3rem;
    color: #fff;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(26, 31, 41, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.compare-table th,
.compare-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: var(--color-gray-400);
}

.compare-table td {
    font-size: 1rem;
    color: var(--color-white);
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Highlight Column (optional logic, but for now just general style) */
.compare-table td:first-child {
    font-weight: 600;
    color: var(--color-accent);
    width: 25%;
}

/* Download CTA Section */
.spec-download {
    background: linear-gradient(135deg, rgba(26, 31, 41, 0.9) 0%, rgba(20, 24, 32, 0.95) 100%);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.spec-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.spec-download h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-white);
}

.spec-download p {
    color: var(--color-gray-400);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.spec-download .btn-primary {
    padding: 0.75rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(230, 57, 70, 0.4);
}

@media (max-width: 768px) {
    .compare-table {
        display: block;
        overflow-x: auto;
    }

    .compare-table th,
    .compare-table td {
        white-space: nowrap;
        padding: 1rem;
    }

    /* Product Grid Mobile Fixes */
    .product-card-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .spec-download {
        padding: 2rem 1rem !important;
    }

    .spec-download h3 {
        font-size: 1.5rem !important;
    }
}