/* =====================================================================
   BIVAK RENTAL - Katalog barang vendor (mandiri / self-contained)
   ---------------------------------------------------------------------
   Semua kelas di file ini dipakai oleh vendor-shop.js dan admin-pin.js.
   File ini SENGAJA tidak menyentuh kelas milik styles.css supaya
   perbaikan tampilan vertical/mobile yang sudah ada tetap aman.
   Ditulis mobile-first: default = layar sempit (format vertical),
   lalu diperlebar lewat media query.
   ===================================================================== */

/* ------------------------------------------------------- catatan platform */
.shop-disclaimer {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: rgba(16, 185, 129, 0.08);
	border: 1px solid rgba(16, 185, 129, 0.28);
	border-left: 4px solid #10b981;
	border-radius: 12px;
	padding: 12px 14px;
	margin: 0 0 18px;
	font-size: 0.86rem;
	line-height: 1.55;
	color: #d7f5e7;
	text-align: left;
}
.shop-disclaimer i {
	color: #10b981;
	font-size: 1rem;
	margin-top: 2px;
	flex: 0 0 auto;
}
.shop-disclaimer strong {
	display: block;
	color: #fff;
	font-weight: 700;
	margin-bottom: 3px;
}
.shop-disclaimer.compact {
	margin-bottom: 14px;
	padding: 10px 12px;
	font-size: 0.8rem;
}

/* ------------------------------------- kepala detail toko (modal vendor) */
.shop-head {
	display: block;
	margin-bottom: 16px;
}
.shop-head-cover {
	width: 100%;
	height: 150px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
	background: #16211c;
}
.shop-head-info {
	padding-top: 12px;
}
.shop-head-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: #fff;
	margin: 0 0 4px;
	line-height: 1.35;
	word-break: break-word;
}
.shop-head-city,
.shop-head-address {
	display: flex;
	gap: 7px;
	align-items: flex-start;
	font-size: 0.84rem;
	color: #9fb3aa;
	margin: 3px 0;
	line-height: 1.5;
	word-break: break-word;
}
.shop-head-city i,
.shop-head-address i {
	color: #10b981;
	margin-top: 3px;
}
.shop-head-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	font-size: 0.8rem;
	color: #cfe9dd;
}
.shop-head-meta span {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 999px;
	padding: 4px 11px;
	white-space: nowrap;
}
.shop-section-title {
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: 0.95rem;
	font-weight: 700;
	color: #fff;
	margin: 18px 0 10px;
}
.shop-section-title i {
	color: #10b981;
}
.shop-empty {
	text-align: center;
	padding: 26px 14px;
	color: #9fb3aa;
	font-size: 0.88rem;
	line-height: 1.6;
	background: rgba(255, 255, 255, 0.03);
	border: 1px dashed rgba(255, 255, 255, 0.14);
	border-radius: 12px;
}
.shop-empty i {
	display: block;
	font-size: 1.6rem;
	color: #10b981;
	margin-bottom: 8px;
}
.shop-contact-btn,
.shop-logout-btn {
	width: 100%;
	justify-content: center;
}
.shop-danger {
	color: #fca5a5 !important;
	border-color: rgba(248, 113, 113, 0.45) !important;
}
.shop-manage-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

/* ------------------------------------------------- tab kategori peralatan */
.gear-category-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0 0 14px;
}
.gear-cat-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #cfe9dd;
	border-radius: 999px;
	padding: 6px 13px;
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s ease;
	white-space: nowrap;
}
.gear-cat-btn:hover {
	border-color: rgba(16, 185, 129, 0.5);
	color: #fff;
}
.gear-cat-btn.active {
	background: #10b981;
	border-color: #10b981;
	color: #05130d;
}

/* --------------------------------------------- kartu barang di detail toko */
.gear-items-grid {
	display: grid;
	grid-template-columns: 1fr; /* format vertical: satu kolom penuh */
	gap: 12px;
}
.gear-item-card {
	display: flex;
	gap: 12px;
	align-items: stretch;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 14px;
	padding: 11px;
	transition: border-color 0.18s ease, transform 0.18s ease;
}
.gear-item-card:hover {
	border-color: rgba(16, 185, 129, 0.45);
}
.gear-item-card.is-highlight {
	border-color: #10b981;
	box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.gear-item-thumb {
	width: 78px;
	height: 78px;
	flex: 0 0 78px;
	object-fit: cover;
	border-radius: 10px;
	background: #16211c;
}
.gear-item-content {
	flex: 1 1 auto;
	min-width: 0; /* wajib: supaya teks panjang mau wrap, tidak terpotong */
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.gear-item-title {
	font-size: 0.92rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.35;
	word-break: break-word;
}
.gear-item-cat {
	font-size: 0.72rem;
	color: #10b981;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 700;
}
.gear-item-desc {
	font-size: 0.8rem;
	color: #9fb3aa;
	line-height: 1.5;
	white-space: normal;
	word-break: break-word;
}
.gear-item-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}
.gear-price-day {
	font-size: 0.9rem;
	font-weight: 700;
	color: #10b981;
	white-space: nowrap;
}
.gear-stock-badge {
	font-size: 0.72rem;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(16, 185, 129, 0.16);
	color: #6ee7b7;
	border: 1px solid rgba(16, 185, 129, 0.35);
	white-space: nowrap;
}
.gear-stock-badge.low {
	background: rgba(245, 158, 11, 0.16);
	color: #fcd34d;
	border-color: rgba(245, 158, 11, 0.4);
}
.gear-stock-badge.empty {
	background: rgba(248, 113, 113, 0.14);
	color: #fca5a5;
	border-color: rgba(248, 113, 113, 0.38);
}

/* stepper jumlah (dipakai vendor saat mengatur unit siap sewa) */
.gear-qty-stepper {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 999px;
	padding: 3px;
}
.gear-qty-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: none;
	background: rgba(16, 185, 129, 0.18);
	color: #6ee7b7;
	font-size: 0.85rem;
	cursor: pointer;
	line-height: 1;
}
.gear-qty-btn:hover {
	background: #10b981;
	color: #05130d;
}
.gear-qty-val {
	min-width: 34px;
	text-align: center;
	font-weight: 700;
	color: #fff;
	font-size: 0.85rem;
}

/* --------------------------------- cuplikan barang di kartu vendor beranda */
.mini-items-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
	margin: 10px 0 2px;
}
.mini-item {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	background: #16211c;
	border: 1px solid rgba(255, 255, 255, 0.08);
	min-width: 0;
}
.mini-item img {
	width: 100%;
	height: 62px;
	object-fit: cover;
	display: block;
}
.mini-item-info {
	display: flex;
	flex-direction: column;
	gap: 1px;
	padding: 5px 7px 6px;
	min-width: 0;
}
.mini-item-name {
	font-size: 0.72rem;
	font-weight: 600;
	color: #eaf6f0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mini-item-price {
	font-size: 0.7rem;
	font-weight: 700;
	color: #6ee7b7;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.mini-item-stock {
	position: absolute;
	top: 5px;
	right: 5px;
	font-size: 0.62rem;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 999px;
	background: rgba(5, 19, 13, 0.82);
	color: #6ee7b7;
	backdrop-filter: blur(3px);
}
.mini-item-stock.low {
	color: #fcd34d;
}
.mini-item-stock.empty {
	color: #fca5a5;
}
.mini-items-empty {
	grid-column: 1 / -1;
	font-size: 0.76rem;
	color: #8fa39a;
	padding: 9px 10px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px dashed rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	text-align: center;
	line-height: 1.5;
}
.mini-items-empty i {
	color: #10b981;
	margin-right: 5px;
}
.mini-items-more {
	grid-column: 1 / -1;
	font-size: 0.72rem;
	font-weight: 600;
	color: #6ee7b7;
	text-align: center;
	padding: 4px 0 0;
}

/* --------------------------------- baris kelola barang (dashboard vendor) */
.stock-manage-row {
	display: flex;
	flex-direction: column; /* format vertical: isian tidak saling menindih */
	gap: 10px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 10px;
}
.stock-manage-main {
	flex: 1 1 auto;
	min-width: 0;
}
.stock-manage-name {
	font-size: 0.9rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.4;
	word-break: break-word;
	margin-bottom: 3px;
}
.stock-manage-meta {
	font-size: 0.78rem;
	color: #9fb3aa;
	line-height: 1.5;
	word-break: break-word;
}
.stock-manage-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/* ------------------------------------------------ PIN toko di panel admin */
.btn-vendor-pin {
	margin-right: 6px;
	margin-bottom: 4px;
	white-space: nowrap;
}
.btn-vendor-pin.pin-missing {
	border-color: rgba(245, 158, 11, 0.55) !important;
	color: #fcd34d !important;
}
.pin-vendor-name {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 12px;
	font-size: 0.8rem;
	color: #9fb3aa;
}
.pin-vendor-name strong {
	font-size: 1rem;
	color: #fff;
	word-break: break-word;
}
.pin-reveal {
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.35);
	border-radius: 14px;
	padding: 16px;
	text-align: center;
}
.pin-reveal.is-hidden {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.12);
}
.pin-reveal-label {
	font-size: 0.76rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #6ee7b7;
	font-weight: 700;
	margin-bottom: 8px;
}
.pin-reveal-value {
	font-size: 2rem;
	font-weight: 800;
	letter-spacing: 0.22em;
	color: #fff;
	font-family: "Courier New", monospace;
	word-break: break-all;
	line-height: 1.2;
}
.pin-reveal-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 14px;
}
.pin-reveal-actions .btn,
.pin-footer-actions .btn {
	width: 100%;
	justify-content: center;
}
.pin-note {
	font-size: 0.78rem;
	color: #9fb3aa;
	line-height: 1.6;
	margin: 12px 0 0;
}
.pin-note i {
	color: #fcd34d;
	margin-right: 5px;
}
.pin-footer-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------- tombol toko vendor di footer */
.footer-shop-btn {
	background: rgba(16, 185, 129, 0.14);
	border: 1px solid rgba(16, 185, 129, 0.4);
	color: #6ee7b7;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1rem;
	transition: all 0.18s ease;
}
.footer-shop-btn:hover {
	background: #10b981;
	color: #05130d;
}

/* ----------------------------------------------------- layar lebih lebar */
@media (min-width: 560px) {
	.gear-item-thumb {
		width: 92px;
		height: 92px;
		flex: 0 0 92px;
	}
	.mini-items-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.mini-item img {
		height: 58px;
	}
	.stock-manage-row {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
	.stock-manage-actions {
		justify-content: flex-end;
	}
	.pin-reveal-actions,
	.pin-footer-actions {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: center;
	}
	.pin-reveal-actions .btn,
	.pin-footer-actions .btn {
		width: auto;
	}
	.shop-contact-btn,
	.shop-logout-btn {
		width: auto;
	}
}

@media (min-width: 900px) {
	.gear-items-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.shop-head {
		display: flex;
		gap: 16px;
		align-items: flex-start;
	}
	.shop-head-cover {
		width: 190px;
		height: 130px;
		flex: 0 0 190px;
	}
	.shop-head-info {
		padding-top: 0;
		min-width: 0;
	}
}

/* ------------------------------- pesan status pada panel kelola barang toko */
.shop-order-status {
	display: block;
	margin: 12px 0 0;
	padding: 11px 13px;
	border-radius: 10px;
	font-size: 0.84rem;
	line-height: 1.55;
	border: 1px solid transparent;
	word-break: break-word;
}
.shop-order-status.is-info {
	background: rgba(59, 130, 246, 0.12);
	border-color: rgba(59, 130, 246, 0.35);
	color: #bfdbfe;
}
.shop-order-status.is-success {
	background: rgba(16, 185, 129, 0.12);
	border-color: rgba(16, 185, 129, 0.35);
	color: #a7f3d0;
}
.shop-order-status.is-error {
	background: rgba(248, 113, 113, 0.12);
	border-color: rgba(248, 113, 113, 0.38);
	color: #fecaca;
}
.shop-order-status b {
	color: #fff;
}

/* ============================== PERBAIKAN 2026-09-08 ==============================
   Kartu barang di modal detail tampil berantakan (foto raksasa + label menempel):
   - .gear-item-thumb adalah DIV pembungkus <img>, tetapi tidak ada aturan untuk
     img di dalamnya, sehingga foto tampil sebesar ukuran aslinya (ratusan piksel)
     dan merusak kartu. object-fit pada div tidak berpengaruh ke img anak.
   - .gear-stock-badge di dalam thumb tidak punya posisi absolut.
   - .gear-item-facts <span>/<b> tidak punya aturan tampilan, jadi label dan nilai
     menempel ("Jumlah5 unit").
   ================================================================================ */
.gear-item-thumb {
	position: relative;
	overflow: hidden;
}
.gear-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.gear-item-thumb .gear-stock-badge {
	position: absolute;
	left: 5px;
	bottom: 5px;
	font-size: 0.6rem;
	padding: 2px 6px;
	background: rgba(5, 19, 13, 0.82);
	backdrop-filter: blur(3px);
}
.gear-item-facts > div {
	display: flex;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}
.gear-item-facts span {
	font-size: 0.68rem;
	color: #9fb3aa;
	line-height: 1.2;
}
.gear-item-facts b {
	font-size: 0.85rem;
	color: #fff;
	line-height: 1.3;
}
.gear-item-facts b small {
	font-weight: 400;
	color: #9fb3aa;
}
