:root {
    --primary: #0057a3;
    --secondary: #00bcd4;
    --accent: #ff9800;
    --bg: #f4f6f8;
    --text: #2c3e50;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
}

/* Accessibility Focus */
input:focus,
select:focus,
textarea:focus,
button:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

/* Navbar */
#navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.95em;
}

.nav-links a:hover {
    color: var(--primary);
    background: #e3f2fd;
}

.nav-links a.active {
    color: var(--primary);
    background: #e3f2fd;
    font-weight: 700;
}

.menu-btn {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
}

/* Sidebar */
.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 0;
    left: -250px;
    background: var(--white);
    z-index: 200;
    box-shadow: var(--shadow);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--primary);
    color: var(--white);
}

.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #eee;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar a:hover {
    background: #f0f0f0;
    padding-left: 30px;
    color: var(--primary);
}

.sidebar a.active {
    background: #e3f2fd;
    color: var(--primary);
    font-weight: 700;
    border-left: 4px solid var(--primary);
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.section.active {
    display: block;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary);
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background: var(--secondary);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slider Fix */
.slider-container {
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-radius: 0 0 10px 10px;
}

.slider {
    display: flex;
    transition: transform 0.7s ease-in-out;
    width: 300%;
}

.slide {
    flex: 0 0 33.3333%;
    min-width: 33.3333%;
    height: 300px;
    background-size: cover;
    background-position: center;
}

/* Cards & Grids */
.card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.vm-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.vm-card ul {
    margin-left: 20px;
    margin-top: 10px;
}

.vm-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    background: #004080;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: #0097a7;
}

/* Home Highlights & Promo */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.highlight-item {
    background: white;
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid var(--secondary);
    transition: transform 0.3s;
}

.highlight-item:hover {
    transform: translateY(-5px);
}

.highlight-item i {
    font-size: 2em;
    color: var(--primary);
    margin-bottom: 10px;
}

.highlight-item h4 {
    color: var(--text);
    font-size: 1.05em;
    margin-bottom: 5px;
}

.highlight-item p {
    font-size: 0.85em;
    color: #666;
}

.poin-banner {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ff9800, #ff5722);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
}

.poin-icon {
    font-size: 3em;
    margin-right: 20px;
    flex-shrink: 0;
}

.poin-text h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.poin-text p {
    font-size: 1em;
    opacity: 0.95;
}

.section-subtitle {
    text-align: center;
    color: var(--primary);
    font-size: 1.8em;
    margin-bottom: 20px;
}

.promo-daily-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.promo-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--accent);
    transition: transform 0.3s;
}

.promo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.promo-day {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.1em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.promo-card p {
    font-size: 0.9em;
    margin-bottom: 5px;
    color: #444;
}

/* Katalog */
.filter-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-filter {
    padding: 8px 15px;
    border: 1px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 20px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.9em;
}

.btn-filter.active,
.btn-filter:hover {
    background: var(--primary);
    color: white;
}

.filter-group input {
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    flex: 1;
    min-width: 200px;
}

.katalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.katalog-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: 0.3s;
}

.katalog-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent);
}

.katalog-item h4 {
    color: var(--primary);
    margin-bottom: 5px;
}

.katalog-item .price {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent);
    margin-top: 5px;
}

.katalog-item .order-btn {
    font-size: 0.85em;
    color: #25d366;
    margin-top: 10px;
    display: inline-block;
    font-weight: bold;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    border-top: 6px solid #ddd;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-img {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
}

.blog-content {
    padding: 15px;
}

.blog-tag {
    display: inline-block;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-bottom: 10px;
    font-weight: bold;
}

.blog-title {
    color: var(--primary);
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.2s;
}

.blog-title:hover {
    text-decoration: underline;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    font-weight: bold;
}

.close-modal:hover {
    color: #333;
}

.video-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
}

.video-link:hover {
    text-decoration: underline;
}

/* Form Group (Admin Modal) */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text);
    font-size: 0.9em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 87, 163, 0.2);
}

/* Loyalty */
.loyalty-tiers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.tier-card {
    padding: 20px 15px;
    border-radius: 10px;
    color: white;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.tier-card:hover {
    transform: translateY(-5px);
}

.tier-silver {
    background: linear-gradient(135deg, #bdc3c7, #9ca3af);
}

.tier-gold {
    background: linear-gradient(135deg, #f6b93b, #e58e26);
}

.tier-platinum {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
}

.tier-diamond {
    background: linear-gradient(135deg, #00b4db, #0083b0);
}

.tier-card h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.tier-card .tier-price {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.tier-card .tier-saldo {
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding-top: 10px;
}

/* QRIS Card */
.qris-card {
    text-align: center;
    border-left: 5px solid #25d366;
}

.qris-card img {
    max-width: 220px;
    height: auto;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: var(--primary);
    color: white;
    font-size: 0.9em;
}

/* Cek Member Box */
.check-member-card {
    border-left: 5px solid var(--accent);
    background: #fffdf5;
}

.check-member-form {
    display: flex;
    gap: 10px;
}

.check-member-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
}

.member-result-box {
    display: none;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.member-result-box h4 {
    color: var(--primary);
    font-size: 1.3em;
    margin-bottom: 5px;
}

.member-result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 0.95em;
}

/* Lokasi */
.lokasi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.login-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.error-msg {
    color: red;
    margin-bottom: 10px;
    font-size: 0.9em;
}

/* Admin */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
}

.admin-tab {
    padding: 10px 20px;
    background: #eee;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.admin-tab.active {
    background: var(--primary);
    color: white;
}

.admin-content {
    display: none;
}

.admin-content.active {
    display: block;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
    color: #555;
    transition: 0.2s;
}

.icon-btn:hover {
    transform: scale(1.2);
}

.loyalty-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.loyalty-edit-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
}

.loyalty-edit-card input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 120px;
    margin: 5px 0;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.qr-card-print {
    background: white;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qr-card-print p {
    font-size: 0.85em;
    margin-top: 5px;
    color: #333;
}

.qr-card-print strong {
    color: var(--primary);
}

.global-adjust-group label {
    font-weight: bold;
    font-size: 0.9em;
    color: var(--text);
}

.adjust-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.adjust-input-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-sm {
    padding: 8px 15px !important;
    font-size: 0.85em;
    white-space: nowrap;
}

.katalog-admin-item {
    flex-wrap: wrap;
    gap: 15px;
}

.item-info {
    flex: 1;
    min-width: 200px;
}

.item-price-edit {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9f9f9;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #eee;
}

.item-price-edit input {
    width: 110px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-weight: bold;
}

.btn-edit-price {
    background: #eee;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    color: #555;
    transition: 0.2s;
}

.btn-edit-price:hover {
    background: var(--primary);
    color: white;
}

.price-update-flash {
    border-color: #2ecc71 !important;
    background-color: #e8f8f5 !important;
    transition: 0.3s;
}

/* WA Float */
.wa-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    box-shadow: var(--shadow);
    z-index: 99;
    transition: 0.3s;
    text-decoration: none;
}

.wa-float:hover {
    transform: scale(1.1);
    background: #1da851;
}

/* Slider Fix */
.slider-container {
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow);
    border-radius: 0 0 10px 10px;
}

.slider {
    display: flex;
    transition: transform 0.7s ease-in-out;
    width: 500%;
    /* Diubah menjadi 500% karena ada 5 slide */
}

/* SLIDER ANIMATED CONTENT */
.slide {
    flex: 0 0 20%;
    /* Diubah menjadi 20% (100% / 5 slide) agar 1 slide memenuhi 1 layar penuh */
    min-width: 20%;
    height: 350px;
    /* Tinggi slider */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.slide-content {
    z-index: 2;
    padding: 30px;
    animation: fadeInUp 1s ease-out;
    max-width: 800px;
    /* Batas lebar teks agar tidak terlalu melar di desktop */
}

.slide-content h2 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    font-weight: 800;
}

.slide-content p {
    font-size: 1.3em;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    margin: 0 auto;
}

.animate-icon {
    font-size: 5em;
    margin-bottom: 25px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

/* Gradient Backgrounds for Slides */
.slide-1 {
    background: linear-gradient(135deg, #0057a3, #8e2de2);
}

.slide-2 {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #86005e;
}

.slide-2 .animate-icon,
.slide-2 h2,
.slide-2 p {
    text-shadow: 1px 1px 4px rgba(255, 255, 255, 0.4);
    filter: none;
}

.slide-3 {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.slide-4 {
    background: linear-gradient(135deg, #f12711, #f5af19);
}

.slide-5 {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient Backgrounds for Slides */
.slide-1 {
    background: linear-gradient(135deg, #0057a3, #8e2de2);
}

.slide-2 {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #86005e;
}

.slide-2 .animate-icon,
.slide-2 h2,
.slide-2 p {
    text-shadow: 1px 1px 4px rgba(255, 255, 255, 0.4);
    filter: none;
}

.slide-3 {
    background: linear-gradient(135deg, #11998e, #38ef7d);
}

.slide-4 {
    background: linear-gradient(135deg, #f12711, #f5af19);
}

.slide-5 {
    background: linear-gradient(135deg, #2193b0, #6dd5ed);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promo-daily-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .loyalty-admin-grid {
        grid-template-columns: 1fr;
    }

    .loyalty-tiers {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .home-grid,
    .vm-container,
    .lokasi-grid {
        grid-template-columns: 1fr;
    }

    .katalog-grid,
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .highlights-grid {
        grid-template-columns: 1fr;
    }

    .promo-daily-grid {
        grid-template-columns: 1fr;
    }

    .loyalty-tiers {
        grid-template-columns: 1fr;
    }

    .poin-banner {
        flex-direction: column;
        text-align: center;
    }

    .poin-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .katalog-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .check-member-form {
        flex-direction: column;
    }
}