/*
Theme Name: Ghorepawa Store
Theme URI: https://ghorepawa.store/
Description: Professional multi-product order-form store for Bangladesh. Products, cash-on-delivery order form (name, phone, address), Facebook Pixel + Conversions API and admin order list. No WooCommerce needed.
Version: 3.2.0
Requires at least: 6.0
Requires PHP: 7.4
Author: Ghorepawa
Text Domain: ghorepawa
*/

/* ========== Tokens ========== */
:root {
	--brand: #e8590c;
	--brand-ink: #fff;
	--ink: #111827;
	--ink-2: #374151;
	--muted: #6b7280;
	--line: #e5e7eb;
	--bg: #f6f5f2;
	--card: #ffffff;
	--red: #dc2626;
	--green: #16a34a;
	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(17,24,39,.04), 0 8px 24px rgba(17,24,39,.06);
	--brand-soft: #fdeee6;
	--brand-dark: #be490a;
	--brand-shadow: rgba(232,89,12,.35);
	--brand-ring: rgba(232,89,12,.15);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.wrap.narrow { max-width: 720px; }
.section { padding: 26px 0; }
.section-title { font-size: 26px; text-align: center; margin-bottom: 22px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }

/* ========== Buttons ========== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--brand); color: var(--brand-ink);
	font: inherit; font-weight: 700; font-size: 18px; line-height: 1.2;
	padding: 14px 26px; border: 0; border-radius: 12px;
	text-decoration: none; cursor: pointer;
	box-shadow: 0 6px 18px var(--brand-shadow);
	transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-dark); color: var(--brand-ink); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .65; cursor: wait; transform: none; }
.btn-lg { font-size: 20px; padding: 16px 28px; }
.btn-sm { font-size: 16px; padding: 11px 16px; box-shadow: none; }
.btn-block { display: flex; width: 100%; }
.btn-outline { background: transparent; color: var(--brand); border: 2px solid var(--brand); box-shadow: none; }
.btn-outline:hover { background: var(--brand); }
.btn-pulse { animation: pulse 2.2s infinite; }
@keyframes pulse {
	0%   { box-shadow: 0 0 0 0 var(--brand-shadow); }
	70%  { box-shadow: 0 0 0 14px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

/* ========== Header ========== */
.topbar { background: var(--ink); color: #f9fafb; text-align: center; font-size: 14px; padding: 7px 12px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 12px; }
.logo { font-weight: 700; font-size: 24px; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo img { max-height: 46px; width: auto; }
.call-btn { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.call-ico { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-size: 19px; }
.call-txt { display: flex; flex-direction: column; font-weight: 700; font-size: 17px; line-height: 1.2; }
.call-txt small { font-weight: 500; font-size: 12px; color: var(--muted); }

/* ========== Home ========== */
.home-hero { background: linear-gradient(135deg, var(--brand-soft), #fff 70%); padding: 56px 0 46px; text-align: center; border-bottom: 1px solid var(--line); }
.home-hero h1 { font-size: 40px; max-width: 760px; margin: 0 auto 12px; }
.home-hero p { color: var(--ink-2); font-size: 19px; max-width: 620px; margin: 0 auto 24px; }
.empty-state { text-align: center; padding: 48px 24px; }

/* ========== Product cards ========== */
.p-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.p-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, box-shadow .15s ease; }
.p-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(17,24,39,.10); }
.pc-img { position: relative; display: block; aspect-ratio: 1/1; background: #f3f4f6; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pc-title { font-size: 17px; font-weight: 600; margin: 0; flex: 1; }
.pc-title a { color: var(--ink); text-decoration: none; }
.pc-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pc-price b { font-size: 21px; color: var(--brand); }
.pc-price del, .sum-price del, .sticky-cta del { color: var(--red); font-size: 15px; }

.img-badge { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--red); color: #fff; font-weight: 700; font-size: 14px; padding: 3px 10px; border-radius: 999px; }
.img-badge.out { left: auto; right: 12px; background: var(--ink); }
.img-badge.tag { top: auto; bottom: 12px; background: #fef3c7; color: #92400e; }
.img-placeholder { width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center; color: var(--muted); background: #f3f4f6; font-size: 15px; }
.p-badge { display: inline-block; align-self: flex-start; background: #fef3c7; color: #92400e; font-weight: 700; font-size: 14px; padding: 3px 12px; border-radius: 999px; margin-bottom: 8px; }
.p-badge.sm { font-size: 12px; padding: 2px 9px; margin: 0; }

/* ========== Product page ========== */
.p-hero { padding: 26px 0 8px; }
.p-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: start; }
.p-gallery { position: sticky; top: 88px; }
.p-main-img { position: relative; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1/1; }
.p-main-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.p-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.p-thumbs button { flex: 0 0 74px; height: 74px; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; opacity: .75; transition: .15s; }
.p-thumbs button.active, .p-thumbs button:hover { border-color: var(--brand); opacity: 1; }
.p-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.p-title { font-size: 32px; letter-spacing: -.01em; margin-bottom: 14px; }
.price-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.price-now { font-size: 40px; font-weight: 700; color: var(--brand); line-height: 1.1; }
.price-meta { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.price-old { color: var(--red); font-size: 22px; font-weight: 600; text-decoration-thickness: 2px; }
.price-off { background: var(--red); color: #fff; font-weight: 700; font-size: 15px; padding: 3px 12px; border-radius: 999px; }
.price-save { color: var(--green); font-weight: 600; font-size: 15px; margin-top: 6px; }


.p-short { color: var(--ink-2); margin: 0 0 14px; }
.p-features { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; }
.p-features li { position: relative; padding-left: 32px; }
.p-features li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: var(--green); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.mini-trust { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--muted); font-size: 15px; }
.stock-out { background: #f3f4f6; color: var(--ink-2); text-align: center; padding: 14px; border-radius: 12px; font-weight: 600; }

/* Variants */
.var-pick { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.var-pick-label { font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.var-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.var-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 96px; padding: 8px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; transition: .15s; color: var(--ink); }
.var-chip span { font-weight: 600; font-size: 15px; }
.var-chip b { color: var(--brand); font-size: 15px; }
.var-chip:hover { border-color: var(--brand); }
.var-chip.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-ring); }
.var-opts { display: grid; gap: 8px; }
.var-opts label { display: flex; align-items: center; gap: 10px; border: 1.5px solid #d1d5db; border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 600; transition: .15s; }
.var-opts input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.var-opts .vo-name { flex: 1; }
.var-opts .vo-price b { color: var(--brand); font-size: 17px; }
.var-opts .vo-price del { color: var(--red); font-weight: 500; font-size: 14px; margin-right: 4px; }
.var-opts label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.sum-var { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); font-size: 13px; font-weight: 700; padding: 1px 9px; border-radius: 99px; margin-left: 4px; }

/* ========== Order form ========== */
#order { scroll-margin-top: 80px; }
.order-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); border: 2px solid var(--brand); overflow: hidden; }
.order-head { background: var(--brand); color: var(--brand-ink); text-align: center; padding: 18px 20px; }
.order-head h2 { margin: 0; font-size: 24px; }
.order-head p { margin: 4px 0 0; opacity: .92; font-size: 15px; }
.order-form { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; padding: 26px; }
.field { margin-bottom: 16px; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; }
.field em { color: var(--red); font-style: normal; }
.field input[type="text"], .field input[type="tel"], .field textarea {
	width: 100%; font: inherit; font-size: 17px; color: var(--ink);
	padding: 13px 15px; border: 1.5px solid #d1d5db; border-radius: 12px; background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.field .is-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 4px rgba(220,38,38,.12) !important; }
.area-opts { display: grid; gap: 8px; }
.area-opts label { display: flex; align-items: center; gap: 10px; border: 1.5px solid #d1d5db; border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 500; transition: .15s; }
.area-opts label span { flex: 1; }
.area-opts input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.area-opts label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.of-summary { background: #fafaf9; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; align-self: start; }
.sum-product { display: flex; gap: 12px; align-items: center; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.sum-product img, .sum-product .img-placeholder { width: 64px; height: 64px; min-height: 0; flex: 0 0 64px; object-fit: cover; border-radius: 10px; font-size: 11px; }
.sum-price { color: var(--brand); font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.sum-total { border-bottom: 0; font-weight: 700; font-size: 21px; color: var(--ink); }
.sum-total span:last-child { color: var(--brand); }
.btn-confirm { margin-top: 10px; background: var(--green); box-shadow: 0 8px 20px rgba(22,163,74,.28); }
.btn-confirm:hover { background: #15803d; }
.cod-note { font-size: 14px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.form-alert { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; padding: 12px 14px; border-radius: 12px; margin: 0 26px; font-weight: 500; }
.of-summary .form-alert { margin: 10px 0 0; }

/* ========== Description ========== */
.p-desc h2 { font-size: 24px; }
.entry { color: var(--ink-2); }
.entry img { border-radius: 12px; margin: 14px auto; }
.entry ul, .entry ol { padding-left: 22px; }
.desc-cta { margin-top: 18px; }
.page-title { font-size: 30px; }

/* ========== Thank you ========== */
.thanks { padding: 44px 0 30px; text-align: center; }
.thanks-icon { width: 86px; height: 86px; border-radius: 50%; background: var(--green); color: #fff; font-size: 46px; font-weight: 700; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 0 0 10px #dcfce7; animation: pop .4s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.thanks h1 { font-size: 32px; }
.thanks-msg { color: var(--ink-2); max-width: 560px; margin: 0 auto 22px; }
.thanks-card { text-align: left; margin-bottom: 20px; }
.tc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.tc-status { background: #fef3c7; color: #92400e; font-size: 14px; font-weight: 600; padding: 3px 12px; border-radius: 999px; }
.tc-addr { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; display: grid; gap: 4px; }
.thanks-help { color: var(--muted); }

/* ========== Footer ========== */
.site-footer { background: var(--ink); color: #d1d5db; padding: 34px 0 96px; margin-top: 30px; text-align: center; font-size: 15px; }
.footer-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.footer-trust div { background: rgba(255,255,255,.06); border-radius: 12px; padding: 14px 8px; color: #f9fafb; font-weight: 500; }
.footer-trust span { display: block; font-size: 24px; margin-bottom: 4px; }
.footer-text { margin: 0 0 10px; }
.footer-menu ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.footer-menu a, .site-footer a { color: #f9fafb; }
.copy { color: #9ca3af; font-size: 14px; margin: 0; }

/* Floating chat buttons */
.float-chat { position: fixed; right: 16px; bottom: 20px; z-index: 45; display: flex; flex-direction: column; gap: 10px; }
.float-chat a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.2); transition: transform .15s; }
.float-chat a:hover { transform: scale(1.07); }
.fc-wa { background: #25d366; }
.fc-ms { background: #0084ff; }

/* Mobile sticky order bar */
.sticky-cta { display: none; }

/* ========== Responsive ========== */
@media (max-width: 960px) {
	.p-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 780px) {
	body { font-size: 16px; }
	.section { padding: 18px 0; }
	.card { padding: 20px; }
	.wrap { padding: 0 14px; }
	.header-inner { min-height: 60px; }
	.logo { font-size: 21px; }
	.logo img { max-height: 38px; }
	.call-txt small { display: none; }
	.call-txt { font-size: 15px; }
	.call-ico { width: 36px; height: 36px; font-size: 16px; }

	.home-hero { padding: 36px 0 30px; }
	.home-hero h1 { font-size: 28px; }
	.home-hero p { font-size: 17px; }
	.p-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.pc-body { padding: 10px 10px 12px; }
	.pc-title { font-size: 15px; }
	.pc-price b { font-size: 18px; }
	.btn-sm { font-size: 15px; padding: 10px; }

	.p-hero { padding-top: 12px; }
	.p-grid { grid-template-columns: 1fr; gap: 18px; }
	.p-gallery { position: static; }
	.p-thumbs button { flex-basis: 62px; height: 62px; }
	.p-title { font-size: 25px; margin-bottom: 10px; }
	.price-now { font-size: 34px; }

	.order-form { grid-template-columns: 1fr; gap: 6px; padding: 18px; }
	.form-alert { margin: 0 18px; }
	.order-head h2 { font-size: 21px; }

	.footer-trust { grid-template-columns: repeat(2, 1fr); }
	.float-chat { bottom: 86px; right: 12px; }
	.float-chat a { width: 48px; height: 48px; }

	.sticky-cta {
		display: flex; align-items: center; gap: 12px;
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
		background: #fff; border-top: 1px solid var(--line);
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
		box-shadow: 0 -6px 20px rgba(0,0,0,.08);
		transition: transform .25s ease;
	}
	.sticky-cta.hide { transform: translateY(120%); }
	.sc-price { display: flex; flex-direction: column; line-height: 1.15; }
	.sc-price b { color: var(--brand); font-size: 21px; }
	.sticky-cta .btn { flex: 1; padding: 13px 10px; font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
