/* ========================================
   WooTrack Showcase - iOS Style Frontend
   ======================================== */

.wtrk-showcase {
    --wtrk-accent: #FF6B35;
    --wtrk-accent-light: #FF9563;
    --wtrk-accent-dark: #E54B10;
    --wtrk-orange-grad: linear-gradient(135deg, #FF6B35 0%, #FF9563 50%, #FFB88C 100%);
    --wtrk-orange-grad-dark: linear-gradient(135deg, #E54B10 0%, #FF6B35 100%);
    --wtrk-bg: #FAFAFA;
    --wtrk-card: #FFFFFF;
    --wtrk-text: #1D1D1F;
    --wtrk-text-secondary: #6E6E73;
    --wtrk-border: rgba(0,0,0,0.06);
    --wtrk-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --wtrk-shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --wtrk-shadow-lg: 0 20px 60px rgba(255,107,53,0.25);
    --wtrk-radius: 20px;
    --wtrk-radius-sm: 14px;
    --wtrk-radius-lg: 28px;

    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--wtrk-text);
    line-height: 1.5;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

.wtrk-showcase *,
.wtrk-showcase *::before,
.wtrk-showcase *::after {
    box-sizing: border-box;
}

/* ==================== HERO ==================== */
.wtrk-hero {
    position: relative;
    padding: 80px 0 100px;
    margin: 40px 0;
    border-radius: var(--wtrk-radius-lg);
    overflow: hidden;
    background: var(--wtrk-orange-grad);
    color: #fff;
    text-align: center;
}

.wtrk-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,200,100,0.3) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.wtrk-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 40px;
}

.wtrk-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.3);
}

.wtrk-badge-dot {
    width: 8px;
    height: 8px;
    background: #4ADE80;
    border-radius: 50%;
    box-shadow: 0 0 8px #4ADE80;
    animation: wtrk-pulse 2s infinite;
}

@keyframes wtrk-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wtrk-hero-title {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 16px;
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.wtrk-hero-subtitle {
    font-size: 22px;
    font-weight: 500;
    margin: 0 0 20px;
    opacity: 0.95;
}

.wtrk-hero-description {
    font-size: 17px;
    line-height: 1.6;
    max-width: 620px;
    margin: 0 auto 36px;
    opacity: 0.92;
}

.wtrk-hero-description strong {
    font-weight: 700;
}

.wtrk-hero-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.wtrk-btn-primary-hero {
    background: #fff;
    color: var(--wtrk-accent-dark);
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.wtrk-btn-primary-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
    color: var(--wtrk-accent-dark);
}

.wtrk-btn-ghost {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
}

.wtrk-btn-ghost:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.wtrk-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 600px;
    margin: 0 auto;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.wtrk-stat-value {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wtrk-stat-label {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 4px;
}

/* ==================== SECTION HEADER ==================== */
.wtrk-section-header {
    text-align: center;
    max-width: 720px;
    margin: 80px auto 48px;
}

.wtrk-section-tag {
    display: inline-block;
    background: linear-gradient(135deg, rgba(255,107,53,0.1), rgba(255,149,99,0.1));
    color: var(--wtrk-accent);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.wtrk-section-header h2 {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 14px;
    line-height: 1.1;
    background: linear-gradient(135deg, #1D1D1F 0%, #3A3A3C 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wtrk-section-header p {
    font-size: 18px;
    color: var(--wtrk-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ==================== FEATURES ==================== */
.wtrk-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.wtrk-feature-card {
    background: var(--wtrk-card);
    border-radius: var(--wtrk-radius);
    padding: 32px 28px;
    box-shadow: var(--wtrk-shadow-sm);
    border: 1px solid var(--wtrk-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 56px 1fr;
    column-gap: 16px;
    align-items: start;
    text-align: left;
}

.wtrk-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wtrk-orange-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wtrk-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--wtrk-shadow-md);
}

.wtrk-feature-card:hover::before {
    transform: scaleX(1);
}

.wtrk-feature-icon {
    width: 56px;
    height: 56px;
    background: var(--wtrk-orange-grad);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 0;
    box-shadow: 0 8px 20px rgba(255,107,53,0.3);
    grid-row: 1 / span 2;
}

.wtrk-feature-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.wtrk-feature-card p {
    font-size: 14.5px;
    color: var(--wtrk-text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ==================== GALLERY ==================== */
.wtrk-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.wtrk-gallery-card {
    background: var(--wtrk-card);
    border-radius: var(--wtrk-radius);
    overflow: hidden;
    box-shadow: var(--wtrk-shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--wtrk-border);
}

.wtrk-gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--wtrk-shadow-md);
}

.wtrk-gallery-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #FFF5EF 0%, #FFE8DB 100%);
}

.wtrk-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.5s;
}

.wtrk-gallery-card:hover .wtrk-gallery-image img {
    transform: scale(1.05);
}

.wtrk-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,107,53,0.85), rgba(229,75,16,0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.wtrk-gallery-card:hover .wtrk-gallery-overlay {
    opacity: 1;
}

.wtrk-gallery-zoom {
    color: #fff;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
}

.wtrk-gallery-caption {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--wtrk-text-secondary);
    font-weight: 500;
}

/* Lightbox — portal to document.body via JS avoids theme content-visibility / stacking bugs */
.wtrk-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100vw;
    height: 100%;
    max-height: 100vh;
    margin: 0;
    border: none;
    box-sizing: border-box;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2147483000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow-x: hidden;
    overflow-y: auto;
    isolation: isolate;
    contain: none;
    animation: wtrk-fade-in 0.2s;
}

.wtrk-lightbox.active {
    display: flex;
}

@keyframes wtrk-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wtrk-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
}

.wtrk-lightbox-img.wtrk-lightbox-photo {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--wtrk-radius-sm);
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

.wtrk-lightbox-close,
.wtrk-lightbox-prev,
.wtrk-lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.wtrk-lightbox-close:hover,
.wtrk-lightbox-prev:hover,
.wtrk-lightbox-next:hover {
    background: var(--wtrk-accent);
    transform: scale(1.1);
}

.wtrk-lightbox-close {
    top: -60px;
    right: 0;
}

.wtrk-lightbox-prev {
    left: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.wtrk-lightbox-next {
    right: -70px;
    top: 50%;
    transform: translateY(-50%);
}

.wtrk-lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }
.wtrk-lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

.wtrk-lightbox-caption {
    color: #fff;
    text-align: center;
    margin-top: 16px;
    font-size: 15px;
    opacity: 0.85;
}

/* ==================== HOW IT WORKS ==================== */
.wtrk-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.wtrk-step {
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    text-align: center;
    padding: 32px 24px;
    background: var(--wtrk-card);
    border-radius: var(--wtrk-radius);
    box-shadow: var(--wtrk-shadow-sm);
    border: 1px solid var(--wtrk-border);
    transition: all 0.3s;
}

.wtrk-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--wtrk-shadow-md);
}

.wtrk-step-number {
    width: 56px;
    height: 56px;
    background: var(--wtrk-orange-grad);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(255,107,53,0.3);
}

.wtrk-step h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.wtrk-step p {
    color: var(--wtrk-text-secondary);
    font-size: 14.5px;
    margin: 0;
    line-height: 1.6;
}

.wtrk-step-arrow {
    font-size: 32px;
    color: var(--wtrk-accent);
    font-weight: 300;
    padding-top: 48px;
}

/* ==================== TECH SPECS ==================== */
.wtrk-tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 40px 0;
}

.wtrk-tech-item {
    background: var(--wtrk-card);
    border-radius: var(--wtrk-radius-sm);
    padding: 24px 20px;
    text-align: center;
    border: 1px solid var(--wtrk-border);
    transition: all 0.3s;
}

.wtrk-tech-item:hover {
    border-color: var(--wtrk-accent);
    transform: translateY(-2px);
}

.wtrk-tech-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.wtrk-tech-item h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}

.wtrk-tech-item p {
    font-size: 13px;
    color: var(--wtrk-text-secondary);
    margin: 0;
}

/* ==================== CTA FINAL ==================== */
.wtrk-cta-final {
    margin: 80px 0 40px;
}

.wtrk-cta-card {
    background: var(--wtrk-orange-grad);
    border-radius: var(--wtrk-radius-lg);
    padding: 64px 40px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--wtrk-shadow-lg);
}

.wtrk-cta-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255,200,100,0.25) 0%, transparent 50%);
    pointer-events: none;
}

.wtrk-cta-card > * {
    position: relative;
    z-index: 1;
}

.wtrk-cta-card h2 {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 12px;
    color: #fff;
}

.wtrk-cta-card p {
    font-size: 17px;
    opacity: 0.95;
    margin: 0 0 28px;
}

.wtrk-cta-small {
    font-size: 13px !important;
    opacity: 0.8 !important;
    margin-top: 20px !important;
}

.wtrk-download-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 28px 0 8px;
}

.wtrk-store-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #1D1D1F;
    color: #fff !important;
    padding: 12px 22px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 180px;
}

.wtrk-store-badge:hover {
    transform: translateY(-2px);
    background: #000;
    color: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.wtrk-store-icon {
    font-size: 28px;
    line-height: 1;
}

.wtrk-store-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.1;
}

.wtrk-store-text small {
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.wtrk-store-text strong {
    font-size: 16px;
    font-weight: 700;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .wtrk-hero { padding: 60px 0 80px; }
    .wtrk-hero-content { padding: 0 28px; }
    .wtrk-hero-title { font-size: 48px; }
    .wtrk-hero-subtitle { font-size: 18px; }
    .wtrk-hero-description { font-size: 16px; }
    .wtrk-section-header h2 { font-size: 34px; }
    .wtrk-section-header p { font-size: 16px; }
    .wtrk-cta-card h2 { font-size: 30px; }
    .wtrk-step-arrow { display: none; }
    .wtrk-lightbox-prev { left: 10px; }
    .wtrk-lightbox-next { right: 10px; }
    .wtrk-lightbox-close { top: 10px; right: 10px; }
}

@media (max-width: 600px) {
    .wtrk-showcase { padding: 0 0px; }
    .wtrk-hero { padding: 48px 0 64px; margin: 20px 0; border-radius: var(--wtrk-radius); }
    .wtrk-hero-content { padding: 0 20px; }
    .wtrk-hero-title { font-size: 36px; }
    .wtrk-hero-subtitle { font-size: 16px; }
    .wtrk-hero-description { font-size: 15px; }
    .wtrk-hero-cta { flex-direction: column; align-items: stretch; }
    .wtrk-btn-primary-hero, .wtrk-btn-ghost { padding: 14px 24px; font-size: 15px; }
    .wtrk-hero-stats { grid-template-columns: 1fr; gap: 16px; }
    .wtrk-stat-value { font-size: 22px; }
    .wtrk-section-header { margin: 60px auto 32px; }
    .wtrk-section-header h2 { font-size: 26px; }
    .wtrk-section-header p { font-size: 15px; }
    .wtrk-feature-card { padding: 24px 20px; }
    .wtrk-feature-card h3 { font-size: 17px; }
    .wtrk-cta-card { padding: 40px 24px; border-radius: var(--wtrk-radius); }
    .wtrk-cta-card h2 { font-size: 24px; }
    .wtrk-cta-card p { font-size: 15px; }
    .wtrk-features-grid, .wtrk-tech-grid { grid-template-columns: 1fr; }
    .wtrk-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .wtrk-gallery-caption { padding: 10px 12px; font-size: 12px; }
    .wtrk-step { min-width: 100%; }
    .wtrk-lightbox { padding: 16px; }
}
