html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { font-family: 'Space Grotesk', sans-serif; }

.crop { position: relative; }
.crop::before, .crop::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
}
.crop::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.crop::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.regmark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 9999px;
    border: 1.5px solid currentColor;
    position: relative;
    flex-shrink: 0;
}
.regmark::before, .regmark::after { content: ""; position: absolute; background: currentColor; }
.regmark::before { top: 50%; left: -3px; right: -3px; height: 1.5px; transform: translateY(-50%); }
.regmark::after { left: 50%; top: -3px; bottom: -3px; width: 1.5px; transform: translateX(50%); }

.tab-active { color: #E63552; border-color: #E63552; }

/* ===== GRID GALERI: 2 kolom di HP, 3 kolom di layar lebar ===== */
#galeriGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
@media (min-width: 768px) {
    #galeriGrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

/* ===== KARTU ===== */
.galeri-item { cursor: pointer; }

.galeri-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.galeri-item[data-cat="yasin"] img {
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
}

.demo-link {
    display: block; margin-top: 8px; text-align: center;
    font-size: 14px; font-weight: 500; color: #E63552; text-decoration: underline;
}

@media (max-width: 639px) {
    .galeri-item { padding: 10px !important; }
    .galeri-item .item-nama { font-size: 13px !important; }
    .galeri-item .item-harga { font-size: 15px !important; }
}

/* ===== DROPDOWN KATEGORI ===== */
.dd { position: relative; display: block; width: 100%; min-width: 220px; max-width: 320px; }

.dd-btn {
    width: 100%;
    display: flex; align-items: center; justify-content: flex-start;
    padding: 12px 16px;
    font-size: 14px; font-weight: 500; color: #1a1a1a;
    background: #fff none;
    -webkit-appearance: none; appearance: none;
    border: 1px solid #d9d9d9; border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.dd-btn:hover,
.dd.open .dd-btn { border-color: #712B13; }
.dd.open .dd-btn { box-shadow: 0 0 0 3px rgba(113,43,19,.15); }

.dd-menu {
    display: none;
    position: absolute; top: calc(100% + 8px); left: 0;
    width: 100%; max-height: 340px; overflow-y: auto;
    background: #fff;
    border: 1px solid #eee; border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    padding: 8px; z-index: 50;
}
.dd.open .dd-menu { display: block; }

.dd-title { padding: 10px 12px; font-size: 14px; font-weight: 700; color: #1a1a1a; }

.dd-item {
    padding: 10px 12px; font-size: 14px; color: #333;
    border-radius: 8px; cursor: pointer;
    transition: background .12s;
}
.dd-item:hover { background: #f4f4f4; }
.dd-item.active { background: #FAECE7; color: #712B13; font-weight: 600; }

/* ===== TABEL HARGA NOTA ===== */
#notaTabel { margin-top: 40px; }
.nota-judul { font-size: 14px; font-weight: 600; color: #1a1a1a; margin: 0 0 10px; }
.nota-wrap {
    overflow-x: auto;
    border: 1px solid #e5e5e5; border-radius: 12px;
    background: #fff;
}
.nota-tabel { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 14px; }
.nota-tabel th, .nota-tabel td { padding: 12px 16px; text-align: left; }
.nota-tabel thead th { background: #faf7f5; font-weight: 600; color: #1a1a1a; vertical-align: bottom; }
.nota-tabel th span { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: #777; }
.nota-tabel tbody tr { border-top: 1px solid #eee; }
.nota-tabel tbody td:first-child { font-weight: 500; color: #1a1a1a; }
.nota-tabel tbody td:not(:first-child) { font-weight: 600; color: #712B13; }
.nota-catatan { margin: 10px 0 0; font-size: 13px; color: #666; }

/* ===== DETAIL DESAIN ===== */
.detail-modal {
    display: none;
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,.65);
    align-items: center; justify-content: center;
    padding: 16px;
}
.detail-modal.open { display: flex; }

.detail-box {
    position: relative;
    display: flex; flex-direction: column;
    width: 100%; max-width: 920px; max-height: 92vh;
    background: #fff; border-radius: 14px; overflow: hidden;
}
.detail-imgwrap {
    position: relative;
    flex: 1; min-height: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f5f5f5; padding: 12px;
}
.detail-imgwrap img {
    max-width: 100%; max-height: 62vh;
    width: auto; height: auto; object-fit: contain;
}

.detail-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 40px; height: 40px; border: 0; border-radius: 9999px;
    background: rgba(255,255,255,.92); color: #1a1a1a;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    font-size: 26px; line-height: 1; cursor: pointer;
}
.detail-nav:hover { background: #fff; }
.detail-nav:disabled { opacity: .35; cursor: default; }
.detail-prev { left: 10px; }
.detail-next { right: 10px; }

.detail-info { padding: 16px 20px 20px; text-align: center; }
.detail-info h3 { font-size: 20px; font-weight: 600; color: #1a1a1a; margin: 0; }
.detail-info p { font-size: 22px; font-weight: 700; color: #712B13; margin: 6px 0 0; }
.detail-spek {
    list-style: none; margin: 16px 0 0; padding: 0;
    font-size: 14px; color: #333; text-align: left;
    border-top: 1px solid #eee;
}
.detail-spek li { padding: 8px 0; border-bottom: 1px solid #eee; }
.detail-hitung { display: block; margin-top: 16px; font-size: 12px; color: #999; }

.detail-close {
    position: absolute; top: 8px; right: 12px; z-index: 3;
    width: 36px; height: 36px; border: 0; border-radius: 9999px;
    background: rgba(255,255,255,.9); color: #1a1a1a;
    font-size: 24px; line-height: 1; cursor: pointer;
}

@media (min-width: 768px) {
    .detail-box { flex-direction: row; }
    .detail-imgwrap { flex: 1.4; }
    .detail-imgwrap img { max-height: 88vh; }
    .detail-info {
        flex: 1; display: flex; flex-direction: column;
        justify-content: center; text-align: left; padding: 32px;
        overflow-y: auto;
    }
}