/*
Theme Name: Flatsome Child - An Phuc
Template: flatsome
Description: Giao dien hien dai cho Thiet bi PCCC An Phuc (child theme cua Flatsome).
Version: 1.0.0
Text Domain: flatsome-child
*/

:root {
	--ap-red: #dc2626;
	--ap-red-dark: #b91c1c;
	--ap-red-soft: #fef2f2;
	--ap-ink: #111827;
	--ap-text: #374151;
	--ap-muted: #6b7280;
	--ap-line: #e5e7eb;
	--ap-radius: 12px;
}

body {
	font-family: "Be Vietnam Pro", "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: var(--ap-text);
}

h1, h2, h3, h4, .section-title-container {
	color: var(--ap-ink);
	letter-spacing: 0;
}

a { color: var(--ap-red); }
a:hover { color: var(--ap-red-dark); }

/* Nut bam */
.button.primary,
.button.checkout,
.single_add_to_cart_button {
	background-color: var(--ap-red);
	border-radius: 8px;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}
.button.primary:hover,
.single_add_to_cart_button:hover { background-color: var(--ap-red-dark); }

/* Top bar + header */
.header-top { background: var(--ap-ink); }
.header-top, .header-top a { color: #e5e7eb; font-size: 12px; }
.header-main { border-bottom: 1px solid var(--ap-line); }
.nav > li > a { text-transform: none; font-weight: 500; font-size: 14px; color: var(--ap-text); }
#header .header-nav > li > a.nav-top-link { font-weight: 700; }
.nav > li > a:hover, .nav > li.active > a { color: var(--ap-red); }

/* The san pham */
.product-small .box { border: 1px solid var(--ap-line); border-radius: var(--ap-radius); overflow: hidden; transition: box-shadow .2s; }
.product-small .box:hover { box-shadow: 0 6px 20px rgba(17, 24, 39, .08); }
.product-small .box-text { padding: 12px; }
.product-small .name a, .product-title a { color: var(--ap-ink); font-weight: 500; }
.price .amount, .price-wrapper .amount { color: var(--ap-red); font-weight: 500; }

/* Trang chu moi */
.ap-wrap { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.ap-section { padding: 36px 0; }
.ap-section > .ap-wrap > h2 { font-size: 22px; font-weight: 600; margin: 0 0 18px; display: flex; justify-content: space-between; align-items: baseline; }
.ap-section > .ap-wrap > h2 a { font-size: 14px; font-weight: 500; }

.ap-hero { background: var(--ap-red-soft); padding: 56px 0; }
.ap-hero .ap-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.ap-hero .ap-tag { display: inline-block; background: #fee2e2; color: #991b1b; font-size: 13px; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.ap-hero h1 { font-size: 40px; line-height: 1.2; font-weight: 600; margin: 0 0 14px; }
.ap-hero p { font-size: 16px; color: #4b5563; margin: 0 0 22px; }
.ap-hero .ap-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ap-btn { display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 500; border: 1px solid transparent; line-height: 1.2; }
.ap-btn.red { background: var(--ap-red); color: #fff; }
.ap-btn.red:hover { background: var(--ap-red-dark); color: #fff; }
.ap-btn.line { background: #fff; border-color: #d1d5db; color: var(--ap-ink); }
.ap-hero .ap-art { background: #fecaca; border-radius: var(--ap-radius); min-height: 260px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ap-hero .ap-art img { width: 100%; height: 100%; object-fit: cover; }
.ap-slider { position: relative; aspect-ratio: 4 / 3; min-height: 0; }
.ap-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.ap-slide.is-active { opacity: 1; visibility: visible; }
.ap-slide .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 14px; background: linear-gradient(transparent, rgba(17, 24, 39, .75)); color: #fff; font-size: 14px; font-weight: 500; line-height: 1.3; }
.ap-dots { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 6px; z-index: 2; }
.ap-dots button { width: 9px; height: 9px; padding: 0; margin: 0; min-height: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; }
.ap-dots button.is-active { background: #fff; width: 22px; border-radius: 5px; }
@media (prefers-reduced-motion: reduce) { .ap-slide { transition: none; } }

.ap-perks { border-bottom: 1px solid var(--ap-line); }
.ap-perks .ap-wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.ap-perks div { padding: 16px; text-align: center; font-size: 14px; border-right: 1px solid var(--ap-line); }
.ap-perks div:last-child { border-right: 0; }
.ap-perks b { display: block; color: var(--ap-red); font-size: 18px; font-weight: 600; }

.ap-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ap-cat { display: flex; align-items: center; gap: 14px; border: 1px solid var(--ap-line); border-radius: var(--ap-radius); padding: 14px; color: var(--ap-ink); transition: border-color .2s; }
.ap-cat:hover { border-color: var(--ap-red); color: var(--ap-ink); }
.ap-cat .thumb { flex: 0 0 56px; height: 56px; border-radius: 10px; background: var(--ap-red-soft); color: var(--ap-red); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 20px; overflow: hidden; }
.ap-cat .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ap-cat strong { display: block; font-weight: 500; line-height: 1.3; }
.ap-cat small { color: var(--ap-muted); font-size: 12px; }

.ap-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ap-card { border: 1px solid var(--ap-line); border-radius: var(--ap-radius); overflow: hidden; background: #fff; transition: box-shadow .2s; }
.ap-card:hover { box-shadow: 0 6px 20px rgba(17, 24, 39, .08); }
.ap-card .img { aspect-ratio: 1 / 1; background: #f3f4f6; }
.ap-card .img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-card .info { padding: 12px; }
.ap-card .name { color: var(--ap-ink); font-size: 14px; line-height: 1.4; height: 40px; overflow: hidden; display: block; }
.ap-card .price { color: var(--ap-red); font-weight: 600; margin-top: 6px; }

.ap-cta { background: var(--ap-ink); color: #fff; padding: 28px 0; }
.ap-cta .ap-wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ap-cta h3 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.ap-cta p { margin: 0; color: #d1d5db; }

/* Footer */
.ap-footer { background: var(--ap-ink); color: #d1d5db; padding: 44px 0 0; font-size: 14px; }
.ap-footer a { color: #e5e7eb; }
.ap-footer a:hover { color: #fff; }
.ap-footer .ap-wrap { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; }
.ap-footer h4 { color: #fff; font-size: 16px; font-weight: 600; margin: 0 0 12px; text-transform: none; }
.ap-footer ul { list-style: none; margin: 0; padding: 0; }
.ap-footer li { margin: 0 0 8px; }
.ap-footer p { margin: 0 0 8px; }
.ap-footer .ap-copy { border-top: 1px solid #1f2937; margin-top: 32px; padding: 16px 0; font-size: 12px; color: #9ca3af; text-align: center; }
.ap-footer .ap-copy .ap-wrap { display: block; }

@media (max-width: 849px) {
	.ap-hero { padding: 32px 0; }
	.ap-hero .ap-wrap { grid-template-columns: 1fr; }
	.ap-hero h1 { font-size: 28px; }
	.ap-perks .ap-wrap { grid-template-columns: repeat(2, 1fr); }
	.ap-perks div:nth-child(2) { border-right: 0; }
	.ap-perks div:nth-child(-n+2) { border-bottom: 1px solid var(--ap-line); }
	.ap-cats { grid-template-columns: 1fr; }
	.ap-products { grid-template-columns: repeat(2, 1fr); }
	.ap-footer .ap-wrap { grid-template-columns: 1fr; gap: 24px; }
}
