/* ==========================================================================
   CUSTOM CSS FOR PRODUCT LANDING PAGE (BLUE PALETTE)
   This CSS is heavily detailed to provide a premium, modern, 
   non-flat, and unique user experience without relying on JavaScript.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES & THEME SETUP
   -------------------------------------------------------------------------- */
:root {
    /* Primary Blue Palette */
    --clr-blue-50: #eff6ff;
    --clr-blue-100: #dbeafe;
    --clr-blue-200: #bfdbfe;
    --clr-blue-300: #93c5fd;
    --clr-blue-400: #60a5fa;
    --clr-blue-500: #3b82f6;
    --clr-blue-600: #2563eb;
    --clr-blue-700: #1d4ed8;
    --clr-blue-800: #1e40af;
    --clr-blue-900: #1e3a8a;
    --clr-blue-950: #172554;
    
    /* Neutrals & Accents */
    --clr-white: #ffffff;
    --clr-black: #020617;
    --clr-text-main: #1e3a8a;
    --clr-text-muted: #64748b;
    --clr-accent-orange: #ea580c; /* For Amazon 'Verified Purchase' */
    
    /* Shadows (Multi-layered for depth) */
    --shadow-soft: 0 4px 20px -2px rgba(29, 78, 216, 0.05);
    --shadow-medium: 0 10px 30px -5px rgba(29, 78, 216, 0.1), 0 4px 10px -4px rgba(29, 78, 216, 0.05);
    --shadow-heavy: 0 20px 40px -10px rgba(29, 78, 216, 0.15), 0 10px 20px -5px rgba(29, 78, 216, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.2);
    --shadow-inner-glow: inset 0 2px 4px rgba(255, 255, 255, 0.8), inset 0 -2px 10px rgba(29, 78, 216, 0.05);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--clr-blue-500), var(--clr-blue-700));
    --grad-hover: linear-gradient(135deg, var(--clr-blue-400), var(--clr-blue-600));
    --grad-background: linear-gradient(180deg, var(--clr-white) 0%, var(--clr-blue-50) 100%);
    
    /* Transitions */
    --trans-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

    /* Layout */
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;
    --border-radius-xl: 2rem;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--clr-blue-50);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--clr-blue-50);
}
::-webkit-scrollbar-thumb {
    background: var(--clr-blue-300);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--clr-blue-400);
}

/* Selection */
::selection {
    background-color: var(--clr-blue-200);
    color: var(--clr-blue-900);
}

/* --------------------------------------------------------------------------
   3. GLOBAL DECORATIONS (BACKGROUND BLOBS)
   -------------------------------------------------------------------------- */
.custom-body-bg {
    background: var(--grad-background);
    min-height: 100vh;
}

.global-background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatBlob 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--clr-blue-200);
    animation-delay: 0s;
}

.blob-2 {
    bottom: 20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--clr-blue-300);
    animation-delay: -5s;
    opacity: 0.2;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--clr-blue-100);
    animation-delay: -10s;
    animation-duration: 25s;
}

.bg-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--clr-blue-200) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.15;
}

/* --------------------------------------------------------------------------
   4. ANIMATIONS (KEYFRAMES)
   -------------------------------------------------------------------------- */
@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

@keyframes buttonShine {
    0% { left: -100%; opacity: 0; }
    20% { left: 100%; opacity: 0.6; }
    100% { left: 100%; opacity: 0; }
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------------------------------
   5. HEADER STYLES
   -------------------------------------------------------------------------- */
.glass-header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 30px rgba(29, 78, 216, 0.03);
}

.header-title-wrapper {
    position: relative;
    padding: 0.5rem 1rem;
}

.header-title-wrapper::before,
.header-title-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 1px;
    background: var(--clr-blue-200);
}
.header-title-wrapper::before { right: 100%; }
.header-title-wrapper::after { left: 100%; }

/* Mobile hiding of decorative header lines */
@media (max-width: 768px) {
    .header-title-wrapper::before,
    .header-title-wrapper::after {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   6. PRODUCT CARD & HERO SECTION
   -------------------------------------------------------------------------- */
.product-card-container {
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--clr-white);
    animation: scaleIn 0.8s var(--trans-bounce) forwards;
}

/* Glowing corner accents */
.card-glow-accent {
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--clr-blue-400);
    filter: blur(60px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}
.card-glow-accent.top-left { top: -20px; left: -20px; }
.card-glow-accent.bottom-right { bottom: -20px; right: -20px; }

/* --------------------------------------------------------------------------
   7. CSS-ONLY INTERACTIVE GALLERY LOGIC
   -------------------------------------------------------------------------- */
.gallery-wrapper {
    position: relative;
    z-index: 10;
}

.main-image-viewport {
    box-shadow: var(--shadow-inner-glow);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.gallery-slide {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    pointer-events: none;
}

.thumb-label {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 2px solid transparent;
    transition: all var(--trans-normal);
}

.thumb-label:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: var(--clr-blue-300);
}

/* --- THE MAGIC: Radio logic --- */

/* Show main image based on checked radio */
#img-trigger-1:checked ~ .main-image-viewport .slide-1,
#img-trigger-2:checked ~ .main-image-viewport .slide-2,
#img-trigger-3:checked ~ .main-image-viewport .slide-3,
#img-trigger-4:checked ~ .main-image-viewport .slide-4 {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
    z-index: 5;
}

/* Style active thumbnail based on checked radio */
#img-trigger-1:checked ~ .gallery-thumbnails .thumb-1,
#img-trigger-2:checked ~ .gallery-thumbnails .thumb-2,
#img-trigger-3:checked ~ .gallery-thumbnails .thumb-3,
#img-trigger-4:checked ~ .gallery-thumbnails .thumb-4 {
    border-color: var(--clr-blue-600);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    transform: scale(1.05);
}

/* Remove overlay on active thumbnail */
#img-trigger-1:checked ~ .gallery-thumbnails .thumb-1 .thumb-overlay,
#img-trigger-2:checked ~ .gallery-thumbnails .thumb-2 .thumb-overlay,
#img-trigger-3:checked ~ .gallery-thumbnails .thumb-3 .thumb-overlay,
#img-trigger-4:checked ~ .gallery-thumbnails .thumb-4 .thumb-overlay {
    opacity: 0;
}

/* --------------------------------------------------------------------------
   8. PRODUCT INFO (RIGHT SIDE)
   -------------------------------------------------------------------------- */
.product-info-wrapper {
    animation: slideUpFade 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.badge {
    box-shadow: var(--shadow-soft);
}
.badge-primary {
    background: var(--clr-blue-100);
    color: var(--clr-blue-800);
    border: 1px solid var(--clr-blue-200);
}
.badge-secondary {
    background: var(--clr-white);
    color: var(--clr-blue-600);
    border: 1px solid var(--clr-blue-100);
}

/* Decorative underline for title */
.title-underline {
    box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

/* Specs Table Customization */
.specs-grid {
    background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(248,250,252,1) 100%);
    position: relative;
    overflow: hidden;
}
.specs-grid::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--grad-primary);
    border-radius: 4px 0 0 4px;
}

.spec-row:hover {
    background-color: rgba(239, 246, 255, 0.5);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--trans-fast);
}

/* List Items Hover Effect */
.benefits-list li {
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: background-color var(--trans-fast), transform var(--trans-fast);
}
.benefits-list li:hover {
    background-color: var(--clr-blue-50);
    transform: translateX(5px);
}
.list-icon-wrapper {
    background: var(--clr-blue-100);
    padding: 2px;
    border-radius: 50%;
    box-shadow: var(--shadow-inner-glow);
}

/* --------------------------------------------------------------------------
   9. CTA SECTION
   -------------------------------------------------------------------------- */
.cta-section {
    position: relative;
    /* Create a deep blue background with CSS shapes */
    background: linear-gradient(135deg, var(--clr-blue-900) 0%, var(--clr-blue-800) 100%);
    box-shadow: inset 0 10px 30px rgba(0,0,0,0.1);
}

.cta-background {
    /* Skewed background for dynamic diagonal effect */
    background: linear-gradient(135deg, var(--clr-blue-800) 0%, var(--clr-blue-950) 100%);
    z-index: 0;
}

/* Pure CSS Particles for CTA */
.cta-particles {
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255,255,255,0.1) 2%, transparent 2.5%),
        radial-gradient(circle at 85% 30%, rgba(255,255,255,0.15) 2%, transparent 2.5%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.05) 3%, transparent 3.5%),
        radial-gradient(circle at 20% 90%, rgba(255,255,255,0.1) 1.5%, transparent 2%);
    background-size: 100px 100px;
    animation: floatBlob 20s infinite linear;
}

.cta-button-wrapper {
    z-index: 20;
}

/* Pulse rings behind the button */
.cta-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    background: var(--clr-blue-400);
    z-index: 1;
    opacity: 0;
}

.cta-pulse-ring.ring-1 {
    animation: pulseGlow 2s infinite;
}

.cta-pulse-ring.ring-2 {
    animation: pulseGlow 2s infinite;
    animation-delay: 1s;
}

/* Button Itself */
.cta-main-btn {
    z-index: 10;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.5), 0 8px 10px -6px rgba(37, 99, 235, 0.5);
    border: 1px solid rgba(255,255,255,0.2);
}

.cta-main-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 30px -5px rgba(37, 99, 235, 0.6), 0 10px 15px -5px rgba(37, 99, 235, 0.4);
    background: var(--grad-hover);
}

.cta-main-btn:focus-visible {
    outline: 4px solid var(--clr-blue-300);
    outline-offset: 4px;
}

/* Arrow hover animation */
.cta-main-btn:hover .cta-arrow {
    transform: translateX(5px);
    transition: transform 0.3s;
}

/* Button Shine Effect */
.cta-shine {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: buttonShine 4s infinite;
}

/* --------------------------------------------------------------------------
   10. REVIEWS SECTION
   -------------------------------------------------------------------------- */
.reviews-section {
    position: relative;
    z-index: 10;
}

/* Decorative CSS Quote Marks behind the header */
.reviews-header::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 120px;
    line-height: 1;
    font-family: serif;
    color: var(--clr-blue-100);
    z-index: -1;
    opacity: 0.5;
}

/* Individual Review Cards */
.review-card {
    transform-origin: center;
    border-left: 4px solid transparent;
}

.review-card:hover {
    border-left-color: var(--clr-blue-500);
    transform: translateX(4px);
}

/* Amazon-style Verified Purchase Badge Customization */
.review-meta span.bg-orange-50 {
    box-shadow: 0 1px 2px rgba(234, 88, 12, 0.1);
}

/* Attachments */
.review-attachment img {
    transition: transform var(--trans-slow);
}
.review-attachment .group\/img:hover img {
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
.main-footer {
    border-top: 1px solid var(--clr-blue-800);
}

.footer-links-group a {
    position: relative;
    display: inline-flex;
}
.footer-links-group a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--clr-blue-400);
    transition: width var(--trans-normal);
}
.footer-links-group a:hover::after {
    width: 100%;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE MEDIA QUERIES (Mobile First execution checks)
   -------------------------------------------------------------------------- */

/* Extra Small Devices (320px) */
@media (max-width: 374px) {
    .header-title-wrapper { font-size: 0.8rem; }
    .product-title { font-size: 1.75rem; }
    .cta-main-btn { padding: 1rem 1.5rem; font-size: 1.1rem; }
    .thumb-label { width: 3.5rem; height: 3.5rem; }
    .specs-grid .spec-row { flex-direction: column; align-items: flex-start; }
}

/* Mobile Devices (up to 767px) */
@media (max-width: 767px) {
    .product-card-container {
        padding: 1.25rem;
        border-radius: var(--border-radius-lg);
    }
    
    .gallery-wrapper {
        margin-bottom: 2rem;
    }
    
    .review-card {
        padding: 1.25rem;
    }
    
    .cta-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    
    .cta-main-btn {
        width: 100%;
    }
}

/* Tablet & Desktop Layout Enhancements (768px and up) */
@media (min-width: 768px) {
    .product-card-container {
        box-shadow: var(--shadow-heavy);
    }
    
    .gallery-thumbnails {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* Large Desktop specific tweaks */
@media (min-width: 1024px) {
    .gallery-wrapper {
        position: sticky;
        top: 6rem;
    }
    
    .gallery-thumbnails {
        justify-content: center;
        gap: 1rem;
    }
    
    .thumb-label {
        width: 5rem;
        height: 5rem;
    }
}
.main-image-viewport {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 320px;
}

@media (max-width: 480px) {
    .main-image-viewport {
        min-height: 280px;
    }
}