/* ============================================
   PREMIUM CNC PRODUCTS SECTION - SCOPED STYLES
   ============================================ */

.cnc-products-wrapper {
    position: relative;
    padding: 100px 20px;
    background: transparent;
    overflow: hidden;
}

.cnc-products-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* ===================================
   SECTION HEADER
   =================================== */
.cnc-products-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    animation: cnc-products-fade-in 0.8s ease-out;
}

@keyframes cnc-products-fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tag */
.cnc-products-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.cnc-products-tag-icon {
    font-size: 8px;
    color: #3b82f6;
    animation: cnc-products-pulse 2s ease-in-out infinite;
}

@keyframes cnc-products-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.cnc-products-tag-text {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Heading */
.cnc-products-heading {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff;
    margin: 0 0 20px 0;
    letter-spacing: -0.02em;
}

.cnc-products-heading-accent {
    display: block;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 8px;
}

/* Description */
.cnc-products-description {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ===================================
   HORIZONTAL PRODUCTS STRIP
   =================================== */

.cnc-products-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    margin-top: 40px;
    margin-bottom: 50px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    box-sizing: border-box;
}

/* Scrollbar styling (optional) */
.cnc-products-grid::-webkit-scrollbar {
    height: 8px;
}

.cnc-products-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.cnc-products-grid::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.6);
    border-radius: 10px;
}

/* Product Card */
.cnc-products-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    animation: cnc-products-card-fade-in 0.6s ease-out backwards;

    /* horizontal strip behaviour */
    flex: 0 0 320px;
    /* width of each card on desktop */
    scroll-snap-align: start;
    box-sizing: border-box;
}

@keyframes cnc-products-card-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cnc-products-card:nth-child(1) {
    animation-delay: 0.1s;
}

.cnc-products-card:nth-child(2) {
    animation-delay: 0.2s;
}

.cnc-products-card:nth-child(3) {
    animation-delay: 0.3s;
}

.cnc-products-card:nth-child(4) {
    animation-delay: 0.4s;
}

.cnc-products-card:nth-child(5) {
    animation-delay: 0.5s;
}

.cnc-products-card:nth-child(6) {
    animation-delay: 0.6s;
}

.cnc-products-card:nth-child(7) {
    animation-delay: 0.7s;
}

.cnc-products-card:nth-child(8) {
    animation-delay: 0.8s;
}

.cnc-products-card:nth-child(9) {
    animation-delay: 0.9s;
}

.cnc-products-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* Card Image */
.cnc-products-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.cnc-products-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cnc-products-card:hover .cnc-products-card-image img {
    transform: scale(1.1);
}

/* Card Overlay */
.cnc-products-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(11, 37, 69, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cnc-products-card:hover .cnc-products-card-overlay {
    opacity: 1;
}

.cnc-products-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #EE6C4D 0%, #E29578 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(238, 108, 77, 0.4);
    transition: all 0.3s ease;
    transform: translateY(10px);
}

.cnc-products-card:hover .cnc-products-card-btn {
    transform: translateY(0);
}

.cnc-products-card-btn:hover {
    background: linear-gradient(135deg, #ff7a5c 0%, #f0a68a 100%);
    box-shadow: 0 6px 20px rgba(238, 108, 77, 0.6);
    color: #ffffff;
}

/* Card Content */
.cnc-products-card-content {
    padding: 24px;
}

.cnc-products-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.cnc-products-card-text {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* ===================================
   FOOTER - VIEW ALL BUTTON
   =================================== */
.cnc-products-footer {
    text-align: center;
}

.cnc-products-view-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cnc-products-view-all:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

.cnc-products-view-all svg {
    transition: transform 0.3s ease;
}

.cnc-products-view-all:hover svg {
    transform: translateX(4px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .cnc-products-wrapper {
        padding: 80px 20px;
    }

    .cnc-products-heading {
        font-size: 40px;
    }

    .cnc-products-description {
        font-size: 16px;
    }

    .cnc-products-card {
        flex: 0 0 280px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cnc-products-wrapper {
        padding: 60px 16px;
    }

    .cnc-products-header {
        margin-bottom: 40px;
    }

    .cnc-products-heading {
        font-size: 32px;
    }

    .cnc-products-description {
        font-size: 15px;
    }

    .cnc-products-card-content {
        padding: 20px;
    }

    .cnc-products-card-title {
        font-size: 18px;
    }

    .cnc-products-view-all {
        width: 100%;
        justify-content: center;
    }

    .cnc-products-card {
        flex: 0 0 240px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .cnc-products-heading {
        font-size: 28px;
    }

    .cnc-products-card-title {
        font-size: 16px;
    }

    .cnc-products-card-text {
        font-size: 13px;
    }

    .cnc-products-card {
        flex: 0 0 220px;
    }
}