/* ==========================================================================
   CSS VARIABLES & THEME SETUP
   Palet merah ketat sesuai permintaan dengan ekstensi gradasi dan bayangan
   ========================================================================== */
:root {
    /* Color Palette - Monochromatic Red Concept */
    --red-50: #fef2f2;
    --red-100: #fee2e2;
    --red-200: #fecaca;
    --red-300: #fca5a5;
    --red-400: #f87171;
    --red-500: #ef4444; /* Base / Primary */
    --red-600: #dc2626; /* Hover / Strong */
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #7f1d1d;
    
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Semantic Colors based on Palette */
    --bg-main: var(--red-50);
    --bg-card: #ffffff;
    --text-main: var(--gray-900);
    --text-muted: var(--gray-500);
    --accent: var(--red-600);
    
    /* Complex Shadows */
    --shadow-soft: 0 4px 20px rgba(220, 38, 38, 0.05);
    --shadow-deep: 0 10px 30px rgba(220, 38, 38, 0.1), 0 1px 3px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 40px rgba(220, 38, 38, 0.15), 0 5px 10px rgba(220, 38, 38, 0.05);
    --shadow-inner-glow: inset 0 0 0 1px rgba(255,255,255,0.5), inset 0 2px 10px rgba(255,255,255,0.8);
    --shadow-cta: 0 15px 30px rgba(185, 28, 28, 0.3), 0 5px 15px rgba(185, 28, 28, 0.2);
    
    /* Border Radius */
    --br-sm: 8px;
    --br-md: 12px;
    --br-lg: 16px;
    --br-xl: 24px;
    --br-2xl: 32px;
    
    /* Transitions */
    --trans-fast: 0.15s ease;
    --trans-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
html, body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: var(--red-200);
    color: var(--red-900);
}

/* ==========================================================================
   GLOBAL DECORATIONS & BACKGROUNDS
   ========================================================================== */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

.bg-shape-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--red-200) 0%, transparent 70%);
}

.bg-shape-2 {
    top: 40%;
    right: -15%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--red-100) 0%, transparent 70%);
    animation-delay: -5s;
    animation-direction: reverse;
}

.bg-shape-3 {
    bottom: -20%;
    left: 20%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--red-100) 0%, transparent 60%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-border-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-200), transparent);
}

.logo-icon {
    color: var(--red-600);
    filter: drop-shadow(0 2px 4px rgba(220,38,38,0.3));
}

/* ==========================================================================
   PRODUCT HERO SECTION & CARD
   ========================================================================== */
.product-hero-section {
    position: relative;
    z-index: 10;
}

.product-card-wrapper {
    background-color: var(--bg-card);
    border-radius: var(--br-2xl);
    box-shadow: var(--shadow-deep);
    border: 1px solid rgba(255, 255, 255, 0.6);
    transform-style: preserve-3d;
    transition: box-shadow var(--trans-normal), transform var(--trans-normal);
}

.product-card-wrapper:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Decorative Card Elements */
.card-glow-effect {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: var(--shadow-inner-glow);
    pointer-events: none;
    z-index: 20;
}

.card-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    pointer-events: none;
    z-index: 1;
}

.card-corner-tl {
    top: 0;
    left: 0;
    background: radial-gradient(circle at top left, var(--red-50) 0%, transparent 70%);
    border-top-left-radius: var(--br-2xl);
}

.card-corner-br {
    bottom: 0;
    right: 0;
    background: radial-gradient(circle at bottom right, var(--red-50) 0%, transparent 70%);
    border-bottom-right-radius: var(--br-2xl);
}

.product-card-inner {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   CSS-ONLY GALLERY (NO JAVASCRIPT)
   ========================================================================== */
.main-image-container {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05), inset 0 2px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--gray-100);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.05) 100%);
    pointer-events: none;
    z-index: 2;
}

.gallery-slide {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95) translateY(10px);
    transition: opacity 0.4s ease-in-out, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.4s;
    z-index: 1;
}

/* Base Thumbnail Styling */
.thumbnail-item {
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumbnail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 
   THE CSS-ONLY MAGIC LOGIC 
   Using sibling combinators (~) to target slides based on checked radio inputs.
*/

/* Logic for Slide 1 */
#img-1:checked ~ .main-image-container .slide-1 {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
}
#img-1:checked ~ .gallery-thumbnails label[for="img-1"] .thumb-highlight {
    border-color: var(--red-500);
    background: rgba(220, 38, 38, 0.05);
}

/* Logic for Slide 2 */
#img-2:checked ~ .main-image-container .slide-2 {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
}
#img-2:checked ~ .gallery-thumbnails label[for="img-2"] .thumb-highlight {
    border-color: var(--red-500);
    background: rgba(220, 38, 38, 0.05);
}

/* Logic for Slide 3 */
#img-3:checked ~ .main-image-container .slide-3 {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
}
#img-3:checked ~ .gallery-thumbnails label[for="img-3"] .thumb-highlight {
    border-color: var(--red-500);
    background: rgba(220, 38, 38, 0.05);
}

/* Logic for Slide 4 */
#img-4:checked ~ .main-image-container .slide-4 {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    z-index: 10;
}
#img-4:checked ~ .gallery-thumbnails label[for="img-4"] .thumb-highlight {
    border-color: var(--red-500);
    background: rgba(220, 38, 38, 0.05);
}

/* ==========================================================================
   PRODUCT DESCRIPTION & TYPOGRAPHY
   ========================================================================== */
.title-wrapper {
    position: relative;
}

.title-underline {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--red-500), var(--red-300));
    border-radius: 2px;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--red-500);
    transform: scaleY(0);
    transition: transform var(--trans-normal);
    transform-origin: bottom;
    border-top-left-radius: var(--br-lg);
    border-bottom-left-radius: var(--br-lg);
}

.feature-item:hover::before {
    transform: scaleY(1);
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.cta-section {
    position: relative;
}

.cta-background {
    background: linear-gradient(135deg, var(--red-900) 0%, var(--red-700) 100%);
}

.cta-gradient-overlay {
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.cta-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vw;
    background-image: 
        radial-gradient(circle, transparent 40%, rgba(255,255,255,0.03) 41%, transparent 42%),
        radial-gradient(circle, transparent 50%, rgba(255,255,255,0.03) 51%, transparent 52%),
        radial-gradient(circle, transparent 60%, rgba(255,255,255,0.03) 61%, transparent 62%);
    pointer-events: none;
}

.text-shadow-sm {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* CTA Button Animations & Effects */
.cta-main-btn {
    box-shadow: var(--shadow-cta);
}

.cta-pulse {
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { opacity: 0.3; }
    100% { transform: scale(1.3); opacity: 0; }
}

.cta-main-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 40px rgba(185, 28, 28, 0.4), 0 10px 20px rgba(185, 28, 28, 0.3);
}

.cta-main-btn:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px rgba(185, 28, 28, 0.3);
}

.cta-main-btn:hover .btn-shine {
    animation: shine 1.5s ease;
}

@keyframes shine {
    100% { left: 200%; }
}

/* ==========================================================================
   REVIEWS SECTION (Beautified Amazon Style)
   ========================================================================== */
.reviews-header h2 {
    position: relative;
    display: inline-block;
}

.review-card {
    transition: transform var(--trans-normal), box-shadow var(--trans-normal);
}

.review-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.review-accent-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--red-100);
    transition: background var(--trans-normal);
}

.review-card:hover .review-accent-line {
    background: linear-gradient(to bottom, var(--red-400), var(--red-600));
}

.review-stars span {
    text-shadow: 0 1px 2px rgba(220,38,38,0.2);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-gradient-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--red-500), transparent);
    opacity: 0.3;
}

.footer-link {
    color: var(--gray-500);
    font-weight: 500;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--red-500);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.footer-link:hover {
    color: var(--red-600);
    transform: translateY(-1px);
}

.footer-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVENESS & ADAPTABILITY)
   ========================================================================== */

/* Ultra Small Devices (320px) */
@media (max-width: 359px) {
    .product-card-inner {
        padding: 1.25rem;
    }
    
    .gallery-thumbnails {
        gap: 0.5rem;
    }
    
    .cta-main-btn {
        font-size: 1.1rem;
        padding: 1rem 1.5rem;
    }
    
    .review-card {
        padding: 1.25rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .review-meta {
        justify-content: center;
    }
}

/* Mobile Devices (360px - 639px) */
@media (max-width: 639px) {
    .product-hero-section {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .feature-icon {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
    
    .title-wrapper h1 {
        font-size: 1.75rem;
        text-align: center;
    }
    
    .title-underline {
        margin: 0 auto;
    }
    
    .title-wrapper .flex {
        justify-content: center;
    }
    
    .review-card {
        flex-direction: column;
    }
    
    .review-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Tablet Devices (640px - 1023px) */
@media (min-width: 640px) and (max-width: 1023px) {
    .product-card-inner {
        flex-direction: column;
    }
    
    .product-gallery-section {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .product-info-section {
        width: 100%;
    }
}

/* Desktop Devices (1024px and up) */
@media (min-width: 1024px) {
    .product-card-wrapper {
        margin-top: 2rem;
    }
    
    .product-info-section {
        padding-left: 1rem;
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .product-card-inner {
        padding: 4rem;
        gap: 5rem;
    }
    
    .title-wrapper h1 {
        font-size: 2.5rem;
    }
}
.main-image-container  {
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 320px;
}

@media (max-width: 480px) {
    .main-image-container {
        min-height: 280px;
    }
}