@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Poppins:wght@300;400;500;600&display=swap');

:root {
    --brown-900: #3e2723;
    --brown-700: #6d4c41;
    --brown-600: #8d6e63;
    --brown-500: #a1887f;
    --cream: #fdf5e6;
    --peach: #ffab91;
    --text: #4a3728;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(62, 39, 35, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: min(1100px, calc(100% - 40px));
    margin-inline: auto;
}

.section {
    padding: 80px 20px;
}

.text-center {
    text-align: center;
    margin-bottom: 40px;
}

.bg-light {
    background: var(--cream);
}

.bg-dark {
    background: var(--brown-900);
    color: var(--white);
}

.text-white {
    color: var(--white);
}

/* NAVBAR */
.navbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    padding: 14px 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.nav-container {
    width: min(1200px, calc(100% - 30px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    flex-shrink: 0;
    font-family: 'Playfair Display', serif;
    font-size: 23px;
    color: var(--brown-600);
    font-weight: 700;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--brown-600);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 160px;
}

.user-profile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.profile-img {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brown-600);
    background: #eee;
}

img[src=""] {
    visibility: hidden;
}

.btn-logout {
    border: 0;
    border-radius: 20px;
    padding: 8px 14px;
    background: #e74c3c;
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    transition: transform .2s ease, background .2s ease;
}

.btn-logout:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* HERO */
.hero-bakery {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-slider,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slider {
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.5s ease-in-out, transform 6s ease-out;
}

.hero-slider .slide.active {
    opacity: 1;
    transform: scale(1.08);
}

.hero-overlay {
    z-index: 2;
    background: rgba(0, 0, 0, .45);
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(800px, calc(100% - 40px));
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 32px;
}

.btn-main,
.btn-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 600;
    transition: transform .2s ease, background .2s ease;
}

.btn-main {
    padding: 13px 30px;
    border-radius: 8px;
    background: var(--brown-600);
    color: white;
}

.btn-main:hover {
    background: var(--brown-700);
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots .dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: width .3s ease, background .3s ease;
}

.hero-dots .dot.active {
    width: 30px;
    background: white;
}

/* ABOUT */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--brown-600);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .15em;
}

.about-grid h2,
.section h2 {
    font-family: 'Playfair Display', serif;
}

.about-grid h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    margin-bottom: 18px;
}

.about-grid p {
    color: #6a5a51;
}

.about-img img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 18px 18px 0 var(--brown-600);
}

/* PRODUCTS */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.card-prod {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .35s ease, box-shadow .35s ease;
    animation: fadeInUp .7s ease both;
}

.card-prod:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 35px rgba(62, 39, 35, .14);
}

.card-prod > img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform .5s ease;
}

.card-prod:hover > img {
    transform: scale(1.06);
}

.card-body {
    padding: 22px 20px 20px;
}

.card-body h3 {
    margin-bottom: 8px;
}

.card-body p {
    min-height: 52px;
    font-size: 13px;
    color: #6b625d;
}

.card-footer-prod {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.price {
    font-weight: 700;
    color: var(--brown-700);
}

.btn-order {
    padding: 9px 13px;
    border-radius: 8px;
    background: var(--brown-600);
    color: white;
    font-size: 13px;
}

.btn-order:hover {
    background: var(--brown-700);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--peach);
    color: var(--brown-900);
    font-size: 11px;
    font-weight: 700;
}

/* FEATURES & STATS */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.stat-item {
    animation: floatRight 3s ease-in-out infinite;
}

.stat-item:nth-child(2) { animation-delay: .5s; }
.stat-item:nth-child(3) { animation-delay: 1s; }
.stat-item:nth-child(4) { animation-delay: 1.5s; }

.stat-item h2 {
    margin-bottom: 5px;
    color: var(--peach);
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
}

.stat-item p {
    font-size: 14px;
    opacity: .9;
}

.feature-box,
.testimonial-card {
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.feature-box {
    padding: 30px 20px;
    text-align: center;
    transition: transform .3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-icon {
    margin-bottom: 15px;
    color: var(--brown-600);
    font-size: 40px;
}

.feature-box h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.feature-box p {
    font-size: 13px;
    color: #666;
}

/* TESTIMONIALS */
.testimonial-card {
    min-height: 220px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stars {
    color: #e5a21a;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

.testimonial-card p {
    font-style: italic;
    font-size: 14px;
    color: #555;
}

.client-info {
    margin-top: 20px;
}

.client-info strong,
.client-info span {
    display: block;
}

.client-info span {
    font-size: 12px;
    color: #888;
}

/* STORY / FAQ / MAP */
.story-box {
    padding: 45px;
    border: 2px dashed var(--brown-600);
    border-radius: 20px;
    background: white;
    text-align: center;
    font-style: italic;
}

.story-box span {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    font-style: normal;
}

.faq-container {
    width: min(800px, 100%);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    padding: 18px 22px;
    border-left: 4px solid var(--brown-600);
    border-radius: 10px;
    background: white;
    box-shadow: 0 3px 10px rgba(0,0,0,.04);
}

.faq-item summary {
    cursor: pointer;
    font-weight: 600;
}

.faq-item p {
    padding-top: 10px;
    font-size: 14px;
    color: #666;
}

.map-container {
    overflow: hidden;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

/* FOOTER */
.footer {
    padding: 60px 0 25px;
    background: var(--brown-900);
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.social-icons a {
    color: white;
    font-size: 24px;
    text-decoration: none;
    transition: transform .2s ease, color .2s ease;
}

.social-icons a:hover {
    color: var(--peach);
    transform: translateY(-3px);
}

.footer-copy {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: 13px;
    opacity: .8;
}

/* LOGIN */
.login-page {
    min-height: 100vh;
    background: url('https://images.unsplash.com/photo-1517433367423-c7e5b0f35086?w=1600&auto=format&fit=crop')
        no-repeat center/cover;
}

.login-overlay {
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,.5);
}

.login-card {
    width: min(400px, 100%);
    padding: 45px 35px;
    border-radius: 20px;
    background: white;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,.3);
}

.bakery-icon {
    margin-bottom: 8px;
    font-size: 50px;
}

.login-card h1 {
    margin-bottom: 10px;
    color: var(--brown-600);
    font-family: 'Playfair Display', serif;
}

.login-card > p {
    margin-bottom: 25px;
    font-size: 14px;
    color: #666;
}

.btn-google {
    width: 100%;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: white;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn-google:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,.1);
}

.btn-google:disabled {
    cursor: wait;
    opacity: .65;
}

.form-message {
    min-height: 22px;
    margin: 12px 0 0 !important;
    color: #c0392b !important;
    font-size: 12px !important;
}

.login-footer {
    margin-top: 25px;
    color: #999;
    font-size: 11px;
}

/* ANIMATION */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

/* RESPONSIVE */
@media (max-width: 1050px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 3px;
    }
}

@media (max-width: 800px) {
    .grid-3,
    .grid-4,
    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .about-grid {
        gap: 30px;
    }
}

@media (max-width: 560px) {
    .section {
        padding: 60px 15px;
    }

    .container {
        width: min(100% - 30px, 1100px);
    }

    .brand {
        font-size: 20px;
    }

    .nav-user {
        margin-left: auto;
    }

    .user-profile span {
        display: none;
    }

    .grid-3,
    .grid-4,
    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .about-img img {
        box-shadow: 10px 10px 0 var(--brown-600);
    }

    .card-prod > img {
        height: 220px;
    }

    .story-box {
        padding: 30px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
/* ==========================================
   PERBAIKAN RESPONSIF MOBILE (BARU)
   ========================================== */
@media (max-width: 768px) {
    /* 1. Perbaiki Navbar agar Rapi & Tidak Terpotong */
    /* Membuat logo, menu, dan profil berderet rapi tanpa menumpuk */
    .nav-container {
        flex-wrap: wrap !important; /* Izinkan elemen turun baris */
        justify-content: space-between !important;
        padding: 10px 15px !important;
        gap: 5px !important;
    }

    /* Mengubah menu menjadi list vertikal di HP */
    .nav-links {
        display: none !important; /* Sembunyikan menu standar di HP (untuk ganti hamburger nanti jika ada) */
        /* JIKA ingin tetap tampil, gunakan kode di bawah ini, jika tidak, biarkan default 'none' */
        /* display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        order: 3 !important;
        text-align: center !important;
        gap: 10px !important;
        padding-top: 10px !important; */
    }

    /* Merapikan Foto Profil dan Tombol Logout di Kanan Atas */
    .nav-user {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important; /* Jarak antara foto profil dan tombol logout */
        margin-left: auto !important; /* Paksa ke kanan */
    }

    /* Memastikan tombol logout tidak terlalu besar di HP */
    .btn-logout {
        padding: 8px 15px !important;
        font-size: 14px !important;
    }

    /* 2. Merapikan Section Peta Google Maps */
    /* Memastikan peta rata tengah dan menyesuaikan lebar layar HP */
    .map-section {
        padding: 20px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .map-container {
        width: 100% !important;
        max-width: 600px !important; /* Batas maksimal lebar peta di HP */
        margin: 0 auto !important; /* Pastikan rata tengah */
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    .map-container iframe {
        width: 100% !important;
        height: 250px !important; /* Sesuaikan tinggi peta di HP */
        border: none !important;
    }
}