/* ==========================================================================
   PREMIUM CUSTOM CSS FOR JOINTFLEX FIT THERAPY FAR
   Theme: Deep Blue Oceanic (Sophisticated, Trustworthy, Modern)
   Architecture: Pure CSS, No JS, Mobile-First, BEM-inspired
========================================================================== 
*/

/* --- 1. DESIGN SYSTEM & CSS VARIABLES --- */
:root {
    /* Main Color Palette (Blue Theme constraints strictly maintained but expanded) */
    --color-primary: #0f172a;        /* Deep Space Blue */
    --color-secondary: #1e3a8a;      /* Royal Navy */
    --color-accent: #2563eb;         /* Vibrant Action Blue */
    --color-accent-light: #3b82f6;   /* Soft Action Blue */
    --color-accent-glow: rgba(37, 99, 235, 0.3);
    
    /* Backgrounds & Neutrals */
    --color-bg-base: #f8fafc;        /* Crisp Light Slate */
    --color-bg-card: #ffffff;        /* Pure White */
    --color-bg-soft: #eff6ff;        /* Ultra Light Blue */
    --color-border: #e2e8f0;         /* Soft Gray/Blue Border */
    --color-border-focus: #bfdbfe;   /* Highlight Border */
    
    /* Typography Colors */
    --color-text-main: #1e293b;      /* Dark Slate for readability */
    --color-text-muted: #64748b;     /* Muted Slate */
    --color-text-light: #f8fafc;     /* White/Light text */
    
    /* Amazon Highlights */
    --color-star: #f59e0b;           /* Rich Amber */
    --color-verified: #c2410c;       /* Trustworthy Rust/Orange */
    
    /* Shadows - Multi-layered for depth */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -1px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 25px var(--color-accent-glow);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* Geometry */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- 2. GLOBAL RESET & BASE STYLES --- */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

*, *::before, *::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body.theme-blue-ocean {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg-base);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.02em;
}

.wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- 3. AMBIENT BACKGROUND DECORATIONS (CSS Shapes) --- */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--color-bg-soft) 0%, rgba(255,255,255,0) 70%);
}

.shape-2 {
    top: 30%;
    right: -20%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #e0e7ff 0%, rgba(255,255,255,0) 70%);
    animation-delay: -5s;
}

.shape-3 {
    bottom: -10%;
    left: 20%;
    width: 70vw;
    height: 50vw;
    background: radial-gradient(circle, #dbeafe 0%, rgba(255,255,255,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 5%) scale(1.1); }
}

/* --- 4. HEADER WITH GLASSMORPHISM --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

@media (min-width: 768px) {
    .header-container { justify-content: space-between; }
}

.header-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-accent));
    border-radius: 8px;
    box-shadow: var(--shadow-sm), inset 0 2px 4px rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: rotate(45deg);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.header-badge {
    background: var(--color-bg-soft);
    border: 1px solid var(--color-border-focus);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent);
}

.header-progress-bar {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    width: 100%;
    opacity: 0.5;
}

/* --- 5. KEYWORD CONTEXT BOX --- */
.intro-context-box {
    margin: 2.5rem auto;
    max-width: 800px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.intro-context-box::before {
    content: '';
    position: absolute;
    left: 0; top: 0; height: 100%; width: 4px;
    background: linear-gradient(to bottom, var(--color-accent-light), var(--color-accent));
}

.context-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.context-text {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin: 0;
}

.context-text strong {
    color: var(--color-secondary);
    font-weight: 700;
}

/* --- 6. MAIN PRODUCT CARD (Complex Layout) --- */
.product-card-layer {
    margin-bottom: 4rem;
}

.product-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 992px) {
    .product-card {
        grid-template-columns: 1fr 1fr;
        padding: 4rem;
        gap: 4rem;
    }
}

/* Pseudo-element shadow behind card for massive depth */
.product-card::before {
    content: '';
    position: absolute;
    top: 5%;
    left: 2%;
    width: 96%;
    height: 96%;
    background: linear-gradient(135deg, var(--color-accent-light), var(--color-bg-soft));
    border-radius: var(--radius-xl);
    z-index: -1;
    filter: blur(25px);
    opacity: 0.3;
}

/* --- 7. CSS-ONLY GALLERY SYSTEM --- */
.gallery-wrapper {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 100px;
}

.gallery-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Hide actual radio inputs */
.gallery-radio {
    display: none;
}

/* Main Viewport */
.gallery-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle at center, #ffffff, var(--color-bg-soft));
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-inner), var(--shadow-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-glow {
    position: absolute;
    width: 60%;
    height: 60%;
    background: var(--color-accent-glow);
    filter: blur(40px);
    border-radius: 50%;
    opacity: 0.4;
    z-index: 0;
}

.stage-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    padding: 2rem;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease-in-out, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.1));
}

/* Logic: Link Radios to Main Stage Visibility */
#view-1:checked ~ .gallery-stage .slide-1,
#view-2:checked ~ .gallery-stage .slide-2,
#view-3:checked ~ .gallery-stage .slide-3,
#view-4:checked ~ .gallery-stage .slide-4 {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
    pointer-events: auto;
}

/* Thumbnails Strip */
.gallery-thumbnails {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .gallery-thumbnails { justify-content: flex-start; }
}

.thumb-label {
    cursor: pointer;
    flex: 0 0 70px;
    height: 70px;
    border-radius: var(--radius-md);
    padding: 3px;
    background: transparent;
    transition: var(--transition-bounce);
    position: relative;
}

.thumb-frame {
    width: 100%;
    height: 100%;
    background: var(--color-bg-card);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.thumb-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover & Focus state for thumbs */
.thumb-label:hover {
    transform: translateY(-3px);
}
.thumb-label:hover .thumb-frame {
    border-color: var(--color-accent-light);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Active Logic: Link Radios to Thumbnails */
#view-1:checked ~ .gallery-thumbnails [data-index="1"] .thumb-frame,
#view-2:checked ~ .gallery-thumbnails [data-index="2"] .thumb-frame,
#view-3:checked ~ .gallery-thumbnails [data-index="3"] .thumb-frame,
#view-4:checked ~ .gallery-thumbnails [data-index="4"] .thumb-frame {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-bg-card), 0 0 0 5px var(--color-accent);
}

/* --- 8. PRODUCT INFORMATION (RIGHT SIDE) --- */
.product-info-wrapper {
    display: flex;
    flex-direction: column;
}

.info-header {
    margin-bottom: 1.5rem;
}

.product-h1 {
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

@media (min-width: 768px) {
    .product-h1 { font-size: 2.75rem; }
}

/* Decorative Underline */
.product-h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), transparent);
    border-radius: 2px;
}

/* Amazon Meta & Stars */
.amazon-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-bg-base);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    width: fit-content;
    border: 1px solid var(--color-border);
}

.star-rating {
    display: flex;
    gap: 2px;
}

.star.filled {
    color: var(--color-star);
    font-size: 1.1rem;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.star-rating.sm .star {
    font-size: 0.9rem;
}

.review-count {
    font-size: 0.9rem;
    color: var(--color-accent);
    font-weight: 500;
}

.info-divider {
    height: 1px;
    background: linear-gradient(90deg, var(--color-border), transparent);
    margin: 1.5rem 0 2rem 0;
}

/* Feature List Formatting */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    background: transparent;
}

.feature-item:hover {
    background: var(--color-bg-soft);
    box-shadow: inset 0 0 0 1px var(--color-border-focus);
}

/* Custom Checkmark via CSS */
.feature-icon-box {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px var(--color-accent-glow);
    margin-top: 2px;
}

.feature-icon-box::before {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.feature-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.feature-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1.4;
}

.feature-desc {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* --- 9. CTA SECTION --- */
.cta-section {
    margin: 6rem 0;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.5);
    color: white;
}

/* CTA Decor Elements */
.cta-decoration {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
}

.decor-left {
    width: 300px; height: 300px;
    top: -100px; left: -100px;
}

.decor-right {
    width: 400px; height: 400px;
    bottom: -150px; right: -100px;
}

.cta-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-heading {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.cta-sub {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
}

/* The Button */
.btn-amazon-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 350px;
    padding: 1.25rem 2rem;
    background: linear-gradient(to bottom, #fcd34d, #f59e0b);
    color: #451a03;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: 1px solid #d97706;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2), inset 0 2px 0 rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover Lift & Glow */
.btn-amazon-primary:hover {
    transform: translateY(-4px);
    background: linear-gradient(to bottom, #fde047, #fbbf24);
    box-shadow: 0 15px 25px rgba(245, 158, 11, 0.3), inset 0 2px 0 rgba(255,255,255,0.6);
}

.btn-amazon-primary:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

/* CSS Animation: Button Shine */
.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: shine-effect 4s infinite;
}

@keyframes shine-effect {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

.cta-trust-badges {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 500;
}

/* --- 10. REVIEWS SECTION (Amazon Style, Premium Wrap) --- */
.reviews-section {
    max-width: 900px;
    margin: 0 auto 6rem auto;
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
}

@media (min-width: 768px) {
    .reviews-section { padding: 4rem; }
}

.reviews-header {
    margin-bottom: 3rem;
    text-align: center;
}

.reviews-title {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--color-accent);
    margin: 0 auto;
    border-radius: 2px;
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Individual Review Card */
.review-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition-smooth);
}

.review-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

@media (min-width: 640px) {
    .review-card {
        flex-direction: row;
    }
}

.review-avatar-col {
    flex-shrink: 0;
}

.avatar-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--color-accent-light), transparent);
    box-shadow: var(--shadow-sm);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.review-content-col {
    flex: 1;
}

.review-author {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.review-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.review-headline {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-text-main);
}

.review-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.review-verified {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-verified);
    margin-bottom: 1rem;
    display: inline-block;
}

.review-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-main);
}

.review-attachment {
    margin-top: 1rem;
}

.attachment-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition-fast);
    cursor: pointer;
}

.attachment-img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* --- 11. FOOTER --- */
.site-footer {
    background: var(--color-primary);
    color: var(--color-text-light);
    padding: 4rem 1.5rem 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Top decorative line/wave */
.footer-wave {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent-light), var(--color-secondary), var(--color-accent-light));
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    .footer-dot {
        display: none;
    }
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0%; height: 1px;
    background: var(--color-accent-light);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-dot {
    color: #475569;
}

.footer-copyright {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #475569;
}

/* --- 12. RESPONSIVE ADJUSTMENTS & FIXES --- */
@media (max-width: 767px) {
    .product-h1 {
        font-size: 1.75rem;
    }
    .feature-item {
        padding: 0;
        background: transparent !important;
        box-shadow: none !important;
    }
    .cta-heading {
        font-size: 1.6rem;
    }
    .btn-amazon-primary {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
}