/* =========================================================================
   ARCORP — Tienda (woocommerce/archive-product.php del hijo)
   Migas finas, barra lateral negra de filtros, barra de resultados, grilla
   de tarjetas (skin .prod-arcorp de home-arcorp.css) y paginación en círculos.
   Se carga solo en tienda / taxonomías de producto, después del
   shop-archive.css del padre (que usa !important en tarjetas y fondos).
   ========================================================================= */

.ar-shop-page {
	--ar-shop-max: 1600px;
	--ar-shop-gutter: clamp(16px, 2.5vw, 32px);
	--ar-shop-side: 317px;
	--ar-shop-border: #d9d9d9;
}

/* Fondo blanco (el padre pinta #f5f7fa en tienda y categorías) */
html body.post-type-archive-product,
html body.tax-product_cat,
html body.tax-product_tag,
html body.tax-product_brand,
html body .site:has(.ar-shop-page),
html body .site-main.ar-shop-page {
	background: #fff;
}

.ar-shop-page .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Migas ---------- */
.ar-shop-crumbs { border-bottom: 1px solid #e5e5e5; }
.ar-shop-crumbs__inner {
	max-width: var(--ar-shop-max);
	margin-inline: auto;
	padding: 10px var(--ar-shop-gutter);
	box-sizing: content-box;
}
.ar-shop-crumbs .woocommerce-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	font-family: var(--ar-font-head);
	font-size: 16px;
	line-height: 1.3;
	color: var(--ar-ink);
}
.ar-shop-crumbs .woocommerce-breadcrumb a { color: var(--ar-ink); text-decoration: none; }
.ar-shop-crumbs .woocommerce-breadcrumb a:hover { color: var(--ar-red); }
.ar-shop-crumbs__sep { font-size: 16px; line-height: 1; }

/* ---------- Layout ---------- */
.ar-shop {
	display: grid;
	grid-template-columns: var(--ar-shop-side) minmax(0, 1fr);
	align-items: start;
	gap: 34px;
	max-width: var(--ar-shop-max);
	margin-inline: auto;
	padding: 34px var(--ar-shop-gutter) 72px;
	box-sizing: content-box;
}
.ar-shop__main { min-width: 0; }
.ar-shop__filters-toggle { display: none; }

/* ---------- Barra lateral ---------- */
.ar-shop__sidebar {
	padding: 22px 18px 30px;
	background: #000;
	border-radius: 12px;
	color: #fff;
	font-family: Arial, Helvetica, sans-serif;
}
.ar-filters__clear {
	display: inline-block;
	margin: 0 6px 14px;
	font-size: 16px;
	color: var(--ar-red);
	text-decoration: underline;
}
.ar-filters__clear:hover { color: #fff; }

.ar-filter + .ar-filter {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 2px solid #3a3a3a;
}
.ar-filter__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0 0 10px;
	padding: 0 6px;
	background: none;
	border: 0;
	font: 700 16px/1.3 Arial, Helvetica, sans-serif;
	color: #fff;
	text-align: left;
	cursor: pointer;
}
.ar-filter__sign {
	position: relative;
	width: 10px;
	height: 10px;
	flex: none;
}
.ar-filter__sign::before,
.ar-filter__sign::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 10px;
	height: 2px;
	margin-top: -1px;
	background: currentColor;
	transition: transform .2s ease;
}
.ar-filter__sign::after { transform: rotate(90deg); }
.ar-filter__head[aria-expanded="true"] .ar-filter__sign::after { transform: rotate(0deg); }
.ar-filter__head:focus-visible { outline: 2px solid var(--ar-red); outline-offset: 2px; border-radius: 4px; }

.ar-filter__list { margin: 0; padding: 0; list-style: none; }
.ar-filter__list li { margin: 0; padding: 0; }

.ar-filter__check,
.ar-filter__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 5px 6px;
	border-radius: 3px;
	font-size: 16px;
	line-height: 1.3;
	color: #fff;
	text-decoration: none;
	transition: color .15s ease, background-color .15s ease;
}
.ar-filter__name { flex: 1 1 auto; min-width: 0; }
.ar-filter__count { flex: none; font-size: 12px; color: #cfcfcf; }

.ar-filter__box {
	position: relative;
	width: 13px;
	height: 13px;
	flex: none;
	border: 1.5px solid #fff;
	border-radius: 3px;
	box-sizing: border-box;
}
.ar-filter__check.is-checked .ar-filter__box { background: var(--ar-red); border-color: var(--ar-red); }
.ar-filter__check.is-checked .ar-filter__box::after {
	content: "";
	position: absolute;
	left: 3px;
	top: 0;
	width: 4px;
	height: 7px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.ar-filter__check:hover,
.ar-filter__link:hover { color: #ffb3b5; }
/* Sin subrayado al pasar el mouse (en la ficha de producto el tema subraya los enlaces) */
.ar-shop__sidebar .ar-filter__check:is(:hover, :focus),
.ar-shop__sidebar .ar-filter__link:is(:hover, :focus) { text-decoration: none; }
.ar-filter__check:hover .ar-filter__count,
.ar-filter__link:hover .ar-filter__count { color: inherit; }

.ar-filter__link { padding-left: 12px; }
.ar-filter__link.is-active { background: var(--ar-red); color: #fff; }
.ar-filter__link.is-active .ar-filter__count { color: #fff; }

.ar-filter__check:focus-visible,
.ar-filter__link:focus-visible,
.ar-filter__more:focus-visible { outline: 2px solid var(--ar-red); outline-offset: 1px; }

.ar-filter__list .is-extra { display: none; }
.ar-filter__list.is-expanded .is-extra { display: block; }
.ar-filter__more {
	margin: 2px 0 0 6px;
	padding: 0;
	background: none;
	border: 0;
	font: 700 16px/1.3 Arial, Helvetica, sans-serif;
	color: var(--ar-red);
	cursor: pointer;
}
.ar-filter__more:hover { text-decoration: underline; }

/* ---------- Barra de resultados ---------- */
.ar-shop__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 0 0 18px;
	font-family: var(--ar-font-head);
}
.ar-shop__count { margin: 0; font-size: 16px; font-weight: 600; color: var(--ar-ink); }
.ar-shop__order { display: flex; align-items: center; gap: 28px; }
.ar-shop__order-label { font-size: 16px; font-weight: 500; color: #555; }
.ar-shop-page .ar-shop__order .woocommerce-ordering { float: none; margin: 0; }
.ar-shop-page .ar-shop__order select.orderby {
	min-width: 215px;
	height: 46px;
	margin: 0;
	padding: 0 40px 0 14px;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%231a1a1a" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 14px center;
	border: 1px solid #555;
	border-radius: 4px;
	box-shadow: none;
	font-family: var(--ar-font-head);
	font-size: 16px;
	font-weight: 500;
	color: var(--ar-ink);
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.ar-shop-page .ar-shop__order select.orderby:focus-visible { outline: 2px solid var(--ar-red); outline-offset: 2px; }

/* ---------- Grilla ---------- */
.ar-shop-page .ar-shop__products ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ar-shop-page .ar-shop__products ul.products::before,
.ar-shop-page .ar-shop__products ul.products::after { content: none; display: none; }
.ar-shop-page .ar-shop__products ul.products li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	display: flex;
	flex-direction: column;
}

/* ---------- Tarjeta (ajustes sobre .prod-arcorp) ---------- */
/* El estilo base de la tarjeta vive en home-arcorp.css; aquí solo lo que cambia en la grilla. */
.ar-shop-page .prod-arcorp .oz-loop-product__inner {
	border: 1px solid #c4c4c4 !important;
	border-radius: 16px !important;
}
.ar-shop-page .prod-arcorp .oz-loop-product__inner:hover { border-color: #9a9a9a !important; }
.ar-shop-page .prod-arcorp .oz-loop-product__media img { max-height: 230px; }
.ar-shop-page .prod-arcorp .oz-loop-product__actions { flex-wrap: wrap; padding-top: 0; }
.ar-shop-page .prod-arcorp .oz-loop-product__actions .button,
.ar-shop-page .prod-arcorp .oz-loop-product__add { margin-left: auto !important; }

/* ---------- Paginación ---------- */
.ar-shop-page .woocommerce-pagination { margin-top: 44px; text-align: center; }
.ar-shop-page .woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}
.ar-shop-page .woocommerce-pagination ul.page-numbers li {
	float: none;
	margin: 0;
	border: 0;
	overflow: visible;
}
.ar-shop-page .woocommerce-pagination ul.page-numbers li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #d5d5d5;
	border-radius: 50%;
	font-family: var(--ar-font-head);
	font-size: 16px;
	line-height: 1;
	color: #333;
	text-decoration: none;
	transition: border-color .15s ease, color .15s ease;
}
.ar-shop-page .woocommerce-pagination ul.page-numbers li a.page-numbers:hover,
.ar-shop-page .woocommerce-pagination ul.page-numbers li .page-numbers.current {
	background: #fff;
	border-color: var(--ar-red);
	color: var(--ar-red);
}
.ar-shop-page .woocommerce-pagination ul.page-numbers li .page-numbers.dots { border-color: transparent; }
.ar-shop-page .woocommerce-pagination .prev,
.ar-shop-page .woocommerce-pagination .next { color: var(--ar-ink); }
.ar-shop-page .woocommerce-pagination .prev { margin-right: 8px; }
.ar-shop-page .woocommerce-pagination .next { margin-left: 8px; }

.ar-shop__empty { padding: 40px 0; font-family: var(--ar-font-head); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.ar-shop-page { --ar-shop-side: 270px; }
	.ar-shop { gap: 24px; }
	.ar-shop-page .ar-shop__products ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
	.ar-shop { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 20px; }
	.ar-shop__filters-toggle {
		display: inline-flex;
		align-items: center;
		justify-self: start;
		gap: 8px;
		padding: 10px 18px;
		background: #000;
		border: 0;
		border-radius: 999px;
		font: 700 14px/1 var(--ar-font-head);
		color: #fff;
		cursor: pointer;
	}
	.ar-shop__filters-toggle[aria-expanded="true"] { background: var(--ar-red); }
	.ar-shop__sidebar { display: none; }
	.ar-shop__sidebar.is-open { display: block; }
}

@media (max-width: 767px) {
	.ar-shop-page .ar-shop__products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.ar-shop__order { gap: 12px; }
	.ar-shop-page .ar-shop__order select.orderby { min-width: 0; height: 40px; font-size: 16px; }
	.ar-shop-page .prod-arcorp .oz-loop-product__inner { padding: 10px; }
	.ar-shop-page .prod-arcorp .oz-loop-product__title { font-size: 16px !important; }
}

/* home-arcorp.css apila las acciones a ≤480px: el botón a todo el ancho */
@media (max-width: 480px) {
	.ar-shop-page .prod-arcorp .oz-loop-product__actions .button,
	.ar-shop-page .prod-arcorp .oz-loop-product__add { margin-left: 0 !important; }
}

@media (max-width: 420px) {
	.ar-shop__toolbar { flex-direction: column; align-items: stretch; }
	.ar-shop__order { justify-content: space-between; }
	.ar-shop-page .ar-shop__order .woocommerce-ordering { flex: 1; }
	.ar-shop-page .ar-shop__order select.orderby { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.ar-filter__sign::before,
	.ar-filter__sign::after,
	.ar-filter__check,
	.ar-filter__link { transition: none; }
}
