/**
 * ==========================================================================
 * CorneaCare Rest - Advanced Custom Stylesheet
 * * Architecture: CSS Variables -> Reset -> Utilities -> Animations -> 
 * Components -> Layout -> Media Queries
 * Pattern: HSL Yellow/Amber Palette, Glassmorphism, CSS-Only logic.
 * ==========================================================================
 */

/* --------------------------------------------------------------------------
 * 1. CSS VARIABLES (Design Tokens)
 * -------------------------------------------------------------------------- */
 :root {
    /* Color Palette: HSL Yellow & Amber Focus */
    --hue-base: 45;       /* Yellow/Amber balance */
    --sat-base: 95%;
    
    /* Yellows & Ambers */
    --c-yellow-50:  hsl(var(--hue-base), 100%, 97%);
    --c-yellow-100: hsl(var(--hue-base), 100%, 90%);
    --c-yellow-200: hsl(var(--hue-base), 100%, 80%);
    --c-yellow-300: hsl(var(--hue-base), 100%, 65%);
    --c-yellow-400: hsl(var(--hue-base), var(--sat-base), 55%);
    --c-yellow-500: hsl(var(--hue-base), var(--sat-base), 45%);
    --c-yellow-600: hsl(var(--hue-base), var(--sat-base), 35%);
    --c-amber-accent: hsl(35, 100%, 50%);
    --c-amber-dark: hsl(35, 100%, 30%);

    /* Neutrals */
    --c-white: #ffffff;
    --c-gray-50:  hsl(0, 0%, 98%);
    --c-gray-100: hsl(0, 0%, 95%);
    --c-gray-200: hsl(0, 0%, 90%);
    --c-gray-400: hsl(0, 0%, 65%);
    --c-gray-600: hsl(0, 0%, 40%);
    --c-gray-800: hsl(0, 0%, 20%);
    --c-gray-900: hsl(0, 0%, 10%);

    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing & Sizing */
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
    --border-radius-2xl: 2rem;

    /* Shadow Scale (Multi-layered for depth) */
    --shadow-soft: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-glass: 
        0 10px 25px -5px hsla(var(--hue-base), 50%, 40%, 0.1),
        0 8px 10px -6px hsla(var(--hue-base), 50%, 40%, 0.05);
    --shadow-deep: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-cta: 
        0 15px 35px -5px hsla(35, 100%, 50%, 0.4),
        0 5px 15px -2px hsla(35, 100%, 50%, 0.2);

    /* Glassmorphism Params */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-blur: blur(16px);
    
    /* Timing */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
 * 2. GLOBAL RESET & BASE STYLES
 * -------------------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-primary);
    background-color: var(--c-yellow-50);
    color: var(--c-gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --------------------------------------------------------------------------
 * 3. BACKGROUND EFFECTS (AURORA)
 * -------------------------------------------------------------------------- */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, var(--c-white) 0%, var(--c-yellow-50) 100%);
}

.aurora-blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.6;
    border-radius: 50%;
    animation: floating-blob 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--c-yellow-200) 0%, transparent 70%);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--c-yellow-300) 0%, transparent 70%);
    animation-delay: -5s;
    opacity: 0.4;
}

.blob-3 {
    top: 40%;
    left: 30%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, hsla(45, 100%, 85%, 0.8) 0%, transparent 70%);
    animation-delay: -10s;
    animation-duration: 25s;
}

/* --------------------------------------------------------------------------
 * 4. GLASSMORPHISM UTILITIES
 * -------------------------------------------------------------------------- */
.glass-effect {
    background-color: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.glass-panel {
    background: linear-gradient(145deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-glass);
}

.glass-badge {
    background: linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(251, 191, 36, 0.3); /* Amber border */
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* --------------------------------------------------------------------------
 * 5. PRODUCT GALLERY (CSS-ONLY LOGIC)
 * -------------------------------------------------------------------------- */
.gallery-system {
    position: relative;
    width: 100%;
}

.main-stage-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stage-image {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    transition: opacity var(--transition-slow), 
                transform var(--transition-slow),
                visibility var(--transition-slow);
}

/* Logic: Mapping Inputs to Images */
#thumb-1:checked ~ .main-stage-container #stage-img-1,
#thumb-2:checked ~ .main-stage-container #stage-img-2,
#thumb-3:checked ~ .main-stage-container #stage-img-3,
#thumb-4:checked ~ .main-stage-container #stage-img-4 {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 100;
}

/* Logic: Thumbnail Active States */
.thumbnail-label {
    transition: all var(--transition-base);
}

#thumb-1:checked ~ .thumbnails-nav label[for="thumb-1"],
#thumb-2:checked ~ .thumbnails-nav label[for="thumb-2"],
#thumb-3:checked ~ .thumbnails-nav label[for="thumb-3"],
#thumb-4:checked ~ .thumbnails-nav label[for="thumb-4"] {
    border-color: var(--c-amber-accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
}

#thumb-1:checked ~ .thumbnails-nav label[for="thumb-1"] .thumb-overlay,
#thumb-2:checked ~ .thumbnails-nav label[for="thumb-2"] .thumb-overlay,
#thumb-3:checked ~ .thumbnails-nav label[for="thumb-3"] .thumb-overlay,
#thumb-4:checked ~ .thumbnails-nav label[for="thumb-4"] .thumb-overlay {
    opacity: 0;
}

/* Thumbnail Hover states */
.thumbnail-label:hover {
    border-color: var(--c-yellow-400);
    transform: translateY(-1px);
}

.thumbnail-label:hover .thumb-overlay {
    opacity: 1;
    background-color: rgba(255,255,255,0.2);
}

/* Custom Scrollbar for Thumbnails on Mobile */
.thumbnails-nav::-webkit-scrollbar {
    height: 6px;
}
.thumbnails-nav::-webkit-scrollbar-track {
    background: var(--c-yellow-50);
    border-radius: 4px;
}
.thumbnails-nav::-webkit-scrollbar-thumb {
    background: var(--c-yellow-300);
    border-radius: 4px;
}
.thumbnails-nav::-webkit-scrollbar-thumb:hover {
    background: var(--c-amber-accent);
}

/* --------------------------------------------------------------------------
 * 6. PRODUCT INFORMATION TYPOGRAPHY & BLOCKS
 * -------------------------------------------------------------------------- */
.feature-block {
    position: relative;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--c-gray-200);
}

.feature-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Decorative line connecting icons (visible on larger screens) */
.description-blocks {
    position: relative;
}

@media (min-width: 768px) {
    .description-blocks::before {
        content: '';
        position: absolute;
        top: 20px;
        bottom: 40px;
        left: 20px;
        width: 2px;
        background: linear-gradient(to bottom, var(--c-yellow-200), transparent);
        z-index: 0;
    }
    .feature-block {
        position: relative;
        z-index: 1;
    }
}

.icon-wrapper {
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.15);
}

/* --------------------------------------------------------------------------
 * 7. CALL TO ACTION (CTA) SECTION
 * -------------------------------------------------------------------------- */
.cta-section {
    background-color: var(--c-white);
}

.mega-cta-button {
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    border: 1px solid var(--c-amber-accent);
}

.mega-cta-button::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.4);
    pointer-events: none;
    z-index: 5;
}

.mega-cta-button:hover {
    box-shadow: 0 20px 40px -5px hsla(35, 100%, 50%, 0.5),
                0 10px 20px -5px hsla(35, 100%, 50%, 0.3);
    background-image: linear-gradient(to bottom, var(--c-yellow-200), var(--c-amber-accent));
}

.mega-cta-button:active {
    box-shadow: 0 5px 10px -2px hsla(35, 100%, 50%, 0.4);
}

/* Shine Animation trigger on hover */
.mega-cta-button:hover .shine-effect {
    animation: shine 1.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
 * 8. REVIEWS SECTION
 * -------------------------------------------------------------------------- */
.reviews-section {
    padding-top: 2rem;
}

.review-card {
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0.8) 100%);
    transform: translateY(0);
}

.review-card:hover {
    transform: translateY(-4px);
    border-color: var(--c-yellow-200);
}

.review-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--c-yellow-100) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.review-card:hover::before {
    opacity: 1;
}

.verified-badge {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* --------------------------------------------------------------------------
 * 9. FOOTER
 * -------------------------------------------------------------------------- */
.policy-link:hover span {
    width: 100%;
}

/* --------------------------------------------------------------------------
 * 10. ANIMATIONS (KEYFRAMES)
 * -------------------------------------------------------------------------- */
@keyframes floating-blob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(3%, 5%) scale(1.05); }
    66% { transform: translate(-2%, 2%) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1) translate(-50%, -50%); }
    50% { opacity: 0.6; transform: scale(1.1) translate(-45%, -45%); }
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes bounce-x {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}

.animate-bounce-x {
    animation: bounce-x 2s infinite;
}

/* --------------------------------------------------------------------------
 * 11. MEDIA QUERIES (Responsive Design)
 * -------------------------------------------------------------------------- */

/* Extremely small devices (320px) */
@media (max-width: 359px) {
    .product-card {
        padding: 1rem;
        border-radius: 1rem;
    }
    
    .thumbnail-label {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    .mega-cta-button {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        font-size: 1.1rem;
    }
    
    .review-card {
        padding: 1rem;
    }
}

/* Mobile Devices (up to 767px) */
@media (max-width: 767px) {
    .gallery-system {
        margin-bottom: 1rem;
    }
    
    .feature-block {
        gap: 1rem;
    }
    
    .icon-wrapper {
        width: 2rem;
        height: 2rem;
    }
    
    .icon-wrapper svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .footer-links {
        align-items: center;
        text-align: center;
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-card {
        padding: 2rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    .gallery-system {
        position: sticky;
        top: 6rem; /* Allows gallery to stick while reading long description */
    }
    
    .product-showcase {
        perspective: 1000px;
    }
}

/* High Resolution / Large Desktop */
@media (min-width: 1280px) {
    .main-wrapper {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
    
    h1 {
        font-size: 3.5rem !important;
        line-height: 1.1 !important;
    }
}
.main-stage-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 320px;
}

@media (max-width: 480px) {
    .main-stage-container {
        min-height: 280px;
    }
}