/* =====================
   RESET & GLOBAL
===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f5f5;
    color: #333;
}

/* =====================
   HEADER
===================== */
header {
    background: #2f6f4e;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    width: 80px;
}

.logo a {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
}

/* =====================
   NAV HORIZONTAL (FIX MOBILE)
===================== */
.nav-horizontal {
    display: flex;
    gap: 18px;
}

.nav-horizontal a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
}

/* ===== MOBILE FIX ===== */
@media (max-width: 768px) {

    .nav-horizontal {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;              /* 🔥 KUNCI */
        overflow-x: auto;               /* 🔥 KUNCI */
        -webkit-overflow-scrolling: touch;
        padding: 10px 5px;
        gap: 10px;
    }

    .nav-horizontal a {
        flex: 0 0 auto;                 /* 🔥 KUNCI */
        padding: 8px 18px;
        background: rgba(255,255,255,0.15);
        border-radius: 6px;
        font-size: 13px;
    }

    /* sembunyikan scrollbar */
    .nav-horizontal::-webkit-scrollbar {
        display: none;
    }
}
/* =========================
   CART NAV WRAPPER
========================= */
.nav-cart {
    position: relative;          /* kunci badge nempel */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

/* =========================
   CART BADGE
========================= */
.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cart-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 18px;
}


/* =========================
   MOBILE ADJUSTMENT
========================= */
@media (max-width: 768px) {
    .nav-horizontal {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .nav-cart {
        font-size: 14px;
    }

    .cart-badge {
        top: 0px;
        right:10px;
        font-size: 10px;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
    }
}



/* =====================
   SLIDER
===================== */
.slider {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caption {
    position: absolute;
    bottom: 40px;
    left: 40px;
    background: rgba(0,0,0,.5);
    color: #fff;
    padding: 15px 20px;
    border-radius: 5px;
}

/* =====================
   HERO
===================== */
.hero {
    background: url("/pengrajin.jpg") center/cover no-repeat;
    color: white;
    text-align: center;
    padding: 100px 20px;
}

.hero h1 {
    font-size: 36px;
    text-shadow: .5px .5px .5px black;
}

.hero p {
    width : auto;
    margin: 15px 0;
    background : white;
    color: #2f6f4e;
    text-shadow: .5px .5px .5px lightgreen;
}

.hero .btn {
    background: #f4a261;
    color: white;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    margin: 5px;
}

/* =====================
   PRODUK
===================== */
.produk {
    padding: 50px;
    text-align: center;
}

.produk-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.card button {
    background: #2f6f4e;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.card h3 {
    font-size: 14px;
    font-weight : bold;    
    text-shadow: .5px .5px .5px lightgray;
}
.card h4 {
    font-size: 12px;
    font-weight : bold;    
    text-shadow: .5px .5px .5px lightgray;
}
.card p {
    font-size: 12px;
}

/* =====================
   ARTIKEL
===================== */
.artikel {
    background: #fff;
    padding: 50px;
}

.artikel-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.artikel-card {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
}

.artikel-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.artikel-content {
    padding: 15px;
}

/* =====================
   FOOTER
===================== */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 15px;
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {

    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-horizontal {
        width: 100%;
        overflow-x: auto;
        gap: 10px;
        padding: 10px 5px;
    }

    .slider {
        height: 250px;
    }

    .caption {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

.artikel-detail {
    padding: 20px;
    background: #f9f9f9;
}

.artikel-wrapper {
    max-width: 800px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
}

.artikel-wrapper h1 {
    font-size: 26px;
    color: #2f6f4e;
}

.artikel-meta {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.artikel-cover {
    width: 100%;
    border-radius: 10px;
    margin: 15px 0;
}

.artikel-body p {
    line-height: 1.8;
    margin-bottom: 12px;
}

.btn-back {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    background: #2f6f4e;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
}
/* =====================
   CARD ACTION BUTTON
===================== */

.card-actions{
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* tombol kiri (lihat galeri) */
.btn-outline{
    flex: 1;
    background: transparent;
    color: #2f6f4e;
    border: 1px solid #2f6f4e;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

.btn-outline:hover{
    background: #2f6f4e;
    color: #fff;
}

/* tombol kanan (beli) */
.btn-primary{
    flex: 1;
    background: #f4a261;
    color: #fff;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

.btn-primary:hover{
    background: #e38b44;
}

/* MOBILE */
@media(max-width: 480px){
    .card-actions{
        flex-direction: column;
    }
}

.card-action {
    display: flex;
    gap: 8px;
}

.card-action button {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
}

.btn-primary {
    background: #2e7d32;
    color: #fff;
    border: none;
}

.btn-secondary {
    background: #e0e0e0;
    border: none;
}

/* ===== SLIDER 2 WRAPPER ===== */
.slider2-wrapper{
    width:100%;
    overflow:hidden;
    margin:30px 0;
}

/* ===== SLIDER HORIZONTAL ===== */
.slider2{
    display:flex;
    gap:15px;
    overflow-x:auto;
    scroll-behavior:smooth;
    padding-bottom:10px;

    /* Hilangkan scrollbar */
    scrollbar-width:none;
}
.slider2::-webkit-scrollbar{
    display:none;
}

/* ===== ITEM ===== */
.slide2{
    flex:0 0 auto;
    width:220px;
    border-radius:12px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 4px 10px rgba(0,0,0,.12);
    text-align:center;
}

/* ===== IMAGE ===== */
.slide2 img{
    width:100%;
    height:160px;
    object-fit:cover; /* gambar proporsional */
    display:block;
}

/* ===== CAPTION ===== */
.caption2{
    padding:10px;
}
.caption2 h2{
    font-size:14px;
    margin:0;
    color:#333;
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
    .slide2{
        width:160px;
    }
    .slide2 img{
        height:120px;
    }
}
.btn-secondary.has-chat
        {
            background:#d32f2f !important;
            color:#fff !important;
            animation:pulse 1.2s infinite;
        }
        
        @keyframes pulse
        {
            0%{ box-shadow:0 0 0 0 rgba(211,47,47,.6); }
            70%{ box-shadow:0 0 0 10px rgba(211,47,47,0); }
            100%{ box-shadow:0 0 0 0 rgba(211,47,47,0); }
        }
#chat-widget * ,
#chat-button {
    pointer-events: auto;
}
.search-form{
    display:flex;
    justify-content:center;
    margin:20px 0;
    gap:10px;
}

.search-form input{
    width:280px;
    padding:10px;
    border-radius:6px;
    border:1px solid #ccc;
}

.search-form button{
    background:#2f6f4e;
    color:#fff;
    border:none;
    padding:10px 18px;
    border-radius:6px;
    cursor:pointer;
}

.search-form button:hover{
    background:#245a3f;
}

.artikel-list{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
gap:20px;
}

.artikel-card{
background:#fff;
border-radius:10px;
overflow:hidden;
box-shadow:0 3px 10px rgba(0,0,0,0.1);
transition:0.3s;
}

.artikel-card:hover{
transform:translateY(-5px);
}

.artikel-image img{
width:100%;
height:180px;
object-fit:cover;
}

.artikel-content{
padding:15px;
}

.artikel-title{
font-size:18px;
margin:10px 0;
}