/* =========================
   FONT & GLOBAL BASE
========================= */
/* Poppins font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Global reset & font */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    animation: pageFade 0.6s ease;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
}

/* Gunakan Poppins untuk semua form & UI utama */
button,
input,
select,
textarea {
    font-family: 'Poppins', sans-serif;
}

/* Aksesibilitas: elemen hanya untuk screen reader */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================
   HEADER & NAVIGATION
========================= */

.site-header {
    position: sticky;              /* sticky header */
    top: 0;
    z-index: 999;
    background-color: #003366;
    color: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    backdrop-filter: blur(12px);   /* glass effect */
    background: rgba(0, 51, 102, 0.88);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: padding 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

/* Sticky shrink effect */
.site-header.shrink {
    padding: 0.4rem 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    background: rgba(0, 40, 80, 0.96);
    transform: translateY(0);
}

/* ✅ LOGO BARU */
.logo {
    display: flex;
    align-items: center;
    min-width: 0;
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}

/* NAV */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-list li {
    position: relative;
}

.nav-list a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-list a:hover,
.nav-list a:focus {
    text-decoration: underline;
}

/* Burger menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.burger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* =========================
   SEARCH BAR
========================= */

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.search-bar input {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 180px;
}

.search-bar button {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

/* =========================
   BREADCRUMB
========================= */

.breadcrumb {
    padding: 0.5rem 1.5rem;
    background: #e9ecef;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* =========================
   MAIN WRAPPER
========================= */

main {
    max-width: 1200px;
    margin: 1rem auto 2rem auto;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

section {
    margin-bottom: 2rem;
}

/* =========================
   BLOG LAYOUT
========================= */

.blog-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.blog-posts {
    flex: 2;
}

.blog-posts article {
    background: #fafafa;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.06);
    border-left: 4px solid #007bff;
}

.blog-posts h2 {
    margin-top: 0;
}

.blog-posts h3 {
    color: #003366;
    margin-top: 0;
}

.blog-posts a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.blog-posts a:hover {
    text-decoration: underline;
}

/* SIDEBAR */
.sidebar {
    flex: 1;
    background: #fafafa;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.06);
}

.sidebar h3 {
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.sidebar li {
    margin-bottom: 0.35rem;
}

.sidebar a {
    text-decoration: none;
    color: #007bff;
    font-weight: 600;
}

/* =========================
   KATEGORI & BUTTON
========================= */

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* BUTTON GLOBAL */
button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

button:hover,
button:focus {
    filter: brightness(1.05);
}

/* =========================
   PRODUCT LIST & CARD
========================= */

.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.product {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    width: calc(25% - 1rem);
    min-width: 200px;
    overflow: hidden;
    position: relative;
}

.product img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    transition: transform 0.3s ease; /* zoom effect (premium) */
}

.product h3 {
    margin: 0.75rem 0 0.25rem 0;
}

.product p {
    margin: 0;
}

/* =========================
   CART
========================= */

#cart-items {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
}

#cart-items li {
    margin-bottom: 0.35rem;
}

.cart-total {
    font-weight: 700;
}

/* =========================
   FORMS: CHECKOUT & LOGIN
========================= */

#checkout-form,
#login-form,
#register-form {
    display: inline-block;
    text-align: left;
    max-width: 400px;
    width: 100%;
}

#checkout-form input,
#checkout-form select,
#checkout-form textarea,
#login-form input,
#register-form input {
    width: 100%;
    margin: 0.4rem 0 0.8rem 0;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#login {
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
}

#login-message {
    color: red;
}

#user-info {
    margin-top: 1rem;
}

.toggle-register-btn {
    margin-top: 0.5rem;
}

/* =========================
   FOOTER
========================= */

footer {
    background-color: #003366;
    color: white;
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* =========================
   RESPONSIVE BREAKPOINTS
========================= */

/* Tablet & down */
@media (max-width: 992px) {
    .product {
        width: calc(33.333% - 1rem);
    }

    .search-bar input {
        min-width: 140px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        justify-content: space-between;
        width: 100%;
    }

    .search-bar {
        width: 100%;
        justify-content: flex-start;
        order: 3;
    }

    .search-bar input {
        flex: 1;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-end;
    }

    .nav-list {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: #003366;
        flex-direction: column;
        padding: 0.5rem 1rem 1rem 1rem;
        display: none;       /* hidden by default */
        z-index: 10;
    }

    /* ✅ Saat burger dibuka, semua menu muncul */
    .main-nav.open .nav-list {
        display: flex;
    }

    .burger-menu {
        display: flex;
    }

    /* Animasi burger saat open */
    .main-nav.open .burger-menu span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .main-nav.open .burger-menu span:nth-child(2) {
        opacity: 0;
    }
    .main-nav.open .burger-menu span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .blog-container {
        flex-direction: column;
    }

    .product {
        width: calc(50% - 1rem);
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .product {
        width: 100%;
    }

    main {
        padding: 1rem;
    }

    .breadcrumb {
        padding: 0.5rem 1rem;
    }
}

/* =========================
   BLOG OPTIMIZATION (PANENS12)
========================= */

.blog-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.blog-posts {
    flex: 1;
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
}

.sidebar {
    width: 280px;
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(0,0,0,.06);
    position: sticky;
    top: 80px;
}

.sidebar h3 {
    margin-top: 0;
    color: #1666b9;
    padding-bottom: 6px;
    border-bottom: 2px solid #1e88e5;
}

.breadcrumb {
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}
.breadcrumb a {
    color: #1666b9;
}

/* Mobile version */
@media (max-width: 900px) {
    .blog-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
}

/* =========================
   PREMIUM UI EFFECTS (8 POIN)
========================= */

/* 1) Smooth page fade */
@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 2) Global fade-in up for key blocks */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

body,
main,
.blog-posts,
.sidebar,
.product,
header,
footer {
  animation: fadeInUp 0.6s ease forwards;
}

/* 3) Premium shadow helper */
.premium-shadow {
  box-shadow: 0 12px 35px rgba(0,0,0,0.12) !important;
}

/* 4) Hover elevation for cards & category items */
.product,
.blog-posts article,
.sidebar,
.category-item {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product:hover,
.blog-posts article:hover,
.sidebar:hover,
.category-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.15) !important;
}

/* 5) Premium buttons (gradien) */
button,
.read-more {
  background: linear-gradient(135deg, #1e88e5, #0056a6);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  transition: all 0.25s ease;
}

button:hover,
.read-more:hover {
  filter: brightness(1.15);
  transform: translateY(-2px);
}

/* 6) Smooth hover untuk semua link */
a {
  transition: 0.25s ease;
}
a:hover {
  opacity: 0.8;
}

/* 7) Heading premium */
h1, h2, h3, h4 {
  letter-spacing: 0.3px;
  font-weight: 700;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }

/* 8) Highlight box modern */
.highlight-box {
  border-left: 5px solid #1e88e5 !important;
  background: linear-gradient(135deg, #eef6ff, #ffffff);
  padding: 18px;
  border-radius: 10px !important;
}

/* Category card layout */
.category-item {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e8e8e8;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.category-item h2 {
  font-size: 1.3rem;
  margin-top: 0;
}

/* =========================
   PARALLAX HERO (1)
========================= */

.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.65));
    z-index: 0;
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

/* Matikan background-attachment fixed di mobile (biar tidak lag) */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
}

/* =========================
   DARK MODE (3)
   Aktif saat body.dark-mode
========================= */

body.dark-mode {
    background-color: #050b12;
    color: #e5ecf5;
}

body.dark-mode main {
    background: #060d16;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
}

body.dark-mode .site-header {
    background: rgba(5, 22, 45, 0.96);
    border-bottom-color: rgba(255,255,255,0.1);
}

body.dark-mode .blog-posts,
body.dark-mode .sidebar,
body.dark-mode .product,
body.dark-mode .category-item {
    background: #0b1725;
    border-color: #1a2940;
    box-shadow: 0 10px 35px rgba(0,0,0,0.7);
}

body.dark-mode .breadcrumb {
    background: #0b1725;
    color: #9bb3d9;
}

body.dark-mode .breadcrumb a,
body.dark-mode .sidebar a,
body.dark-mode .blog-posts a {
    color: #6ea8ff;
}

body.dark-mode footer {
    background-color: #040b14;
}

/* =========================
   SKELETON LOADING (4)
========================= */

.skeleton {
    position: relative;
    overflow: hidden;
    background: #e2e2e2;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-text {
    height: 0.9rem;
    margin-bottom: 0.4rem;
    border-radius: 4px;
}

.skeleton-thumb {
    height: 150px;
    border-radius: 8px;
}

/* =========================
   PREMIUM SCROLLBAR (5)
========================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d1827;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1e88e5, #0056a6);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.1);
}

/* Firefox */
html {
    scrollbar-width:thin;
    scrollbar-color:#1e88e5 #0d1827;
}

/* =========================
   LAZY IMAGE VISUAL (6)
========================= */

.lazy-image {
    filter: blur(4px);
    transform: scale(1.02);
    transition: filter 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
    opacity: 0.6;
}

.lazy-image.loaded {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
}

/* =========================
   FLOATING ACTION BUTTON (7)
========================= */

.fab-button {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffb74d, #f57c00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
    cursor: pointer;
    z-index: 1000;
    border: none;
    font-size: 1.4rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.fab-button:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 32px rgba(0,0,0,0.5);
    filter: brightness(1.05);
}

/* =========================
   PRODUCT IMAGE ZOOM (8)
========================= */

.product:hover img {
    transform: scale(1.06);
}


/* Breadcrumb spacing */
.breadcrumb {
    padding: 0.5rem 1.5rem;
    padding-left: 1rem !important; /* Tambahkan jarak kiri */
}

/* Dark Mode Toggle Button */
.dark-mode-btn {
    background: #ffffff22;
    border: 1px solid rgba(255,255,255,0.5);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 0;
    transition: 0.25s ease;
}

.dark-mode-btn:hover {
    background: #ffffff33;
}

/* DARK MODE THEME */
body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode main {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .breadcrumb {
    background: #334155;
}

body.dark-mode .site-header {
    background: rgba(15,23,42,0.92) !important;
}

body.dark-mode .sidebar,
body.dark-mode .blog-posts article,
body.dark-mode .category-item,
body.dark-mode .product {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: none !important;
    color: #e2e8f0 !important;
}

body.dark-mode a {
    color: #60a5fa !important;
}

body.dark-mode button {
    background: linear-gradient(135deg,#3b82f6,#1d4ed8) !important;
}





