/* Lightweight "bookstore" UI additions (global-safe). */

.tt-cart-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 999px;
	margin-right: 10px;
	color: inherit;
	text-decoration: none;
	background: rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(8px);
	transition: transform 0.2s ease, background 0.2s ease;
}
.tt-cart-link:hover {
	transform: translateY(-1px);
	background: rgba(255, 255, 255, 0.10);
}
.tt-cart-link i {
	font-size: 16px;
}
.tt-cart-count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #ff4d4d;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

/* Book cards grid */
.tt-books-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 26px;
}
@media (max-width: 1200px) {
	.tt-books-grid {
		grid-template-columns: repeat(8, 1fr);
	}
}
@media (max-width: 768px) {
	.tt-books-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.tt-book-card {
	grid-column: span 4;
	border-radius: 18px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.tt-book-card:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.16);
	background: rgba(255, 255, 255, 0.06);
}
.tt-book-card-featured {
	border-color: rgba(255, 255, 255, 0.22);
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}
@media (max-width: 768px) {
	.tt-book-card {
		grid-column: span 4;
	}
}

.tt-book-card-cover {
	position: relative;
	display: block;
	aspect-ratio: 2 / 3;
	background: rgba(0, 0, 0, 0.4);
}
.tt-book-card-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tt-book-badges {
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.tt-book-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
	background: rgba(0, 0, 0, 0.55);
	border: 1px solid rgba(255, 255, 255, 0.12);
}

.tt-book-card-body {
	padding: 18px 18px 16px 18px;
}
.tt-book-card-title {
	margin: 0 0 8px 0;
	font-size: 22px;
	letter-spacing: -0.02em;
}
.tt-book-card-title a {
	color: inherit;
	text-decoration: none;
}
.tt-book-card-desc {
	margin: 0 0 14px 0;
	opacity: 0.8;
}
.tt-book-card-meta {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
}
.tt-book-price-label {
	display: block;
	font-size: 12px;
	opacity: 0.7;
}
.tt-book-price-amount {
	font-size: 18px;
	font-weight: 700;
}
.tt-btn-sm {
	padding: 10px 16px !important;
}

/* Book detail pricing */
.tt-book-detail-hero {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 34px;
	align-items: start;
}
@media (max-width: 992px) {
	.tt-book-detail-hero {
		grid-template-columns: 1fr;
	}
}
.tt-book-detail-cover {
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.10);
	background: rgba(255, 255, 255, 0.03);
}
.tt-book-detail-cover img {
	width: 100%;
	height: auto;
	display: block;
}
.tt-book-detail-title {
	margin: 0 0 8px 0;
}
.tt-book-detail-subtitle {
	opacity: 0.75;
	margin-bottom: 18px;
}

/* Book detail read more */
.tt-readmore p {
	margin: 0 0 14px 0;
}
.tt-readmore p:last-child {
	margin-bottom: 0;
}
.tt-readmore-toggle.tt-btn-link {
	margin-top: 10px;
	padding: 0 !important;
}
.tt-readmore-toggle .tt-btn-icon {
	margin-left: 6px;
}
.tt-readmore.is-expanded .tt-readmore-toggle .tt-btn-icon i {
	transform: rotate(180deg);
}

.tt-book-pricing {
	margin-top: 22px;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 16px;
	overflow: hidden;
}
.tt-book-pricing-row {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 18px;
	padding: 16px;
	background: rgba(255, 255, 255, 0.03);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tt-book-pricing-row:first-child {
	border-top: none;
}
.tt-book-format {
	font-weight: 700;
	margin-bottom: 4px;
}
.tt-book-format-price {
	font-size: 20px;
	font-weight: 800;
}
.tt-book-ship-note {
	margin-top: 6px;
	font-size: 12px;
	opacity: 0.7;
}
.tt-book-pricing-col-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: flex-end;
	flex-wrap: wrap;
}
.tt-inline-form {
	display: inline;
}
.tt-rating i {
	color: #ffd166;
	margin-right: 2px;
}

.tt-book-notify {
	margin-top: 22px;
	padding: 18px;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.10);
	background: rgba(255, 255, 255, 0.03);
}
.tt-book-notify-title {
	margin: 0 0 6px 0;
}
.tt-book-notify-text {
	margin: 0 0 12px 0;
	opacity: 0.8;
}
.tt-book-notify-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.tt-book-notify-input {
	flex: 1;
	min-width: 220px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: rgba(0, 0, 0, 0.25);
	color: inherit;
}

/* Cart */
.tt-cart-table {
	width: 100%;
	border-collapse: collapse;
	border: 1px solid rgba(255, 255, 255, 0.10);
	border-radius: 16px;
	overflow: hidden;
}
.tt-cart-table th,
.tt-cart-table td {
	padding: 14px 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tt-cart-table th {
	text-align: left;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.03);
}
.tt-cart-row-title {
	font-weight: 700;
}
.tt-cart-muted {
	opacity: 0.75;
	font-size: 12px;
}

.tt-cart-item {
	display: flex;
	align-items: center;
	gap: 12px;
}
.tt-cart-thumb {
	display: block;
	width: 54px;
	min-width: 54px;
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.10);
	background: rgba(255, 255, 255, 0.03);
}
.tt-cart-thumb img {
	display: block;
	width: 100%;
	height: auto;
}
.tt-cart-item-meta a {
	color: inherit;
	text-decoration: none;
}
.tt-cart-item-meta a:hover {
	text-decoration: underline;
}

/* Hero banner book covers (home + books) */
#page-header.ph-hero-with-covers.ph-center .page-header-inner {
	flex-direction: column;
	align-items: stretch;
	justify-content: center;
	text-align: center;
	width: 100%;
}

.ph-hero-covers {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	margin: 0 auto 30px;
	z-index: 3;
	width: 100%;
}

.ph-hero-cover {
	position: relative;
	display: block;
	line-height: 0;
	flex: 0 0 auto;
	transition: transform 0.35s ease, filter 0.35s ease;
	filter: drop-shadow(10px 22px 26px rgba(0, 0, 0, 0.55));
}

.ph-hero-cover img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	border-radius: 3px;
}

.ph-hero-cover-back {
	width: clamp(124px, 16vw, 220px);
	z-index: 1;
	transform: rotate(-5deg);
}

.ph-hero-cover-front {
	width: clamp(140px, 18vw, 250px);
	z-index: 2;
	margin-left: clamp(-40px, -3.2vw, -22px);
	transform: rotate(4deg);
}

.ph-hero-cover-back:hover {
	z-index: 4;
	transform: rotate(-5deg) translateY(-10px) scale(1.04);
}

.ph-hero-cover-front:hover {
	z-index: 4;
	transform: rotate(4deg) translateY(-10px) scale(1.04);
}

@media (min-width: 1025px) {
	#page-header.ph-hero-with-covers.ph-full .page-header-inner {
		padding-top: 88px;
		padding-bottom: 48px;
	}

	#page-header.ph-hero-with-covers.ph-cap-xxxxlg .ph-hero-cover-back {
		width: clamp(112px, 13vw, 186px);
	}

	#page-header.ph-hero-with-covers.ph-cap-xxxxlg .ph-hero-cover-front {
		width: clamp(128px, 15vw, 214px);
	}
}

@media (max-width: 768px) {

	.ph-hero-cover-back {
		width: clamp(92px, 26vw, 140px);
	}

	.ph-hero-cover-front {
		width: clamp(104px, 30vw, 160px);
	}

	#page-header.ph-hero-with-covers .ph-caption-description.max-width-700 {
		max-width: 78% !important;
		width: auto !important;
		min-width: 0;
		box-sizing: border-box;
		padding-left: 8px;
		padding-right: 8px;
	}

	#page-header.ph-hero-with-covers .ph-caption-description .tt-cap-word-wrap,
	#page-header.ph-hero-with-covers .ph-caption-description .tt-cap-word {
		display: inline !important;
		overflow: visible !important;
		white-space: normal !important;
	}
}

@media (max-width: 480px) {
	.ph-hero-cover-back {
		width: 86px;
	}

	.ph-hero-cover-front {
		width: 98px;
	}
}

/* Books / cart responsive */
@media (max-width: 768px) {
	.tt-books-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.tt-book-card {
		grid-column: span 1;
	}

	.tt-book-card-title {
		font-size: 18px;
	}

	.tt-book-card-meta {
		flex-wrap: wrap;
		align-items: stretch;
	}

	.tt-book-card-meta .tt-btn {
		width: 100%;
		justify-content: center;
	}

	.tt-book-pricing-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.tt-book-pricing-col-actions {
		justify-content: flex-start;
	}

	.tt-book-notify-form {
		flex-direction: column;
	}

	.tt-book-notify-input {
		min-width: 0;
		width: 100%;
	}

	.tt-cart-table {
		display: block;
		width: 100%;
		border: 0;
		overflow: visible;
	}

	.tt-cart-table thead {
		display: none;
	}

	.tt-cart-table tbody,
	.tt-cart-table tr,
	.tt-cart-table td {
		display: block;
		width: 100%;
	}

	.tt-cart-table tr {
		margin-bottom: 16px;
		padding: 16px;
		border: 1px solid rgba(255, 255, 255, 0.10);
		border-radius: 16px;
		background: rgba(255, 255, 255, 0.03);
	}

	.tt-cart-table td {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 8px 0;
		border: 0;
	}

	.tt-cart-table td:first-child {
		display: block;
		padding-top: 0;
	}

	.tt-cart-table td:nth-of-type(2)::before { content: "Format"; font-weight: 700; opacity: 0.7; }
	.tt-cart-table td:nth-of-type(3)::before { content: "Qty"; font-weight: 700; opacity: 0.7; }
	.tt-cart-table td:nth-of-type(4)::before { content: "Price"; font-weight: 700; opacity: 0.7; }

	.tt-cart-table td:last-child {
		justify-content: flex-end;
		padding-bottom: 0;
	}

	.tt-cart-item {
		align-items: flex-start;
	}
}

@media (max-width: 480px) {
	.tt-books-grid {
		grid-template-columns: 1fr;
	}

	.tt-book-card-body {
		padding: 14px;
	}

	.tt-book-detail-title {
		font-size: clamp(28px, 8vw, 40px);
	}
}

