:root {
    --md-primary: #006874;
    --md-on-primary: #ffffff;
    --md-primary-container: #97f0ff;
    --md-on-primary-container: #001f24;
    --md-secondary-container: #cde7ec;
    --md-on-secondary-container: #051f23;
    --md-surface: #f5fafb;
    --md-surface-container: #ffffff;
    --md-surface-variant: #dbe4e6;
    --md-on-surface: #171d1e;
    --md-on-surface-variant: #3f484a;
    --md-outline: #6f797a;
    --wa-green: #1ea952;
    --wa-green-dark: #15803d;
    --radius-card: 22px;
    --radius-pill: 50px;
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--md-surface);
    color: var(--md-on-surface);
    margin: 0;
    padding-bottom: 135px; /* Ruang ekstra untuk Bottom Nav + Floating Button Konsultasi di Mobile */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 50px;
    }
}

/* Efek 3D Modern untuk Semua Ikon 3D */
.icon-3d {
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.16));
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    vertical-align: middle;
}

.m3-chip:hover .icon-3d,
.nav-item-m3:hover .icon-3d,
.product-card:hover .icon-3d-float {
    transform: scale(1.15) translateY(-2px);
}

/* Badge Ikon 3D pada Brand Header */
.brand-3d-box {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(145deg, #007f8e, #005560);
    box-shadow: 0 6px 14px rgba(0, 104, 116, 0.28), inset 0 2px 3px rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Android Top App Bar */
.android-app-bar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(245, 250, 251, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 104, 116, 0.08);
    transition: box-shadow 0.2s ease;
}

.android-app-bar.scrolled {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

/* Material 3 Search Pill */
.m3-search-bar {
    background-color: #e9f1f3;
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
}

.m3-search-bar:focus-within {
    background-color: #ffffff;
    border-color: var(--md-primary);
    box-shadow: 0 4px 14px rgba(0, 104, 116, 0.12);
}

.m3-search-bar input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    color: var(--md-on-surface);
}

/* Horizontal Category Chips (Android Style with 3D Icons) */
.chip-scroll {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 6px 2px 10px 2px;
    scrollbar-width: none;
}

.chip-scroll::-webkit-scrollbar {
    display: none;
}

.m3-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 0.86rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    background-color: #ffffff;
    color: var(--md-on-surface-variant);
    border: 1px solid #d5e0e2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.18s cubic-bezier(0.2, 0, 0, 1);
}

.m3-chip:active {
    transform: scale(0.95);
}

.m3-chip.active {
    background: linear-gradient(135deg, #cde7ec 0%, #b4dfe7 100%);
    color: var(--md-on-secondary-container);
    border-color: rgba(0, 104, 116, 0.25);
    box-shadow: 0 4px 10px rgba(0, 104, 116, 0.12);
}

/* Product Card - Material You Elevated Card */
.product-card {
    background: var(--md-surface-container);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 14px 28px rgba(0, 104, 116, 0.11);
    }
}

.product-card:active {
    transform: scale(0.985);
}

.product-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle at 30% 30%, #eaf6f8 0%, #d9ecef 100%);
    overflow: hidden;
}

.product-img-wrap img.prod-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.product-card:hover .product-img-wrap img.prod-photo {
    transform: scale(1.04);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.badge-promo {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #007785, #005863);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 12px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(0, 104, 116, 0.3);
}

.badge-habis {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.product-body {
    padding: 12px 14px 14px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--md-primary);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 3px;
}

.product-title {
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--md-on-surface);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 6px;
}

.product-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0b57d0;
    margin-top: auto;
    margin-bottom: 10px;
}

.product-price.hubungi {
    color: var(--md-primary);
    font-size: 0.86rem;
    background: var(--md-primary-container);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    width: fit-content;
}

/* WhatsApp Action Button */
.btn-wa-pill {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 8px 12px;
    font-size: 0.84rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-wa-pill:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(22, 163, 74, 0.32);
}

.btn-wa-pill:active {
    transform: scale(0.96);
}

/* =========================================================
   TOMBOL MELAYANG "KONSULTASI" WHATSAPP (FLOATING ACTION)
   ========================================================= */
.floating-konsultasi-btn {
    position: fixed;
    right: 16px;
    bottom: 84px; /* Di atas Android Bottom Nav pada Mobile */
    z-index: 1045;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 14px;
    border-radius: 50px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 8px 24px rgba(18, 140, 126, 0.38), inset 0 1px 2px rgba(255, 255, 255, 0.45);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
    animation: floatPulse 3s ease-in-out infinite;
}

@media (min-width: 992px) {
    .floating-konsultasi-btn {
        right: 28px;
        bottom: 28px; /* Di sudut kanan bawah pada Desktop */
        padding: 12px 22px 12px 16px;
        font-size: 0.95rem;
    }
}

.floating-konsultasi-btn:hover {
    color: #ffffff;
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 30px rgba(18, 140, 126, 0.48);
}

.floating-konsultasi-btn:active {
    transform: scale(0.95);
}

.floating-konsultasi-btn .wa-3d-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}

@keyframes floatPulse {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* Android Material 3 Bottom Navigation Bar (Mobile Only) */
.android-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(238, 245, 246, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(0, 104, 116, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item-m3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--md-on-surface-variant);
    font-size: 0.72rem;
    font-weight: 600;
    gap: 3px;
    flex: 1;
    height: 100%;
}

.nav-item-m3 .icon-pill {
    width: 52px;
    height: 28px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.nav-item-m3.active {
    color: var(--md-on-surface);
    font-weight: 700;
}

.nav-item-m3.active .icon-pill {
    background-color: var(--md-secondary-container);
    color: var(--md-on-secondary-container);
}

/* Bottom Sheet Modal on Mobile (Android Style) */
@media (max-width: 575.98px) {
    .modal-bottom-sheet .modal-dialog {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        max-width: 100%;
        transform: translateY(100%);
        transition: transform 0.28s cubic-bezier(0.2, 0, 0, 1);
    }
    .modal-bottom-sheet.show .modal-dialog {
        transform: translateY(0);
    }
    .modal-bottom-sheet .modal-content {
        border-radius: 28px 28px 0 0;
        border: none;
        max-height: 90vh;
        overflow-y: auto;
    }
    .sheet-drag-handle {
        width: 38px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 4px;
        margin: 10px auto 4px auto;
    }
}

@media (min-width: 576px) {
    .modal-bottom-sheet .modal-content {
        border-radius: 24px;
        border: none;
    }
    .sheet-drag-handle {
        display: none;
    }
}

.brand-3d-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(0, 104, 116, 0.14);
    box-shadow: 0 3px 10px rgba(0, 104, 116, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-3d-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
