/**
 * Après Shop — protocol category archive styles.
 * Colours exposed as custom properties for easy retuning against the brand kit.
 */

.apres-category {
	--apres-ink: #1a1a1a;
	--apres-muted: #6b6b6b;
	--apres-hairline: #d7d7d7;
	--apres-primary: #4a1512;
	--apres-primary-hover: #601c17;
	--apres-panel: #f4f2ef;
	--apres-select-border: #1a1a1a;
	--apres-radius: 4px;

	color: var(--apres-ink);
}

.apres-category__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: clamp(1.5rem, 4vw, 3.5rem);
	align-items: start;
}

/* ---- Media / includes ---- */

.apres-category__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--apres-radius);
}

.apres-category__includes {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--apres-hairline);
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--apres-muted);
}

.apres-category__includes h2,
.apres-category__includes h3 {
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--apres-muted);
	margin: 0 0 0.75rem;
}

.apres-category__includes ul {
	margin: 0;
	padding-left: 1.1rem;
}

.apres-category__includes li {
	margin-bottom: 0.5rem;
}

/* ---- Summary ---- */

.apres-category__eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--apres-muted);
}

.apres-category__title {
	margin: 0 0 0.75rem;
	font-size: clamp(2.4rem, 5vw, 3.6rem);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.01em;
}

.apres-category__subtitle {
	margin-bottom: 2rem;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	line-height: 1.45;
	color: #3a3a3a;
}

.apres-category__subtitle p {
	margin: 0;
}

/* ---- Selector ---- */

.apres-category__selector-label {
	margin: 0 0 0.5rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--apres-muted);
}

.apres-option {
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 1rem;
	width: 100%;
	padding: 1rem 1.1rem;
	border: 1px solid transparent;
	border-bottom: 1px solid var(--apres-hairline);
	border-radius: var(--apres-radius);
	text-align: left;
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.apres-option:hover {
	background: rgba( 0, 0, 0, 0.02 );
}

.apres-option.is-active {
	border: 1px solid var(--apres-select-border);
	background:#1450aa1a;
}

.apres-option.is-unavailable {
	opacity: 0.45;
	pointer-events: none;
}

.apres-option__name {
	font-size: 1.05rem;
	font-weight: 700;
}

.apres-option__sessions {
	font-size: 0.9rem;
	color: var(--apres-muted);
	white-space: nowrap;
}

.apres-option__price {
	font-size: 1.05rem;
	font-weight: 700;
	white-space: nowrap;
}

/* ---- Price panel ---- */

.apres-category__price-panel {
	margin-top: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--apres-hairline);
}

.apres-category__price-label {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--apres-muted);
}

.apres-category__price {
	font-size: clamp(3rem, 7vw, 4.5rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}

.apres-category__price del {
	color: var(--apres-muted);
	font-weight: 500;
	font-size: 0.5em;
}

.apres-option__price del, .apres-option__price del .woocommerce-Price-amount.amount {
	color: #949494;
}

.apres-category__price-meta {
	margin: 0.35rem 0 0;
	font-size: 0.95rem;
	color: var(--apres-muted);
}

/* ---- Actions ---- */

.apres-category__actions {
	margin-top: 1.5rem;
}

.apres-category .single_add_to_cart_button,
.apres-category__book {
	display: block;
	width: 100%;
	padding: 1.1rem 1.5rem;
	border-radius: var(--apres-radius);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.apres-category .single_add_to_cart_button {
	border: 0;
	background: var(--apres-primary);
	color: #fff;
	margin-bottom: 0.75rem;
}

.apres-category .single_add_to_cart_button:hover {
	background: var(--apres-primary-hover);
}

/* Core appends its own "View cart" link after the AJAX add; we surface a
   styled confirmation panel instead (below), so hide the default to avoid a
   duplicate link. */
.apres-category .added_to_cart {
	display: none;
}

/* ---- Add-to-cart feedback ---- */

.apres-category .single_add_to_cart_button.is-loading {
	opacity: 0.75;
	pointer-events: none;
}

.apres-category .single_add_to_cart_button.is-added {
	background: #1f6b3a;
}

.apres-category__added {
	display: none;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	padding: 0.85rem 1rem;
	border: 1px solid #cfe6d6;
	border-radius: var(--apres-radius);
	background: #eef6f0;
	font-size: 0.9rem;
	color: #1f6b3a;
}

.apres-category__added.is-visible {
	display: flex;
}

.apres-category__added-note {
	font-weight: 600;
}

.apres-category__added-note::before {
	content: "\2713";
	margin-right: 0.4rem;
	font-weight: 700;
}

.apres-category__added-link {
	margin-left: auto;
	color: var(--apres-primary);
	font-weight: 700;
	text-decoration: underline;
	white-space: nowrap;
}

.apres-category__book {
	border: 1px solid var(--apres-select-border);
	background: transparent;
	color: var(--apres-ink);
}

.apres-category__book:hover {
	background: rgba( 0, 0, 0, 0.03 );
}

.apres-category__refund {
	margin: 1rem 0 0;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--apres-muted);
}

.apres-category__empty {
	margin: 1.5rem 0;
	color: var(--apres-muted);
}

/* ---- How your purchase works ---- */

.apres-category__works {
	margin-top: 2rem;
	padding: 1.5rem 1.75rem;
	background: var(--apres-panel);
	border-radius: var(--apres-radius);
}

.apres-category__works-title {
	margin: 0 0 0.6rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--apres-muted);
}

.apres-category__works p {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.6;
	color: #3a3a3a;
}

/* ---- Responsive ---- */

@media ( max-width: 860px ) {
	.apres-category__grid {
		grid-template-columns: 1fr;
	}
}
