/*
Theme Name: FOURDOTS
Theme URI: https://fourdots.in
Author: FOURDOTS
Description: Premium black-and-yellow streetwear storefront for WooCommerce. Homepage, banners, featured categories and collections are editable under Appearance → Customize → FOURDOTS Settings.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: fourdots
Tags: e-commerce, dark, custom-colors, custom-logo, custom-menu, threaded-comments, translation-ready
*/

/* ---------- Design tokens ---------- */
:root {
	--fd-bg: #0A0A0A;
	--fd-bg-2: #141414;
	--fd-card: #191919;
	--fd-yellow: #FFD400;
	--fd-yellow-hover: #FFE34D;
	--fd-text: #FFFFFF;
	--fd-muted: #A3A3A3;
	--fd-border: #2B2B2B;
	--fd-ok: #22C55E;
	--fd-err: #EF4444;
	--fd-font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;
	--fd-font-display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
	--fd-wrap: 1280px;
	--fd-gap: clamp(16px, 2.2vw, 28px);
	--fd-radius: 4px;
	--fd-header-h: 68px;
	color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fd-bg); color: var(--fd-text); font-family: var(--fd-font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--fd-yellow); text-underline-offset: 3px; }
a:hover { color: var(--fd-yellow); }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--fd-yellow); outline-offset: 2px; }
::selection { background: var(--fd-yellow); color: #000; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; clip-path: none; background: var(--fd-yellow); color: #000; padding: 12px 16px; z-index: 1000; }
.fd-hp { position: absolute; left: -9999px; }
.fd-container { width: 100%; max-width: var(--fd-wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.fd-muted { color: var(--fd-muted); }
.fd-sep { margin-inline: .5em; color: var(--fd-muted); }

/* ---------- Type ---------- */
.fd-h1, .fd-h2, .fd-h3, .fd-hero__title, .fd-promo__title { font-family: var(--fd-font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -.025em; line-height: .98; margin: 0 0 .5em; }
.fd-h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
.fd-h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: 0; }
.fd-h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.fd-link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; white-space: nowrap; }
.fd-prose { max-width: 760px; }
.fd-prose h2, .fd-prose h3 { font-family: var(--fd-font-display); text-transform: uppercase; letter-spacing: -.01em; margin-top: 1.6em; }
.fd-prose ul, .fd-prose ol { padding-left: 1.2em; }
.fd-prose table, .fd-dialog table { border-collapse: collapse; width: 100%; }
.fd-prose th, .fd-prose td, .fd-dialog th, .fd-dialog td { border: 1px solid var(--fd-border); padding: 8px 12px; text-align: left; }
.fd-prose th, .fd-dialog th { background: var(--fd-bg-2); }

/* ---------- Buttons ---------- */
.fd-btn, .button, button.button, input[type="submit"], .wp-element-button, .wc-block-components-button:not(.is-link) {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 48px; padding: 12px 28px; border: 2px solid var(--fd-yellow);
	background: var(--fd-yellow); color: #0A0A0A; font: 800 .9rem/1 var(--fd-font); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
	border-radius: var(--fd-radius); transition: background-color .15s, color .15s, border-color .15s; -webkit-appearance: none; appearance: none;
}
.fd-btn:hover, .button:hover, input[type="submit"]:hover, .wp-element-button:hover { background: var(--fd-yellow-hover); border-color: var(--fd-yellow-hover); color: #0A0A0A; }
.fd-btn--ghost, .button.alt.fd-ghost { background: transparent; color: var(--fd-text); border-color: var(--fd-text); }
.fd-btn--ghost:hover { background: var(--fd-text); border-color: var(--fd-text); color: #0A0A0A; }
.fd-btn--dark { background: #0A0A0A; border-color: #0A0A0A; color: #fff; }
.fd-btn--dark:hover { background: #000; border-color: #000; color: var(--fd-yellow); }
.fd-btn--sm { min-height: 40px; padding: 8px 18px; font-size: .78rem; }
.button.disabled, .button:disabled, .fd-btn:disabled { opacity: .45; cursor: not-allowed; }
.fd-iconbtn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 0; color: var(--fd-text); cursor: pointer; font-size: 1.8rem; line-height: 1; padding: 0; }
.fd-iconbtn:hover { color: var(--fd-yellow); }

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], select, textarea {
	width: 100%; min-height: 48px; padding: 12px 14px; background: var(--fd-bg-2); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); font: inherit;
}
input::placeholder, textarea::placeholder { color: #777; }
input:focus, select:focus, textarea:focus { border-color: var(--fd-yellow); outline: 0; box-shadow: 0 0 0 3px rgba(255, 212, 0, .25); }
label { font-weight: 600; }
.fd-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--fd-muted); font-size: .9rem; }
.fd-check input { width: 20px; height: 20px; min-height: 0; accent-color: var(--fd-yellow); margin-top: 2px; flex: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--fd-yellow); }

/* ---------- Announcement + header ---------- */
.fd-announce { background: var(--fd-yellow); color: #0A0A0A; text-align: center; font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; padding: 9px 16px; }
.fd-announce a { text-decoration: none; }
.fd-announce a:hover { color: #0A0A0A; text-decoration: underline; }
.fd-header { position: sticky; top: 0; z-index: 50; background: rgba(10, 10, 10, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fd-border); }
.admin-bar .fd-header { top: 32px; }
.fd-header__bar { display: flex; align-items: center; gap: 20px; min-height: var(--fd-header-h); }
.fd-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fd-text); }
.fd-logo:hover { color: var(--fd-text); }
.fd-logo__text { font: 900 1.35rem/1 var(--fd-font-display); letter-spacing: -.03em; }
.fd-logo__img { max-height: 40px; width: auto; }
.fd-mark circle { fill: var(--fd-yellow); }
.fd-nav { margin-left: auto; }
.fd-nav__list { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.fd-nav__list a { display: block; padding: 10px 14px; font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.fd-nav__list .current-menu-item > a, .fd-nav__list a:hover { color: var(--fd-yellow); }
.fd-nav__list .sub-menu { display: none; }
.fd-header__tools { display: flex; align-items: center; margin-left: 8px; }
.fd-navtoggle { display: none; margin-left: -10px; }
.fd-burger, .fd-burger::before, .fd-burger::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.fd-burger::before, .fd-burger::after { content: ""; position: absolute; left: 0; }
.fd-burger::before { top: -7px; } .fd-burger::after { top: 7px; }
.fd-navtoggle[aria-expanded="true"] .fd-burger { background: transparent; }
.fd-navtoggle[aria-expanded="true"] .fd-burger::before { top: 0; transform: rotate(45deg); }
.fd-navtoggle[aria-expanded="true"] .fd-burger::after { top: 0; transform: rotate(-45deg); }
.fd-cart-count { position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--fd-yellow); color: #000; font: 800 .7rem/18px var(--fd-font); text-align: center; display: none; }
.fd-cart-count.has-items { display: block; }
.fd-searchbar { border-top: 1px solid var(--fd-border); background: var(--fd-bg-2); padding: 14px 0; }
.fd-searchbar[hidden] { display: none; }
.fd-searchform { display: flex; gap: 10px; }
.fd-searchform input[type="search"] { flex: 1; }

/* ---------- Hero ---------- */
.fd-hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); overflow: hidden; }
.fd-hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.fd-hero__title { font-size: clamp(3rem, 10.5vw, 9rem); line-height: .86; letter-spacing: -.045em; margin: 0 0 .3em; }
.fd-hero__title span { display: block; }
.fd-hero__title span:last-child { color: var(--fd-yellow); }
.fd-hero__text { font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--fd-muted); max-width: 30em; margin-bottom: 1.8em; }
.fd-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fd-hero__art { justify-self: end; width: 100%; max-width: 460px; }
.fd-hero__frame { position: relative; aspect-ratio: 4 / 5; }
.fd-hero__frame::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--fd-yellow); border-radius: var(--fd-radius); }
.fd-hero__img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: var(--fd-radius); }
.fd-hero__dots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3vw, 28px); aspect-ratio: 1; }
.fd-hero__dots i { border-radius: 50%; border: 2px solid var(--fd-yellow); }
.fd-hero__dots i:nth-child(4) { background: var(--fd-yellow); }

/* ---------- Sections ---------- */
.fd-section { padding: clamp(40px, 6vw, 80px) 0; }
.fd-section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 36px); border-bottom: 1px solid var(--fd-border); padding-bottom: 16px; }
.fd-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--fd-gap); }
.fd-tiles--wide { grid-template-columns: repeat(3, 1fr); }
.fd-tile a { position: relative; display: flex; align-items: flex-end; aspect-ratio: 4 / 5; background: var(--fd-card); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); overflow: hidden; text-decoration: none; }
.fd-tiles--wide .fd-tile a { aspect-ratio: 16 / 10; }
.fd-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fd-tile a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.75), transparent 55%); }
.fd-tile__name { position: relative; z-index: 1; padding: 18px; font: 900 1.2rem/1.1 var(--fd-font-display); text-transform: uppercase; letter-spacing: -.01em; }
.fd-tile a:hover img { transform: scale(1.04); }
.fd-tile a:hover .fd-tile__name { color: var(--fd-yellow); }
.fd-story__grid { display: grid; gap: clamp(24px, 5vw, 64px); align-items: center; }
.fd-story__grid.has-image { grid-template-columns: 1fr 1fr; }
.fd-story__text { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--fd-muted); max-width: 36em; margin-top: 1em; }
.fd-story__media img { width: 100%; border-radius: var(--fd-radius); }
.fd-promo { background-color: var(--promo-bg, var(--fd-yellow)); color: var(--promo-fg, #0A0A0A); background-size: cover; background-position: center; border-radius: var(--fd-radius); padding: clamp(32px, 6vw, 80px); }
.fd-promo.has-bg-image { background-blend-mode: multiply; }
.fd-promo__title { font-size: clamp(2rem, 6vw, 4.5rem); max-width: 14em; }
.fd-promo__text { font-size: 1.15rem; max-width: 32em; }
.fd-news { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding: clamp(28px, 5vw, 56px); background: var(--fd-bg-2); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); }
.fd-news__row { display: flex; gap: 10px; margin-bottom: 12px; }
.fd-note { margin: 12px 0 0; font-weight: 700; }
.fd-note--ok { color: var(--fd-ok); } .fd-note--err { color: var(--fd-err); }

/* ---------- Pages ---------- */
.fd-main { padding-block: clamp(24px, 4vw, 56px) clamp(48px, 6vw, 96px); }
.fd-404 { text-align: center; padding-block: 12vh; }
.fd-404__code { font: 900 clamp(5rem, 22vw, 12rem)/1 var(--fd-font-display); margin: 0; letter-spacing: -.05em; }
.fd-404__code span { color: var(--fd-yellow); }
.fd-post { border-bottom: 1px solid var(--fd-border); padding-block: 1.2em; }
.pagination, .navigation.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.page-numbers { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--fd-border); text-decoration: none; font-weight: 700; border-radius: var(--fd-radius); }
.page-numbers.current, a.page-numbers:hover { background: var(--fd-yellow); color: #000; border-color: var(--fd-yellow); }
.fd-contact-list { list-style: none; padding: 0; }

/* ---------- Footer ---------- */
.fd-footer { background: var(--fd-bg-2); border-top: 1px solid var(--fd-border); margin-top: 40px; }
.fd-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--fd-gap); padding-block: clamp(36px, 5vw, 64px); }
.fd-footer__title { font: 800 .85rem/1 var(--fd-font); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 16px; color: var(--fd-yellow); }
.fd-footer__list { list-style: none; margin: 0 0 16px; padding: 0; }
.fd-footer__list li { margin-bottom: 8px; }
.fd-footer__list a { text-decoration: none; color: #d4d4d4; }
.fd-footer__list a:hover { color: var(--fd-yellow); }
.fd-footer__social { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fd-footer__base { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-block: 20px; border-top: 1px solid var(--fd-border); color: var(--fd-muted); font-size: .88rem; }
.fd-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.fd-pay i { font-style: normal; border: 1px solid var(--fd-border); border-radius: 3px; padding: 3px 10px; font-size: .78rem; }

/* ---------- Filter drawer + size chart dialog ---------- */
.fd-drawer[hidden] { display: none; }
.fd-drawer { position: fixed; inset: 0; z-index: 200; display: flex; }
.fd-drawer__panel { position: relative; z-index: 1; width: min(380px, 92vw); background: var(--fd-bg); border-right: 1px solid var(--fd-border); padding: 20px; overflow-y: auto; }
.fd-drawer__scrim { flex: 1; background: rgba(0, 0, 0, .65); }
.fd-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 1.2rem; }
.fd-filter { padding-block: 16px; border-top: 1px solid var(--fd-border); }
.fd-filter__title { font: 800 .85rem/1 var(--fd-font); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.fd-dialog { width: min(640px, 94vw); background: var(--fd-card); color: var(--fd-text); border: 1px solid var(--fd-border); border-radius: var(--fd-radius); padding: 0; }
.fd-dialog::backdrop { background: rgba(0, 0, 0, .75); }
.fd-dialog__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--fd-border); }
.fd-dialog__body { padding: 20px; overflow-x: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.fd-navtoggle { display: inline-flex; }
	.fd-nav { position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - var(--fd-header-h)); height: calc(100dvh - var(--fd-header-h)); margin: 0; background: var(--fd-bg); padding: 12px 20px; overflow-y: auto; transform: translateX(-100%); visibility: hidden; transition: transform .25s, visibility .25s; }
	.fd-nav.is-open { transform: none; visibility: visible; }
	.fd-nav__list { flex-direction: column; gap: 0; }
	.fd-nav__list a { padding: 18px 4px; font-size: 1.1rem; border-bottom: 1px solid var(--fd-border); }
	.fd-header__tools { margin-left: auto; }
	.fd-logo { margin-inline: auto 0; }
	.fd-hero__grid, .fd-story__grid.has-image, .fd-news { grid-template-columns: 1fr; }
	.fd-hero__art { justify-self: start; max-width: 340px; }
	.fd-tiles { grid-template-columns: repeat(2, 1fr); }
	.fd-tiles--wide { grid-template-columns: 1fr 1fr; }
	.fd-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	.fd-hero__actions .fd-btn { flex: 1 1 100%; }
	.fd-tiles--wide { grid-template-columns: 1fr; }
	.fd-news__row { flex-direction: column; }
	.fd-footer__grid { grid-template-columns: 1fr; }
	.fd-section__head { flex-wrap: wrap; }
}
@media (max-width: 782px) { .admin-bar .fd-header { top: 46px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
