/* Tienda — layout tipo loja (sidebar + catálogo) · colores Soberano */

.shop-body {
	padding-top: var(--nav-h);
	min-height: 100vh;
	background: var(--bg);
}

.nav-links a.active {
	color: var(--accent);
}

.shop-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	min-height: calc(100vh - var(--nav-h));
	max-width: 1280px;
	margin: 0 auto;
}

.shop-sidebar {
	position: sticky;
	top: var(--nav-h);
	height: calc(100vh - var(--nav-h));
	padding: 1.5rem 1rem 1.5rem 1.25rem;
	border-right: 1px solid var(--border);
	background: var(--bg-elevated);
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	overflow-y: auto;
}

.sidebar-head .sidebar-title {
	font-size: 1.15rem;
	font-weight: 800;
	margin-top: 0.25rem;
}

.category-nav {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.category-btn {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	padding: 0.7rem 0.85rem;
	border: 1px solid transparent;
	border-radius: 10px;
	background: transparent;
	color: var(--muted);
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.category-btn:hover {
	background: var(--card);
	color: var(--text);
}

.category-btn.active {
	background: var(--accent-soft);
	border-color: rgba(255, 162, 0, 0.35);
	color: var(--accent);
}

.category-btn .cat-icon {
	font-size: 1.15rem;
	width: 1.5rem;
	text-align: center;
}

.category-btn .cat-count {
	margin-left: auto;
	font-size: 0.72rem;
	opacity: 0.7;
}

.sidebar-help {
	margin-top: auto;
	padding: 1rem;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.sidebar-help-title {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--accent);
	margin-bottom: 0.5rem;
}

.redeem-steps {
	margin: 0 0 0.75rem 1.1rem;
	font-size: 0.75rem;
	color: var(--muted);
	line-height: 1.5;
}

.sidebar-link {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--accent);
	text-decoration: none;
}

.shop-main {
	padding: 1.5rem 1.5rem 3rem;
	min-width: 0;
}

.shop-hero {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 1.5rem;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--border);
}

.shop-banner {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--accent);
	margin-bottom: 0.35rem;
}

.shop-hero h1 {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
}

.shop-subtitle {
	color: var(--muted);
	font-size: 0.92rem;
	margin-top: 0.35rem;
	max-width: 480px;
}

.shop-hero-badge {
	text-align: right;
	padding: 0.85rem 1.1rem;
	background: var(--accent-soft);
	border: 1px solid rgba(255, 162, 0, 0.3);
	border-radius: var(--radius);
}

.shop-hero-badge span {
	display: block;
	font-size: 0.72rem;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.shop-hero-badge strong {
	font-size: 0.95rem;
	color: var(--accent);
}

.shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
}

.search-wrap {
	flex: 1;
	min-width: 200px;
	max-width: 360px;
}

.search-wrap input {
	width: 100%;
	padding: 0.7rem 1rem;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	font-family: inherit;
	font-size: 0.9rem;
}

.search-wrap input:focus {
	outline: none;
	border-color: var(--accent);
}

.shop-count {
	font-size: 0.82rem;
	color: var(--muted);
	white-space: nowrap;
}

.shop-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.15rem;
}

.shop-card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
	text-align: left;
	font-family: inherit;
	color: inherit;
	padding: 0;
}

.shop-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 162, 0, 0.45);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--accent-soft);
}

.shop-card-visual {
	position: relative;
	aspect-ratio: 16 / 10;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
}

.shop-card-visual::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}

.shop-card-visual .card-icon {
	position: relative;
	z-index: 1;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.shop-card-body {
	padding: 1rem 1rem 1.1rem;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 0.4rem;
}

.shop-card-body h3 {
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.3;
}

.shop-card-body p {
	font-size: 0.78rem;
	color: var(--muted);
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	flex: 1;
}

.shop-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.5rem;
	padding-top: 0.65rem;
	border-top: 1px solid var(--border);
}

.shop-card-price {
	font-size: 1.1rem;
	font-weight: 800;
	color: var(--accent);
}

.shop-card-cta {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--muted);
}

.shop-empty {
	text-align: center;
	color: var(--muted);
	padding: 3rem 1rem;
}

.sidebar-fab {
	display: none;
	position: fixed;
	bottom: 1.25rem;
	left: 1rem;
	z-index: 40;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--accent);
	color: #111;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	box-shadow: 0 8px 24px var(--accent-glow);
}

/* Drawer producto (detalle + compra) */
.drawer {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	justify-content: flex-end;
}

.drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
	backdrop-filter: blur(4px);
}

.drawer-panel {
	position: relative;
	width: min(420px, 100%);
	height: 100%;
	background: #121218;
	border-left: 1px solid var(--border);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	animation: slideIn 0.25s ease;
}

@keyframes slideIn {
	from { transform: translateX(100%); }
	to { transform: translateX(0); }
}

.drawer-visual {
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 4rem;
	flex-shrink: 0;
}

.drawer-body {
	padding: 1.25rem 1.5rem 2rem;
}

.drawer-desc {
	color: var(--muted);
	font-size: 0.9rem;
	margin: 0.5rem 0 1rem;
	line-height: 1.55;
}

.drawer-price {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--accent);
	margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
	.shop-layout {
		grid-template-columns: 1fr;
	}

	.shop-sidebar {
		position: fixed;
		left: 0;
		top: var(--nav-h);
		z-index: 45;
		width: min(280px, 88vw);
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		box-shadow: var(--shadow);
	}

	.shop-sidebar.open {
		transform: translateX(0);
	}

	.sidebar-fab {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.shop-main {
		padding: 1rem 1rem 2.5rem;
	}
}

/* Carrito */
.cart-fab {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(255, 162, 0, 0.45);
	border-radius: 999px;
	background: var(--accent);
	color: #111;
	font-family: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--shadow);
}

.cart-fab-count {
	min-width: 1.4rem;
	height: 1.4rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: #111;
	color: var(--accent);
	font-size: 0.8rem;
}

.cart-panel {
	position: fixed;
	inset: 0;
	z-index: 60;
}

.cart-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.65);
}

.cart-sheet {
	position: absolute;
	right: 0;
	top: 0;
	width: min(400px, 100%);
	height: 100%;
	background: var(--bg-elevated);
	border-left: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	padding: 1rem 1.25rem 1.5rem;
}

.cart-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.cart-head h2 {
	margin: 0;
	font-size: 1.2rem;
}

.cart-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.cart-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--card);
}

.cart-line-info {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	font-size: 0.88rem;
}

.cart-line-info strong {
	font-size: 0.92rem;
}

.cart-line-actions {
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.cart-qty-btn,
.cart-remove {
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	background: transparent;
	color: var(--text);
	cursor: pointer;
	font-family: inherit;
}

.cart-qty {
	min-width: 1.5rem;
	text-align: center;
	font-weight: 700;
}

.cart-empty {
	color: var(--muted);
	text-align: center;
	padding: 2rem 0;
}

.cart-foot {
	border-top: 1px solid var(--border);
	padding-top: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.cart-total {
	margin: 0;
	font-size: 1.05rem;
}

.drawer-body .btn.ghost.full {
	margin-top: 0.5rem;
}
