/*
Theme Name: Doaba Mart
Theme URI: https://doabamart.com
Author: Doaba Mart
Description: Catalogue-style store theme for Doaba Mart. Products are shown with an "Order on WhatsApp" button instead of a cart. Includes Customizer settings for business details, homepage text and colours.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: doabamart
*/

:root {
	--dm-accent: #b7791f;
	--dm-green: #1f5130;
	--dm-text: #2b2b2b;
	--dm-muted: #6b6b6b;
	--dm-bg: #fffdf8;
	--dm-border: #ece6d9;
	--dm-radius: 12px;
	--dm-max: 1160px;
	--dm-whatsapp: #25d366;
	--dm-whatsapp-dark: #1ebe5d;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--dm-text);
	background: var(--dm-bg);
	line-height: 1.6;
	font-size: 16px;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--dm-green);
}

h1,
h2,
h3,
h4 {
	line-height: 1.25;
	color: var(--dm-green);
	margin: 0.4em 0;
}

.container {
	width: 100%;
	max-width: var(--dm-max);
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

.screen-reader-text {
	position: absolute;
	left: -9999px;
}

.skip-link:focus {
	left: 10px;
	top: 10px;
	background: #fff;
	padding: 8px;
	z-index: 100;
}

/* Header */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--dm-border);
	position: sticky;
	top: 0;
	z-index: 50;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	min-height: 72px;
	padding-top: 10px;
	padding-bottom: 10px;
}

.site-title {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--dm-green);
	text-decoration: none;
}

.custom-logo {
	max-height: 56px;
	width: auto;
}

.main-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
}

.main-nav a {
	text-decoration: none;
	color: var(--dm-text);
	font-weight: 500;
}

.main-nav a:hover {
	color: var(--dm-accent);
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 11px 20px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	border: 2px solid transparent;
	cursor: pointer;
	text-align: center;
	transition: background 0.2s, color 0.2s, filter 0.2s;
}

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

.btn-primary:hover {
	filter: brightness(0.92);
	color: #fff;
}

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

.btn-outline:hover {
	background: var(--dm-green);
	color: #fff;
}

.btn-whatsapp {
	background: var(--dm-whatsapp);
	color: #fff;
}

.btn-whatsapp:hover {
	background: var(--dm-whatsapp-dark);
	color: #fff;
}

.btn-small {
	padding: 8px 16px;
	font-size: 0.9rem;
}

.btn-large {
	padding: 14px 28px;
	font-size: 1.05rem;
}

.btn-block {
	display: block;
	width: 100%;
}

/* Layout */
.site-main {
	min-height: 60vh;
}

.section {
	padding-top: 56px;
	padding-bottom: 56px;
}

.section-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 16px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}

.section-head h1,
.section-head h2 {
	margin: 0;
	font-size: 1.8rem;
}

.hero {
	background: linear-gradient(135deg, #fff7e6 0%, #f3efe2 100%);
	padding-top: 70px;
	padding-bottom: 70px;
	border-bottom: 1px solid var(--dm-border);
}

.hero-inner {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 40px;
	align-items: center;
}

.hero h1 {
	font-size: 2.4rem;
}

.hero .lead {
	font-size: 1.1rem;
	color: var(--dm-muted);
}

.hero-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.hero-badge {
	background: #fff;
	border-radius: var(--dm-radius);
	padding: 30px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
	text-align: center;
}

.hero-badge .big {
	font-size: 3.5rem;
}

.hero-badge h2 {
	font-size: 1.3rem;
}

/* Products */
.product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 24px;
}

.product-card {
	background: #fff;
	border: 1px solid var(--dm-border);
	border-radius: var(--dm-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.product-thumb {
	display: block;
	aspect-ratio: 1 / 1;
	background: #f7f1e3;
	overflow: hidden;
}

.product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 160px;
	font-size: 5rem;
	font-weight: 700;
	color: var(--dm-accent);
	background: #f7f1e3;
}

.product-body {
	padding: 16px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
}

.product-title {
	font-size: 1.15rem;
	margin: 0;
}

.product-title a {
	color: var(--dm-green);
	text-decoration: none;
}

.product-unit {
	color: var(--dm-muted);
	font-size: 0.9rem;
	margin: 0;
}

.product-price {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--dm-accent);
	margin: 4px 0 10px;
}

.product-body .btn {
	margin-top: auto;
}

.product-single {
	padding-top: 50px;
	padding-bottom: 50px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

.product-thumb-large {
	border-radius: var(--dm-radius);
	overflow: hidden;
	background: #f7f1e3;
	aspect-ratio: 1 / 1;
}

.product-thumb-large img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.product-info h1 {
	font-size: 2rem;
}

.product-desc {
	margin: 16px 0;
}

.note {
	font-size: 0.9rem;
	color: var(--dm-muted);
}

.features {
	background: #fff;
	border-top: 1px solid var(--dm-border);
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px;
}

.feature {
	padding: 24px;
	border: 1px solid var(--dm-border);
	border-radius: var(--dm-radius);
	background: var(--dm-bg);
}

.feature h3 {
	margin-top: 0;
}

/* Pages */
.page-content {
	padding-top: 50px;
	padding-bottom: 50px;
	max-width: 820px;
}

.page-content h1 {
	font-size: 2.1rem;
}

.contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin: 30px 0;
}

.contact-card {
	background: #fff;
	border: 1px solid var(--dm-border);
	border-radius: var(--dm-radius);
	padding: 22px;
}

.contact-card h3 {
	margin-top: 0;
	font-size: 1.05rem;
}

.contact-card p {
	margin: 0.2em 0;
}

.blog-post {
	border-bottom: 1px solid var(--dm-border);
	padding: 20px 0;
}

.empty-state {
	padding: 40px;
	text-align: center;
	background: #fff;
	border-radius: var(--dm-radius);
}

.pagination-wrap .nav-links {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin: 30px 0;
	flex-wrap: wrap;
}

.pagination-wrap .page-numbers {
	padding: 8px 14px;
	border: 1px solid var(--dm-border);
	border-radius: 8px;
	text-decoration: none;
	background: #fff;
}

.pagination-wrap .current {
	background: var(--dm-green);
	color: #fff;
}

/* Floating WhatsApp button */
.whatsapp-float {
	position: fixed;
	right: 18px;
	bottom: 18px;
	background: var(--dm-whatsapp);
	color: #fff;
	padding: 12px 18px;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 700;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
	z-index: 60;
}

.whatsapp-float:hover {
	color: #fff;
	background: var(--dm-whatsapp-dark);
}

/* Footer */
.site-footer {
	background: var(--dm-green);
	color: #e9f1ec;
	padding-top: 48px;
	margin-top: 40px;
}

.site-footer a {
	color: #fff;
}

.site-footer h3,
.site-footer h4 {
	color: #fff;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 30px;
}

.footer-grid ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-grid li {
	margin: 6px 0;
}

.footer-grid p {
	margin: 0.4em 0;
}

.footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	margin-top: 36px;
	padding: 18px 0;
	text-align: center;
	font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 820px) {
	.hero-inner,
	.product-single {
		grid-template-columns: 1fr;
	}

	.hero h1 {
		font-size: 1.9rem;
	}

	.product-placeholder {
		font-size: 3.5rem;
	}
}
