/*
 * SpesialisBaut.com - Custom CSS
 * TailwindCSS menangani sebagian besar styling.
 * File ini untuk custom style yang tidak bisa di-Tailwind.
 */

/*
 * SpesialisBaut.com - Custom CSS
 */

/* ============================================================
   SCROLLBAR CUSTOM
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
html.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}
html.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ============================================================
   ANIMASI FADE-IN — AMAN: hanya hide jika JS berhasil load
   ============================================================ */
html.js-ready .fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
html.js-ready .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   PRODUCT CARD HOVER
   ============================================================ */
.product-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.12);
}
html.dark .product-card:hover {
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.4);
}

/* ============================================================
   CATEGORY CARD
   ============================================================ */
.category-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.1);
}
html.dark .category-card:hover {
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   MODAL OVERLAY & ANIMASI
   ============================================================ */
.modal-overlay {
    animation: fadeIn 0.2s ease;
}
.modal-content {
    animation: slideUp 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   WA FLOATING BUTTON PULSE
   ============================================================ */
.wa-pulse {
    animation: waPulse 2s infinite;
}
@keyframes waPulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================================
   GALLERY THUMBNAIL ACTIVE STATE
   ============================================================ */
.thumb-active {
    border-color: #1e3a5f !important;
    opacity: 1 !important;
}

/* ============================================================
   QUANTITY SELECTOR
   ============================================================ */
.qty-btn {
    transition: background-color 0.15s ease;
}
.qty-btn:active {
    transform: scale(0.92);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
html.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-20px); }
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   MISC
   ============================================================ */
.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;
}

html {
    scroll-behavior: smooth;
}

/* Fix untuk dark mode transition tanpa flash */
html.no-transition,
html.no-transition *,
html.no-transition *::before,
html.no-transition *::after {
    transition: none !important;
    animation-duration: 0s !important;
}