/* =========================================================================
 * CCW Books — luxury books grid with Amazon links.
 * ===================================================================== */

.ccw-books { position: relative; width: 100%; overflow: hidden; }
.ccw-books::before {
	content: "";
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 1;
	pointer-events: none;
	z-index: 0;
}

.ccw-books__inner { position: relative; z-index: 1; margin: 0 auto; padding-block: var(--ccw-space-8); }

/* ---- Header ---- */
.ccw-books__head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.ccw-books__eyebrow { font-family: var(--ccw-font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ccw-rose-deep); }
.ccw-books__title { font-family: var(--ccw-font-display); font-size: var(--ccw-fs-h2); line-height: 1.15; color: var(--ccw-heading); margin: 0; }
.ccw-books__intro { max-width: 620px; font-size: var(--ccw-fs-body); line-height: var(--ccw-lh-body); color: var(--ccw-text); }
.ccw-books__intro p { margin: 0; }

/* ---- Grid + card ---- */
.ccw-books__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; align-items: stretch; }

.ccw-books__item {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 22px;
	background: rgba(255, 255, 255, 0.66);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	border: 1px solid rgba(212, 175, 55, 0.3);
	border-radius: 18px;
	box-shadow: 0 16px 38px rgba(42, 30, 44, 0.08);
	transition: transform 0.3s var(--ccw-ease-out), box-shadow 0.3s ease;
}
.ccw-books__item:hover { transform: translateY(-4px); box-shadow: 0 26px 54px rgba(42, 30, 44, 0.16); }

.ccw-books__cover { position: relative; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; box-shadow: 0 12px 26px rgba(42, 30, 44, 0.2); }
.ccw-books__cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ccw-ease-out); }
.ccw-books__item:hover .ccw-books__cover img { transform: scale(1.04); }

.ccw-books__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 5px 13px;
	font-family: var(--ccw-font-body);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	background: var(--ccw-rose-deep);
	border-radius: 50px;
	box-shadow: 0 5px 14px rgba(192, 57, 122, 0.3);
}

.ccw-books__body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
.ccw-books__bt { font-family: var(--ccw-font-display); font-size: 1.25rem; line-height: 1.2; color: var(--ccw-heading); margin: 0; }
.ccw-books__author { font-family: var(--ccw-font-script); font-size: 1.1rem; color: #B8862E; line-height: 1; }
.ccw-books__blurb { font-size: 0.92rem; line-height: 1.5; color: #5A4F58; margin: 4px 0 0; }

.ccw-books__buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 8px; }
.ccw-books__price { font-family: var(--ccw-font-display); font-size: 1.3rem; line-height: 1; color: var(--ccw-rose-deep); }

.ccw-books__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	font-family: var(--ccw-font-body);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #2A1E2C;
	background: #F7C948;
	border-radius: var(--ccw-radius-pill);
	cursor: pointer;
	transition: var(--ccw-transition);
	box-shadow: 0 6px 16px rgba(247, 201, 72, 0.4);
}
.ccw-books__btn:hover { color: #2A1E2C; background: #E5B53C; transform: translateY(-2px); }

/* ---- "Cover beside text" layout ---- */
.ccw-books--row .ccw-books__item { flex-direction: row; align-items: stretch; }
.ccw-books--row .ccw-books__cover { flex: 0 0 38%; aspect-ratio: 2 / 3; }
.ccw-books--row .ccw-books__body { flex: 1 1 auto; }

@media (max-width: 1024px) { .ccw-books__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
	.ccw-books__grid { grid-template-columns: 1fr; }
	.ccw-books--row .ccw-books__item { flex-direction: column; }
	.ccw-books--row .ccw-books__cover { flex-basis: auto; max-width: 200px; }
}
