/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* Variabel Global */
:root {
    --primary-color: #33a1e0;
    --accent-color: #2b8ac9;
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-color: #343a40;
    --secondary-text-color: #6c757d;
    --light-text-color: #ffffff;
    --border-radius: 12px;
    --shadow-light: 0 4px 20px rgba(0, 0, 0, 0.07);
    --gray-bg: #f0f3f5;
    --success-color: #28a745;
}

/* Reset dan Aturan Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.bg-gray {
    background-color: var(--gray-bg);
}

/* Header dan Navigasi */
header {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
}
.logo img {
    height: 50px;
}
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-text strong {
    font-size: 1.2rem;
    font-weight: 700;
}
.logo-text span {
    font-size: 0.8rem;
    color: var(--secondary-text-color);
}

/* Container untuk item navigasi di desktop */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

ul.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 0;
}
ul.nav-links a {
    color: var(--secondary-text-color);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}
ul.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1002; /* Pastikan hamburger di atas segalanya */
}

/* Tombol Header Login/Register & Cheki/Galeri */
.nav-auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.nav-button {
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 1px solid var(--primary-color);
}
.nav-button.cta {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
.nav-button.cta:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}
.nav-button:not(.cta) {
    color: var(--primary-color);
    background-color: transparent;
}
.nav-button:not(.cta):hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}


/* Hero Section & Slider */
#hero {
    padding: 0;
}
.slider-container {
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    position: relative;
}
.slider {
    display: flex;
    width: 100%;
    height: 450px;
    transition: transform 0.5s ease-in-out;
}
.slide {
    min-width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.slide.active {
    opacity: 1;
}
.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    display: block;
}
.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}
.slider-nav button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white; border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}
.slider-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background-color 0.3s;
}
.dot.active {
    background-color: white;
}
.hero-text {
    padding: 3rem 1.5rem;
    text-align: center;
}
.hero-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}
.hero-text h3 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--secondary-text-color);
    margin-bottom: 1.5rem;
}
.hero-text p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Bagian Umum */
section {
    padding: 4rem 0;
}
section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
    text-align: center;
}

/* Cara Pesan */
.how-to-order-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.order-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}
.order-step .step-number {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    font-weight: 700;
}
.order-step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}
.order-step p {
    color: var(--secondary-text-color);
}

/* Member Section (Detailed) */
.member-grid-detailed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.member-card-detailed {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    display: flex;
    overflow: hidden;
    gap: 2rem;
}
.member-card-detailed.group-card {
    flex-direction: column;
    text-align: center;
}
.member-card-detailed img {
    width: 250px;
    height: auto;
}
.member-card-detailed.group-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.member-details {
    padding: 1.5rem;
    padding-left: 0;
}
.member-card-detailed.group-card .member-details {
    padding: 1.5rem;
}
.member-details .role {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
}
.member-details h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.member-details .jiko {
    font-style: italic;
    color: var(--secondary-text-color);
    margin-bottom: 1.5rem;
    display: block;
}
.member-details ul {
    list-style: none;
    padding: 0;
}
.member-details ul li {
    margin-bottom: 0.5rem;
}
.member-details ul li strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* News Section */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
.news-item {
    background: var(--card-bg);
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}
.news-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.news-item .date {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-bottom: 1rem;
}
.news-item p {
    color: var(--text-color);
}

/* FAQ (Accordion) */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}
.faq-question {
    padding: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
}
.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid #eee;
    margin-top: -1px;
}
.faq-item.active .faq-answer {
    max-height: 300px;
}


/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 3rem 0;
    text-align: center;
}
.social-media {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.social-media a {
    color: var(--light-text-color);
    font-size: 1.8rem;
}
footer p {
    opacity: 0.9;
}

/* General CTA Button */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Hero Section Specific CTA */
.hero-cta {
    margin-top: 2rem;
    font-size: 1.1rem;
}

/* Section untuk Page Actions (Tombol) */
#page-actions {
    padding: 0 0 4rem 0;
    background-color: var(--bg-gray);
}

.page-actions-container {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap; /* Untuk responsivitas di layar kecil */
}

/* Style untuk tombol sekunder */
.cta-button.secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: calc(0.8rem - 2px) calc(2rem - 2px);
}

.cta-button.secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ============================ */
/* REVISI HALAMAN CHEKI (STYLE) */
/* ============================ */
#cheki-page {
    background-color: var(--gray-bg);
}
.cheki-header {
    text-align: center;
    margin-bottom: 3rem;
}
.stock-display {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    margin-top: 1rem;
    font-size: 1rem;
    font-weight: 500;
}
.stock-display h3 {
    margin: 0;
    font-size: inherit;
}
.cheki-main-layout {
    display: grid;
    grid-template-columns: 2.5fr 1.5fr; /* Kolom kiri lebih lebar */
    gap: 2rem;
    align-items: flex-start;
}
.cheki-member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.cheki-member-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cheki-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.card-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.cheki-member-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 5; /* Rasio potret yang umum */
    object-fit: cover;
}
.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Membuat konten mengisi sisa ruang */
}
.cheki-member-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: auto; /* Mendorong tombol ke bawah */
    padding-bottom: 1rem;
}
.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.quantity-btn {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.quantity-btn:hover {
    background-color: var(--accent-color);
}
.quantity-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
.quantity-input {
    width: 45px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield; /* Firefox */
}
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.order-summary-container {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    position: static; /* Dibuat statis sesuai permintaan */
}
.order-summary-container h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}
#order-summary-items {
    margin-bottom: 1.5rem;
    min-height: 50px;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
.order-summary-total {
    border-top: 2px solid var(--primary-color);
    padding-top: 1rem;
    font-weight: bold;
    font-size: 1.2rem;
}
.order-summary-total p {
    display: flex;
    justify-content: space-between;
}
.order-summary-total #total-price {
    color: var(--primary-color);
}
.order-summary-container .cta-button {
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.empty-cart-message {
    color: var(--secondary-text-color);
    text-align: center;
    font-style: italic;
}

/* Responsivitas */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%; /* Mulai dari luar layar */
        width: 300px;
        height: 100vh;
        background-color: var(--card-bg);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 2rem 2rem 2rem;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.4s ease-in-out;
        z-index: 1001;
        gap: 2rem;
    }
    .nav-menu.active {
        right: 0; /* Pindahkan ke dalam layar */
    }

    ul.nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        width: 100%;
    }

    .nav-auth-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--gray-bg);
    }
    .hamburger {
        display: block;
    }
    .cheki-main-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
    section h2 {
        font-size: 1.8rem;
    }
    .member-card-detailed {
        flex-direction: column;
    }
    .member-card-detailed img {
        width: 100%;
        height: auto;
    }
    .member-card-detailed.group-card img {
        height: auto; /* Membuat tinggi gambar grup otomatis di mobile */
    }
    .member-details {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .cheki-member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Style untuk container link galeri di atas member */
.gallery-link-container {
    text-align: center;
    margin-bottom: 2.5rem; /* Memberi jarak ke daftar member di bawahnya */
}

/* ============================ */
/* STYLE HALAMAN GALERI BARU    */
/* ============================ */
#gallery-page .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    aspect-ratio: 1 / 1; /* Membuat gambar menjadi persegi */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Memastikan gambar mengisi area tanpa distorsi */
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

/* Lightbox Style Baru */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0,0,0,0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s;
    user-select: none;
}
.nav-arrow:hover {
    color: white;
}
.nav-arrow.prev-btn { left: 20px; }
.nav-arrow.next-btn { right: 20px; }

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
}
.close-btn:hover {
    color: white;
    transform: rotate(90deg);
}