/* ==========================================================================
   Globlly Theme Styles
   ========================================================================== */

:root {
	--globlly-ink: #1c2b24;
	--globlly-green: #1f7a4d;
	--globlly-green-dark: #145c39;
	--globlly-cream: #faf7f0;
	--globlly-tan: #e8dfce;
	--globlly-accent: #e0663b;
	--globlly-white: #ffffff;
	--globlly-gray: #6b7570;
	--radius: 14px;
	--font-heading: 'Poppins', sans-serif;
	--font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font-body);
	color: var(--globlly-ink);
	background: var(--globlly-white);
	line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0 0 .5em; line-height: 1.2; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.btn {
	display: inline-block;
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-family: var(--font-heading);
	transition: transform .15s ease, box-shadow .15s ease;
	border: none;
	cursor: pointer;
}
.btn-primary {
	background: var(--globlly-green);
	color: #fff;
}
.btn-primary:hover { background: var(--globlly-green-dark); transform: translateY(-1px); }

/* ---------------- Top bar ---------------- */
.topbar {
	background: var(--globlly-ink);
	color: #e9efe9;
	font-size: 13px;
}
.topbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 24px;
	flex-wrap: wrap;
	gap: 6px;
}
.topbar-contact a { margin-right: 18px; color: #e9efe9; }
.topbar-contact a:hover { color: var(--globlly-accent); }

/* ---------------- Header / Logo ---------------- */
.site-header {
	border-bottom: 1px solid var(--globlly-tan);
	background: var(--globlly-white);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	gap: 24px;
}

.site-logo {
	display: flex;
	align-items: baseline;
	gap: 10px;
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 30px;
	color: var(--globlly-ink);
	white-space: nowrap;
	position: relative;
	letter-spacing: -.01em;
}
.site-logo .logo-text { color: var(--globlly-green-dark); }
.site-logo .logo-accent { color: var(--globlly-accent); }
.site-logo .logo-tagline {
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--globlly-gray);
	margin-left: 10px;
	align-self: center;
}
.footer-logo { color: #fff; margin-bottom: 12px; }
.footer-logo .logo-text { color: #fff; }
.footer-logo .logo-tagline { display: none; }

/* ---------------- Nav ---------------- */
.main-navigation { flex: 1; }
.primary-menu { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.primary-menu a {
	font-weight: 600;
	font-size: 15px;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
}
.primary-menu a:hover { border-color: var(--globlly-green); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.header-account, .header-cart { font-size: 20px; position: relative; }
.cart-count {
	position: absolute;
	top: -8px;
	right: -12px;
	background: var(--globlly-accent);
	color: #fff;
	font-size: 11px;
	border-radius: 999px;
	padding: 1px 6px;
	font-family: var(--font-body);
}
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--globlly-ink); margin: 4px 0; }

/* ---------------- Hero ---------------- */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-image {
	position: absolute; inset: 0;
	background-size: cover; background-position: center;
}
.hero-image::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(90deg, rgba(20,32,26,.88) 0%, rgba(20,32,26,.55) 60%, rgba(20,32,26,.25) 100%);
}
.hero-inner { position: relative; padding: 110px 24px; max-width: 620px; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 600; color: #cfe8d8; margin-bottom: 14px; }
.hero-inner h1 { font-size: 46px; margin-bottom: 18px; }
.hero-sub { font-size: 17px; color: #e7ece7; margin-bottom: 30px; }

/* ---------------- Sections ---------------- */
.section { padding: 64px 0; }
.section-title { font-size: 30px; text-align: center; margin-bottom: 36px; }

/* Category grid */
.categories-section { background: var(--globlly-cream); }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-card {
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(28,43,36,.08);
	text-align: center;
	transition: transform .2s ease;
	display: block;
}
.category-card:hover { transform: translateY(-4px); }
.category-card img { width: 100%; height: 220px; object-fit: cover; }
.category-card-name { display: block; font-family: var(--font-heading); font-weight: 700; font-size: 18px; padding: 16px 16px 2px; }
.category-card-count { display: block; font-size: 13px; color: var(--globlly-gray); padding-bottom: 18px; }

/* Trust strip */
.trust-section { background: var(--globlly-ink); color: #fff; padding: 40px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.trust-item span { font-size: 26px; display: block; margin-bottom: 6px; }
.trust-item p { margin: 0; font-weight: 600; font-size: 14px; }

/* ---------------- WooCommerce product grid ---------------- */
/* WooCommerce's own stylesheet floats li.product and gives it a narrow
   percentage width (e.g. 22%) for its non-grid layout. Since we lay the
   grid out ourselves with CSS grid, that inherited width/float makes each
   card shrink inside its grid cell — so we explicitly reset both, with
   !important because WooCommerce's core CSS can load after ours. */
ul.products,
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
}
ul.products li.product,
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: 100% !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	background: #fff;
	border: 1px solid var(--globlly-tan);
	border-radius: var(--radius);
	padding: 16px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	transition: box-shadow .2s ease, transform .2s ease;
}
ul.products li.product:hover { box-shadow: 0 10px 26px rgba(28,43,36,.1); transform: translateY(-3px); }
/* Safety net: never let a category tile (shares the .product class) sneak into
   the product grid and throw off the column alignment — see functions.php. */
ul.products li.product-category { display: none !important; }
ul.products li.product img {
	width: 100% !important;
	height: auto;
	border-radius: 10px;
	margin-bottom: 12px;
	aspect-ratio: 1/1;
	object-fit: cover;
}
ul.products li.product h2, ul.products li.product .woocommerce-loop-product__title {
	font-size: 16px; font-family: var(--font-heading); font-weight: 600; margin: 4px 0;
}
ul.products li.product .price { color: var(--globlly-green-dark); font-weight: 700; }
ul.products li.product .price del { color: var(--globlly-gray); font-weight: 400; opacity: .7; margin-right: 6px; }
ul.products li.product .button {
	display: inline-block; align-self: center; margin-top: auto; background: var(--globlly-green);
	color: #fff; border-radius: 999px; padding: 10px 20px; font-size: 13px; font-weight: 600;
}
ul.products li.product .button:hover { background: var(--globlly-green-dark); }
ul.products li.product .onsale {
	background: var(--globlly-accent) !important; border-radius: 999px !important;
	font-size: 11px !important; min-height: auto !important; min-width: auto !important;
	padding: 4px 10px !important; line-height: 1.6 !important;
}

.woocommerce-page .site-main .container { padding: 48px 24px; }
.woocommerce-breadcrumb { margin-bottom: 24px; font-size: 13px; color: var(--globlly-gray); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-family: var(--font-heading); font-weight: 600; }
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit,
.woocommerce input.button, .woocommerce-Button, .wc-forward, .checkout-button {
	background: var(--globlly-green) !important; color: #fff !important; border-radius: 999px !important;
	font-family: var(--font-heading) !important; font-weight: 600 !important; padding: 12px 26px !important; border: none !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce #respond input#submit:hover,
.woocommerce input.button:hover { background: var(--globlly-green-dark) !important; }
.woocommerce span.onsale { background: var(--globlly-accent) !important; }
.woocommerce ul.product_list_widget img { border-radius: 8px; }
.woocommerce table.shop_table { border-radius: var(--radius); overflow: hidden; border-color: var(--globlly-tan); }

/* ---------------- Generic pages ---------------- */
.page-content-wrap { padding: 56px 24px; max-width: 860px; margin: 0 auto; }
.page-title { font-size: 34px; margin-bottom: 24px; }
.page-body h2 { margin-top: 1.6em; font-size: 22px; }
.page-body p, .page-body li { color: #3a4a41; }
.page-body ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.contact-details { background: var(--globlly-cream); border-radius: var(--radius); padding: 24px 28px; margin: 24px 0; }
.contact-details a { color: var(--globlly-green-dark); font-weight: 600; }
.not-found { text-align: center; padding: 100px 24px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--globlly-ink); color: #cfd8d1; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 56px 24px 32px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #cfd8d1; }
.footer-col a:hover { color: #fff; }
.footer-widget-title { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-contact li { margin-bottom: 8px; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.1);
	padding: 18px 24px;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
	font-size: 13px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
	.category-grid { grid-template-columns: repeat(2, 1fr); }
	ul.products, .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr) !important; }
	.trust-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-top { grid-template-columns: 1fr 1fr; }
	.hero-inner h1 { font-size: 34px; }
}
@media (max-width: 680px) {
	.main-navigation { position: fixed; top: 0; right: -100%; width: 78%; height: 100%; background: #fff; padding: 90px 24px; transition: right .25s ease; box-shadow: -8px 0 24px rgba(0,0,0,.12); }
	.main-navigation.is-open { right: 0; }
	.primary-menu { flex-direction: column; gap: 6px; align-items: flex-start; }
	.menu-toggle { display: block; }
	.category-grid { grid-template-columns: 1fr; }
	ul.products, .woocommerce ul.products, .woocommerce-page ul.products { grid-template-columns: 1fr 1fr !important; gap: 14px; }
	.footer-top { grid-template-columns: 1fr; }
	.topbar-inner { justify-content: center; text-align: center; }
}
