/**
 * ============================================================
 * Author:    DARK-MASTER
 * Studio:    DARK DIGITAL STUDIO
 * Site:      dark-digital-studio.com
 * Email:     Service.Dark.Digital.studio@gmail.com
 * WhatsApp:  +905378664534
 * Telegram:  https://t.me/DARK_Digital_Studio
 * GitHub:    github.com/DARK-MASTER-0
 *
 * Copyright (c) 2018-2026 Dark Digital Studio. All Rights Reserved.
 * Unauthorized copying, distribution, or use of this software,
 * in whole or in part, is strictly prohibited without prior
 * written permission from the author.
 * ============================================================
 */
/* ========================================================================
   Hero & Welcome Sections
   ======================================================================== */

/* Hero wrapper — sticky so content scrolls over the video (parallax) */
.hero-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 0;
    overflow: visible;
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport for mobile browsers */
}

/* Video background layer — fixed full-viewport */
.hero-video-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
.hero-video-bg video,
.hero-video-bg .hero-video-iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    border: 0;
}
.hero-video-bg video.loaded,
.hero-video-bg .hero-video-iframe.loaded {
    opacity: 1;
}
/* YouTube/Drive iframe needs to be scaled up to remove black bars & fill viewport */
.hero-video-bg .hero-video-iframe {
    position: absolute;
    inset: 0;
    /* Scale 20% larger to crop letter-boxing from embeds */
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    /* Block all user interaction — no pause, no controls, no timeline */
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}
.hero-video-bg .hero-video-overlay {
    position: absolute;
    inset: 0;
    background: var(--color-bg);
    mix-blend-mode: var(--hero-video-blend, multiply);
    opacity: var(--hero-video-overlay-opacity, 0.55);
    pointer-events: none;
}

/* Solid curtain that covers the fixed video for all content below the hero */
.content-over-video {
    position: relative;
    z-index: 2;
    background: var(--color-bg);
}

/* Everything after the hero scrolls over the fixed video with solid bg */
.welcome-over-video {
    padding-top: 100px;
}

/* All sections inside the curtain inherit solid bg (safety net) */
.content-over-video > section {
    position: relative;
    background: var(--color-bg);
}

.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 72px;
    align-items: center;
    width: var(--container);
    margin: 0 auto;
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
    min-height: 100vh;
    box-sizing: border-box;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.hero-kicker {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hero-kicker-color, var(--color-primary));
    font-family: var(--hero-body-font, inherit);
}

.hero-title {
    font-size: var(--hero-title-size, clamp(2.8rem, 5vw, 3.8rem));
    line-height: 1.1;
    font-family: var(--hero-title-font, 'Playfair Display', serif);
    color: var(--color-text);
}

.hero-title .text-gradient {
    color: var(--hero-title-color, var(--color-primary));
    background: linear-gradient(135deg, var(--hero-title-color, var(--color-primary)) 0%, var(--hero-title-gradient-end, #4CC9F0) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero-subtitle {
    max-width: 520px;
    color: var(--hero-subtitle-color, var(--color-muted));
    font-size: 1.05rem;
    font-family: var(--hero-body-font, inherit);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-media {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;

    box-shadow: var(--shadow-raised);
    height: auto; /* Let image determine height */
    aspect-ratio: 16 / 9; /* Establish a nice ratio */
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95; /* Brighten image */
    transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-media:hover img {
    transform: scale(1.03);
}

/* ── Dynamic Scroll Pill (mobile/tablet) ── */
.scroll-pill {
    display: none;              /* shown via responsive.css on touch devices */
    position: fixed;
    right: 6px;
    top: 50%;                   /* JS overrides this proportionally */
    translate: 0 -50%;
    z-index: 9990;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-bg-soft);
    border: 1.5px solid var(--color-border);
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
    touch-action: none; 
    -webkit-user-select: none;        /* let JS handle all touch on this element */
    user-select: none;
    transition: background 0.3s, box-shadow 0.3s, width 0.2s, height 0.2s, border-radius 0.2s;
    pointer-events: auto;
}
.scroll-pill.is-dragging {
    cursor: grabbing;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    box-shadow: 0 4px 18px rgba(13,125,220,0.35);
}
.scroll-pill.is-dragging .scroll-pill__icon {
    color: #fff;
}
.scroll-pill__icon {
    width: 24px;
    height: 24px;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    color: var(--color-primary);
    transition: color 0.3s;
}

/* Individual SVG part transitions */
.scroll-pill .sp-dash {
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.scroll-pill .sp-chev-down {
    opacity: 1;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.scroll-pill .sp-chev-up {
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* State: middle of page → show dash */
.scroll-pill[data-state="middle"] .sp-dash         { opacity: 1; }
.scroll-pill[data-state="middle"] .sp-chev-down     { opacity: 0; }
.scroll-pill[data-state="middle"] .sp-chev-up       { opacity: 0; }

/* State: near bottom → show up arrow */
.scroll-pill[data-state="bottom"] .sp-dash          { opacity: 0; }
.scroll-pill[data-state="bottom"] .sp-chev-down     { opacity: 0; }
.scroll-pill[data-state="bottom"] .sp-chev-up       { opacity: 1; }

/* Bounce animation for down-arrow state */
@keyframes pillBounce {
    0%, 100% { translate: -50% -50%; }
    50%      { translate: -50% calc(-50% + 3px); }
}
.scroll-pill[data-state="top"] .scroll-pill__icon {
    animation: pillBounce 2s ease-in-out infinite;
}

/* Bounce up for bottom state */
@keyframes pillBounceUp {
    0%, 100% { translate: -50% -50%; }
    50%      { translate: -50% calc(-50% - 3px); }
}
.scroll-pill[data-state="bottom"] .scroll-pill__icon {
    animation: pillBounceUp 2s ease-in-out infinite;
}

/* Text Animations */
@keyframes textDataReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-reveal {
    opacity: 0;
    /*Starthidden*/display: inline-block;
    -webkit-animation: textDataReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation: textDataReveal 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    will-change: transform, opacity;
}

.section-heading {
    width: var(--container);
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.section-heading h2 {
    font-size: clamp(2.1rem, 3.3vw, 2.8rem);
    line-height: 1.2;
    margin: 0;
}

.section-heading p {
    max-width: 700px;
    color: var(--color-muted);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.eyebrow::before {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--color-primary);
}

.welcome {
    width: var(--container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 72px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.welcome-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-primary);
    box-shadow: var(--shadow-soft), var(--card-glow-subtle);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.welcome-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-raised);
}

.welcome-card h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
}

.welcome-card p {
    margin: 0;
    color: var(--color-muted);
}

/* ========================================================================
   Products & Canvas Sequence
   ======================================================================== */
.products {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 16px 0 96px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 1800px;
}

.product-tabs {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: var(--container);
    margin: 24px auto 0;
}

.tab-btn {
    padding: 14px 26px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-soft);
    font-weight: 600;
    color: var(--color-muted);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease, box-shadow 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-text);
}

.tab-btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-on-primary);
    box-shadow: 0 4px 16px -4px rgba(11, 111, 204, 0.4);
}

.product-card-grid {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    align-items: flex-start;
}

/* ========================================================================
   Product Slider / Listings
   ======================================================================== */
.product-listings {
    width: var(--container);
    margin: 40px auto 0;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    /* Ensure buttons align with the center */
}

/* 
 * Grid Slider Mechanism:
 * We use a grid that flows columns automatically, and we snap-scroll horizontally.
 * Grid Rows = 2 (fixed).
 * Grid Columns = Defined by container width / desired visible items.
 */
.slider-track {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto); /* 2 rows — items fill top→bottom per column group */
    gap: 28px;
    padding-top: 18px;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px; /* Space for shadows/hover effects */
    
    /* Hide scrollbar */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.slider-track::-webkit-scrollbar {
    display: none;
}

/* 
 * Column Sizing Logic:
 * 2-row grid with X columns visible per "page".
 * Items fill top→bottom per column, then next column.
 * 
 * PC: 3 columns visible (6 items per page).
 * Tablet: 2 columns visible (4 items per page).
 * Mobile: 1 column (2 items, with peek).
 */

/* Default (PC > 1024px) - 3 Columns */
.slider-track {
    grid-auto-columns: calc((100% - (28px * 2)) / 3);
}

.slider-track .product-card {
    scroll-snap-align: start;
    width: 100%;
    margin: 0;
    height: 100%; /* Ensure equal height in grid */
}

/* Slider Buttons */
.slider-btn {
    flex: 0 0 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: var(--shadow-soft);
}
.slider-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: scale(1.05);
}
.slider-btn:active:not(:disabled) {
    transform: scale(0.95);
}
.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: var(--color-bg-soft);
}

.mobile-scroll-hint {
    display: none;
}

/* Desktop / Tablet drag hint */
.desktop-drag-hint {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(13, 125, 220, 0.35);
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: drag-hint-pulse 2.2s ease-in-out infinite;
}

.desktop-drag-hint svg {
    flex-shrink: 0;
    animation: drag-hint-arrows 2s ease-in-out infinite;
}

.desktop-drag-hint.is-hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    pointer-events: none;
}

@keyframes drag-hint-pulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(13, 125, 220, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(13, 125, 220, 0.55), 0 0 0 6px rgba(13, 125, 220, 0.12); }
}

@keyframes drag-hint-arrows {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.25); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--color-muted);
    background: var(--color-bg-soft);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--color-border);
}

@media (max-width: 1024px) {
    /* Tablet: 2 columns visible (4 items per page) */
    .slider-track {
        grid-auto-columns: calc((100% - 28px) / 2);
    }
}

@media (max-width: 768px) {
    .product-listings {
        width: 100%;
        padding: 0 16px; /* Ensure edge padding */
    }
    
    .slider-track {
        /* Mobile: show next card snippet to encourage scroll */
        grid-auto-columns: 85%;
        gap: 16px;
        padding-right: 16px; /* Balance the peek */
    }
    
    .product-card-body {
        padding: 16px;
    }
    
    .product-card-header h3 {
        font-size: 1.1rem;
    }

    .slider-btn {
        display: none; /* Hide buttons on mobile, rely on swipe */
    }

    .desktop-drag-hint {
        display: none; /* Hide desktop hint on mobile */
    }
    
    .slider-container {
        gap: 0;
        display: grid;
        grid-template-areas: "stack";
    }

    .slider-track {
        grid-area: stack;
    }

    .mobile-scroll-hint {
        grid-area: stack;
        justify-self: end;
        align-self: start;
        
        position: -webkit-sticky;
        position: sticky;
        top: 50vh;
        
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        z-index: 5;
        pointer-events: none;
        color: var(--color-primary);
        font-size: 0.75rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        
        background: var(--color-surface);
        opacity: 0.95;
        box-shadow: -4px 4px 16px rgba(0,0,0,0.1);
        padding: 12px 8px 12px 16px;
        border-radius: 12px 0 0 12px;
        transition: opacity 0.3s ease;
    }
    
    .mobile-scroll-hint svg {
        width: 24px;
        height: 24px;
        animation: hint-slide 1.5s infinite ease-in-out;
    }

    @keyframes hint-slide {
        0%, 100% { transform: translateX(0); opacity: 0.6; }
        50% { transform: translateX(6px); opacity: 1; }
    }
}

.product-card {
    background: var(--color-bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft), var(--card-glow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.product-card.is-hovered,
.product-card:hover,
.product-card:focus-within {
    transform: translateY(-12px);
    box-shadow: var(--shadow-raised), var(--card-glow);
    border-color: rgba(13, 125, 220, 0.35);
}

.product-card-media {
    margin: 0;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: rgb(99, 99, 99);
    position: relative;
    outline: none;
}

.product-card-media[data-product-media-trigger] {
    cursor: pointer;
}

.product-card-media[data-product-media-trigger]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
}

.product-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card.is-hovered .product-card-media img,
.product-card:hover .product-card-media img,
.product-card:focus-within .product-card-media img {
    transform: scale(1.06);
}

.product-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
}

.product-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}


.product-card-media-overlay {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
    padding: 12px;
    z-index: 2;
    pointer-events: none;
}

.product-card-media-label {
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease 0.2s, transform 0.3s ease 0.2s;
    pointer-events: none;
}

.product-card-media-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse-soft 3s infinite;
}

.product-card-media-trigger::before {
    display: none;
}

.product-card-media-trigger::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
    z-index: -1;
}

/* Reveal Trigger on Card Hover */
.product-card.is-hovered .product-card-media-trigger,
.product-card:hover .product-card-media-trigger,
.product-card:focus-within .product-card-media-trigger,
.product-card.is-media-active .product-card-media-trigger {
    opacity: 1;
    transform: scale(1);
}

/* Reveal Label on Trigger Hover */
.product-card-media-trigger:hover + .product-card-media-label,
.product-card-media-trigger:focus-visible + .product-card-media-label {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
}

/* Trigger Hover State */
.product-card-media-trigger:hover,
.product-card-media-trigger:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.product-card-media-trigger:hover::after,
.product-card-media-trigger:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

@keyframes pulse-soft {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.15); }
    70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.product-card-media-trigger svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card-media-trigger:hover svg {
    transform: scale(1.1);
}

.product-card-media-trigger [data-media-icon][hidden] {
    display: none;
}
.product-card-category {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-primary);
}

.product-card-body h3 {
    margin: 0;
    font-size: 1.3rem;
}

.product-card-body p {
    margin: 0;
    color: var(--color-muted);
}

.product-card-tagline {
    font-size: 0.9rem;
    color: var(--color-text-soft);
}

.product-card-sku {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--color-muted);
    text-transform: uppercase;
}


.product-card-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(13, 125, 220, 0.22);
    background: rgba(13, 125, 220, 0.08);
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease, color 0.3s ease;
}

.product-card-toggle span {
    font-size: 1.2rem;
    line-height: 1;
    font-weight: 700;
}

.product-card-toggle:hover,
.product-card-toggle:focus-visible {
    background: rgba(13, 125, 220, 0.16);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px -24px rgba(13, 125, 220, 0.6);
}

.product-card-detail {
    margin-top: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(13, 125, 220, 0.16);
    background: rgba(13, 125, 220, 0.08);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.product-card.is-details-open .product-card-detail {
    max-height: var(--detail-max-height);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.product-card-detail[style*="overflow-y: auto"] {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(13, 125, 220, 0.25) transparent;
}

.product-card-detail[style*="overflow-y: auto"]::-webkit-scrollbar {
    width: 3px;
}

.product-card-detail[style*="overflow-y: auto"]::-webkit-scrollbar-track {
    background: transparent;
}

.product-card-detail[style*="overflow-y: auto"]::-webkit-scrollbar-thumb {
    background: rgba(13, 125, 220, 0.25);
    border-radius: 4px;
}

.product-card-detail[style*="overflow-y: auto"]:hover::-webkit-scrollbar {
    width: 8px;
}

.product-card-detail[style*="overflow-y: auto"]:hover::-webkit-scrollbar-thumb {
    background: rgba(13, 125, 220, 0.45);
}

.product-card.is-details-open .product-card-toggle {
    display: none;
}

.product-card-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    font-weight: 600;
    color: var(--color-text);
}

.product-card-detail-list {
    margin: 0;
    padding: 0 22px 18px 34px;
    color: var(--color-muted);
    list-style: disc;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ── Detail scroll arrows ── */
.detail-scroll-arrow {
    position: sticky;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px 0 8px;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 2;
}

.detail-scroll-arrow[data-detail-scroll-arrow-down] {
    bottom: 0;
    background: linear-gradient(to top, rgba(13, 125, 220, 0.14) 60%, transparent);
}

.detail-scroll-arrow[data-detail-scroll-arrow-up] {
    top: 0;
    background: linear-gradient(to bottom, rgba(13, 125, 220, 0.14) 60%, transparent);
}

.detail-scroll-arrow.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.detail-scroll-arrow svg {
    animation: detailArrowBounce 1.2s ease-in-out infinite;
}

.detail-scroll-arrow[data-detail-scroll-arrow-up] svg {
    animation-name: detailArrowBounceUp;
}

@keyframes detailArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes detailArrowBounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.product-card-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: color 0.3s ease, background 0.3s ease;
}

.product-card-back:hover,
.product-card-back:focus-visible {
    color: var(--color-primary-dark);
    background: rgba(13, 125, 220, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    .product-card-detail {
        pointer-events: none;
    }

    .product-card.is-hovered .product-card-detail,
    .product-card:hover .product-card-detail,
    .product-card:focus-within .product-card-detail {
        max-height: var(--detail-max-height);
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(13, 125, 220, 0.25) transparent;
    }

    .product-card.is-hovered .product-card-detail::-webkit-scrollbar,
    .product-card:hover .product-card-detail::-webkit-scrollbar,
    .product-card:focus-within .product-card-detail::-webkit-scrollbar {
        width: 3px;
    }

    .product-card.is-hovered .product-card-detail::-webkit-scrollbar-track,
    .product-card:hover .product-card-detail::-webkit-scrollbar-track,
    .product-card:focus-within .product-card-detail::-webkit-scrollbar-track {
        background: transparent;
    }

    .product-card.is-hovered .product-card-detail::-webkit-scrollbar-thumb,
    .product-card:hover .product-card-detail::-webkit-scrollbar-thumb,
    .product-card:focus-within .product-card-detail::-webkit-scrollbar-thumb {
        background: rgba(13, 125, 220, 0.25);
        border-radius: 4px;
    }

    .product-card.is-hovered .product-card-detail:hover::-webkit-scrollbar,
    .product-card:hover .product-card-detail:hover::-webkit-scrollbar,
    .product-card:focus-within .product-card-detail:hover::-webkit-scrollbar {
        width: 8px;
    }

    .product-card.is-hovered .product-card-detail:hover::-webkit-scrollbar-thumb,
    .product-card:hover .product-card-detail:hover::-webkit-scrollbar-thumb,
    .product-card:focus-within .product-card-detail:hover::-webkit-scrollbar-thumb {
        background: rgba(13, 125, 220, 0.45);
    }

    .product-card-back {
        display: none;
    }

    .product-card.is-details-open .product-card-toggle {
        display: inline-flex;
    }
}

.product-card-footer {
    padding: 0 22px 20px;
    margin-top: auto;
}

.product-card-footer .btn {
    width: 100%;
    justify-content: center;
}

.product-card-note {
    font-size: 0.85rem;
    color: var(--color-muted);
    font-style: italic;
}

.product-card-video {
    margin: 18px 22px 0;
    border-radius: var(--radius-md);
    border: 1px solid rgba(13, 125, 220, 0.2);
    background: var(--color-bg-soft);
    overflow: hidden;
    display: none;
}

.product-card.is-media-active .product-card-video {
    display: block;
}

@media (hover: none) and (pointer: coarse) {
    .product-card-media-overlay {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.product-card-video__player {
    position: relative;
    background: var(--product-media-player-bg);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: var(--radius-md);
}

.product-card-video .video-container {
    position: relative;
    height: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--product-media-video-bg);
    border-radius: inherit;
    overflow: hidden;
}

.product-card-video video,
.product-card-video .video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
    border: 0;
}

/* Fix for direct video children (HTML5) to ensure they take space and don't overlap controls */
.product-card-video__player > video {
    position: relative;
    aspect-ratio: 16 / 9;
    height: auto;
    inset: auto;
}

.product-card-video.is-youtube .video-container {
    background: transparent;
}

.product-card-video.is-youtube .video-container iframe {
    background: transparent;
    transform: none;
}

/* YouTube Integration Controls */
.product-card-video.is-youtube .product-card-video__controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px;
    background: transparent;
    pointer-events: none;
    justify-content: flex-start;
    align-items: flex-start;
    box-shadow: none;
    z-index: 20;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    height: 0; /* Important: allow click-through below */
    padding: 12px;
}

/* Hide all controls by default in YouTube mode */
.product-card-video.is-youtube .product-card-video__controls > * {
    display: none;
}

/* Only show close button */
.product-card-video.is-youtube .product-card-video__controls [data-media-close] {
    display: flex;
    pointer-events: auto;
    font-size: 11px;
    background: rgba(30, 30, 30, 0.5);
    color: #fff;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    width: 53px;
    height: 28px;
    -webkit-border-radius: 9px;
    -moz-border-radius: 9px;
    -ms-border-radius: 9px;
    -o-border-radius: 9px;
    border-radius: 9px;
    border: 1px solid rgba(255,255,255,0.3);
    margin-right: auto;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.product-card-video.is-youtube .product-card-video__controls [data-media-close]::before {
    content: "✕";
    color: crimson;
    font-family: sans-serif;
    font-size: 13px;
    line-height: 1;
}

/* Standard Controls (HTML5 + Default State) */
.product-card-video__controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 14px;
    background: var(--product-media-controls-bg);
    color: var(--product-media-controls-color);
    flex-wrap: wrap;
    position: relative;
    z-index: 5;
    border-radius: calc(var(--radius-md) - 4px);
}

.product-card-video:not(.is-youtube) .product-card-video__controls {
    position: static;
    background: var(--product-media-controls-bg);
    margin-top: 4px;
    visibility: visible;
    opacity: 1;
}

/* Ensure buttons are visible in HTML5 mode */
.product-card-video:not(.is-youtube) .product-card-video__controls > * {
    display: inline-flex; /* Restore flex display for buttons */
}
/* Progress bar specific */
.product-card-video:not(.is-youtube) .product-card-video__controls .product-card-video__progress {
    display: block;
}
/* Time display specific */
.product-card-video:not(.is-youtube) .product-card-video__controls .product-card-video__time {
    display: block;
}
/* Hidden attribute support */
.product-card-video__controls [hidden] {
    display: none !important;
}

.product-card-video__controls button {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--product-media-button-bg);
    color: var(--product-media-button-text);
    transition: background 0.2s ease, transform 0.2s ease;
    flex: 0 0 auto;
}

.product-card-video:not(.is-youtube) .product-card-video__controls button {
    /* background: rgba(255, 255, 255, 0.15); Remove this fixed color */
    /* color: #fff; Remove this fixed color to use variable */
    background: var(--product-media-button-bg);
    color: var(--product-media-button-text);
}

.product-card-video__controls button:hover,
.product-card-video__controls button:focus-visible {
    background: var(--product-media-button-hover-bg);
    transform: translateY(-1px);
}

.product-card-video:not(.is-youtube) .product-card-video__controls button:hover,
.product-card-video:not(.is-youtube) .product-card-video__controls button:focus-visible {
    /* background: rgba(255, 255, 255, 0.3); Remove overlap */
     background: var(--product-media-button-hover-bg);
}

.product-card-video__progress {
    flex: 1;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.1);
    cursor: pointer;
    min-width: 140px;
}

.product-card-video:not(.is-youtube) .product-card-video__progress {
    /* background: rgba(255, 255, 255, 0.24); Remove invisible white on white */
    background: var(--color-border-strong);
}

.product-card-video__progress::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(94, 182, 255, 0.35);
    cursor: pointer;
}

.product-card-video__progress::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--color-secondary);
    box-shadow: 0 0 0 4px rgba(94, 182, 255, 0.35);
    cursor: pointer;
}

.product-card-video__time {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    min-width: 88px;
    text-align: right;
    color: var(--product-media-controls-color);
}

.product-card-video:not(.is-youtube) .product-card-video__time {
    color: #fff;
}

/* Fullscreen mode styles */
.product-card-video.is-fullscreen .product-card-video__player {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    background: #000;
}

.product-card-video.is-fullscreen video,
.product-card-video.is-fullscreen .video-container {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-card-video.is-fullscreen .product-card-video__controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 24px 32px;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.product-card-video.is-fullscreen.is-controls-hidden .product-card-video__controls {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.product-card-video.is-fullscreen .product-card-video__controls button {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-card-video.is-fullscreen .product-card-video__controls button:hover,
.product-card-video.is-fullscreen .product-card-video__controls button:focus-visible {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
}

.product-card-video.is-fullscreen .product-card-video__progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
}

.product-card-video.is-fullscreen .product-card-video__progress::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 6px rgba(94, 182, 255, 0.4);
}

.product-card-video.is-fullscreen .product-card-video__progress::-moz-range-thumb {
    width: 16px;
    height: 16px;
    box-shadow: 0 0 0 6px rgba(94, 182, 255, 0.4);
}

.product-card-video.is-fullscreen .product-card-video__time {
    color: #fff;
    font-size: 0.9rem;
    min-width: 100px;
}

/* Show controls on hover in fullscreen */
.product-card-video.is-fullscreen:hover .product-card-video__controls,
.product-card-video.is-fullscreen:focus-within .product-card-video__controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ========================================================================
   About & Certificates
   ======================================================================== */
.about {
    width: 100%;
    display: flex;
    flex-direction: column;
    content-visibility: auto;
    contain-intrinsic-size: 1px 800px;
}

.about-content {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 48px;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-text h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
}

.about-text p {
    margin: 0;
    color: var(--color-muted);
}

.about-highlights {
    display: flex;
    gap: 24px;
}

.about-highlights div {
    flex: 1;
    padding: 20px 24px;
    border-radius: var(--radius-md);
    background: rgba(13, 125, 220, 0.07);
    text-align: center;
}

.about-highlights strong {
    display: block;
    font-size: 1.6rem;
    color: var(--color-primary);
}

.certificate-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.certificate-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft), var(--card-glow-subtle);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certificate-media {
    display: inline-flex;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(13, 125, 220, 0.08);
    box-shadow: 0 10px 20px -16px rgba(13, 125, 220, 0.45);
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.certificate-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

button.certificate-media {
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--color-primary);
}

button.certificate-media:hover,
button.certificate-media:focus-visible {
    background: rgba(13, 125, 220, 0.16);
    box-shadow: 0 12px 24px -18px rgba(13, 125, 220, 0.55);
    transform: translateY(-2px);
}

button.certificate-media:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

svg.certificate-icon {
    width: 60px;
    height: 60px;
    color: var(--color-primary);
}

svg.certificate-icon path,
svg.certificate-icon circle {
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.certificate-card h3 {
    margin: 0;
}

.certificate-card p {
    margin: 0;
    color: var(--color-muted);
}

.certificate-modal[hidden] {
    display: none !important;
}

.certificate-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background: rgba(6, 13, 26, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.certificate-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.certificate-modal-dialog {
    width: min(900px, 96vw);
    max-height: 94vh;
    overflow-y: auto;
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--layer-glass-border);
    box-shadow: var(--shadow-raised);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
    text-align: center;
}

.certificate-modal-figure {
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.certificate-modal-figure img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.certificate-modal-figure figcaption {
    font-weight: 600;
    color: var(--color-text);
}

.certificate-modal-close {
    min-width: 180px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    letter-spacing: 0.02em;
    box-shadow: 0 4px 18px rgba(13, 125, 220, 0.35);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
}
.certificate-modal-close:hover,
.certificate-modal-close:focus-visible {
    background: var(--color-primary-hover, #0a6bc4);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(13, 125, 220, 0.5);
}

/* ========================================================================
   Contact
   ======================================================================== */
.contact {
    margin-bottom: 70px;
    display: flex;
    flex-direction: column;
    gap: 60px;
    width: 100%;
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}

.contact-grid {
    width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 32px;
}

.contact-card,
.contact-form {
    background: var(--color-bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft), var(--card-glow-subtle);
    padding: 32px;
}

.contact-card h3 {
    margin-top: 0;
    margin-bottom: 18px;
}

.contact-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card li {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-card span {
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.contact-card a,
.contact-card strong {
    font-size: 1.05rem;
}
.contact-note {
    margin-top: 24px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: rgba(111, 199, 255, 0.14);
    color: var(--color-text-soft);
    font-weight: 500;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

input,
textarea {
    font: inherit;
    padding: 14px 18px;
    border: 1px solid var(--form-field-border);
    border-radius: var(--radius-sm);
    background: var(--form-field-bg);
    color: var(--form-field-text);
    transition: border 0.3s ease, box-shadow 0.3s ease;
}

input:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--form-field-focus-ring);
}

input::placeholder,
textarea::placeholder {
    color: var(--form-field-placeholder);
}

.form-disclaimer {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ── Local math CAPTCHA (shown when consent = 'necessary only') ── */
.contact-form .captcha-row {
    margin-top: 4px;
}

.contact-form .captcha-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-form .captcha-img {
    border-radius: var(--radius-sm);
    border: 1px solid var(--form-field-border);
    flex-shrink: 0;
    height: 52px;
    width: auto;
    max-width: 220px;
    user-select: none;
    -webkit-user-drag: none;
}

.contact-form .captcha-refresh {
    width: 36px;
    height: 36px;
    border: 1px solid var(--form-field-border);
    border-radius: var(--radius-sm);
    background: var(--form-field-bg);
    color: var(--color-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.contact-form .captcha-refresh:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.contact-form .captcha-refresh svg {
    width: 18px;
    height: 18px;
}

.contact-form .captcha-input {
    width: 80px;
    background: var(--form-field-bg);
    border: 1px solid var(--form-field-border);
    border-radius: var(--radius-sm);
    color: var(--form-field-text);
    font-size: 16px;
    font-weight: 700;
    padding: 10px 12px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 0.08em;
}

.contact-form .captcha-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--form-field-focus-ring);
}

.contact-form .captcha-input::placeholder {
    font-weight: 400;
    letter-spacing: 0;
}

/* reCAPTCHA inline disclosure (replaces the floating badge) */
.form-recaptcha-note {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--color-muted);
    opacity: 0.6;
}

.form-recaptcha-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Hide the floating reCAPTCHA badge — we show inline disclosure instead */
.grecaptcha-badge {
    visibility: hidden !important;
}

.form-feedback {
    min-height: 20px;
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-top: 8px;
}

.form-feedback[data-status="success"] {
    color: var(--color-success);
}

.form-feedback[data-status="error"] {
    color: var(--color-error);
}

.form-feedback[data-status="pending"] {
    color: var(--color-warning);
}
