/* 
   DESIGN SYSTEM 
   Concept: Minimalist Modern
   Warna Utama: Putih Bersih (#FFFFFF), Abu-abu Muda (#F5F5F7), Krem Pucat (#FAF9F6)
   Warna Aksen: Hitam (#1A1A1A), Earth Tone (#8E7D6A)
   Tipografi: 
     - Playfair Display (Serif) - Headers
     - Montserrat (Sans Serif) - Body, Nav
*/

:root {
    --primary-color: #1A1A1A;
    --accent-color: #8E7D6A;
    --bg-white: #FFFFFF;
    --bg-light: #F5F5F7;
    --bg-cream: #FAF9F6;
    --text-muted: #666666;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --container-width: 1200px;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--bg-white);
    -webkit-font-smoothing: antialiased;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- REUSABLE COMPONENTS --- */
.section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.bg-light {
    background-color: var(--bg-light);
}

.mt-4 { margin-top: 2rem; }
.text-center { text-align: center; }

/* --- HEADER --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.header.scrolled {
    padding: 0.5rem 0;
    height: 70px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.container-nav {
    display: flex;
    justify-content: space-between; /* Keeps toggle left and nav right */
    align-items: center;
    height: 80px;
    position: relative; /* Anchor for absolute logo */
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Logo - Desktop Default (Left Aligned) */
.container-nav .logo {
    position: static;
    transform: none;
}

.logo span {
    color: var(--accent-color);
}

/* --- MOBILE HEADER & NAV --- */
@media (max-width: 768px) {
    .container-nav .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
    }
}

.logo span {
    color: var(--accent-color);
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link:hover {
    color: var(--accent-color);
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-icon {
    font-size: 1.2rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--accent-color);
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle, .nav-close {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--bg-cream);
    overflow: hidden;
}

.hero-content {
    flex: 1;
    padding: 0 5% 0 10%;
    animation: fadeInSlide 1s ease-out;
}

.hero-subtitle {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 4px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5.5rem);
    line-height: 1;
    margin-bottom: 2rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 450px;
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-image {
    flex: 1;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- PRODUCT CARD --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem;
}

.product-card {
    position: relative;
    transition: var(--transition);
}

.product-img-wrapper {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    background-color: var(--bg-light);
    margin-bottom: 1.5rem;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-card:hover .product-video {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--bg-white);
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 10;
}

.product-info {
    text-align: center;
}

.product-category {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-name {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-weight: 500;
    color: var(--primary-color);
}

/* --- FLASH SALE --- */
.flash-sale-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background-image: url('Images/FlashSale.webp');
    background-size: cover;
    background-position: center;
    position: relative;
}

.hotspot {
    position: absolute;
    cursor: pointer;
}

.hotspot-dot {
    width: 30px;
    height: 30px;
    background-color: rgba(255,255,255,0.4);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.8);
    transition: var(--transition);
}

.hotspot-dot::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
}

.hotspot:hover .hotspot-dot {
    transform: scale(1.2);
    background-color: rgba(255,255,255,0.8);
}

.hotspot-tooltip {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--bg-white);
    padding: 1rem 1.5rem;
    width: 200px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.hotspot:hover .hotspot-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hotspot-tooltip h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-family: var(--font-serif);
}

.hotspot-tooltip p {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 600;
}

/* --- REVIEWS --- */
.reviews-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    margin: 0 auto;
}

.review-card {
    background-color: var(--bg-white);
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    /* Reset carousel transforms for desktop */
    opacity: 1;
    transform: none;
    position: relative;
    pointer-events: auto;
}

/* Styles that apply to both but might need overrides if carousel overrides them */
.review-user {
    display: flex;
    align-items: center; 
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.review-content {
    font-size: 0.95rem; /* Adjusted for desktop readability */
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.review-img {
    width: 100%;
    height: auto; /* Allow natural height on desktop or fixed if preferred */
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-top: 1rem;
}

/* User Info specific adjustments */
.user-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
}

.user-info div {
    font-size: 0.7rem;
    color: #FFD700;
}

/* --- MOBILE CAROUSEL (Single Story) --- */
@media (max-width: 768px) {
    .reviews-masonry {
        display: block;
        position: relative;
        max-width: 600px;
        height: 600px; /* Fixed height for mobile carousel */
        overflow: hidden;
    }

    .review-card {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 2rem;
        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        
        /* Carousel Animation Base States */
        opacity: 0;
        pointer-events: none;
        transform: scale(0.95);
        transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    }

    .review-card.active {
        opacity: 1;
        pointer-events: auto;
        transform: scale(1) translateX(0);
        z-index: 2;
    }

    .review-card.exit-left {
        opacity: 0;
        transform: translateX(-50px) scale(0.95);
    }

    .review-card.enter-center {
        opacity: 0;
        transform: scale(0.95);
    }

    .review-user {
        flex-direction: column;
        gap: 0.5rem;
    }

    .review-content {
        font-size: 1.1rem; /* Larger text for mobile focus */
        margin-bottom: 2rem;
    }

    .review-img {
        height: 300px; /* Fixed height for mobile constraint */
    }
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 5rem 0 2rem;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    color: #AAA;
    font-weight: 300;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    font-size: 1.2rem;
    color: #AAA;
}

.social-links a:hover {
    color: white;
}

.footer-links h4, .footer-newsletter h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links ul li a {
    color: #AAA;
    font-size: 0.9rem;
    font-weight: 300;
}

.footer-links ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-newsletter p {
    color: #AAA;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
}

.newsletter-form input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding: 0.8rem 0;
    color: white;
    outline: none;
}

.newsletter-form button {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0 1rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    cursor: pointer;
}

.footer-bottom {
    padding-top: 2rem;
    color: #666;
    font-size: 0.8rem;
    text-align: center;
}

/* --- ANIMATIONS --- */
.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.category-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.category-info {
    padding: 1.5rem 0;
    text-align: left;
}

.category-info h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.link-arrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.link-arrow:hover i {
    transform: translateX(5px);
}

.categories-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 992px) {

}

@media (max-width: 768px) {
    .container-nav {
        height: 70px;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-white);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 2000;
        transition: 0.5s ease-in-out;
    }

    .nav.open {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-close {
        display: block;
        position: absolute;
        top: 2rem;
        right: 2rem;
    }

    .hero {
        flex-direction: column-reverse;
        height: auto;
    }

    .hero-content {
        padding: 8rem 2rem 4rem;
        text-align: center;
    }

    .hero-description {
        margin: 0 auto 3rem;
    }

    .hero-image {
        width: 100%;
        height: 50vh;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }



    /* Mobile Carousels */
    .product-grid,
    .categories-grid,
    .reviews-masonry {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding-bottom: 2rem; /* Space for scrollbar or ease of use */
        -webkit-overflow-scrolling: touch;
        
        /* Hide scrollbar */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;  /* IE 10+ */
    }

    .product-grid::-webkit-scrollbar,
    .categories-grid::-webkit-scrollbar,
    .reviews-masonry::-webkit-scrollbar { 
        display: none; /* Chrome/Safari/Webkit */
    }

    .product-card,
    .category-card,
    .review-card {
        min-width: 80%; /* Show most of one card, hint at next */
        scroll-snap-align: center;
    }
}
