/* ========================================
   JASUL — LAYOUT STYLES
   ======================================== */

/* ---------- NAVBAR ---------- */
.navbar {
    background: #FFFFFF !important;
    border-bottom: 1px solid rgba(169, 101, 42, 0.15);
    box-shadow: 0 2px 12px rgba(21, 93, 39, 0.06);
}

.navbar.navbar-scrolled {
    background: #FFFFFF !important;
    box-shadow: 0 4px 20px rgba(21, 93, 39, 0.12);
    border-bottom-color: rgba(169, 101, 42, 0.25);
}

.nav-link {
    color: #155D27;
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #A9652A;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.nav-link:hover,
.nav-link.active { color: #75421D; }

/* ---------- MOBILE MENU ---------- */
.mobile-menu {
    background: #FFFFFF !important;
    border-top: 1px solid rgba(169, 101, 42, 0.15);
    box-shadow: 0 8px 20px rgba(21, 93, 39, 0.1);
}

.mobile-nav-link {
    color: #155D27;
    display: block;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(21, 93, 39, 0.08);
    color: #75421D;
}

/* Hamburger Animation */
#mobileMenuBtn {
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

#mobileMenuBtn .hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: #155D27;
    transition: all 0.3s ease;
    border-radius: 2px;
}

#mobileMenuBtn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobileMenuBtn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobileMenuBtn.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---------- FOOTER (FIX GRID) ---------- */
.footer {
    background: #061F0D !important;
    color: #F8F6F0 !important;
    border-top: 3px solid #A9652A;
    width: 100%;
    overflow-x: hidden;
}

.footer * {
    box-sizing: border-box;
}

.footer p,
.footer span,
.footer li,
.footer div,
.footer a {
    color: rgba(255, 255, 255, 0.85);
}

.footer h4 {
    color: #FFFFFF !important;
}

.footer a.footer-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
    text-decoration: none;
}

.footer a.footer-link:hover {
    color: #C58A4A !important;
    padding-left: 4px;
}

.footer .text-coco-light,
.footer p.text-coco-light {
    color: #D4A574 !important;
}

.footer a[href^="mailto"],
.footer a[href^="https://wa.me"] {
    color: #FFFFFF !important;
    text-decoration: none;
}

.footer a[href^="mailto"]:hover,
.footer a[href^="https://wa.me"]:hover {
    color: #C58A4A !important;
}

/* ---------- FOOTER GRID OVERRIDE (PASTI BERFUNGSI) ---------- */
.footer .grid {
    display: grid !important;
    gap: 2rem;
}

@media (min-width: 1024px) {
    /* Top row: brand 5 kolom + navigasi 3 kolom + legal 3 kolom */
    .footer .lg\:grid-cols-12 {
        grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    }

    .footer .lg\:col-span-5 {
        grid-column: span 5 / span 5 !important;
    }

    .footer .lg\:col-span-3 {
        grid-column: span 3 / span 3 !important;
    }

    .footer .lg\:col-start-7 {
        grid-column-start: 7 !important;
    }

    /* Contact row: 3 kolom */
    .footer .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    /* Tablet: contact row 2 kolom */
    .footer .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 639px) {
    /* Mobile: semua 1 kolom */
    .footer .grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- PRODUCT CARD ---------- */
.product-card {
    background: #FFFFFF;
    border: 1px solid rgba(169, 101, 42, 0.12);
    box-shadow: 0 4px 16px rgba(21, 93, 39, 0.04);
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: #A9652A;
    box-shadow: 0 12px 32px rgba(21, 93, 39, 0.12);
    transform: translateY(-4px);
}

/* ---------- PAGE TRANSITION ---------- */
main { animation: pageFadeIn 0.4s ease-out; }

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- FOOTER: PASTIKAN TEXT RATA KIRI/KANAN BERFUNGSI ---------- */
.footer .text-right,
.footer .md\:text-right {
    text-align: right !important;
}

.footer .text-center {
    text-align: center !important;
}

@media (max-width: 767px) {
    .footer .text-right,
    .footer .md\:text-right {
        text-align: left !important;
    }
}
