/* ==========================================================================
   SebasPeru — portada v2 (diseño "Home 1"). Referencia: docs/design-v2/Home-1.dc.html.
   Se carga solo en la portada con home_variant = v2 (inc/home-v2.php).
   ========================================================================== */

body.sp-home--v2, body.sp-home--v2 .sp-main { background: #fff; }

.sp-hv2 { max-width: 1392px; margin: 0 auto; padding: 0 24px 40px; }

/* ---------- Slider ---------- */
.sp-hv2-hero { margin: 0 -24px; }
.sp-hv2-hero .sp-hero { max-width: 1392px; margin: 0 auto; }
.sp-hv2-hero .sp-hero__dots { bottom: 14px; left: 0; right: 0; transform: none; justify-content: center; gap: 8px; }
.sp-hv2-hero .sp-hero__dots button {
	position: relative; width: 6px; height: 6px; padding: 0; border-radius: 3px;
	background: rgba(255, 255, 255, .6); transition: width .25s, background .25s;
}
.sp-hv2-hero .sp-hero__dots button::after { content: ""; position: absolute; top: -9px; bottom: -9px; left: -9px; right: -9px; }
.sp-hv2-hero .sp-hero__dots button.is-on { width: 32px; border-radius: 3px; background: #fff; }
.sp-hv2-hero .sp-hero__dots button:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.sp-hv2-hero .sp-hero__arrow { width: 44px; height: 44px; }

/* ---------- Tarjetas de categoría ---------- */
.sp-hv2-catcards__grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px;
	max-width: 1040px; margin: 24px auto 0;
}
.sp-hv2-cc {
	display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 16px 14px;
	background: #fff; border: 1px solid #eef1f5; border-radius: 14px; box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
	text-align: center; color: var(--sp-ink); transition: box-shadow .2s, transform .2s;
}
.sp-hv2-cc:hover { color: var(--sp-ink); box-shadow: 0 10px 24px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.sp-hv2-cc__img, .sp-hv2-cc img.sp-hv2-cc__img { width: 100%; height: 120px; object-fit: contain; }
.sp-hv2-cc__img--icon { display: flex; align-items: center; justify-content: center; color: #b4c0d3; }
.sp-hv2-cc b { display: block; margin-top: 14px; font-size: 14px; font-weight: 900; line-height: 1.3; }
.sp-hv2-cc__text { display: block; min-height: 36px; font-size: 12.5px; line-height: 1.45; color: #4b5f7d; }
.sp-hv2-cc__more { font-size: 13px; font-weight: 700; color: var(--sp-primary); }

/* ---------- Banners de producto ---------- */
.sp-hv2-promo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 8px; margin-top: 40px; }
.sp-hv2-pc {
	position: relative; height: 218px; min-width: 0; display: flex; align-items: center; overflow: hidden;
	background: var(--sp-primary); border-radius: 4px; color: #fff;
}
.sp-hv2-pc:hover { color: #fff; }
.sp-hv2-pc:focus-visible { outline: 3px solid var(--sp-ink); outline-offset: 2px; }
.sp-hv2-pc.is-image { display: block; background: none; }
.sp-hv2-pc.is-image img { width: 100%; height: 218px; object-fit: cover; }
.sp-hv2-pc__deco {
	position: absolute; right: -60px; top: -40px; width: 260px; height: 260px; border-radius: 50%;
	background: color-mix(in srgb, var(--sp-primary), #fff 20%);
}
.sp-hv2-pc__tag {
	position: absolute; top: 14px; left: 16px; z-index: 2; padding: 4px 10px; border-radius: 6px;
	background: var(--sp-highlight); color: var(--sp-ink); font-size: 12px; font-weight: 900; transform: rotate(-4deg);
}
.sp-hv2-pc__img { position: relative; flex: 0 0 52%; width: 52%; height: 150px; margin: 30px 0 0 10px; display: flex; align-items: center; justify-content: center; }
.sp-hv2-pc__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.sp-hv2-pc__body {
	position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-right: 14px;
}
.sp-hv2-pc__code {
	font-size: 10px; font-weight: 700; letter-spacing: .06em; line-height: 1.4; padding: 2px 8px; border-radius: 4px;
	background: rgba(15, 28, 46, .3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-hv2-pc__name {
	max-width: 100%; padding: 6px 12px; border-radius: 8px; background: var(--sp-ink); font-size: 13px; font-weight: 800;
	line-height: 1.2; text-align: center; text-transform: uppercase;
}
.sp-hv2-pc__name span { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sp-hv2-pc__price {
	flex-shrink: 0; width: 112px; height: 112px; border-radius: 50%; background: #d13700;
	display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; text-align: center;
}
.sp-hv2-pc__price b { font-size: 26px; font-weight: 900; white-space: nowrap; }
.sp-hv2-pc__price b.is-long { font-size: 21px; }
.sp-hv2-pc__price span { font-size: 10.5px; font-weight: 800; padding: 0 6px; }

/* Variante oscura (promo2) */
.sp-hv2-promo--dark .sp-hv2-pc { background: var(--sp-ink); }
.sp-hv2-promo--dark .sp-hv2-pc__deco { background: #1d3050; }
.sp-hv2-promo--dark .sp-hv2-pc__img { flex-basis: 50%; width: 50%; height: 160px; margin: 0 0 0 18px; background: #fff; border-radius: 14px; padding: 10px; }
.sp-hv2-promo--dark .sp-hv2-pc__img img { mix-blend-mode: normal; }
.sp-hv2-promo--dark .sp-hv2-pc__body { padding: 0 14px; }
.sp-hv2-promo--dark .sp-hv2-pc__name { background: var(--sp-primary); }
.sp-hv2-promo--dark .sp-hv2-pc__price { width: 108px; height: 108px; background: var(--sp-highlight); color: var(--sp-ink); }
.sp-hv2-promo--dark .sp-hv2-pc__price b { font-size: 24px; }
.sp-hv2-promo--dark .sp-hv2-pc__price b.is-long { font-size: 20px; }
.sp-hv2-promo--dark .sp-hv2-pc__price span { font-size: 10px; }

/* ---------- Tarjeta de producto v2 ---------- */
.sp-pcard2 {
	position: relative; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 16px; margin: 0; list-style: none;
	background: #fff; border: 1px solid #e8ecf3; border-radius: 12px; transition: box-shadow .2s;
}
.sp-pcard2:hover { box-shadow: 0 10px 24px rgba(15, 23, 42, .1); }
.sp-pcard2__link { position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.sp-pcard2__link:focus-visible { outline: 3px solid var(--sp-primary); outline-offset: -3px; }
.sp-pcard2__badge {
	position: absolute; top: 10px; right: 10px; z-index: 2; padding: 2px 7px; border-radius: 5px;
	background: #d13700; color: #fff; font-size: 12px; font-weight: 900; pointer-events: none;
}
.sp-pcard2__badge.is-out { background: #64748b; }
.sp-pcard2__img { display: block; margin-bottom: 12px; }
.sp-pcard2__img img { width: 100%; height: 150px; object-fit: contain; }
.sp-pcard2.is-out .sp-pcard2__img img { opacity: .55; }
.sp-pcard2__brand { font-size: 12px; font-weight: 800; color: #4b5f7d; text-transform: uppercase; }
.sp-pcard2__cod { font-size: 10.5px; color: #64748b; }
.sp-pcard2__name {
	margin: 4px 0 8px; height: 38px; font-size: 13px; line-height: 1.45; color: var(--sp-ink); text-transform: uppercase;
	display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.sp-pcard2__row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 18px; }
.sp-pcard2__old { font-size: 11px; color: #64748b; text-decoration: line-through; }
.sp-pcard2__old .amount { color: inherit; }
.sp-pcard2__off { padding: 1px 6px; border-radius: 4px; background: #fff1eb; color: #c23400; font-size: 10.5px; font-weight: 800; }
.sp-pcard2__price { font-size: 19px; font-weight: 900; line-height: 1.35; color: var(--sp-ink); }
.sp-pcard2__price .amount { color: inherit; }
.sp-pcard2__price del { font-size: 12px; font-weight: 600; color: #64748b; }
.sp-pcard2__price ins { text-decoration: none; }
.sp-pcard2__cuota { margin-bottom: 8px; font-size: 11px; color: #4b5f7d; }
.sp-pcard2__chip {
	align-self: flex-start; padding: 2px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 800; line-height: 1.45;
}
.sp-pcard2__chip.is-g { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.sp-pcard2__chip.is-n { margin-top: 4px; background: #fff; border: 1px solid #d5dce8; color: #334155; }

/* ---------- Carruseles v2 (flechas en línea) ---------- */
.sp-hv2 .sp-carousel { display: flex; align-items: center; gap: 16px; }
.sp-hv2 .sp-carousel__arrow {
	position: static; flex-shrink: 0; transform: none; width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid #e1e7f0; background: #fff; color: var(--sp-ink); box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}
.sp-hv2 .sp-carousel__arrow[disabled] { opacity: .45; }
.sp-hv2 .sp-carousel__track { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; padding: 4px 2px 8px; margin: 0; }

/* ---------- Ofertas de la semana ---------- */
.sp-hv2-week {
	display: flex; margin: 40px 32px 0; overflow: hidden; border-radius: 22px;
	background: var(--sp-bg); box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}
.sp-hv2-week__panel {
	flex: 0 0 266px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
	padding: 32px 20px; background: var(--sp-highlight); color: var(--sp-ink); text-align: center;
}
.sp-hv2-week__clock {
	width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: var(--sp-ink); color: var(--sp-highlight);
}
.sp-hv2-week__title { font-size: 38px; line-height: 1; font-weight: 900; color: var(--sp-ink); overflow-wrap: anywhere; }
.sp-hv2-week__timer { font-size: 13px; font-weight: 700; color: var(--sp-ink); }
.sp-hv2 .sp-hv2-week__carousel { flex: 1; min-width: 0; gap: 12px; padding: 40px 18px; }
.sp-hv2-week__track { grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; }

/* ---------- Banner ancho ---------- */
.sp-hv2-wide:not(a) { display: block; margin-top: 48px; }
a.sp-hv2-wide {
	position: relative; display: flex; align-items: center; height: 218px; overflow: hidden;
	border-radius: 10px; background: var(--sp-ink); color: #fff;
}
a.sp-hv2-wide:hover { color: #fff; }
a.sp-hv2-wide:focus-visible { outline: 3px solid var(--sp-primary); outline-offset: 2px; }
a.sp-hv2-wide.is-image { display: block; height: auto; background: none; }
a.sp-hv2-wide.is-image img { width: 100%; height: auto; }
.sp-hv2-wide__deco { position: absolute; right: 120px; top: -70px; width: 320px; height: 320px; border-radius: 50%; background: var(--sp-primary); }
.sp-hv2-wide__txt { position: relative; flex: 1; min-width: 0; padding: 0 0 0 80px; }
.sp-hv2-wide__l1 { display: block; font-size: 26px; font-weight: 900; letter-spacing: .02em; line-height: 1.15; }
.sp-hv2-wide__l2 { display: block; font-size: 50px; font-weight: 900; line-height: 1; color: var(--sp-highlight); }
.sp-hv2-wide__imgs { position: relative; display: flex; align-items: flex-end; margin-right: 40px; }
.sp-hv2-wide__imgs img { width: 150px; height: 150px; object-fit: contain; background: #fff; border-radius: 16px; margin-right: -30px; padding: 8px; }
.sp-hv2-wide__imgs img:last-child { margin-right: 0; }
.sp-hv2-wide__circle {
	position: relative; flex-shrink: 0; width: 210px; height: 210px; margin-right: 60px; border-radius: 50%;
	background: #d13700; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; text-align: center;
}
.sp-hv2-wide__circle span:first-child { font-size: 22px; font-weight: 700; }
.sp-hv2-wide__circle b { font-size: 66px; font-weight: 900; }
.sp-hv2-wide__circle span:last-child { font-size: 20px; font-weight: 800; }

/* ---------- Carrusel de categorías ---------- */
.sp-hv2-cats { margin-top: 40px; }
.sp-hv2-cats__track { grid-auto-columns: calc((100% - 100px) / 6); gap: 20px; }
.sp-hv2-cat {
	display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 16px;
	background: var(--sp-bg); border-radius: 12px; color: var(--sp-ink); font-size: 15px; text-align: center; scroll-snap-align: start;
}
.sp-hv2-cat:hover { color: var(--sp-primary); }
.sp-hv2-cat__img { width: 100%; height: 100px; display: flex; align-items: center; justify-content: center; color: #b4c0d3; }
.sp-hv2-cat__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* ---------- Secciones de productos ---------- */
.sp-hv2-products, .sp-hv2-office { margin-top: 56px; }
.sp-hv2-products { padding: 0 20px; }
.sp-hv2-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.sp-hv2-office .sp-hv2-head { padding: 0 20px; }
.sp-hv2-h2 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: var(--sp-ink); }
.sp-hv2-h2--light { font-weight: 600; }
.sp-hv2-more { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; min-height: 44px; color: var(--sp-ink); font-weight: 600; }
.sp-hv2-more:hover { color: var(--sp-primary); }
.sp-hv2-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }

/* ---------- Oficina ---------- */
.sp-hv2-office__body { display: flex; flex-wrap: wrap; gap: 24px; }
.sp-hv2-office__hero {
	position: relative; flex: 1 1 560px; min-width: 0; min-height: 420px; overflow: hidden;
	border-radius: 14px; background: var(--sp-ink); color: #fff;
}
.sp-hv2-office__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.sp-hv2-office__content { position: relative; display: flex; flex-direction: column; gap: 14px; max-width: 420px; padding: 48px; }
.sp-hv2-office__kicker { align-self: flex-start; padding: 4px 10px; border-radius: 6px; background: var(--sp-highlight); color: var(--sp-ink); font-size: 12px; font-weight: 900; }
.sp-hv2-office__heading { font-size: 40px; line-height: 1.05; font-weight: 900; }
.sp-hv2-office__text { font-size: 16px; }
.sp-hv2-office__btn {
	align-self: flex-start; margin-top: 10px; min-height: 44px; display: inline-flex; align-items: center;
	padding: 12px 22px; border-radius: 8px; background: var(--sp-primary); color: #fff; font-weight: 800;
}
.sp-hv2-office__btn:hover { background: var(--sp-primary-hover); color: #fff; }
.sp-hv2-office__cats { flex: 1 1 520px; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sp-hv2-otile {
	display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; min-width: 0;
	padding: 18px; border-radius: 12px; background: var(--sp-bg); color: #4b5f7d; font-size: 14px; font-weight: 800; text-align: center;
}
.sp-hv2-otile:hover { color: var(--sp-primary); }
.sp-hv2-otile__img { width: 100%; height: 120px; display: flex; align-items: center; justify-content: center; color: #b4c0d3; }
.sp-hv2-otile__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.sp-hv2-otile__name { overflow-wrap: anywhere; }

/* ---------- Marcas ---------- */
.sp-hv2-brands { margin: 48px 0 0; }
.sp-hv2-brands__track { grid-auto-columns: calc((100% - 100px) / 6); gap: 20px; }
a.sp-hv2-brand {
	height: 96px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 10px 14px;
	border: 1px solid #eef1f5; border-radius: 12px; background: #fff; color: var(--sp-ink); scroll-snap-align: start;
}
a.sp-hv2-brand:hover { color: var(--sp-ink); border-color: var(--sp-primary); }
.sp-hv2-brand img { max-width: 100%; max-height: 22px; object-fit: contain; }
.sp-hv2-brand__name { max-width: 100%; font-size: 26px; font-weight: 900; line-height: 1.1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sp-hv2-content { margin-top: 48px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
	.sp-hv2-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.sp-hv2-week__track { grid-auto-columns: calc((100% - 32px) / 3); }
	.sp-hv2-cats__track, .sp-hv2-brands__track { grid-auto-columns: calc((100% - 60px) / 4); }
	.sp-hv2-wide__txt { padding-left: 40px; }
	.sp-hv2-wide__circle { margin-right: 32px; }
	.sp-hv2-wide__imgs { margin-right: 24px; }
	.sp-hv2-wide__imgs img { width: 120px; height: 120px; }
}

@media (max-width: 1023px) {
	.sp-hv2-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.sp-hv2-week { margin: 32px 0 0; }
	.sp-hv2-week__track { grid-auto-columns: calc((100% - 16px) / 2); }
	.sp-hv2-wide__imgs { display: none; }
}

@media (max-width: 767px) {
	.sp-hv2 { padding: 0 16px 32px; }
	.sp-hv2-hero { margin: 0 -16px; }
	.sp-hv2-catcards__grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 20px; }
	.sp-hv2-promo { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
	.sp-hv2-pc__price { width: 88px; height: 88px; }
	.sp-hv2-pc__price b { font-size: 20px; }
	.sp-hv2-pc__price b.is-long { font-size: 16px; }
	.sp-hv2-pc__price span { font-size: 9px; }
	.sp-hv2-promo--dark .sp-hv2-pc__price { width: 88px; height: 88px; }
	.sp-hv2-promo--dark .sp-hv2-pc__price b { font-size: 19px; }
	.sp-hv2-promo--dark .sp-hv2-pc__price b.is-long { font-size: 16px; }
	.sp-hv2-promo--dark .sp-hv2-pc__img { flex-basis: 46%; width: 46%; margin-left: 12px; }

	.sp-hv2-week { flex-direction: column; margin-top: 28px; border-radius: 18px; }
	.sp-hv2-week__panel { flex: 0 0 auto; padding: 22px 16px; gap: 10px; }
	.sp-hv2-week__clock { width: 60px; height: 60px; }
	.sp-hv2-week__clock svg { width: 32px; height: 32px; }
	.sp-hv2-week__title { font-size: 28px; }
	.sp-hv2 .sp-hv2-week__carousel { padding: 18px 12px; }
	.sp-hv2-week__track { grid-auto-columns: calc((100% - 10px) / 2); gap: 10px; }
	.sp-hv2 .sp-carousel__arrow { display: none; }

	a.sp-hv2-wide { height: auto; flex-wrap: wrap; gap: 16px; padding: 24px; }
	.sp-hv2-wide:not(a) { margin-top: 32px; }
	.sp-hv2-wide__deco { right: -80px; top: -60px; width: 220px; height: 220px; }
	.sp-hv2-wide__txt { padding: 0; flex: 1 1 100%; }
	.sp-hv2-wide__l1 { font-size: 18px; }
	.sp-hv2-wide__l2 { font-size: 34px; }
	.sp-hv2-wide__circle { width: 120px; height: 120px; margin: 0; }
	.sp-hv2-wide__circle span:first-child { font-size: 14px; }
	.sp-hv2-wide__circle b { font-size: 38px; }
	.sp-hv2-wide__circle span:last-child { font-size: 12px; }

	.sp-hv2-cats { margin-top: 28px; }
	.sp-hv2-cats__track, .sp-hv2-brands__track { grid-auto-columns: calc((100% - 24px) / 2.5); gap: 12px; overflow-x: auto; }
	.sp-hv2-cat { padding: 12px; font-size: 14px; }

	.sp-hv2-products, .sp-hv2-office { margin-top: 36px; }
	.sp-hv2-products { padding: 0; }
	.sp-hv2-office .sp-hv2-head { padding: 0; }
	.sp-hv2-head { margin-bottom: 16px; }
	.sp-hv2-h2 { font-size: 24px; }
	.sp-hv2-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.sp-pcard2 { padding: 12px; }
	.sp-pcard2__img img { height: 120px; }

	.sp-hv2-office__hero { flex-basis: 100%; min-height: 320px; }
	.sp-hv2-office__content { padding: 28px 22px; }
	.sp-hv2-office__heading { font-size: 30px; }
	.sp-hv2-office__cats { flex-basis: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sp-hv2-otile__img { height: 96px; }

	.sp-hv2-brands { margin-top: 32px; }
	a.sp-hv2-brand { height: 80px; }
	.sp-hv2-brand__name { max-width: 100%; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
}
