/* assets/css/style.css */
:root { 
    --primary: #0f766e; 
    --button-radius: 40px; 
    --product-gap: 0.8rem;
}

/* 🔥 CLASS UNTUK WARNA DINAMIS DARI DATABASE */
.bg-primary { background-color: var(--primary); }
.text-primary { color: var(--primary); }
.border-primary { border-color: var(--primary); }
.hover\:bg-primary:hover { background-color: var(--primary); filter: brightness(0.9); }
.hover\:text-primary:hover { color: var(--primary); }

/* Untuk tombol dan elemen yang sebelumnya pakai bg-teal-600 */
.bg-teal-600 { background-color: var(--primary) !important; }
.text-teal-600 { color: var(--primary) !important; }
.border-teal-600 { border-color: var(--primary) !important; }
.hover\:bg-teal-700:hover { background-color: var(--primary) !important; filter: brightness(0.9); }
.hover\:text-teal-600:hover { color: var(--primary) !important; }

.btn-primary { background-color: var(--primary); border-radius: var(--button-radius); transition: all 0.3s ease; }
.btn-primary:active { transform: scale(0.97); }
.scroll-horizontal { scroll-snap-type: x mandatory; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.scroll-horizontal::-webkit-scrollbar { height: 4px; }
.wa-float { position: fixed; bottom: 80px; right: 16px; z-index: 50; }
@media (min-width: 640px) { .wa-float { bottom: 24px; right: 24px; } }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 🔥 TOUCH TARGET UNTUK MOBILE */
button, 
a, 
[role="button"],
summary,
.clickable,
.product-card,
.blog-card,
.portfolio-item {
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
}

/* 🔥 FIX OVERFLOW PADA MOBILE */
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Animasi */
html { scroll-behavior: smooth; }
.navbar { animation: slideDown 0.6s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
.hero-slider { animation: fadeZoom 0.8s ease-out; }
@keyframes fadeZoom { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }
.kategori-section { animation: slideFromRight 0.7s ease-out; }
@keyframes slideFromRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
.produk-section { animation: slideFromLeft 0.7s ease-out; }
@keyframes slideFromLeft { from { opacity: 0; transform: translateX(-50px); } to { opacity: 1; transform: translateX(0); } }
.cara-pemesanan-section { animation: zoomIn 0.7s ease-out; }
@keyframes zoomIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.portfolio-section, .testimoni-section { animation: fadeUp 0.7s ease-out; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.cta-section { animation: gentleBounce 0.8s ease-out; }
@keyframes gentleBounce { 0% { opacity: 0; transform: scale(0.95); } 70% { opacity: 1; transform: scale(1.02); } 100% { transform: scale(1); } }
.faq-section { animation: slideFromBottom 0.7s ease-out; }
@keyframes slideFromBottom { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
.maps-section { animation: fadeIn 0.8s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.footer { animation: slideUp 0.6s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.produk-grid .product-card:nth-child(odd) { animation: slideFromLeft 0.6s ease-out; }
.produk-grid .product-card:nth-child(even) { animation: slideFromRight 0.6s ease-out; }
@keyframes slideFromRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

.product-card, .blog-card, .portfolio-item, .btn-primary { transition: all 0.3s ease; }
.product-card:hover, .blog-card:hover, .portfolio-item:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -12px rgba(0,0,0,0.15); }
.btn-primary:hover { transform: scale(1.02); filter: brightness(1.05); }

/* ========================================== */
/* NAVBAR - 1 BARIS UNTUK SEMUA UKURAN */
/* ========================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--heading-color, #1f2937);
    flex-shrink: 0;
}
.logo-img {
    height: 35px;
    width: auto;
}
.logo-text {
    font-size: 0.95rem;
}

/* Search Box - flexibel mengisi ruang */
.search-box {
    display: flex;
    align-items: center;
    background: var(--card-bg, white);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 40px;
    overflow: hidden;
    transition: all 0.2s;
    flex: 1;
    max-width: 300px;
}
.search-box:focus-within {
    border-color: var(--primary, #0f766e);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
}
.search-icon {
    background: none;
    border: none;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    color: var(--text-color, #64748b);
}
.search-input {
    flex: 1;
    border: none;
    padding: 0.5rem 0;
    background: transparent;
    outline: none;
    color: var(--text-color, #1f2937);
    font-size: 0.85rem;
}
.search-input::placeholder {
    color: #94a3b8;
}

/* Dark Mode Button */
.dark-mode-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color, #1f2937);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    flex-shrink: 0;
}
.dark-mode-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Menu Toggle (Burger) - Mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color, #1f2937);
    flex-shrink: 0;
}

/* Desktop Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-shrink: 0;
}
.nav-menu li a {
    text-decoration: none;
    color: var(--text-color, #1f2937);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 0.5rem 0;
}
.nav-menu li a:hover {
    color: var(--primary, #0f766e);
}

/* Navbar hide on scroll */
.navbar.hide {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

/* ========================================== */
/* MOBILE - TETAP 1 BARIS */
/* ========================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    /* Sembunyikan desktop menu, tampilkan burger */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg, white);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: var(--card-shadow, 0 4px 12px rgba(0,0,0,0.1));
        border-top: 1px solid var(--border-color, #e2e8f0);
    }
    
    .nav-menu.show {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color, #e2e8f0);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* Search box di mobile: tetap 1 baris, ukuran lebih kecil */
    .search-box {
        max-width: 180px;
    }
    
    .search-input {
        font-size: 0.75rem;
    }
    
    .search-input::placeholder {
        font-size: 0.7rem;
    }
}

/* ========================================== */
/* DARK MODE */
/* ========================================== */
body.dark-mode {
    --bg-color: #111111;
    --text-color: #E0E0E0;
    --card-bg: #1A1A1A;
    --border-color: #333333;
    --heading-color: #FFFFFF;
}

body.dark-mode .search-box {
    background: #1A1A1A;
    border-color: #333333;
}

body.dark-mode .search-input {
    color: #E0E0E0;
}

body.dark-mode .nav-menu {
    background: #1A1A1A;
}

body.dark-mode .nav-menu li a {
    color: #E0E0E0;
}

body.dark-mode .nav-menu li a:hover {
    color: var(--primary);
}

body.dark-mode .dark-mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}
/* ========================================== */
/* FIX NAVBAR OVERLAP - TAMBAHKAN INI */
/* ========================================== */
html {
    scroll-padding-top: 75px;
    scroll-behavior: smooth;
}

.navbar + * {
    padding-top: 75px !important;
    margin-top: -75px !important;
}

.hero-slider:first-of-type {
    padding-top: 75px !important;
    margin-top: -75px !important;
}