/* ====== Font & Tokens ====== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    --c-white: #ffffff;
    --c-soft: #E9F5EC; /* pastel green */
    --c-soft-2: #F6FBF8; /* latar sangat lembut */
    --c-accent: #8FBC8F; /* primary green */
    --c-accent-soft: #BEE3C6; /* gradient pair */
    --c-deep: #2F6F52; /* judul / ikon */
    --c-muted: #5a7a6a; /* body text */

    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, .06);
    --shadow-md: 0 12px 30px rgba(143, 188, 143, .15);
    --speed: .3s;
}

* { box-sizing: border-box; }

body {
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ====== WRAPPER DETAIL ====== */
.umkm-detail {
    display: grid;
    grid-template-columns: minmax(260px, 520px) 1fr; 
    gap: 2rem;
    margin: 1.5rem auto;
    max-width: 1100px;
    padding: 1rem;
    align-items: start; 
    background: linear-gradient(180deg, #fff 0%, var(--c-soft-2) 100%);
    border: 1px solid var(--c-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.umkm-left { grid-column: 1; }
.umkm-right {
    grid-column: 2;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--c-muted);
    padding-right: .25rem;
}

/* Nama UMKM → selalu di tengah atas */
.umkm-title {
    text-align: center;  
    margin: 1.25rem 0; 
    font-weight: 800;
    color: var(--c-deep);
    font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem);
    letter-spacing: .01em;
}

/* ====== Gambar utama (slider UMKM) ====== */
.slider {
    display: flex;
    justify-content: center;
}

.slider img {
    width: 100%;
    max-width: 520px;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-soft);
    box-shadow: var(--shadow-sm);
    object-fit: cover;
    transition: transform .25s ease, box-shadow .25s ease, opacity .35s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* ====== KONTAK & ALAMAT ====== */
.umkm-contact {
    max-width: 1100px;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
}

.contact-title {
    text-align: center;
    margin: 0 0 1.25rem;
    font-weight: 800;
    color: var(--c-deep);
    font-size: clamp(1.1rem, .95rem + .6vw, 1.5rem);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-card {
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-soft);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform var(--speed) ease, box-shadow var(--speed) ease, border-color var(--speed) ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-accent);
}

.contact-card h3 {
    margin: 0 0 .35rem;
    font-weight: 800;
    color: var(--c-accent);
    font-size: 1rem;
}

.contact-card p {
    margin: 0;
    color: var(--c-muted);
    font-size: .95rem;
}

.map-container {
    margin-top: 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--c-soft);
    box-shadow: var(--shadow-sm);
}

/* ====== KATALOG PRODUK (galeri) ====== */
.katalog-wrap {
    max-width: 1100px;
    margin: 2.25rem auto;
    padding: 0 1rem;
}

.katalog-title {
    text-align: center;
    margin: 0 0 .9rem;
    font-weight: 800;
    color: var(--c-deep);
    font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem);
}

.katalog {
    display: flex;
    gap: 32px;
    padding: 22px 16px;
    background: #fff;
    border: 1px solid var(--c-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    align-items: flex-start;
}

/* Kiri: display + thumbnails */
.produk-display {
    flex: 0 0 50%;
    max-width: 460px;
    text-align: center;
}

.main-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-soft);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.thumbnail-container {
    display: flex;
    justify-content: center;   /* selalu center */
    align-items: center;       /* vertikal rata tengah */
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;               /* penting biar bisa full center */
    text-align: center;
}

.thumbnail-container img {
    width: 90px;
    height: 68px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--c-soft);
    transition: transform .2s ease, border-color .2s ease;
}

.thumbnail-container img:hover {
    transform: scale(1.05);
    border-color: var(--c-accent);
}

/* Bagian deskripsi */
.produk-deskripsi {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 24px;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-soft);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.produk-deskripsi h2 {
    margin: .1rem 0 .5rem;
    color: var(--c-deep);
    font-weight: 800;
    font-size: 1.4rem;
}

.harga {
    font-size: 1rem;
    font-weight: 800;
    margin-left: .35rem;
    background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-accent-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.produk-deskripsi p {
    color: var(--c-muted);
    line-height: 1.75;
    margin: .4rem 0;
}

.produk-deskripsi hr {
    border: none;
    height: 1px;
    background: var(--c-soft);
    margin: .8rem 0 .6rem;
}

/* ====== ANIMASI ====== */
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-left { transform: translateX(-16px); }
.reveal-right { transform: translateX(16px); }
.reveal-up { transform: translateY(18px); }

.is-visible.reveal-left,
.is-visible.reveal-right,
.is-visible.reveal-up { transform: none; }

.slider img.appear,
.thumbnail-container img.appear { animation: fadeIn .6s ease both; }

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

.slider img:hover {
    transform: scale(1.015);
    box-shadow: var(--shadow-md);
}

/* Judul underline aksen */
.umkm-title,
.katalog-title,
.contact-title { position: relative; }

.umkm-title.is-visible::after,
.katalog-title.is-visible::after,
.contact-title.is-visible::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    width: 72px;
    height: 3px;
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-soft));
    transform: translateX(-50%) scaleX(1);
    border-radius: 2px;
    animation: growBar .7s ease .15s both;
}

@keyframes growBar {
    from { transform: translateX(-50%) scaleX(0); }
    to { transform: translateX(-50%) scaleX(1); }
}

/* ====== RESPONSIVE FIX ====== */

/* Laptop / tablet besar */
@media (max-width: 1024px) {
  .katalog { gap: 22px; }
  .main-img { height: 300px; }
}

/* Tablet & HP */
@media (max-width: 768px) {
  .umkm-detail {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .umkm-left,
  .umkm-right {
    grid-column: 1;
    max-width: 100%;
  }

  .slider img {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    height: auto;
    opacity: 1 !important;   /* pastikan gambar selalu terlihat */
    visibility: visible !important;
    transform: none !important;
  }

  .umkm-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }

  /* Produk detail (katalog) */
  .katalog {
    flex-direction: column;
    gap: 20px;
    padding: 16px 12px;
  }

  .produk-display {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .main-img {
    display: block;
    margin: 0 auto 12px;
    height: auto;
    max-height: 280px;
  }

  .thumbnail-container { justify-content: center; }
  .thumbnail-container img { width: 72px; height: 54px; }

  .produk-deskripsi {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 16px;
    text-align: center;
  }

  .produk-deskripsi h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .harga {
    display: block;
    margin: 8px 0;
  }

  .produk-deskripsi p {
    font-size: 0.95rem;
    text-align: justify;
  }
}

/* HP kecil */
@media (max-width: 480px) {
  .main-img { max-height: 220px; }
  .thumbnail-container img { width: 60px; height: 45px; }
  .produk-deskripsi { padding: 16px 12px; }
  .produk-deskripsi h2 { font-size: 1.05rem; }
  .harga { font-size: 0.95rem; }
}
