/* ==========================================================================
   CSS VARIABLES & PALETTE SETUP (Strictly Green/Emerald Palette)
   ========================================================================== */
:root {
    /* Core Green Palette */
    --clr-green-50: #f0fdf4;
    --clr-green-100: #dcfce7;
    --clr-green-200: #bbf7d0;
    --clr-green-300: #86efac;
    --clr-green-400: #4ade80;
    --clr-green-500: #22c55e;
    --clr-green-600: #16a34a;
    --clr-green-700: #15803d;
    --clr-green-800: #166534;
    --clr-green-900: #14532d;
    --clr-green-950: #052e16;

    /* Neutrals strictly matching the green tint */
    --clr-white: #ffffff;
    --clr-gray-50: #f8fafc;
    --clr-gray-100: #f1f5f9;
    --clr-gray-text: #475569;
    --clr-gray-muted: #64748b;

    /* Shadows & Glows */
    --shadow-sm: 0 1px 2px 0 rgba(22, 101, 52, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(22, 101, 52, 0.1), 0 2px 4px -1px rgba(22, 101, 52, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(22, 101, 52, 0.1), 0 4px 6px -2px rgba(22, 101, 52, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(22, 101, 52, 0.1), 0 10px 10px -5px rgba(22, 101, 52, 0.04);
    --shadow-glow: 0 0 20px rgba(74, 222, 128, 0.4);
    --shadow-btn: 0 10px 25px -5px rgba(21, 128, 61, 0.5);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--clr-green-600) 0%, var(--clr-green-800) 100%);
    --grad-light: linear-gradient(180deg, var(--clr-white) 0%, var(--clr-green-50) 100%);
    --grad-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);

    /* Transitions & Borders */
    --trans-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.site-body {
    font-family: 'Inter', sans-serif;
    background-color: var(--clr-green-50);
    color: var(--clr-green-950);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

::selection {
    background-color: var(--clr-green-300);
    color: var(--clr-green-950);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--clr-green-50);
}
::-webkit-scrollbar-thumb {
    background: var(--clr-green-300);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--clr-green-500);
}

/* ==========================================================================
   DECORATIVE BACKGROUND BLOBS (CSS Shapes)
   ========================================================================== */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite ease-in-out alternate;
}
.bg-shape-1 {
    width: 600px;
    height: 600px;
    background: var(--clr-green-200);
    top: -100px;
    left: -200px;
}
.bg-shape-2 {
    width: 500px;
    height: 500px;
    background: var(--clr-green-100);
    top: 40%;
    right: -150px;
    animation-delay: -5s;
}
.bg-shape-3 {
    width: 700px;
    height: 700px;
    background: var(--clr-green-200);
    bottom: -200px;
    left: 20%;
    animation-duration: 15s;
}

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.05); }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
    padding: 1rem 1.5rem;
    transition: var(--trans-smooth);
}

.header-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--clr-green-100);
    color: var(--clr-green-800);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    border: 1px solid var(--clr-green-200);
}

.badge-icon {
    width: 14px;
    height: 14px;
}

.header-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--clr-green-900);
    text-align: center;
    letter-spacing: -0.02em;
}

.header-decor-line {
    width: 60px;
    height: 3px;
    background: var(--grad-primary);
    border-radius: var(--radius-full);
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .site-header {
        padding: 1.25rem 2rem;
    }
    .header-title {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   MAIN LAYOUT & PRODUCT CARD
   ========================================================================== */
.main-content {
    flex-grow: 1;
    padding: 2rem 1rem 4rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.product-hero {
    width: 100%;
    margin-top: 1rem;
}

.product-card {
    background: var(--grad-glass);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: var(--radius-xl);
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--clr-green-300), var(--clr-green-100)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

@media (min-width: 1024px) {
    .product-card {
        grid-template-columns: 1fr 1fr;
        padding: 3rem;
        gap: 4rem;
        align-items: flex-start;
    }
}

/* ==========================================================================
   CSS-ONLY GALLERY (The Magic)
   ========================================================================== */
.gallery-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Hide Radio Buttons Visually but keep accessible */
.gallery-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

/* Main Image Viewport */
.gallery-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--clr-white);
    box-shadow: inset 0 0 20px rgba(22, 101, 52, 0.05);
    border: 1px solid var(--clr-green-100);
}

@media (min-width: 768px) {
    .gallery-viewport {
        aspect-ratio: 1/1; /* Square on larger screens */
    }
}

.gallery-viewport-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-item {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff; /* Ensure no transparent bleed */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* or contain depending on raw images, cover is safer for layouts */
    display: block;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(22, 101, 52, 0.03) 100%);
    pointer-events: none;
}

.gallery-badge-top {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--clr-green-700);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--clr-green-200);
    z-index: 10;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

@media (min-width: 480px) {
    .gallery-thumbnails {
        gap: 1rem;
    }
}

.thumb-label {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--clr-white);
    border: 2px solid transparent;
    transition: var(--trans-smooth);
}

.thumb-label img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.thumb-label:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.thumb-label:hover img {
    transform: scale(1.05);
}

.thumb-focus-ring {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 3px solid var(--clr-green-500);
    opacity: 0;
    transform: scale(0.9);
    transition: var(--trans-smooth);
    pointer-events: none;
}

/* Gallery Logic (The Check States) */
#gallery-img-1:checked ~ .gallery-viewport .item-1,
#gallery-img-2:checked ~ .gallery-viewport .item-2,
#gallery-img-3:checked ~ .gallery-viewport .item-3,
#gallery-img-4:checked ~ .gallery-viewport .item-4 {
    opacity: 1;
    transform: scale(1);
    z-index: 5;
}

#gallery-img-1:checked ~ .gallery-thumbnails .thumb-1,
#gallery-img-2:checked ~ .gallery-thumbnails .thumb-2,
#gallery-img-3:checked ~ .gallery-thumbnails .thumb-3,
#gallery-img-4:checked ~ .gallery-thumbnails .thumb-4 {
    border-color: var(--clr-green-500);
    box-shadow: var(--shadow-md), 0 0 0 4px var(--clr-green-100);
}

#gallery-img-1:checked ~ .gallery-thumbnails .thumb-1 .thumb-focus-ring,
#gallery-img-2:checked ~ .gallery-thumbnails .thumb-2 .thumb-focus-ring,
#gallery-img-3:checked ~ .gallery-thumbnails .thumb-3 .thumb-focus-ring,
#gallery-img-4:checked ~ .gallery-thumbnails .thumb-4 .thumb-focus-ring {
    opacity: 1;
    transform: scale(1);
}

/* Keyboard Accessibility Focus */
#gallery-img-1:focus-visible ~ .gallery-thumbnails .thumb-1,
#gallery-img-2:focus-visible ~ .gallery-thumbnails .thumb-2,
#gallery-img-3:focus-visible ~ .gallery-thumbnails .thumb-3,
#gallery-img-4:focus-visible ~ .gallery-thumbnails .thumb-4 {
    outline: 2px dashed var(--clr-green-800);
    outline-offset: 4px;
}

/* ==========================================================================
   PRODUCT INFO RIGHT COLUMN
   ========================================================================== */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-info-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-main-title {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--clr-green-950);
    letter-spacing: -0.02em;
}

@media (min-width: 1024px) {
    .product-main-title {
        font-size: 2.25rem;
    }
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--clr-white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--clr-green-200);
    width: max-content;
    box-shadow: var(--shadow-sm);
}

.stars-visual {
    display: flex;
    color: #eab308; /* Star yellow */
    width: 90px;
}

.rating-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--clr-green-800);
}

/* Description Formatting */
.product-description-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.desc-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clr-green-900);
    position: relative;
    padding-bottom: 0.5rem;
}

.desc-section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 40px; height: 3px;
    background: var(--clr-green-500);
    border-radius: var(--radius-full);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.6);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--clr-green-100);
    transition: var(--trans-smooth);
}

.feature-card:hover {
    background: var(--clr-white);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    border-color: var(--clr-green-200);
}

.feature-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--clr-green-600);
    background: var(--clr-green-100);
    border-radius: 50%;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.feature-text strong {
    font-size: 0.95rem;
    color: var(--clr-green-900);
    font-weight: 700;
    line-height: 1.3;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--clr-green-800);
    line-height: 1.6;
}

/* Highlighted Safe Keyword Card */
.highlight-card {
    background: var(--grad-light);
    border-left: 4px solid var(--clr-green-500);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.highlight-card .glow-icon {
    background: var(--clr-green-500);
    color: var(--clr-white);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.cta-section {
    width: 100%;
    padding: 0 1rem;
}

.cta-card {
    background: var(--grad-primary);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    color: var(--clr-white);
}

/* Abstract circles inside CTA */
.cta-decor-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    z-index: 1;
}
.circle-1 {
    width: 200px; height: 200px;
    top: -50px; left: -50px;
}
.circle-2 {
    width: 300px; height: 300px;
    bottom: -100px; right: -50px;
}

.cta-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.cta-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 400px;
}

@media (min-width: 768px) {
    .cta-card { padding: 4rem 3rem; }
    .cta-title { font-size: 2.5rem; }
    .cta-subtitle { font-size: 1.125rem; }
}

/* The Button */
.cta-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--clr-white);
    color: var(--clr-green-800);
    padding: 1.125rem 2.5rem;
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-btn);
    overflow: hidden;
    transition: var(--trans-bounce);
    border: 2px solid transparent;
}

.cta-button:hover, .cta-button:focus-visible {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.3);
    color: var(--clr-green-900);
}

.cta-button:active {
    transform: translateY(1px);
}

.btn-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.cta-button:hover .btn-icon {
    transform: translateX(4px);
}

/* Shimmer Animation */
.btn-shimmer {
    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.8) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: shimmer 3s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* ==========================================================================
   REVIEWS SECTION (Amazon-Style Elevated)
   ========================================================================== */
.reviews-section {
    width: 100%;
    padding: 0 1rem;
}

.reviews-header {
    text-align: center;
    margin-bottom: 3rem;
}

.reviews-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--clr-green-950);
}

.reviews-divider {
    width: 80px;
    height: 4px;
    background: var(--grad-primary);
    margin: 1rem auto 0;
    border-radius: var(--radius-full);
}

.reviews-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.amazon-review-card {
    background: var(--clr-white);
    border: 1px solid var(--clr-green-100);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--trans-smooth);
    position: relative;
}

.amazon-review-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 0;
    background: var(--clr-green-500);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transition: height 0.3s ease;
}

.amazon-review-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--clr-green-200);
    transform: translateY(-2px);
}

.amazon-review-card:hover::before {
    height: 100%;
}

.review-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .review-layout {
        flex-direction: row;
        gap: 1.5rem;
    }
}

.review-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    position: relative;
}

.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: var(--clr-green-100);
    position: relative;
    z-index: 2;
}

.avatar-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-green-400), var(--clr-green-200));
    z-index: 1;
}

.review-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.review-author {
    font-weight: 700;
    color: var(--clr-green-950);
    font-size: 1rem;
}

.review-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.review-stars {
    color: #eab308;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.review-headline {
    font-weight: 700;
    color: var(--clr-green-900);
    font-size: 0.95rem;
}

.review-date-loc {
    font-size: 0.8rem;
    color: var(--clr-gray-muted);
}

.review-attributes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-green-700);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.attr-item {
    background: var(--clr-green-50);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--clr-green-100);
}

.attr-separator {
    color: var(--clr-green-300);
}

.review-body {
    font-size: 0.95rem;
    color: var(--clr-green-900);
    line-height: 1.6;
}

/* Attached Photo in Review */
.review-attachment {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--clr-green-200);
}

.attachment-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--clr-green-700);
    margin-bottom: 0.5rem;
}

.attachment-img-wrap {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--clr-green-100);
    cursor: zoom-in;
    transition: var(--trans-smooth);
}

.attachment-img-wrap:hover {
    border-color: var(--clr-green-400);
    transform: scale(1.05);
}

.attachment-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    position: relative;
    background: var(--clr-white);
    padding: 3rem 1.5rem;
    margin-top: auto;
    border-top: 1px solid var(--clr-green-100);
}

.footer-bg-decor {
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--grad-primary);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

@media (min-width: 768px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-brand {
    font-size: 1rem;
    font-weight: 800;
    color: var(--clr-green-900);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .footer-links {
        flex-direction: row;
        gap: 2rem;
    }
}

.footer-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--clr-green-700);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.3s ease;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--clr-green-500);
    transition: width 0.3s ease;
}

.footer-link:hover, .footer-link:focus-visible {
    color: var(--clr-green-900);
}

.footer-link:hover::after, .footer-link:focus-visible::after {
    width: 100%;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--clr-gray-muted);
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .footer-copyright {
        width: auto;
        margin-top: 0;
    }
}