/* --- BASE --- */
:root {
    --primary: #b02762;
    --primary-light: #e0527a;
    --accent: #d4a017;
    --bg-hero: #FFF5F5;
    --bg-body: #ffffff;
    --text-dark: #2d1b22;
    --text-muted: #6e5d63;
    --shadow: 0 10px 30px rgba(176, 39, 98, 0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-hero); /* Start with hero background for seamlessness */
    color: var(--text-dark);
    line-height: 1.5;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Navbar --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.nav-content { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.cart-btn {
    position: relative;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(176, 39, 98, 0.3);
    transition: var(--transition);
}

.cart-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--accent); color: white;
    font-size: 0.7rem; padding: 2px 6px; border-radius: 10px;
    font-weight: 700; border: 2px solid white;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(45, 27, 34, 0.45) 0%, rgba(176, 39, 98, 0.2) 60%, var(--bg-hero) 100%), url('background (1).webp') no-repeat center/cover;
    z-index: -1;
    animation: heroZoom 20s infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.hero-content {
    max-width: 800px;
}

.accent-text {
    background: linear-gradient(90deg, #ff85c0, #ff69b4, #e0527a);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 768px) {
    .hero { min-height: 100vh; text-align: center; }
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.8rem, 10vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.95);
    max-width: 650px;
    margin-bottom: 40px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out 0.3s both;
    backdrop-filter: blur(5px);
    background: rgba(0,0,0,0.1);
    padding: 10px 0;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) { .hero p { margin: 0 auto 35px; } }

.cta-btn {
    display: inline-block;
    background: var(--primary); color: white;
    padding: 16px 40px; border-radius: 50px;
    text-decoration: none; font-weight: 600;
    box-shadow: 0 8px 30px rgba(176, 39, 98, 0.4);
    transition: var(--transition);
    animation: fadeInUp 1s ease-out 0.6s both;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.cta-btn:hover { 
    transform: translateY(-5px) scale(1.05); 
    background: var(--primary-light);
    box-shadow: 0 12px 40px rgba(176, 39, 98, 0.5);
}

/* --- Sticky Tabs --- */
.tabs-sticky {
    position: sticky; 
    top: 70px; 
    z-index: 999;
    background: rgba(255, 245, 245, 0.95); /* Menyamakan dengan warna katalog (pink cerah) */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 0; 
    border-bottom: 1px solid rgba(176, 39, 98, 0.08); /* Border yang lebih halus */
    transition: var(--transition);
}

@media (max-width: 768px) {
    .tabs-sticky { top: 60px; padding: 10px 0; }
}

.tabs-scroll { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 5px 2px; }
.tabs-scroll::-webkit-scrollbar { display: none; }

.tab {
    padding: 10px 24px; background: white; border: 1px solid #f0f0f0; border-radius: 50px;
    font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap;
    transition: var(--transition); position: relative;
}

.tab.active {
    background: var(--primary); color: white; border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(176, 39, 98, 0.15);
}

/* --- Catalog Grid --- */
.catalog { 
    padding: 60px 0 100px; 
    background-color: var(--bg-hero); /* Menyamakan dengan tema pink cerah */
    position: relative;
    z-index: 1;
}

.cat-group { margin-bottom: 80px; scroll-margin-top: 180px; }
.cat-title { 
    font-family: 'Playfair Display', serif; 
    font-size: 2rem; 
    margin-bottom: 35px; 
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.cat-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 10px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; } }

.card {
    background: white; border-radius: 24px; border: 1px solid #f5f5f5;
    overflow: hidden; transition: var(--transition); cursor: pointer; position: relative;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }

.img-wrap { position: relative; aspect-ratio: 1/1; background: #fafafa; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img { transform: scale(1.1); }

.card-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--accent); color: white;
    padding: 4px 10px; border-radius: 50px; font-size: 0.65rem;
    font-weight: 700; text-transform: uppercase;
}

.btn-plus {
    position: absolute; bottom: 12px; right: 12px;
    width: 44px; height: 44px; background: var(--primary);
    color: white; border-radius: 50%; border: none; font-size: 1.2rem;
    cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center; z-index: 5;
}

.card-body { padding: 15px; }
.card-name { font-size: 1rem; margin-bottom: 4px; font-weight: 600; }
.card-price { font-weight: 700; color: var(--primary); font-size: 0.95rem; }

/* --- Bottom Sheet --- */
.overlay {
    position: fixed; inset: 0; background: rgba(45, 27, 34, 0.4);
    backdrop-filter: blur(8px); z-index: 2000; display: none; opacity: 0; transition: opacity 0.3s;
}
.sheet {
    position: fixed; bottom: 0; width: 100%; background: white;
    border-radius: 32px 32px 0 0; z-index: 2001;
    transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px; max-height: 85vh; overflow-y: auto;
}
.overlay.active { display: block; opacity: 1; }
.sheet.active { transform: translateY(0); }
.handle { width: 40px; height: 4px; background: #e0e0e0; border-radius: 10px; margin: 0 auto 24px; }

.summary-item { display: flex; justify-content: space-between; margin-bottom: 12px; font-weight: 500; }

/* --- Map & Location --- */
.map-section { margin-top: 24px; border-top: 1px solid #f0f0f0; padding-top: 24px; }
#map { height: 200px; width: 100%; border-radius: 16px; margin: 15px 0; border: 1px solid #eee; z-index: 1; }
.loc-input {
    width: 100%; padding: 12px 16px; border: 1px solid #eee; border-radius: 12px;
    font-family: inherit; margin-bottom: 10px; font-size: 0.9rem;
}
.loc-btn {
    background: #f5f5f5; border: none; padding: 12px; border-radius: 12px;
    font-weight: 600; cursor: pointer; font-size: 0.85rem; width: 100%; margin-bottom: 10px;
}

/* --- Checkout Bar --- */
.floating-checkout {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 48px); max-width: 400px;
    background: var(--primary); color: white; padding: 16px 24px;
    border-radius: 50px; display: flex; justify-content: space-between;
    align-items: center; box-shadow: 0 10px 40px rgba(176, 39, 98, 0.3);
    z-index: 1500; display: none;
}
.checkout-btn {
    background: white; color: var(--primary); border: none;
    padding: 10px 20px; border-radius: 50px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; gap: 8px;
}

.bank-box {
    background: #fdf2f6; padding: 16px; border-radius: 16px; margin: 15px 0;
    border: 1px dashed var(--primary-light);
}
.bank-item { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; font-size: 0.9rem; }
.bank-item small { color: var(--text-muted); }
.copy-btn { color: var(--primary); font-weight: 700; cursor: pointer; margin-left: 8px; font-size: 0.8rem; flex-shrink: 0; }

/* Product Option Buttons */
.opt-btn {
    width: 100%; padding: 14px; border: 1px solid #eee; background: white;
    border-radius: 16px; margin-bottom: 10px; cursor: pointer; text-align: left;
    transition: var(--transition); display: flex; justify-content: space-between;
    font-family: inherit;
}
.opt-btn:hover { border-color: var(--primary); background: #fdf2f6; }

/* Micro-animations */
.fly { position: fixed; pointer-events: none; z-index: 3000; font-size: 2rem; transition: all 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.2); }

/* --- PWA Install Popup --- */
#pwa-install-popup {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 450px;
    background: white;
    padding: 20px;
    border-radius: 24px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    z-index: 3000;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), bottom 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

#pwa-install-popup.active {
    bottom: 24px;
}

.pwa-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(176,39,98,0.2);
}

.pwa-text {
    flex: 1;
}

.pwa-text strong {
    display: block;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.pwa-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
    margin: 0;
}

.pwa-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pwa-btn-install {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.pwa-btn-later {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 480px) {
    .pwa-content { flex-direction: column; text-align: center; }
    .pwa-actions { flex-direction: row; width: 100%; justify-content: center; }
}
