/* =====================================================================
   Blakletterpress — Trang khuyến mãi thiệp Tết 2026
   HOẠT ĐỘNG 1 — CSS ĐÃ CÀI LỖI (chủ đề: Box model + Position).

   Trang này đáng lẽ hiển thị như sau:
   - Thanh menu trên cùng DÍNH lại khi cuộn (sticky) và luôn nằm trên ảnh.
   - Ảnh hero phủ kín khung, chữ tiêu đề nằm CHÍNH GIỮA ảnh.
   - Ba thẻ sản phẩm xếp thành MỘT HÀNG, mỗi thẻ có nhãn "-20%" ở GÓC TRÊN
     BÊN PHẢI của chính thẻ đó; ảnh và chữ nằm gọn trong thẻ.
   - Nút "↑" nổi cố định ở GÓC DƯỚI BÊN PHẢI màn hình khi cuộn.

   Hiện tại bố cục đang VỠ. Nhiệm vụ của bạn (KHÔNG dùng AI): tìm và sửa
   các lỗi box model / position để trang hiển thị đúng như mô tả trên.
   ===================================================================== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Segoe UI", Arial, sans-serif;
	color: #222;
	background: #f4f1ea;
	line-height: 1.5;
}

a {
	color: inherit;
}

/* ===== Header / thanh điều hướng ===== */
.site-header {
	background: #2b2b2b;
	position: sticky;
	z-index: 1000;
	top: 0;
}

.header-inner {
	max-width: 1000px;
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	color: #fff;
	font-size: 24px;
	font-weight: bold;
	text-decoration: none;
}

.main-nav ul {
	list-style: none;
	display: flex;
	gap: 24px;
}

.main-nav a {
	color: #ddd;
	text-decoration: none;
}

.main-nav a:hover {
	color: #fff;
}

/* ===== Hero ===== */
.hero {
	height: 360px;
	overflow: hidden;
	position: relative;
}

.hero-bg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hero-overlay {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 80%;
	max-width: 560px;
	text-align: center;
	color: #fff;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
	z-index: 5;
}

.hero-overlay h1 {
	font-size: 34px;
	margin-bottom: 12px;
}

.hero-overlay p {
	font-size: 18px;
	margin-bottom: 20px;
}

.hero-btn {
	display: inline-block;
	padding: 12px 28px;
	background: #c0392b;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
}

/* ===== Khu sản phẩm ===== */
.products {
	max-width: 1000px;
	margin: 48px auto;
	padding: 0 24px;
}

.products h2 {
	margin-bottom: 24px;
	font-size: 28px;
}

.card-list {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
}

.card {
	flex: 0 0 calc((100% - 48px) / 3);
	background: #fff;
	border: 1px solid #e0d8c8;
	border-radius: 8px;
	padding: 16px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
	position: relative;
}

.badge {
	position: absolute;
	top: 12px;
	right: 12px;
	background: #c0392b;
	color: #fff;
	font-size: 14px;
	font-weight: bold;
	padding: 4px 10px;
	border-radius: 20px;
}

.card img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: 4px;
}

.card-body h3 {
	margin: 12px 0 8px;
	font-size: 20px;
}

.card-body p {
	margin-bottom: 8px;
	font-size: 15px;
	color: #555;
}

.card-body .price {
	color: #c0392b;
	font-weight: bold;
	font-size: 18px;
}

/* ===== Nút lên đầu trang ===== */
.back-to-top {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 48px;
	height: 48px;
	background: #2b2b2b;
	color: #fff;
	text-align: center;
	line-height: 48px;
	font-size: 22px;
	text-decoration: none;
	border-radius: 50%;
	z-index: 1010;
}

/* ===== Footer ===== */
.site-footer {
	margin-top: 48px;
	padding: 32px 24px;
	background: #2b2b2b;
	color: #cfcfcf;
	text-align: center;
	font-size: 14px;
}