/* =========================================================
   UG Equipment Showcase Pro — Frontend Styles
   ========================================================= */

:root {
	--ug-primary: #9F2842;
	--ug-primary-dark: #7e2035;
	--ug-secondary: #53575A;
	--ug-bg: #F8F9FB;
	--ug-accent: #FFFFFF;
	--ug-border: #E7E9EC;
	--ug-radius: 12px;
	--ug-radius-sm: 8px;
	--ug-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	--ug-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.10);
	--ug-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ug-equipment-single, .ug-archive {
	font-family: var(--ug-font);
	color: #1F2226;
	background: var(--ug-bg);
}

.ug-equipment-single *, .ug-archive * {
	box-sizing: border-box;
}

/* ---------- Breadcrumbs ---------- */
.ug-breadcrumbs {
	font-size: 13px;
	color: var(--ug-secondary);
	margin: 24px auto 16px;
	max-width: 1280px;
	padding: 0 20px;
}
.ug-breadcrumbs a { color: var(--ug-secondary); text-decoration: none; }
.ug-breadcrumbs a:hover { color: var(--ug-primary); }
.ug-breadcrumbs span[aria-hidden] { margin: 0 6px; opacity: .5; }

/* ---------- Layout ---------- */
.ug-single-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 28px;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
	align-items: start;
}
.ug-single-below {
	max-width: 1280px;
	margin: 40px auto 60px;
	padding: 0 20px;
	display: flex;
	flex-direction: column;
	gap: 36px;
}

@media (max-width: 960px) {
	.ug-single-layout { grid-template-columns: 1fr; }
}

/* ---------- Gallery ---------- */
.ug-gallery {
	background: var(--ug-accent);
	border-radius: var(--ug-radius);
	box-shadow: var(--ug-shadow);
	overflow: hidden;
}
.ug-gallery-viewport { padding: 16px; }

.ug-gallery-panel { display: none; }
.ug-gallery-panel.is-active { display: block; }

/* ---------- Pill control bar (below the viewport) ---------- */
.ug-gallery-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 0 16px 16px;
}
.ug-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1.5px solid rgba(159, 40, 66, 0.22);
	background: var(--ug-accent);
	color: var(--ug-primary);
	font-weight: 700;
	font-size: 14px;
	font-family: var(--ug-font);
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.ug-pill:hover {
	border-color: var(--ug-primary);
	background: rgba(159, 40, 66, 0.06);
	transform: translateY(-1px);
}
.ug-pill-icon { display: flex; align-items: center; color: currentColor; }
.ug-pill-count {
	background: var(--ug-bg);
	color: var(--ug-secondary);
	font-size: 12px;
	font-weight: 700;
	border-radius: 999px;
	padding: 2px 8px;
	line-height: 1.4;
}

/* Solid/featured pill — used for the 3D viewer, the primary call-out */
.ug-pill-solid {
	background: var(--ug-primary);
	border-color: var(--ug-primary);
	color: #fff;
}
.ug-pill-solid:hover { background: var(--ug-primary-dark); border-color: var(--ug-primary-dark); }
.ug-pill-solid .ug-pill-count { background: rgba(255, 255, 255, 0.2); color: #fff; }

.ug-pill.is-active:not(.ug-pill-solid) {
	border-color: var(--ug-primary);
	background: rgba(159, 40, 66, 0.08);
}

.ug-pill-link { }

@media (max-width: 480px) {
	.ug-gallery-pills { gap: 8px; }
	.ug-pill { padding: 9px 14px; font-size: 13px; }
}

.ug-gallery-main {
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: var(--ug-radius-sm);
	overflow: hidden;
	background: var(--ug-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
}
.ug-gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s ease; }
.ug-gallery-placeholder { background: linear-gradient(135deg, #eee, #f6f6f6); }

.ug-gallery-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 12px;
	overflow-x: auto;
	padding-bottom: 4px;
}
.ug-gallery-thumb {
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	padding: 0;
	border-radius: var(--ug-radius-sm);
	border: 2px solid transparent;
	overflow: hidden;
	cursor: pointer;
	background: none;
}
.ug-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ug-gallery-thumb.is-active { border-color: var(--ug-primary); }

/* Video grid */
.ug-video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
}
.ug-video-thumb {
	background: var(--ug-bg);
	border: 1px solid var(--ug-border);
	border-radius: var(--ug-radius-sm);
	padding: 24px 12px;
	text-align: center;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}
.ug-video-play {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--ug-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ug-video-title { font-size: 13px; color: var(--ug-secondary); }

.ug-video-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.85);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.ug-video-lightbox[hidden] { display: none; }
.ug-video-lightbox-inner { width: 100%; max-width: 900px; position: relative; }
.ug-video-lightbox-body { position: relative; padding-top: 56.25%; }
.ug-video-lightbox-body iframe, .ug-video-lightbox-body video {
	position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.ug-video-lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
}

/* 3D viewer */
.ug-sketchfab-lazy {
	position: relative;
	background: var(--ug-bg);
	border-radius: var(--ug-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.ug-sketchfab-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.ug-sketchfab-load-btn {
	position: relative;
	z-index: 1;
	background: var(--ug-primary);
	color: #fff;
	border: none;
	padding: 12px 24px;
	border-radius: 999px;
	font-weight: 600;
	cursor: pointer;
}
.ug-sketchfab-lazy iframe { width: 100%; height: 100%; border: 0; }

.ug-short-description {
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ug-secondary);
}

/* ---------- Sidebar ---------- */
.ug-sidebar { position: relative; }
.ug-sidebar-card {
	position: sticky;
	top: 24px;
	background: var(--ug-accent);
	border-radius: var(--ug-radius);
	box-shadow: var(--ug-shadow-lg);
	padding: 24px;
}
.ug-sidebar-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ug-sidebar-title { font-size: 22px; font-weight: 700; margin: 0 0 12px; line-height: 1.3; }
.ug-sidebar-price { margin-bottom: 18px; }
.ug-price-current { font-size: 26px; font-weight: 800; color: var(--ug-primary); }
.ug-price-original { font-size: 15px; color: var(--ug-secondary); text-decoration: line-through; margin-right: 8px; }

.ug-sidebar-facts { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--ug-border); }
.ug-sidebar-facts li {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid var(--ug-border);
	font-size: 14px;
}
.ug-sidebar-facts li span { color: var(--ug-secondary); }
.ug-sidebar-facts li strong { font-weight: 600; }

.ug-sidebar-downloads, .ug-sidebar-contact {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.ug-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	border-radius: var(--ug-radius-sm);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: transform .1s ease, box-shadow .15s ease;
}
.ug-btn:hover { transform: translateY(-1px); }
.ug-btn-primary { background: var(--ug-primary); color: #fff; }
.ug-btn-primary:hover { background: var(--ug-primary-dark); }
.ug-btn-outline { background: var(--ug-accent); color: var(--ug-secondary); border-color: var(--ug-border); }
.ug-btn-whatsapp { background: #25D366; color: #fff; }

/* ---------- Sections ---------- */
.ug-section {
	background: var(--ug-accent);
	border-radius: var(--ug-radius);
	box-shadow: var(--ug-shadow);
	padding: 28px;
}
.ug-section h2 {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 18px;
}
.ug-description-content { line-height: 1.7; color: #333; }

.ug-specs-table { width: 100%; border-collapse: collapse; }
.ug-specs-table tr { border-bottom: 1px solid var(--ug-border); }
.ug-specs-table tr:last-child { border-bottom: none; }
.ug-specs-table th, .ug-specs-table td { text-align: left; padding: 12px 8px; font-size: 14px; }
.ug-specs-table th { color: var(--ug-secondary); font-weight: 600; width: 40%; }
.ug-specs-table td { font-weight: 600; }

.ug-key-features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}
.ug-key-feature-card {
	background: var(--ug-bg);
	border-radius: var(--ug-radius-sm);
	padding: 20px;
	text-align: center;
}
.ug-key-feature-card .dashicons { font-size: 28px; width: 28px; height: 28px; color: var(--ug-primary); }
.ug-key-feature-card h3 { font-size: 15px; margin: 10px 0 6px; }
.ug-key-feature-card p { font-size: 13px; color: var(--ug-secondary); margin: 0; }

.ug-feature-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ug-feature-list li {
	font-size: 14px;
	padding-left: 22px;
	position: relative;
}
.ug-feature-list li::before {
	content: "\2713";
	position: absolute;
	left: 0;
	color: var(--ug-primary);
	font-weight: 700;
}

.ug-downloads-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 14px;
}
.ug-download-card {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--ug-bg);
	border-radius: var(--ug-radius-sm);
	padding: 16px;
	text-decoration: none;
	color: #1F2226;
	border: 1px solid var(--ug-border);
}
.ug-download-card .dashicons { color: var(--ug-primary); font-size: 24px; width: 24px; height: 24px; }
.ug-download-title { flex: 1; font-size: 14px; font-weight: 600; }
.ug-download-btn { font-size: 12px; color: var(--ug-primary); font-weight: 700; }

/* ---------- Cards / Slider / Archive ---------- */
.ug-card-slider {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 8px;
}
.ug-card-slider .ug-card { flex: 0 0 260px; }

.ug-archive { max-width: 1280px; margin: 0 auto; padding: 32px 20px 60px; }
.ug-archive-header h1 { font-size: 28px; margin-bottom: 24px; }
.ug-archive-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}
.ug-archive-pagination { margin-top: 32px; text-align: center; }
.ug-archive-empty { color: var(--ug-secondary); }

.ug-card {
	display: block;
	background: var(--ug-accent);
	border-radius: var(--ug-radius);
	box-shadow: var(--ug-shadow);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow .15s ease, transform .1s ease;
}
.ug-card:hover { box-shadow: var(--ug-shadow-lg); transform: translateY(-2px); }
.ug-card-media { position: relative; aspect-ratio: 4/3; background: var(--ug-bg); }
.ug-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ug-card-media-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, #eee, #f6f6f6); }
.ug-card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.ug-card-body { padding: 16px; }
.ug-card-title { font-size: 15px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.ug-card-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ug-secondary); margin-bottom: 10px; }
.ug-card-meta span:not(:last-child)::after { content: '\2022'; margin-left: 8px; }
.ug-card-price { font-size: 16px; font-weight: 700; color: var(--ug-primary); }

/* ---------- Badges ---------- */
.ug-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: #fff;
	background: var(--ug-secondary);
}
.ug-badge-new { background: #2E7D32; }
.ug-badge-featured { background: var(--ug-primary); }
.ug-badge-hot { background: #E65100; }
.ug-badge-used { background: #616161; }
.ug-badge-rental { background: #1565C0; }
.ug-badge-sale { background: #C62828; }

@media (max-width: 600px) {
	.ug-section { padding: 20px; }
	.ug-sidebar-card { position: static; }
}

/* ---------- Search form ([equipment_search]) ---------- */
.ug-search-form {
	background: var(--ug-accent);
	border-radius: var(--ug-radius);
	box-shadow: var(--ug-shadow);
	padding: 20px;
	margin-bottom: 24px;
}
.ug-search-fields {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 14px;
	margin-bottom: 16px;
}
.ug-search-field { display: flex; flex-direction: column; gap: 6px; }
.ug-search-field label { font-size: 12px; font-weight: 600; color: var(--ug-secondary); }
.ug-search-field input,
.ug-search-field select {
	font-family: var(--ug-font);
	padding: 10px 12px;
	border: 1px solid var(--ug-border);
	border-radius: var(--ug-radius-sm);
	font-size: 14px;
	background: var(--ug-bg);
}
.ug-search-actions { display: flex; gap: 10px; }

.ug-search-loading { color: var(--ug-secondary); font-size: 14px; margin-bottom: 12px; }
.ug-search-empty { color: var(--ug-secondary); padding: 20px 0; }

.ug-search-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 24px;
}
.ug-pagination-status { font-size: 13px; color: var(--ug-secondary); }

/* ---------- Carousel (Equipment Carousel widget) ---------- */
.ug-carousel { position: relative; overflow: hidden; }
.ug-carousel-track {
	display: flex;
	transition: transform .35s ease;
	will-change: transform;
}
.ug-carousel-slide { padding: 0 8px; box-sizing: border-box; }
.ug-carousel-slide .ug-card { height: 100%; }

.ug-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: var(--ug-accent);
	box-shadow: var(--ug-shadow-lg);
	color: var(--ug-primary);
	font-size: 14px;
	cursor: pointer;
	z-index: 2;
}
.ug-carousel-arrow-prev { left: 0; }
.ug-carousel-arrow-next { right: 0; }

.ug-carousel-dots, .ug-hero-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}
.ug-carousel-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	background: var(--ug-border);
	cursor: pointer;
	padding: 0;
}
.ug-carousel-dot.is-active { background: var(--ug-primary); width: 22px; border-radius: 4px; transition: all .2s ease; }

/* ---------- Hero Slider (Equipment Slider widget) ---------- */
.ug-hero-slider {
	position: relative;
	overflow: hidden;
	border-radius: var(--ug-radius);
}
.ug-hero-track {
	display: flex;
	height: 100%;
	transition: transform .5s ease;
}
.ug-hero-slide {
	flex: 0 0 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	background-color: var(--ug-secondary);
	position: relative;
	display: flex;
	align-items: flex-end;
	text-decoration: none;
}
.ug-hero-slide::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(0deg, rgba(0,0,0,.65), rgba(0,0,0,.05) 60%);
}
.ug-hero-overlay {
	position: relative;
	z-index: 1;
	padding: 32px;
	color: #fff;
	max-width: 560px;
}
.ug-hero-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
.ug-hero-price { font-size: 18px; font-weight: 700; margin: 0 0 16px; opacity: .95; }
.ug-hero-cta { display: inline-block; }
.ug-hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; z-index: 2; margin-top: 0; }
.ug-hero-dots .ug-carousel-dot { background: rgba(255,255,255,.5); }
.ug-hero-dots .ug-carousel-dot.is-active { background: #fff; }

/* ---------- Widget empty state ---------- */
.ug-widget-empty {
	padding: 24px;
	text-align: center;
	color: var(--ug-secondary);
	background: var(--ug-bg);
	border: 1px dashed var(--ug-border);
	border-radius: var(--ug-radius-sm);
}

.ug-featured-cta { text-align: center; margin-top: 24px; }

@media (max-width: 600px) {
	.ug-hero-title { font-size: 20px; }
	.ug-hero-overlay { padding: 20px; }
}
