:root {
    --primary: #3155A3;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-lighter: #dbeafe;
    --secondary: #1a2b4a;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #94a3b8;
    --text-lighter: #cbd5e1;
    --white: #ffffff;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --radius-xl: 16px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

.quality-top-image {
    margin-top: 64px !important;
    width: 100%;
    height: 55vh;
    position: relative;
    overflow: hidden;

    background: var(--slate-900);
}

.quality-top-image {
    margin-top: 0;
}
@media (max-width: 600px) {
    .mobile-dissapear {
        display:none !important;
    }
}


.quality-top-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    filter: brightness(0.45);
    max-width: 2560px;
    margin: 0 auto;
}

.quality-top-image__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -30%);
    text-align: center;
    z-index: 5;
    width: 100%;
    pointer-events: none;
}

.quality-top-image__title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.product-hero {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, var(--slate-900), #1e293b);
    text-align: center;
    overflow: hidden;
}

.product-hero__subtitle {
    font-size: 1.25rem;
    color: var(--text-lighter);
    max-width: 800px;
    margin: 20px auto 0;
    line-height: 1.8;
    font-weight: 300;
}

/* Category Grid */
.product-categories {
    padding: 100px 0;
    background: var(--slate-900);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.category-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition);
    text-align: center;
}

.category-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.category-card i {
    font-size: 2.5rem;
    color: var(--primary-light);
    margin-bottom: 24px;
    display: block;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.category-card p {
    color: var(--text-lighter);
    line-height: 1.6;
    margin: 0;
}

/* Big Gallery Section */
.product-gallery-section {
    padding: 100px 0;
    background: var(--primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 50px;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    background: rgba(49, 85, 163, 0.8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.lightbox-img {
    display: block;
    max-width: 100%;
    height: auto;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    transform: translateY(-50%);
    pointer-events: none;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: auto;
}

.lightbox-btn:hover {
    background: var(--primary);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 40px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-caption {
    color: white;
    margin-top: 24px;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Image Grid Section */
.product-details__images {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.product-details__images img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.product-details__images img:hover {
    transform: scale(1.02);
}

/* Stats Section */
.product-details__stats {
    flex: 0.8;
    position: relative;
    background: transparent;
    padding: 50px;
    border-radius: 20px;
    color: white;
}

.product-details__stats::before {
    content: '';
    position: absolute;
    top: -24px;
    left: -24px;
    right: 24px;
    bottom: 24px;
    border: 2px solid rgba(96, 165, 250, 0.35);
    border-radius: 20px;
    z-index: 1;
    pointer-events: none;
}

.product-details__stats > * {
    position: relative;
    z-index: 2;
}

/* ===== TABLET — max-width: 992px ===== */
@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stack the flex layout into a column */
    .product-details__layout {
        flex-direction: column !important;
        gap: 40px !important;
    }

    .product-details__images img {
        height: 240px;
    }

    .product-details__text,
    .product-details__stats {
        flex: 1 1 auto !important;
    }

    .product-details__stats {
        margin-top: 40px;
    }

    .product-details__stats::before {
        top: -16px;
        left: -16px;
        right: 16px;
        bottom: 16px;
    }

    /* Portfolio: single column */
    .portfolio-grid {
        grid-template-columns: 1fr !important;
        gap: 50px !important;
    }

    /* Remove the large negative margin that overlaps content */
    .portfolio-heading {
        margin-top: 0 !important;
    }

    /* Gallery title: remove negative margin */
    .gallery-title {
        margin-top: 0 !important;
    }

    /* Reduce section padding */
    .product-details {
        padding: 70px 0 !important;
    }

    .specialized-portfolio {
        padding: 70px 0 !important;
    }

    .product-gallery-section {
        padding: 70px 0;
    }

    .product-gallery-infinite {
        padding: 0 0 70px;
    }

    /* Slightly smaller slider items */
    .product-gallery-infinite__item {
        width: 360px;
        height: 202px;
    }
}

/* ===== MOBILE — max-width: 768px ===== */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .product-hero__subtitle {
        font-size: 1rem;
    }

    /* Hero */
    .quality-top-image {
        height: 40vh;
    }

    /* Tighten layout gap */
    .product-details__layout {
        gap: 30px !important;
    }

    /* Stats card: reduce padding */
    .product-details__stats {
        padding: 30px !important;
        border-radius: 16px !important;
        margin-top: 40px;
    }

    .product-details__stats::before {
        top: -12px;
        left: -12px;
        right: 12px;
        bottom: 12px;
    }

    .product-details__stats strong {
        font-size: 1.8rem !important;
    }

    /* Text column: scale fonts */
    .product-details__text h2 {
        font-size: 1.8rem !important;
    }

    .product-details__text p {
        font-size: 1rem !important;
    }

    /* Portfolio headings */
    .portfolio-heading {
        font-size: 1.6rem !important;
    }

    /* Gallery title */
    .gallery-title {
        font-size: 1.8rem !important;
    }

    /* Reduce section padding */
    .product-details {
        padding: 50px 0 !important;
    }

    .specialized-portfolio {
        padding: 50px 0 !important;
    }

    .product-gallery-section {
        padding: 50px 0;
    }

    .product-gallery-infinite {
        padding: 0 0 50px;
    }

    /* Smaller slider items */
    .product-gallery-infinite__item {
        width: 300px;
        height: 170px;
    }

    .product-gallery-infinite__track {
        gap: 16px;
    }

    /* Lightbox: touch-friendly */
    .lightbox-nav {
        padding: 0 15px;
    }

    .lightbox-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
}

/* ===== SMALL MOBILE — max-width: 480px ===== */
@media (max-width: 480px) {

    .product-hero__subtitle {
        font-size: 0.95rem;
    }

    /* Hero */
    .quality-top-image {
        height: 30vh;
    }

    .quality-top-image__title {
        font-size: 1.6rem;
    }

    /* Details section */
    .product-details {
        padding: 36px 0 !important;
    }

    .product-details__text h2 {
        font-size: 1.4rem !important;
        margin-bottom: 16px !important;
    }

    .product-details__text p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    /* Image grid: single column on very small screens */
    .product-details__images {
        grid-template-columns: 1fr !important;
    }

    /* Stats card */
    .product-details__stats {
        padding: 24px !important;
        border-radius: 14px !important;
    }

    .product-details__stats h3 {
        font-size: 1.15rem !important;
        margin-bottom: 16px !important;
    }

    .product-details__stats strong {
        font-size: 1.5rem !important;
    }

    /* Portfolio */
    .specialized-portfolio {
        padding: 36px 0 !important;
    }

    .portfolio-heading {
        font-size: 1.35rem !important;
        margin-bottom: 20px !important;
    }

    .portfolio-grid {
        gap: 36px !important;
    }

    /* Product list: single column */
    .product-list-grid {
        grid-template-columns: 1fr !important;
    }

    /* Gallery */
    .product-gallery-section {
        padding: 36px 0;
    }

    .gallery-title {
        font-size: 1.4rem !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 30px;
    }

    /* Slider */
    .product-gallery-infinite {
        padding: 0 0 36px;
    }

    .product-gallery-infinite__item {
        width: 250px;
        height: 141px;
        border-radius: 8px;
    }

    .product-gallery-infinite__track {
        gap: 12px;
    }

    /* Lightbox */
    .lightbox-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        font-size: 1.8rem;
    }

    .lightbox-caption {
        font-size: 0.9rem;
    }
}

/* Infinite Slider Below Hero */
.product-gallery-infinite {
    padding: 0 0 100px;
    background: var(--slate-900);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.product-gallery-infinite__track {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: scroll-product-gallery 60s linear infinite;
}

.product-gallery-infinite__track:hover {
    animation-play-state: paused;
}

@keyframes scroll-product-gallery {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 15px));
    }
}

.product-gallery-infinite__item {
    width: 444px;
    /* 16:9 ratio of 250px height is 444px */
    height: 250px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-gallery-infinite__item:hover {
    transform: scale(1.02);

}

.product-gallery-infinite__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}