/* petking — Design System CSS */
/* ecommerce-vibrant (pet-adapted) */

/* ========== Reset & Base ========== */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

:root {
	--canvas: #ffffff;
	--surface: #fef9f3;
	--surface-accent: #fff5eb;
	--ink: #2d2520;
	--muted: #7a6e63;
	--primary: #e8734a;
	--primary-hover: #d4623b;
	--secondary: #5bb5a2;
	--secondary-hover: #4a9e8d;
	--border: #e8ddd3;
	--success: #4caf7d;
	--star: #f5a623;
	--highlight: #fef0db;
	--shadow-sm: 0 2px 8px rgba(45, 37, 32, 0.06);
	--shadow-md: 0 4px 16px rgba(45, 37, 32, 0.08);
	--shadow-lg: 0 8px 24px rgba(45, 37, 32, 0.12);
	--radius: 12px;
	--radius-sm: 8px;
	--max-w: 1280px;
	--content-w: 720px;
	--font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-ar: "Tajawal", "Noto Naskh Arabic", sans-serif;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--canvas);
	-webkit-font-smoothing: antialiased;
}

html[dir="rtl"] body {
	font-family: var(--font-ar);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}
a {
	color: var(--primary);
	text-decoration: none;
	transition: color 0.2s;
}
a:hover {
	color: var(--primary-hover);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 700;
	line-height: 1.25;
	color: var(--ink);
}

h1 {
	font-size: clamp(2rem, 5vw, 3.2rem);
}
h2 {
	font-size: clamp(1.5rem, 3.5vw, 2.2rem);
}
h3 {
	font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

.container {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 24px;
}
.content-narrow {
	max-width: var(--content-w);
	margin: 0 auto;
	padding: 0 24px;
}

/* ========== Header / Navigation ========== */
.site-header {
	background: var(--canvas);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.nav-inner {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 72px;
}

.nav-logo {
	font-size: 1.5rem;
	font-weight: 800;
	color: var(--primary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.nav-logo svg {
	width: 32px;
	height: 32px;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 32px;
	list-style: none;
}

.nav-links a {
	color: var(--ink);
	font-weight: 600;
	font-size: 0.95rem;
	transition: color 0.2s;
}

.nav-links a:hover {
	color: var(--primary);
}
.nav-links a.active {
	color: var(--primary);
}

.lang-switcher {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	font-weight: 600;
}

.lang-switcher a {
	color: var(--muted);
	padding: 4px 8px;
	border-radius: 6px;
	transition: all 0.2s;
}

.lang-switcher a.active {
	color: var(--primary);
	background: var(--surface);
}

.lang-switcher a:hover {
	color: var(--primary);
}

.hamburger {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
}

.hamburger span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--ink);
	margin: 5px 0;
	transition: all 0.3s;
}

/* ========== Buttons ========== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	border-radius: var(--radius);
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	border: 2px solid transparent;
	transition: all 0.2s;
	min-height: 44px;
	text-align: center;
}

.btn-primary {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
}

.btn-primary:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
	color: #fff;
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

.btn-secondary {
	background: transparent;
	color: var(--secondary);
	border-color: var(--secondary);
}

.btn-secondary:hover {
	background: var(--secondary);
	color: #fff;
}

.btn-outline {
	background: transparent;
	color: var(--ink);
	border-color: var(--border);
}

.btn-outline:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.btn-sm {
	padding: 10px 20px;
	font-size: 0.9rem;
}

/* ========== Hero Section ========== */
.hero {
	background: var(--surface);
	padding: 80px 0;
	overflow: hidden;
}

.hero-inner {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}

.hero-content h1 {
	margin-bottom: 20px;
	color: var(--ink);
}

.hero-content h1 span {
	color: var(--primary);
}

.hero-content p {
	font-size: 1.15rem;
	color: var(--muted);
	margin-bottom: 32px;
	max-width: 500px;
}

.hero-cta {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.hero-image {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
}

.hero-image img {
	width: 100%;
	height: 420px;
	object-fit: cover;
}

/* ========== Category Cards ========== */
.categories {
	padding: 80px 0;
}

.section-header {
	text-align: center;
	margin-bottom: 48px;
}

.section-header h2 {
	margin-bottom: 12px;
}
.section-header p {
	color: var(--muted);
	font-size: 1.1rem;
	max-width: 600px;
	margin: 0 auto;
}

.category-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.category-card {
	background: var(--surface);
	border-radius: var(--radius);
	padding: 32px;
	text-align: center;
	border: 1px solid var(--border);
	transition: all 0.3s;
	cursor: pointer;
	text-decoration: none;
	color: var(--ink);
}

.category-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	border-color: var(--primary);
	color: var(--ink);
}

.category-card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	margin-bottom: 16px;
}

.category-card h3 {
	margin-bottom: 8px;
	font-size: 1.15rem;
}
.category-card p {
	color: var(--muted);
	font-size: 0.9rem;
}

/* ========== Product Cards ========== */
.products-section {
	padding: 80px 0;
	background: var(--canvas);
}

.product-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.product-card {
	background: var(--canvas);
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	transition: all 0.3s;
	text-decoration: none;
	color: var(--ink);
}

.product-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
	color: var(--ink);
}

.product-card img {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.product-card-body {
	padding: 20px;
}

.product-card-body h3 {
	font-size: 1.05rem;
	margin-bottom: 8px;
}

.product-card-body .product-desc {
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 12px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-card-body .btn {
	width: 100%;
}

/* ========== Trust / Advantages Section ========== */
.trust-section {
	padding: 80px 0;
	background: var(--surface);
}

.trust-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.trust-item {
	text-align: center;
	padding: 32px 16px;
}

.trust-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	background: var(--canvas);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--shadow-sm);
}

.trust-icon svg {
	width: 28px;
	height: 28px;
	color: var(--primary);
}

.trust-item h3 {
	font-size: 1rem;
	margin-bottom: 8px;
}
.trust-item p {
	color: var(--muted);
	font-size: 0.9rem;
}

/* ========== CTA Banner ========== */
.cta-banner {
	padding: 80px 0;
	background: linear-gradient(135deg, var(--primary) 0%, #d4623b 100%);
	color: #fff;
	text-align: center;
}

.cta-banner h2 {
	color: #fff;
	margin-bottom: 16px;
}
.cta-banner p {
	color: rgba(255, 255, 255, 0.9);
	margin-bottom: 32px;
	font-size: 1.1rem;
}
.cta-banner .btn-white {
	background: #fff;
	color: var(--primary);
	border-color: #fff;
	font-weight: 700;
}
.cta-banner .btn-white:hover {
	background: var(--surface);
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* ========== FAQ Section ========== */
.faq-section {
	padding: 80px 0;
}

.faq-item {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	margin-bottom: 12px;
	overflow: hidden;
}

.faq-question {
	padding: 20px 24px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: var(--canvas);
	transition: background 0.2s;
}

.faq-question:hover {
	background: var(--surface);
}

.faq-question::after {
	content: "+";
	font-size: 1.5rem;
	color: var(--primary);
	transition: transform 0.3s;
}

.faq-item.open .faq-question::after {
	content: "−";
}

.faq-answer {
	padding: 0 24px;
	max-height: 0;
	overflow: hidden;
	transition: all 0.3s ease;
	color: var(--muted);
}

.faq-item.open .faq-answer {
	padding: 0 24px 20px;
	max-height: 300px;
}

/* ========== GitHub Link ========== */
.github-link {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--muted);
	font-size: 0.85rem;
	font-weight: 600;
	transition: color 0.2s;
}
.github-link:hover {
	color: var(--ink);
}
.github-link svg {
	width: 18px;
	height: 18px;
}

@media (max-width: 768px) {
	.github-link span {
		display: none;
	}
	.github-link svg {
		width: 22px;
		height: 22px;
	}
}

/* ========== Footer ========== */
.site-footer {
	background: var(--ink);
	color: rgba(255, 255, 255, 0.8);
	padding: 64px 0 32px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 48px;
	margin-bottom: 48px;
}

.footer-brand .nav-logo {
	color: #fff;
	margin-bottom: 16px;
}
.footer-brand p {
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.6);
	max-width: 300px;
}

.footer-col h4 {
	color: #fff;
	font-size: 0.95rem;
	margin-bottom: 16px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.footer-col ul {
	list-style: none;
}
.footer-col ul li {
	margin-bottom: 10px;
}
.footer-col ul a {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.9rem;
}
.footer-col ul a:hover {
	color: #fff;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 24px;
	text-align: center;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.4);
}

/* ========== Form Styles ========== */
.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-size: 16px;
	font-family: var(--font);
	transition: border-color 0.2s;
	background: var(--canvas);
}

html[dir="rtl"] .form-group input,
html[dir="rtl"] .form-group textarea,
html[dir="rtl"] .form-group select {
	font-family: var(--font-ar);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(232, 115, 74, 0.15);
}

.form-group textarea {
	min-height: 140px;
	resize: vertical;
}

.form-submit {
	margin-top: 8px;
}

/* ========== Page Hero (inner pages) ========== */
.page-hero {
	background: var(--surface);
	padding: 48px 0;
	text-align: center;
}

.page-hero h1 {
	margin-bottom: 12px;
}
.page-hero p {
	color: var(--muted);
	font-size: 1.1rem;
}

/* ========== About Page ========== */
.about-content {
	padding: 64px 0;
}

.about-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
	margin-bottom: 64px;
}

.about-grid img {
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	height: 380px;
	object-fit: cover;
}

.about-grid h2 {
	margin-bottom: 16px;
}
.about-grid p {
	color: var(--muted);
	margin-bottom: 16px;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin-top: 32px;
}

.stat-item {
	text-align: center;
}
.stat-item .stat-number {
	font-size: 2.5rem;
	font-weight: 800;
	color: var(--primary);
}
.stat-item .stat-label {
	color: var(--muted);
	font-size: 0.9rem;
}

/* ========== Product Detail Page ========== */
.product-detail {
	padding: 64px 0;
}

.product-detail-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
}

.product-detail-image {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-md);
}

.product-detail-image img {
	width: 100%;
	height: 480px;
	object-fit: cover;
}

.product-detail-info h1 {
	margin-bottom: 8px;
}
.product-detail-info .product-category {
	color: var(--secondary);
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 16px;
}

.product-features {
	list-style: none;
	margin: 24px 0;
}

.product-features li {
	padding: 8px 0;
	padding-left: 28px;
	position: relative;
	color: var(--muted);
}

html[dir="rtl"] .product-features li {
	padding-left: 0;
	padding-right: 28px;
}

.product-features li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--success);
	font-weight: 700;
}

html[dir="rtl"] .product-features li::before {
	left: auto;
	right: 0;
}

.product-applications {
	background: var(--surface);
	padding: 20px;
	border-radius: var(--radius-sm);
	margin: 24px 0;
}

.product-applications h3 {
	font-size: 1rem;
	margin-bottom: 8px;
}
.product-applications p {
	color: var(--muted);
	font-size: 0.9rem;
}

.product-cta {
	margin-top: 32px;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

/* ========== Blog ========== */
.blog-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
	padding: 64px 0;
}

.blog-card {
	background: var(--canvas);
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
	text-decoration: none;
	color: var(--ink);
	transition: all 0.3s;
}

.blog-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
	color: var(--ink);
}

.blog-card img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.blog-card-body {
	padding: 20px;
}

.blog-card-body .blog-date {
	color: var(--muted);
	font-size: 0.85rem;
	margin-bottom: 8px;
}

.blog-card-body h3 {
	font-size: 1.1rem;
	margin-bottom: 8px;
}
.blog-card-body p {
	color: var(--muted);
	font-size: 0.9rem;
}

/* ========== Contact Page ========== */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	padding: 64px 0;
}

@media (max-width: 768px) {
	.contact-grid {
		grid-template-columns: 1fr;
		padding: 32px 16px;
		gap: 32px;
	}
	.contact-grid h2 {
		font-size: 1.3rem;
		margin-bottom: 16px;
	}
	.form-group {
		margin-bottom: 14px;
	}
	.form-group input,
	.form-group textarea,
	.form-group select {
		padding: 10px 14px;
		font-size: 16px;
	}
	.form-group textarea {
		min-height: 100px;
	}
	.btn {
		width: 100%;
		padding: 12px 20px;
	}
	.contact-info-card {
		padding: 16px;
		gap: 12px;
		margin-bottom: 12px;
	}
}

.contact-info-card {
	background: var(--surface);
	padding: 24px;
	border-radius: var(--radius-sm);
	margin-bottom: 20px;
	display: flex;
	gap: 16px;
	align-items: start;
}

.contact-info-card svg {
	width: 24px;
	height: 24px;
	color: var(--primary);
	flex-shrink: 0;
	margin-top: 2px;
}

.contact-info-card h3 {
	font-size: 1rem;
	margin-bottom: 4px;
}
.contact-info-card p {
	color: var(--muted);
	font-size: 0.9rem;
}

/* ========== Thanks Page ========== */
.thanks-page {
	text-align: center;
	padding: 120px 24px;
}

.thanks-page svg {
	width: 80px;
	height: 80px;
	color: var(--success);
	margin-bottom: 24px;
}
.thanks-page h1 {
	margin-bottom: 16px;
}
.thanks-page p {
	color: var(--muted);
	font-size: 1.1rem;
	margin-bottom: 32px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
	.hero-inner {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.hero-content p {
		margin: 0 auto 32px;
	}
	.hero-cta {
		justify-content: center;
	}
	.hero-image img {
		height: 320px;
	}
	.category-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.trust-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.footer-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.about-grid {
		grid-template-columns: 1fr;
	}
	.product-detail-grid {
		grid-template-columns: 1fr;
	}
	.contact-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.nav-links {
		display: none;
	}
	.hamburger {
		display: block;
	}
	.nav-links.open {
		display: flex;
		flex-direction: column;
		position: absolute;
		top: 72px;
		left: 0;
		right: 0;
		background: var(--canvas);
		border-bottom: 1px solid var(--border);
		padding: 24px;
		gap: 16px;
		box-shadow: var(--shadow-md);
	}
	html[dir="rtl"] .nav-links.open {
		flex-direction: column;
	}
	.category-grid {
		grid-template-columns: 1fr;
	}
	.product-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.trust-grid {
		grid-template-columns: 1fr;
	}
	.stats-grid {
		grid-template-columns: repeat(3, 1fr);
	}
	.blog-grid {
		grid-template-columns: 1fr;
	}
	.footer-grid {
		grid-template-columns: 1fr;
	}
	.hero {
		padding: 48px 0;
	}
	.categories,
	.products-section,
	.trust-section,
	.cta-banner,
	.faq-section {
		padding: 48px 0;
	}
}

@media (max-width: 480px) {
	.product-grid {
		grid-template-columns: 1fr;
	}
	.hero-image img {
		height: 240px;
	}
	.btn {
		padding: 12px 24px;
		font-size: 0.95rem;
	}
	.nav-inner {
		height: 60px;
	}
}

/* ========== Mobile Nav Overlay ========== */
.nav-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 99;
}
.nav-overlay.active {
	display: block;
}

/* ========== Blog Article Page ========== */
.article-content {
	padding: 48px 0 80px;
}
.article-content h2 {
	margin: 40px 0 16px;
	font-size: 1.5rem;
}
.article-content h3 {
	margin: 32px 0 12px;
	font-size: 1.2rem;
}
.article-content p {
	color: var(--muted);
	margin-bottom: 16px;
	line-height: 1.8;
}
.article-content ul,
.article-content ol {
	margin: 16px 0 24px 24px;
	color: var(--muted);
}
html[dir="rtl"] .article-content ul,
html[dir="rtl"] .article-content ol {
	margin-left: 0;
	margin-right: 24px;
}
.article-content li {
	margin-bottom: 10px;
	line-height: 1.7;
}
.article-content blockquote {
	border-right: 4px solid var(--primary);
	padding: 16px 24px;
	background: var(--surface);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	margin: 24px 0;
	font-style: italic;
	color: var(--muted);
}
html[dir="rtl"] .article-content blockquote {
	border-right: none;
	border-left: 4px solid var(--primary);
	border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.article-meta {
	display: flex;
	gap: 16px;
	align-items: center;
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 32px;
	flex-wrap: wrap;
}
.article-meta span {
	display: flex;
	align-items: center;
	gap: 6px;
}
.article-back {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 0.9rem;
	margin-bottom: 24px;
}
.article-back:hover {
	color: var(--primary);
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ========== Safe Area (notch phones) ========== */
@supports (padding: env(safe-area-inset-bottom)) {
	.site-footer {
		padding-bottom: calc(32px + env(safe-area-inset-bottom));
	}
}

/* ========== RTL Overrides ========== */
html[dir="rtl"] .hero-cta {
	flex-direction: row-reverse;
}
html[dir="rtl"] .contact-info-card {
	flex-direction: row-reverse;
}
html[dir="rtl"] .faq-question {
	flex-direction: row-reverse;
}
html[dir="rtl"] .faq-question::after {
	content: "+";
}
html[dir="rtl"] .faq-item.open .faq-question::after {
	content: "−";
}

/* ========== Print ========== */
@media print {
	.site-header,
	.site-footer,
	.cta-banner,
	.hamburger {
		display: none !important;
	}
	a[href]::after {
		content: " (" attr(href) ")";
		font-size: 0.8rem;
		color: #999;
	}
}
