/*
Theme Name: 5GrandStore
Theme URI: https://shopbuyshop.com
Author: 5GrandStore
Description: A WooCommerce theme for a Jamaican 5 Grand store. Every item carries a level tag (5 GRAND, DOUBLE 5, 3 PIECES OF 5 and up) worked out from its price. Includes bundles, a bundle builder, live search with level keywords, level filters, a cart drawer and a settings page.
Version: 1.5.0
Requires at least: 6.3
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fivegrandstore
Tags: e-commerce, custom-colors, custom-logo, featured-images, threaded-comments, translation-ready, two-columns
WC requires at least: 8.0
*/

:root {
	--fg-green: #14633A;
	--fg-green-dark: #0B3F25;
	--fg-gold: #F4D35E;
	--fg-orange: #C2570C;
	--fg-cream: #F6F1E5;
	--fg-paper: #FFFFFF;
	--fg-ink: #1B2A22;
	--fg-muted: #4A574F;
	--fg-line: #E2DAC6;
	--fg-radius: 12px;
	--fg-shadow: 0 1px 4px rgba(27, 42, 34, .18);
	--fg-head: 'Playfair Display', Georgia, serif;
	--fg-label: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--fg-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--fg-mono: 'IBM Plex Mono', ui-monospace, monospace;
	--fg-w: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fg-cream); color: var(--fg-ink); font-family: var(--fg-body); font-size: 17px; line-height: 1.55; }
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--fg-green); text-underline-offset: 3px; }
a:hover { color: var(--fg-green-dark); }
h1, h2, h3, h4 { font-family: var(--fg-head); font-weight: 800; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--fg-orange); outline-offset: 2px; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; white-space: nowrap; }
.fg-skip { position: absolute; left: -9999px; top: 0; background: var(--fg-gold); color: var(--fg-ink); padding: 12px 18px; z-index: 1000; }
.fg-skip:focus { left: 8px; top: 8px; }
.fg-container { width: min(100% - 32px, var(--fg-w)); margin-inline: auto; }
.fg-main { min-height: 50vh; padding-block: 24px 64px; }

/* Buttons */
.fg-btn, .button, button.button, input[type="submit"], .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 22px; white-space: nowrap; border: 2px solid var(--fg-green); border-radius: 999px;
	background: var(--fg-green); color: #fff; font: 600 16px/1.2 var(--fg-body); text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.fg-btn:hover, .button:hover, input[type="submit"]:hover { background: var(--fg-green-dark); border-color: var(--fg-green-dark); color: #fff; }
.fg-btn--gold { background: var(--fg-gold); border-color: var(--fg-gold); color: var(--fg-ink); }
.fg-btn--gold:hover { background: #fff; border-color: #fff; color: var(--fg-ink); }
.fg-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .7); }
.fg-btn--ghost:hover { background: #fff; color: var(--fg-green-dark); border-color: #fff; }

/* Forms */
input[type="text"], input[type="email"], input[type="search"], input[type="tel"], input[type="number"], input[type="password"], select, textarea {
	width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid #B9B09A; border-radius: 10px; background: #fff; color: var(--fg-ink); font: inherit;
}
textarea { min-height: 120px; }
label { font-weight: 600; }

/* ===== 5 Grand tag (scales with font-size) ===== */
.fg-tag {
	--c1: #14633A; --c2: #0B3F25; --acc: #F4D35E; --cols: 1; --pip: .8125em; --gap: .3125em;
	position: relative; display: block; flex: none; width: 18em; height: 10.5em; overflow: hidden; border-radius: .75em; color: #fff; font-size: 16px; line-height: 1.1;
	font-family: var(--fg-label); text-align: left;
	background:
		repeating-radial-gradient(circle at 15% 130%, rgba(255, 255, 255, .09) 0 .09em, transparent .09em .31em),
		repeating-radial-gradient(circle at 90% -30%, rgba(0, 0, 0, .14) 0 .09em, transparent .09em .31em),
		linear-gradient(135deg, var(--c1), var(--c2));
	box-shadow: 0 .375em 1.125em rgba(0, 0, 0, .28);
}
.fg-tag::before { content: ""; position: absolute; inset: .375em; border: .09em solid var(--acc); border-radius: .5em; opacity: .75; }
.fg-tag::after { content: ""; position: absolute; inset: .6875em; border: .0625em dashed rgba(255, 255, 255, .35); border-radius: .3em; }
.fg-tag > * { position: absolute; }
.fg-tag__brand { left: 1.25em; top: 1.25em; font-size: .75em; font-weight: 700; letter-spacing: .22em; color: var(--acc); }
.fg-tag__num { right: 1.125em; top: .8125em; width: 2.125em; height: 2.125em; border-radius: 50%; border: .125em solid rgba(255, 255, 255, .85); background: var(--acc); color: var(--c2); display: flex; align-items: center; justify-content: center; font-family: var(--fg-head); font-weight: 900; font-size: 1.0625em; z-index: 1; }
.fg-tag__plate { left: 1.25em; top: 3.25em; width: 6.25em; height: 5.125em; border-radius: .5em; background: #FBF6E9; box-shadow: inset 0 0 0 .125em var(--acc), 0 .125em .25em rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; z-index: 1; }
.fg-tag__pips { display: grid; grid-template-columns: repeat(var(--cols), var(--pip)); gap: var(--gap); justify-content: center; }
.fg-tag__pip { display: block; width: var(--pip); height: var(--pip); border-radius: 50%; background: var(--c2); }
.fg-tag__body { left: 8.25em; top: 3.375em; right: 1em; z-index: 1; display: flex; flex-direction: column; }
.fg-tag__name { font-size: 1.3125em; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
.fg-tag__name--long { font-size: 1.05em; letter-spacing: .03em; }
.fg-tag__name--xl { font-size: .92em; letter-spacing: .02em; }
.fg-tag__price { margin-top: .2em; font-family: var(--fg-head); font-weight: 900; font-size: 1.8125em; color: var(--acc); white-space: nowrap; }
.fg-tag__sub { margin-top: .3em; font-size: .8125em; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .92); }
.fg-tag__micro { left: 1.25em; right: 1.125em; bottom: .94em; display: flex; justify-content: space-between; font-family: var(--fg-mono); font-size: .5625em; letter-spacing: .1em; color: rgba(255, 255, 255, .78); z-index: 1; }
.fg-tag--sm { font-size: 12px; }
.fg-tag--lg { font-size: 20px; }

/* Compact chip */
.fg-chip {
	--c1: #14633A; --c2: #0B3F25; --acc: #F4D35E;
	display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border-radius: 999px; border: 1.5px solid var(--acc);
	background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font: 700 14px/1 var(--fg-label); letter-spacing: .06em; white-space: nowrap; text-transform: uppercase;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.fg-chip__pips { display: inline-flex; gap: 3px; }
.fg-chip__pips i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); display: block; }

/* ===== Announcement + header ===== */
.fg-announce { background: var(--fg-green-dark); color: #fff; text-align: center; font: 600 15px/1.3 var(--fg-label); letter-spacing: .08em; text-transform: uppercase; padding: 9px 16px; }
.fg-announce a { color: var(--fg-gold); }
.fg-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--fg-line); }
.admin-bar .fg-header { top: 32px; }
.fg-header__row { display: flex; align-items: center; gap: 20px; padding-block: 12px; }
.fg-logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--fg-ink); font-family: var(--fg-head); font-weight: 900; font-size: 26px; line-height: 1; white-space: nowrap; }
.fg-logo b { color: var(--fg-green); }
.fg-logo small { display: block; font: 600 11px/1 var(--fg-mono); letter-spacing: .16em; color: var(--fg-muted); margin-top: 4px; }
.custom-logo { max-height: 52px; width: auto; }
.fg-search { position: relative; flex: 1 1 auto; max-width: 640px; }
.fg-search input[type="search"] { padding-right: 52px; border-radius: 999px; border-color: var(--fg-green); }
.fg-search button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fg-green); color: #fff; cursor: pointer; display: grid; place-items: center; }
.fg-search__results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--fg-line); border-radius: var(--fg-radius); box-shadow: 0 12px 30px rgba(0, 0, 0, .18); max-height: 70vh; overflow: auto; z-index: 60; }
.fg-search__results[hidden] { display: none; }
.fg-sr { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: var(--fg-ink); text-decoration: none; border-bottom: 1px solid var(--fg-line); }
.fg-sr:hover, .fg-sr:focus-visible { background: var(--fg-cream); }
.fg-sr img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }
.fg-sr__t { flex: 1; font-weight: 600; line-height: 1.25; }
.fg-sr__p { font-size: 14px; color: var(--fg-muted); }
.fg-sr--meta { font-weight: 600; background: var(--fg-cream); }
.fg-header__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.fg-iconlink { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 10px; color: var(--fg-ink); text-decoration: none; font: 600 15px/1 var(--fg-label); letter-spacing: .06em; text-transform: uppercase; background: none; border: 0; cursor: pointer; }
.fg-iconlink:hover { color: var(--fg-green); }
.fg-cart-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--fg-orange); color: #fff; font: 700 13px/1 var(--fg-body); }
.fg-menu-toggle, .fg-search-toggle { display: none; }

.fg-nav { background: var(--fg-green); color: #fff; }
.fg-nav__row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.fg-nav__row::-webkit-scrollbar { display: none; }
.fg-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.fg-nav a, .fg-levels-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 14px; color: #fff; text-decoration: none; font: 700 16px/1 var(--fg-label); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.fg-nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.fg-levels-btn { background: var(--fg-gold); color: var(--fg-ink); border: 0; cursor: pointer; gap: 8px; }
.fg-levels-btn:hover { background: #fff; }
.fg-nav__spacer { flex: 1; }
.fg-nav__deal { color: var(--fg-gold) !important; }
.fg-levels-panel { position: absolute; left: 0; right: 0; background: #fff; border-bottom: 4px solid var(--fg-gold); box-shadow: 0 16px 30px rgba(0, 0, 0, .2); z-index: 55; }
.fg-levels-panel[hidden] { display: none; }
.fg-levels-panel__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; padding-block: 22px; }
.fg-levels-panel a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--fg-ink); text-decoration: none; font-size: 15px; }
.fg-levels-panel a:hover { background: var(--fg-cream); }
.fg-nav-wrap { position: relative; }

/* ===== Home ===== */
.fg-hero { background: radial-gradient(circle at 80% 20%, #1c7d49 0, transparent 55%), linear-gradient(135deg, var(--fg-green), var(--fg-green-dark)); color: #fff; overflow: hidden; }
.fg-hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding-block: 56px; }
.fg-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
.fg-hero p { font-size: 1.2rem; max-width: 34em; color: #E8F1EA; }
.fg-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.fg-hero__tags { position: relative; height: 420px; }
.fg-hero__tags .fg-tag { position: absolute; font-size: 15px; }
.fg-hero__tags .fg-tag:nth-child(1) { left: 0; top: 0; transform: rotate(-6deg); }
.fg-hero__tags .fg-tag:nth-child(2) { left: 70px; top: 128px; transform: rotate(3deg); z-index: 2; }
.fg-hero__tags .fg-tag:nth-child(3) { left: 20px; top: 268px; transform: rotate(-3deg); z-index: 3; }
.fg-section { padding-block: 48px 8px; }
.fg-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.fg-section__head h2 { margin: 0; }
.fg-eyebrow { font: 500 13px/1 var(--fg-mono); letter-spacing: .18em; color: var(--fg-green); text-transform: uppercase; margin-bottom: 8px; }
.fg-ladder { display: flex; gap: 20px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x proximity; }
.fg-ladder a { scroll-snap-align: start; text-decoration: none; display: block; transition: transform .15s; }
.fg-ladder a:hover { transform: translateY(-4px); }
.fg-ladder small { display: block; margin-top: 10px; font: 500 13px/1.2 var(--fg-mono); color: var(--fg-muted); }
.fg-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.fg-cat { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--fg-ink); background: #fff; border-radius: var(--fg-radius); box-shadow: var(--fg-shadow); overflow: hidden; }
.fg-cat__img { aspect-ratio: 1; background: repeating-linear-gradient(45deg, #E7E0CF 0 12px, #EFE9DA 12px 24px); display: grid; place-items: center; font: 900 56px/1 var(--fg-head); color: var(--fg-green); }
.fg-cat__img img { width: 100%; height: 100%; object-fit: cover; }
.fg-cat span.t { padding: 0 14px 14px; font-weight: 600; }
.fg-band { margin-top: 56px; background: var(--fg-ink); color: #fff; }
.fg-band__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding-block: 44px; }
.fg-band h2 { color: #fff; }
.fg-band p { color: #D8E3DB; max-width: 36em; }
.fg-band .fg-tag { margin-inline: auto; }
.fg-trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.fg-trust div { background: #fff; border-radius: var(--fg-radius); padding: 18px; box-shadow: var(--fg-shadow); font: 700 18px/1.2 var(--fg-label); letter-spacing: .06em; text-transform: uppercase; border-top: 4px solid var(--fg-gold); }
.fg-news { margin-top: 56px; background: var(--fg-gold); }
.fg-news__row { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding-block: 36px; }
.fg-news h2 { margin: 0 0 4px; }
.fg-news form { display: flex; gap: 10px; flex: 1 1 380px; max-width: 520px; }
.fg-news .fg-hp { position: absolute; left: -9999px; }
.fg-news__msg { flex-basis: 100%; font-weight: 600; margin: 0; }

/* ===== Footer ===== */
.fg-footer { background: var(--fg-green-dark); color: #DCE8DF; margin-top: 0; }
.fg-footer a { color: #fff; }
.fg-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 48px 24px; }
.fg-footer h3 { color: var(--fg-gold); font: 700 16px/1 var(--fg-label); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.fg-footer ul { list-style: none; margin: 0; padding: 0; }
.fg-footer li { margin-bottom: 8px; }
.fg-footer__social { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.fg-footer__bar { border-top: 1px solid rgba(255, 255, 255, .15); padding-block: 18px; font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.fg-wa { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 999px; background: #1FA855; color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
.fg-wa:hover { background: #178443; color: #fff; }

/* Generic content */
.fg-article { background: #fff; border-radius: var(--fg-radius); padding: clamp(18px, 4vw, 40px); box-shadow: var(--fg-shadow); max-width: 860px; margin-inline: auto; }
.fg-postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.fg-post { background: #fff; border-radius: var(--fg-radius); overflow: hidden; box-shadow: var(--fg-shadow); }
.fg-post > div { padding: 16px 18px 20px; }
.fg-post h2 { font-size: 1.25rem; }
.fg-post a { text-decoration: none; color: var(--fg-ink); }

/* Mobile bottom bar */
.fg-bottombar { display: none; }

@media (max-width: 1000px) {
	.fg-hero__grid, .fg-band__grid { grid-template-columns: 1fr; }
	.fg-hero__tags { height: 330px; max-width: 420px; }
	.fg-trust { grid-template-columns: repeat(2, 1fr); }
	.fg-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 782px) {
	.admin-bar .fg-header { top: 46px; }
	.fg-header__row { flex-wrap: wrap; gap: 8px; }
	.fg-search { order: 3; flex: 1 1 100%; max-width: none; }
	.fg-iconlink .lbl { display: none; }
	.fg-logo { font-size: 22px; }
}
@media (max-width: 640px) {
	body { font-size: 16px; padding-bottom: 64px; }
	.fg-footer__grid { grid-template-columns: 1fr; }
	.fg-trust { grid-template-columns: 1fr; }
	.fg-news form { flex-wrap: wrap; }
	.fg-wa { bottom: 76px; }
	.fg-bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 65; display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-top: 1px solid var(--fg-line); }
	.fg-bottombar a, .fg-bottombar button { display: grid; place-items: center; gap: 2px; min-height: 58px; font: 700 12px/1 var(--fg-label); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-ink); text-decoration: none; background: none; border: 0; cursor: pointer; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
