/*
Theme Name: PadangMart
Theme URI: https://localhost/
Author: Custom
Author URI: https://localhost/
Description: Toko Online Lokal Kota Padang - Oleh-oleh Khas Minang, Kuliner & Wisata, Fashion Minangkabau.
Version: 1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: padangmart
Tags: e-commerce, shop, custom-post-types, custom-menu, featured-images, translation-ready
*/

/* ============ Variables & Reset ============ */
:root {
	--primary: #a4161a;
	--primary-dark: #7f1014;
	--secondary: #d4a017;
	--dark: #1f1f1f;
	--cream: #faf6ef;
	--wa: #25d366;
	--text: #333;
	--muted: #777;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
	font-family: 'Poppins', sans-serif;
	color: var(--text);
	background: var(--cream);
	line-height: 1.7;
	font-size: 15px;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; line-height: 1.25; color: var(--dark); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: .25s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}

/* ============ Top Bar ============ */
.top-bar {
	background: linear-gradient(90deg, var(--primary-dark), var(--primary));
	color: #fff;
	font-size: 12.5px;
	padding: 8px 0;
}
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar-left span { margin-right: 18px; }
.top-bar a { color: #fff; font-weight: 500; }
.top-bar a:hover { color: var(--secondary); }

/* ============ Header ============ */
.site-header { background: #fff; padding: 18px 0; border-bottom: 3px solid var(--secondary); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-branding { text-align: left; }
.site-title { font-size: 34px; font-weight: 900; margin: 0; }
.site-title a { color: var(--dark); }
.site-title a:hover { color: var(--primary); }
.site-description { font-size: 13px; color: var(--muted); margin-top: 2px; }

.header-right { display: flex; align-items: center; gap: 12px; }
.search-toggle {
	background: var(--primary); color: #fff; border: 0;
	padding: 10px 14px; border-radius: 6px; cursor: pointer;
	display: inline-flex; align-items: center;
}
.search-toggle:hover { background: var(--primary-dark); color: #fff; }

.menu-toggle {
	display: none; flex-direction: column; gap: 4px;
	background: var(--dark); border: 0; padding: 12px; border-radius: 6px; cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; }

/* ============ Navigation (HORIZONTAL) ============ */
.main-navigation { background: var(--dark); position: relative; z-index: 50; }
.main-navigation.sticky { position: fixed; top: 0; left: 0; right: 0; }

.main-navigation .nav-menu {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: center;
	list-style: none;
	margin: 0; padding: 0;
}
.nav-menu > li { position: relative; margin: 0; }
.nav-menu > li > a {
	display: block; padding: 15px 20px;
	color: #fff; font-weight: 500; font-size: 14.5px;
}
.nav-menu > li > a:hover { background: var(--primary); color: #fff; }

.nav-menu .sub-menu {
	display: none; position: absolute; top: 100%; left: 0;
	min-width: 230px; background: #fff;
	box-shadow: 0 8px 20px rgba(0,0,0,.15);
	flex-direction: column; margin: 0; padding: 0; list-style: none;
	z-index: 99;
}
.nav-menu li:hover > .sub-menu { display: flex; }
.sub-menu li a {
	display: block; padding: 10px 16px;
	color: #333; border-bottom: 1px solid #eee; font-size: 14px;
}
.sub-menu li a:hover { background: var(--cream); color: var(--primary); }

.search-bar-wrapper { background: #fff; border-bottom: 1px solid #eee; padding: 14px 0; }

/* ============ Hero ============ */
.hero-section {
	background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #c0392b 100%);
	color: #fff; padding: 70px 0; text-align: center;
}
.hero-badge {
	display: inline-block; background: var(--secondary); color: var(--dark);
	font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
	padding: 6px 16px; border-radius: 30px; margin-bottom: 18px;
}
.hero-title { font-size: 44px; color: #fff; max-width: 820px; margin: 0 auto 14px; }
.hero-sub { max-width: 640px; margin: 0 auto 26px; color: rgba(255,255,255,.85); font-size: 15.5px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-gold {
	background: var(--secondary); color: var(--dark); font-weight: 600;
	padding: 13px 30px; border-radius: 8px; display: inline-block;
}
.btn-gold:hover { background: #c8930f; color: var(--dark); }
.btn-outline {
	border: 2px solid #fff; color: #fff; font-weight: 500;
	padding: 12px 28px; border-radius: 8px; display: inline-block;
}
.btn-outline:hover { background: #fff; color: var(--primary); }

/* ============ Sections ============ */
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 26px; border-bottom: 3px solid var(--secondary); padding-bottom: 10px; }
.section-title { font-size: 26px; font-weight: 700; }
.view-all { font-size: 13.5px; font-weight: 600; }
section { padding: 50px 0; }

/* ============ Category Showcase ============ */
.category-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.category-card {
	background: #fff; border: 1px solid #eee; border-top: 4px solid var(--primary);
	border-radius: 12px; padding: 28px 24px; display: block; color: var(--text);
	transition: .25s;
}
.category-card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(0,0,0,.1); color: var(--text); }
.cat-icon { font-size: 34px; }
.cat-name { font-size: 20px; margin: 10px 0 6px; }
.cat-desc { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.cat-count { font-size: 12.5px; font-weight: 600; color: var(--primary); }

/* ============ Product Grid ============ */
.product-grid, .posts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.empty-note { color: var(--muted); background: #fff; padding: 24px; border-radius: 10px; border: 1px dashed #ddd; }

.product-card {
	background: #fff; border: 1px solid #eee; border-radius: 10px; overflow: hidden;
	transition: .25s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(0,0,0,.12); }

.product-thumb { position: relative; }
.product-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.thumb-placeholder, .no-image {
	aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
	background: var(--cream); font-size: 44px; color: #ccc;
}
.product-category {
	position: absolute; top: 10px; left: 10px;
	color: #fff; font-size: 11px; font-weight: 600;
	padding: 4px 10px; border-radius: 4px; text-transform: uppercase; letter-spacing: .4px;
}
.product-content { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.product-title { font-size: 16.5px; margin-bottom: 8px; }
.product-title a { color: var(--dark); }
.product-title a:hover { color: var(--primary); }
.product-price { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 14px; }
.product-buy {
	margin-top: auto; text-align: center; background: var(--wa); color: #fff !important;
	padding: 10px; border-radius: 7px; font-weight: 600; font-size: 13.5px;
}
.product-buy:hover { background: #1fb855; }

/* ============ WA Strip ============ */
.wa-strip { background: linear-gradient(135deg, #1fb855, var(--wa)); color: #fff; text-align: center; }
.wa-strip h2 { color: #fff; font-size: 30px; margin-bottom: 8px; }
.wa-strip p { color: rgba(255,255,255,.9); margin-bottom: 22px; }
.btn-wa-big {
	background: #fff; color: #1fb855; font-weight: 700; font-size: 16px;
	padding: 15px 38px; border-radius: 10px; display: inline-block;
}
.btn-wa-big:hover { transform: translateY(-2px); color: #1fb855; }
.btn-wa {
	background: var(--wa); color: #fff !important; font-weight: 600;
	padding: 12px 26px; border-radius: 8px; display: inline-block;
}
.btn-wa:hover { background: #1fb855; color: #fff; }

/* ============ Sidebar Layout ============ */
.content-with-sidebar { display: grid; grid-template-columns: 1fr 340px; gap: 34px; align-items: start; }
.sidebar .widget, .widget {
	background: #fff; border: 1px solid #eee; border-radius: 10px;
	padding: 20px; margin-bottom: 22px;
}
.widget-title {
	font-size: 17px; margin-bottom: 14px; padding-left: 12px;
	border-left: 4px solid var(--primary);
}
.widget ul { list-style: none; }
.widget ul li { padding: 7px 0; border-bottom: 1px dashed #eee; }
.widget ul li a { color: var(--text); }
.widget ul li a:hover { color: var(--primary); }

/* ============ Single Product ============ */
.single-product, .single-post, .single-page { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 30px; }
.product-layout { display: grid; grid-template-columns: 45% 1fr; gap: 30px; align-items: start; }
.product-image img { border-radius: 12px; width: 100%; }
.product-info .product-category-badge {
	display: inline-block; color: #fff; font-size: 11.5px; font-weight: 600;
	padding: 5px 12px; border-radius: 4px; margin-bottom: 12px; text-transform: uppercase;
}
.product-title-single { font-size: 30px; margin-bottom: 10px; }
.product-price-big { font-size: 32px; font-weight: 700; color: var(--primary); margin-bottom: 18px; }
.product-info .btn-wa { font-size: 15px; }
.product-meta { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ============ Single Post ============ */
.post-category-badge, .single-post .card-category {
	display: inline-block; background: var(--primary); color: #fff;
	font-size: 11.5px; font-weight: 600; padding: 5px 12px;
	border-radius: 4px; margin-bottom: 12px; text-transform: uppercase;
}
.post-title { font-size: 32px; margin-bottom: 12px; }
.post-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.post-meta img { border-radius: 50%; display: inline-block; }
.post-thumbnail img { border-radius: 10px; margin-bottom: 20px; }
.post-content p { margin-bottom: 16px; }
.post-content h2, .post-content h3 { margin: 24px 0 12px; }
.post-content ul, .post-content ol { margin: 0 0 16px 22px; }
.post-content img { border-radius: 8px; }
.post-tags { margin-top: 22px; font-size: 13px; }

.author-box {
	display: flex; gap: 16px; align-items: center;
	background: var(--cream); border: 1px solid #eee; border-radius: 10px;
	padding: 18px; margin-top: 26px;
}
.author-box img { border-radius: 50%; }
.author-info h4 { margin-bottom: 4px; }

.related-posts, .related-products { margin-top: 36px; }

/* ============ Archive / Search ============ */
.archive-header { margin-bottom: 30px; }
.archive-badge {
	display: inline-block; color: #fff; font-size: 11.5px; font-weight: 600;
	padding: 5px 12px; border-radius: 4px; margin-bottom: 10px; text-transform: uppercase;
}
.archive-title { font-size: 30px; }
.archive-description { color: var(--muted); }

/* ============ Pagination ============ */
.nav-links { display: flex; gap: 8px; justify-content: center; margin: 34px 0 6px; flex-wrap: wrap; }
.nav-links .page-numbers {
	display: inline-block; padding: 9px 16px; background: #fff;
	border: 1px solid #eee; border-radius: 7px; color: var(--text); font-size: 14px;
}
.nav-links .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.nav-links .page-numbers:hover:not(.current) { border-color: var(--primary); color: var(--primary); }

/* ============ Comments ============ */
.comments-area { margin-top: 34px; }
.comments-title { font-size: 22px; margin-bottom: 18px; }
.comment-list { list-style: none; }
.comment-list .comment { border-bottom: 1px solid #eee; padding: 16px 0; list-style: none; }
.comment-list .children { list-style: none; margin-left: 32px; }
.comment-form p { margin-bottom: 14px; }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
	width: 100%; padding: 11px 14px; border: 1px solid #ddd; border-radius: 7px; font-family: inherit; font-size: 14px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: 0; border-color: var(--primary); }

/* ============ Forms & Buttons ============ */
input, textarea, select { font-family: inherit; }
input[type="text"], input[type="search"], input[type="email"], textarea {
	padding: 11px 14px; border: 1px solid #ddd; border-radius: 7px; font-size: 14px; width: 100%;
}
input:focus, textarea:focus { outline: 0; border-color: var(--primary); }

.search-form { display: flex; gap: 8px; }
.search-submit {
	background: var(--primary); color: #fff; border: 0;
	padding: 0 16px; border-radius: 7px; cursor: pointer;
}
.btn-primary {
	display: inline-block; background: var(--primary); color: #fff !important;
	font-weight: 600; padding: 12px 28px; border-radius: 8px; border: 0; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); }

/* ============ Footer ============ */
.site-footer { background: var(--dark); color: #cfcfcf; padding: 50px 0 0; }
.site-footer .widget-title { color: var(--secondary); border-left-color: var(--secondary); font-size: 16px; }
.footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-bottom: 36px; }
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: var(--secondary); }
.site-footer ul li { border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-bottom { background: rgba(0,0,0,.35); padding: 16px 0; font-size: 13px; }
.footer-bottom p { text-align: center; margin: 0; }

/* ============ 404 ============ */
.error-404 { text-align: center; padding: 60px 20px; }
.error-404 h1 { font-size: 90px; color: var(--primary); }
.error-404 h2 { margin-bottom: 10px; }
.error-search { max-width: 460px; margin: 24px auto 0; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
	.product-grid, .posts-grid { grid-template-columns: repeat(3, 1fr); }
	.hero-title { font-size: 36px; }
}

@media (max-width: 768px) {
	.menu-toggle { display: flex; }
	.product-grid, .posts-grid { grid-template-columns: repeat(2, 1fr); }
	.content-with-sidebar, .product-layout { grid-template-columns: 1fr; }
	.category-cards { grid-template-columns: 1fr; }
	.footer-widgets { grid-template-columns: repeat(2, 1fr); }

	/* Nav collapses to vertical drawer on mobile only */
	.main-navigation .nav-menu { display: none; flex-direction: column; align-items: stretch; }
	.main-navigation .nav-menu.active { display: flex; }
	.nav-menu > li > a { padding: 13px 20px; border-top: 1px solid rgba(255,255,255,.06); }
	.hero-title { font-size: 30px; }
	.hero-section { padding: 50px 0; }
}

@media (max-width: 480px) {
	.product-grid, .posts-grid { grid-template-columns: 1fr; }
	.footer-widgets { grid-template-columns: 1fr; }
	.site-title { font-size: 26px; }
	.post-title, .product-title-single { font-size: 24px; }
	.section-title { font-size: 21px; }
}
