:root {
  --primary: #007bff;
  --secondary: #6c757d;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --border-radius: 12px;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --hover-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  --nav-bg: #2c3e50;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  padding-top: 60px;
  padding-bottom: 90px;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

/* --- RESPONSIVE HAMBURGER NAVIGATION --- */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-content {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
}

/* Label Menu Kiri (Optional) */
.nav-logo {
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    text-decoration: none;
}

/* Butang Hamburger (Mobile Only) */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 15px;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: background 0.3s;
    display: block;
}

.nav-links li a:hover {
    background-color: rgba(255,255,255,0.2);
}

/* --- CONTAINER & CONTENTS --- */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

h1, h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

.section-title {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-top: 40px;
    display: inline-block;
}

.center-text { text-align: center; }

.icon-nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.icon-nav li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--card-bg);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: #444;
  font-size: 24px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.icon-nav li a:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

.ai-nav li a {
    width: auto;
    height: auto;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 16px;
}
.ai-nav li a i { margin-right: 8px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 15px;
  text-align: center;
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); }

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
}

.product-title { font-weight: 600; margin: 10px 0 5px; font-size: 1.1em; }
.product-price { color: #e74c3c; font-weight: bold; font-size: 1.2em; }

.search-title-section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 10px;
}
.search-wrapper {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid #ddd;
    border-radius: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 6px 15px;
    margin: 0;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
.search-wrapper:focus-within {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.2);
}
.search-wrapper i.search-icon {
    color: #888;
    font-size: 16px;
}
#searchInput {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 0;
    font-size: 16px;
    outline: none;
    color: var(--text-color);
    width: 100%;
}

/* TABLE STYLES */
.table-responsive {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow);
    background: white;
    margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th, td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.linksTable:not(.stats-table) th:nth-child(1),
.linksTable:not(.stats-table) th:nth-child(3) {
    width: 50px;
    text-align: center;
}

.linksTable:not(.stats-table) th:nth-child(2),
.linksTable:not(.stats-table) th:nth-child(4) {
    width: auto;
}

th {
  background-color: #2c3e50;
  color: white;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 1px;
}

tr:nth-child(even) { background-color: #f8f9fa; }
tr:hover { background-color: #e9ecef; }

.no-col { 
    font-weight: bold; 
    color: #777; 
    text-align: center; 
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; color: #0056b3; }

#popupOverlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}
#popupOverlay img {
    max-width: 90%;
    max-height: 90%;
    border: 5px solid white;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Custom Alert Modal */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 10002;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 85%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.modal-overlay.active .modal-card {
    transform: scale(1);
}
.modal-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: #e74c3c;
}
.modal-title {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: #333;
}
.modal-message {
    color: #666;
    font-size: 1em;
    line-height: 1.5;
    margin: 0 0 20px 0;
}
.btn-modal-close {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 25px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}
.btn-modal-close:hover {
    background-color: #0056b3;
}
.btn-modal-close:active {
    transform: scale(0.95);
}

#backToTop {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: var(--primary);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#backToTop:hover { background-color: #555; }

/* --- MOBILE RESPONSIVE LOGIC --- */
@media (max-width: 768px) {
    /* Tukar menu jadi dropdown bila skrin kecil */
    .hamburger { display: block; }
    .nav-logo { display: block; }

    .nav-links {
        display: none; /* Sembunyikan asal */
        position: absolute;
        top: 60px; /* Bawah navbar */
        left: 0;
        width: 100%;
        background-color: var(--nav-bg);
        flex-direction: column;
        padding: 10px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        text-align: center;
    }

    /* Class ni ditambah guna Javascript bila klik */
    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        display: block;
        margin: 5px 0;
    }
    
    /* Grid produk jadi 2 column */
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    th, td { padding: 10px; font-size: 14px; }
    
    .linksTable:not(.stats-table) thead { display: none; }
    
    .linksTable:not(.stats-table) tr {
        display: flex;
        flex-wrap: wrap;
        border-bottom: 1px solid #ddd;
    }
    
    .linksTable:not(.stats-table) td {
        box-sizing: border-box;
        border-bottom: none;
        display: flex;
        align-items: center;
    }

    .linksTable:not(.stats-table) td.no-col {
        width: 15%;
        justify-content: center;
        background: #f8f9fa;
    }
    .linksTable:not(.stats-table) td:not(.no-col) {
        width: 85%;
    }
    .linksTable:not(.stats-table) td:nth-child(3), 
    .linksTable:not(.stats-table) td:nth-child(4) {
         border-top: 1px dashed #e0e0e0;
    }

    /* --- STATS TABLE SPECIFIC OVERRIDE --- */
    table.stats-table thead { display: table-header-group; }
    table.stats-table tr { display: table-row; }
    table.stats-table td { 
        display: table-cell; 
        width: auto;
        border-bottom: 1px solid #eee;
    }
    
    table.stats-table th:nth-child(1), table.stats-table td:nth-child(1) { width: 70%; }
    table.stats-table th:nth-child(2), table.stats-table td:nth-child(2) { width: 30%; text-align: center; }

    tr:nth-child(even) { background-color: #f8f9fa; }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: 1fr; }
    .ai-nav { flex-direction: column; align-items: center; }
    .ai-nav li { width: 100%; }
    .ai-nav li a { width: 100%; box-sizing: border-box; }
}

/* --- CATALOG BANNERS STYLES (DESKTOP) --- */
.banner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.catalog-banner {
  border-radius: var(--border-radius);
  padding: 25px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
  justify-content: space-between;
  height: 100%;
  box-sizing: border-box;
}
.catalog-banner:hover {
  transform: translateY(-4px);
}

.mesinsabun-card {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
}
.katalog-card {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border: 2px solid #38bdf8;
}
.kumpuldata-card {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  border: 2px solid #a5b4fc;
}

.catalog-header-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.catalog-emoji {
  font-size: 40px;
  margin-bottom: -5px;
}

.catalog-text {
  max-width: 600px;
  margin: 0 auto;
}

.catalog-banner h3 {
  margin: 0 0 8px 0;
  font-weight: 700;
  font-size: 1.4em;
  letter-spacing: -0.02em;
}
.mesinsabun-card h3 { color: #15803d; }
.katalog-card h3 { color: #0369a1; }
.kumpuldata-card h3 { color: #4338ca; }

.catalog-banner p {
  margin: 0;
  font-size: 0.95em;
  line-height: 1.6;
}
.mesinsabun-card p { color: #14532d; }
.katalog-card p { color: #0c4a6e; }
.kumpuldata-card p { color: #1e1b4b; }

.catalog-btn {
  color: white !important;
  text-decoration: none !important;
  font-weight: bold;
  font-size: 1em;
  padding: 12px 30px;
  border-radius: 25px;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.mesinsabun-card .catalog-btn {
  background-color: #0d9488;
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}
.mesinsabun-card .catalog-btn:hover {
  background-color: #0f766e;
}

.katalog-card .catalog-btn {
  background-color: #0284c7;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}
.katalog-card .catalog-btn:hover {
  background-color: #0369a1;
}

.kumpuldata-card .catalog-btn {
  background-color: #4f46e5;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}
.kumpuldata-card .catalog-btn:hover {
  background-color: #4338ca;
}

/* --- GAYA BORANG BANTUAN (CONTACT FORM) --- */
.contact-wrapper {
    max-width: 650px;
    margin: 50px auto;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid #eaeaea;
    padding: 40px 30px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-icon {
    width: 60px;
    height: 60px;
    background-color: #d1e7dd;
    color: #0f5132;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 15px auto;
}

.form-header h3 {
    margin: 0 0 10px 0;
    color: #111;
    font-size: 1.8em;
}

.form-header p {
    color: var(--secondary);
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 0.95em;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: #25D366;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.btn-whatsapp {
    width: 100%;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: background-color 0.3s, transform 0.1s;
    margin-top: 10px;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

.btn-whatsapp:active {
    transform: scale(0.98);
}

/* --- FLOATING SOCIAL MEDIA BAR --- */
.social-float-bar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 15px 8px;
    border-radius: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.social-float-bar a.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--card-bg);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: #444;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

/* Brand hover styles */
.social-float-bar a.social-icon.telegram:hover { background-color: #0088cc; color: #fff; transform: scale(1.18); }
.social-float-bar a.social-icon.tiktok:hover { background-color: #000000; color: #fff; transform: scale(1.18); }
.social-float-bar a.social-icon.facebook:hover { background-color: #1877f2; color: #fff; transform: scale(1.18); }
.social-float-bar a.social-icon.youtube:hover { background-color: #ff0000; color: #fff; transform: scale(1.18); }
.social-float-bar a.social-icon.threads:hover { background-color: #000000; color: #fff; transform: scale(1.18); }
.social-float-bar a.social-icon.lemon8:hover { background-color: #ffd100; color: #000; transform: scale(1.18); }
.social-float-bar a.social-icon.instagram:hover { 
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); 
    color: #fff; 
    transform: scale(1.18); 
}

/* Responsive style for mobile (smartphone) */
@media (max-width: 768px) {
    .social-float-bar {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        transform: none;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 12px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 8px 0;
        border-radius: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .social-float-bar a.social-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    body {
        padding-top: 112px; /* 60px navbar + 52px social bar */
    }

    .katalog-card {
        order: 1;
    }
    .mesinsabun-card {
        order: 2;
    }
    .kumpuldata-card {
        order: 3;
    }

    /* --- MOBILE RESPONSIVE BANNERS OVERRIDES --- */
    .banner-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    .catalog-banner {
        padding: 15px 12px !important;
        gap: 10px !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    .catalog-banner:hover {
        transform: none !important;
    }
    
    .catalog-header-wrapper {
        flex-direction: column !important;
        align-items: center !important;
        gap: 6px !important;
        text-align: center !important;
    }
    
    .catalog-emoji {
        font-size: 32px !important;
        margin-bottom: 0 !important;
    }
    
    .catalog-banner h3 {
        font-size: 1.1em !important;
        margin: 0 !important;
        line-height: 1.3 !important;
    }
    
    .catalog-banner p {
        display: none !important; /* Hide details on mobile to keep it ringkas */
    }
    
    .catalog-btn {
        margin-top: 5px !important;
        padding: 8px 20px !important;
        font-size: 0.9em !important;
        border-radius: 20px !important;
        width: auto !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
    }
    
    .btn-text-desktop {
        display: none !important; /* Hide words like 'Layari' and '& Beli PCB' to keep buttons compact */
    }
}
