/* ============================================
   Toko Template Widget — Frontend Styles
   ============================================ */

.ttw-wrap { padding: 0; }

/* ── Search Bar ── */
.ttw-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 16px;
    background: #fff;
    margin-bottom: 16px;
    transition: border-color .2s;
}
.ttw-search-wrap:focus-within {
    border-color: #E05A1E;
}
.ttw-search {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #111;
    width: 100%;
    font-family: inherit;
}
.ttw-search::placeholder { color: #9ca3af; }

/* ── Tombol Filter Kategori ── */
.ttw-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.ttw-cat-btn {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1.5px solid #e5e7eb;
    font-size: 13px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    line-height: 1;
}
.ttw-cat-btn:hover {
    border-color: #E05A1E;
    color: #E05A1E;
}
.ttw-cat-btn.active {
    background: #E05A1E;
    color: #fff;
    border-color: #E05A1E;
}

/* ── Jumlah Produk ── */
.ttw-count {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}
.ttw-count strong { color: #111; }

/* ── Grid ── */
.ttw-grid {
    display: grid;
    /* kolom diatur via inline style dari widget PHP */
}

/* ── Kartu ── */
.ttw-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.ttw-card:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, .09);
    transform: translateY(-3px);
}

/* Gambar */
.ttw-card__img-link { display: block; }
.ttw-card__img {
    /* tinggi diatur via inline style dari widget PHP */
    background: #fef3ec center / cover no-repeat;
    transition: opacity .2s;
}
.ttw-card__img-link:hover .ttw-card__img {
    opacity: .92;
}

/* Body */
.ttw-card__body { padding: 14px 16px; }

/* Tags */
.ttw-card__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.ttw-tag-kat {
    font-size: 10px;
    font-weight: 700;
    color: #E05A1E;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.ttw-tag-disc {
    font-size: 10px;
    background: #E05A1E;
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}
.ttw-tag-free {
    font-size: 10px;
    background: #dcfce7;
    color: #166534;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

/* Judul */
.ttw-card__title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 12px !important;
    line-height: 1.4;
    padding: 0 !important;
    border: none !important;
}

/* Harga */
.ttw-card__price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.ttw-card__price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1;
}
.ttw-card__price--free {
    color: #16a34a;
    font-size: 16px;
}
/* Override style harga WooCommerce bawaan */
.ttw-card__price del {
    font-size: 12px !important;
    color: #9ca3af !important;
    font-weight: 400 !important;
    margin-left: 4px;
    opacity: 1 !important;
}
.ttw-card__price ins {
    text-decoration: none !important;
    background: none !important;
}
.ttw-card__price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Tombol panah */
.ttw-arrow-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #6b7280;
    text-decoration: none !important;
    transition: background .15s, border-color .15s, color .15s;
    flex-shrink: 0;
    line-height: 1;
}
.ttw-arrow-btn:hover {
    background: #fef3ec;
    border-color: #E05A1E;
    color: #E05A1E;
}

/* ── Pesan Kosong ── */
.ttw-empty {
    text-align: center;
    padding: 3rem;
    color: #9ca3af;
    font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .ttw-card__img { height: 130px !important; }
    .ttw-cat-btn { font-size: 12px; padding: 6px 12px; }
}
