/* ── Banner merch ── */
#banner {
	background-image: url("../../images/Merch/PortadaMerch.png");
}

@media (max-width: 768px) {
	#banner {
		background-image: url("../../images/Merch/PortadaMerch.png");
		background-size: contain;
		background-repeat: no-repeat;
		background-position: center center;
		background-color: #1a1a2e;
		min-height: unset;
		height: auto;
		padding-bottom: 3em;
	}
}

/* ── Merch dinámico ── */
.merch-section-titulo {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 2.5rem 0 1.2rem;
	padding-left: 0.5rem;
	border-left: 4px solid #e07b39;
	color: #fff;
}
.merch-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.5rem;
	padding: 0 0 2rem;
}
.merch-card {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.1);
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s, box-shadow 0.2s;
}
.merch-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.merch-card-img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	background: #1e1e1e;
}
.merch-card-img-placeholder {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #2a2a2a;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	color: #555;
}
.merch-card-body {
	padding: 0.85rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1;
}
.merch-card-nombre { font-weight: 600; font-size: 0.95rem; }
.merch-card-precio { color: #e07b39; font-size: 1rem; font-weight: 700; }
.merch-card-talla  { font-size: 0.8rem; color: #999; }

/* ── Select de tallas agrupadas ── */
.merch-talla-select-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
}
.merch-talla-label {
    font-size: 0.8rem;
    color: #aaa;
    white-space: nowrap;
}
.merch-talla-select {
    flex: 1;
    padding: 0.3rem 0.5rem;
    background: #111;
    border: 1px solid #444;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}
.merch-talla-select:focus {
    outline: none;
    border-color: #e07b39;
}
.merch-talla-select option:disabled {
    color: #666;
}
.merch-card-stock  { font-size: 0.78rem; color: #e0a84a; font-weight: 600; }
.merch-card-agotado {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #fff;
    background: rgba(180,30,30,0.8);
    border-radius: 4px;
    padding: 0.2em 0.6em;
    margin-top: 0.3rem;
}
.merch-card--agotado {
    opacity: 0.55;
    pointer-events: none;
}
.merch-card--agotado .merch-card-img {
    filter: grayscale(80%);
}
.merch-card-qty {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 0.6rem;
}
.merch-card-qty label { font-size: 0.8rem; color: #aaa; }
.merch-card-qty input[type=number] {
	width: 65px;
	padding: 0.3rem 0.5rem;
	background: #111;
	border: 1px solid #444;
	border-radius: 4px;
	color: #e0e0e0;
	font-size: 0.9rem;
}
.merch-loading { color: #888; padding: 2rem 0; }

/* ── Carrito flotante ── */
#carrito-bar {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	background: #e07b39;
	color: #fff;
	padding: 0.85rem 2rem;
	border-radius: 40px;
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(0,0,0,0.5);
	z-index: 999;
	white-space: nowrap;
	border: none;
	display: none;
	text-align: center;
}
#carrito-bar:hover { background: #c9692a; }

/* ── Modal checkout ── */
.merch-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.8);
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.merch-modal-box {
	background: #1e1e1e;
	border: 1px solid #444;
	border-radius: 12px;
	padding: 2rem;
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}
.merch-modal-box h3 { font-size: 1.1rem; margin-bottom: 1.25rem; color: #e07b39; }
.merch-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 1rem;
	background: none;
	border: none;
	color: #999;
	font-size: 1rem;
	cursor: pointer;
	line-height: 1;
}
.merch-modal-close:hover { color: #fff; }
.merch-modal-field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin-bottom: 1rem;
}
.merch-modal-field label { font-size: 0.85rem; color: #aaa; }
.merch-modal-field input, .merch-modal-field select, .merch-modal-field textarea {
	padding: 0.55rem 0.75rem;
	background: #111;
	border: 1px solid #444;
	border-radius: 4px;
	color: #e0e0e0;
	font-size: 0.95rem;
	font-family: inherit;
}
.merch-modal-field input:focus, .merch-modal-field select:focus,
.merch-modal-field textarea:focus { outline: none; border-color: #e07b39; }
.merch-desglose {
	background: #111;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
	margin-bottom: 1rem;
	line-height: 1.8;
}
.merch-desglose-total { font-weight: 700; color: #e07b39; font-size: 1rem; }
.merch-btn-pagar {
	background: #e07b39;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	transition: background 0.2s;
}
.merch-btn-pagar:hover { background: #c9692a; }
.merch-btn-pagar:disabled { opacity: 0.6; cursor: not-allowed; }
.merch-modal-error { color: #e06060; font-size: 0.85rem; margin-bottom: 0.75rem; }
.merch-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(255,255,255,0.15);
	border-top-color: #e07b39;
	border-radius: 50%;
	margin: 0 auto;
	animation: merch-spin 0.9s linear infinite;
}
@keyframes merch-spin { to { transform: rotate(360deg); } }
.merch-radios {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-top: 0.6rem;
}
.merch-radios input[type=radio] { display: none; }
.merch-radios label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 0.35rem;
	padding: 1.1rem 0.75rem;
	background: #111;
	border: 2px solid #444;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, color 0.2s;
	color: #ccc;
	font-size: 0.9rem;
	font-weight: 600;
}
.merch-radios label:hover {
	border-color: #e07b39;
	background: rgba(224,123,57,0.08);
	color: #e0e0e0;
}
.merch-radios label:has(input:checked) {
	border-color: #e07b39;
	background: rgba(224,123,57,0.15);
	color: #e07b39;
	box-shadow: 0 0 0 1px #e07b39;
}
.merch-radio-icon { font-size: 1.6rem; line-height: 1; }
.merch-radio-sub { font-size: 0.75rem; font-weight: 400; color: #888; margin-top: 0.1rem; }
