/*
Theme Name: Mojoo Noir
Theme URI: https://mojoo.co.uk/
Author: Mojoo Limited
Description: Black-and-white shop theme with big hero, category tiles, best sellers, featured product and reviews. Change the home page in Appearance > Customize > Noir Home Page. Works with WooCommerce.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: mojoo-noir
*/

/* ---------- Colours and sizes (change these to re-colour the whole site) ---------- */
:root {
	--black: #000;
	--ink: #1a1a1a;
	--grey-bg: #efefef;
	--line: #d9d9d9;
	--muted: #6b6b6b;
	--white: #fff;
	--sale: #d0463b;
	--accent: #f0a500;
	--wrap: 1480px;
	--gap: 24px;
	--track: .14em; /* letter spacing used everywhere */
}

/* ---------- Basics ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: "Montserrat", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 500; line-height: 1.2; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.skip-link, .screen-reader-text { position: absolute; left: -9999px; }
.skip-link:focus { left: 10px; top: 10px; z-index: 999; background: #fff; padding: 8px 12px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-block;
	padding: 13px 28px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: var(--track);
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid currentColor;
	transition: background .2s, color .2s;
}
.btn-dark { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-dark:hover { background: transparent; color: var(--ink); }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-light:hover { background: transparent; color: var(--white); }

/* ---------- Announcement bar ---------- */
.announce {
	display: flex; align-items: center; justify-content: center; gap: 30px;
	background: var(--black); color: var(--white);
	height: 38px; border-bottom: 1px solid #333;
	font-size: 11px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase;
}
.announce-track { position: relative; min-width: 300px; text-align: center; }
.announce-msg { margin: 0; display: none; }
.announce-msg.is-on { display: block; }
.announce .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 0; }
.announce-arrow { background: none; border: 0; color: var(--white); font-size: 20px; line-height: 1; padding: 0 6px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); color: var(--white); transition: background .3s; }
.header-inner {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
	max-width: var(--wrap); margin: 0 auto; padding: 0 40px; height: 72px;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 32px; }
.main-nav a { text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; }
.main-nav a:hover { opacity: .7; }
.main-nav li { position: relative; }
.main-nav .sub-menu { display: none; position: absolute; top: 100%; left: -16px; min-width: 200px; background: var(--black); padding: 14px 16px; flex-direction: column; gap: 10px; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.site-brand { text-align: center; }
.site-brand img { max-height: 44px; width: auto; margin: 0 auto; }
.site-title { text-decoration: none; font-size: 20px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.header-icons { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.header-icons a, .header-icons button { background: none; border: 0; color: inherit; padding: 0; display: flex; position: relative; }
.cart-count { position: absolute; top: -6px; right: -8px; background: var(--white); color: var(--black); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; text-align: center; line-height: 16px; }
.menu-toggle, .menu-close { display: none; background: none; border: 0; color: inherit; padding: 0; }
.search-panel { background: var(--black); padding: 0 40px 20px; }
.search-panel form { display: flex; max-width: 640px; margin: 0 auto; }
.search-panel input[type=search] { flex: 1; padding: 12px 14px; border: 1px solid #444; background: #111; color: #fff; font: inherit; }
.search-panel button { padding: 0 22px; background: #fff; color: #000; border: 0; text-transform: uppercase; letter-spacing: var(--track); font-size: 12px; }

/* Keep the header below the WordPress admin bar when logged in. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

/* ---------- Hero ---------- */
.hero {
	position: relative; min-height: 78vh; display: flex; align-items: center; justify-content: center;
	background: #111 center / cover no-repeat; color: var(--white); text-align: center; overflow: hidden;
}
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55)); }
.hero-text { position: relative; padding: 0 20px; }
.hero-small { margin: 0 0 10px; font-size: 13px; letter-spacing: .4em; text-transform: uppercase; }
.hero-title { margin: 0 0 30px; font-size: clamp(44px, 9vw, 130px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.hero-next {
	position: absolute; bottom: -26px; left: 50%; transform: translateX(-50%);
	width: 52px; height: 52px; border-radius: 50%; background: var(--white); color: var(--ink);
	display: flex; align-items: center; justify-content: center; padding-bottom: 20px; z-index: 2;
	box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.hero-next .icon { margin-top: 12px; }

/* ---------- Sections ---------- */
.section { padding: 70px 0; }
.section-grey { background: var(--grey-bg); }
.section-title {
	text-align: center; margin: 0 0 34px;
	font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
}

/* ---------- Category tiles (slider) ---------- */
.slider { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.slider-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slider-track::-webkit-scrollbar { display: none; }
.cat-tile { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; scroll-snap-align: start; background: #ddd; }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-label {
	position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%);
	background: var(--white); color: var(--ink); padding: 10px 24px; white-space: nowrap;
	font-size: 12px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase;
}
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--white); font-size: 24px; line-height: 1; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.slider-btn.prev { left: 16px; }
.slider-btn.next { right: 16px; }

/* ---------- Scrolling strip ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); padding: 12px 0; }
.marquee-track { display: flex; width: max-content; animation: noir-scroll 40s linear infinite; }
.marquee-track span { padding-right: 40px; font-size: 15px; letter-spacing: var(--track); text-transform: uppercase; white-space: nowrap; }
.marquee-track span::after { content: "✦"; margin-left: 40px; }
@keyframes noir-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px var(--gap); margin-bottom: 40px; }
.card { display: block; text-decoration: none; text-align: center; }
.card-img { position: relative; display: block; background: var(--white); aspect-ratio: 1 / 1.1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.03); }

/* Hover slideshow: extra pictures sit on top of the first and fade in one by one. */
.card-img { position: relative; display: block; overflow: hidden; }
.card-img .cycle-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
.card-img .cycle-img.is-on { opacity: 1; }
.cycle-bar { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; gap: 4px; opacity: 0; transition: opacity .3s; z-index: 2; }
.card-img:hover .cycle-bar { opacity: 1; }
.cycle-bar i { flex: 1; height: 2px; background: rgba(0,0,0,.2); }
.cycle-bar i.is-on { background: var(--ink); }
.save-tag { position: absolute; top: 12px; left: 12px; background: var(--sale); color: var(--white); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; }
.card-name { display: block; margin: 16px 0 4px; font-size: 12px; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; }
.card-price, .price { font-size: 13px; letter-spacing: .06em; }
.card-price ins, .price ins { color: var(--sale); text-decoration: none; }
.card-price del, .price del { color: var(--muted); margin-right: 4px; }

/* ---------- Dark banner ---------- */
.banner { position: relative; background: var(--black); color: var(--white); min-height: 420px; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
.banner-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.banner-text { position: relative; padding: 60px 20px; }
.banner-text h2 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 52px); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Featured product ---------- */
.featured { display: grid; grid-template-columns: 1fr 1.2fr; gap: 60px; align-items: center; max-width: 1100px; }
.featured-img img { width: 100%; }
.featured-text h3 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 36px); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.featured-desc { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; line-height: 1.9; margin-bottom: 26px; }

/* ---------- Reviews ---------- */
.reviews { background: var(--black); color: var(--white); text-align: center; padding: 70px 20px 50px; }
.reviews-label { margin: 0 0 30px; font-size: 12px; letter-spacing: var(--track); text-transform: uppercase; }
.review { display: none; margin: 0 auto; max-width: 620px; }
.review.is-on { display: block; }
.review h3 { margin: 0 0 14px; font-size: 20px; letter-spacing: .12em; text-transform: uppercase; }
.review p { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; line-height: 1.8; }
.review .stars { letter-spacing: .3em; font-size: 14px; }
.review cite { font-style: normal; font-size: 13px; }
.dots { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: #555; }
.dots button.is-on { background: var(--white); }

/* ---------- Trust boxes ---------- */
.trust { padding: 50px 0; background: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; max-width: 1150px; }
.trust-item .icon { margin: 0 auto 12px; }
.trust-item h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.trust-item p { margin: 0; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 50px 0 20px; background: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-grid > div:nth-child(2) { justify-self: center; }
.footer-grid > div:nth-child(3) { justify-self: end; max-width: 300px; }
.footer-title { margin: 0 0 16px; font-size: 12px; letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; font-size: 14px; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 11px; letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.footer-bottom p { margin: 0; }

/* ---------- Blog and pages ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px var(--gap); }
.post-card { background: var(--white); padding-bottom: 20px; }
.post-card h2 { font-size: 16px; letter-spacing: .08em; text-transform: uppercase; padding: 0 20px; margin: 18px 0 4px; }
.post-card h2 a { text-decoration: none; }
.post-card .meta, .post-card p { padding: 0 20px; }
.meta { font-size: 12px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.entry-content { font-size: 16px; line-height: 1.8; }

/* ---------- WooCommerce shop pages (match the card look) ---------- */
.shop-area .woocommerce-products-header__title { text-align: center; font-size: 28px; letter-spacing: .18em; text-transform: uppercase; }
.woocommerce ul.products li.product { text-align: center; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 12px !important; font-weight: 500; letter-spacing: var(--track); text-transform: uppercase; }
.woocommerce ul.products li.product .price { color: var(--ink); font-size: 13px; }
.woocommerce ul.products li.product .price ins { color: var(--sale); }
.woocommerce span.onsale { background: var(--sale); border-radius: 0; min-height: 0; min-width: 0; padding: 4px 8px; line-height: 1.4; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
	background: var(--ink); color: var(--white); border-radius: 0; font-weight: 500;
	font-size: 12px; letter-spacing: var(--track); text-transform: uppercase; padding: 13px 24px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--black); color: var(--white); }
.woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--black); }
.woocommerce div.product .product_title { font-size: 28px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.woocommerce div.product p.price { color: var(--ink); font-size: 18px; }
.woocommerce div.product p.price ins { color: var(--sale); }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
	.product-grid { grid-template-columns: repeat(2, 1fr); }
	.slider-track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
	.trust-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
	.post-grid { grid-template-columns: repeat(2, 1fr); }
	.featured { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
	.wrap, .slider, .header-inner { padding-left: 16px; padding-right: 16px; }
	.header-inner { height: 60px; }
	.menu-toggle { display: flex; }
	.main-nav {
		position: fixed; inset: 0 30% 0 0; background: var(--black); padding: 70px 24px;
		transform: translateX(-100%); transition: transform .3s; z-index: 60;
	}
	.main-nav.is-open { transform: none; box-shadow: 0 0 0 100vw rgba(0,0,0,.5); }
	.main-nav ul { flex-direction: column; gap: 22px; }
	.main-nav .sub-menu { display: flex; position: static; padding: 12px 0 0 14px; }
	.menu-close { display: flex; position: absolute; top: 20px; right: 20px; }
	.header-icons { gap: 14px; }
	.announce { gap: 10px; font-size: 10px; }
	.announce-track { min-width: 0; }
	.hero { min-height: 62vh; }
	.section { padding: 50px 0; }
	.slider-track { grid-auto-columns: 80%; }
	.slider-btn { display: none; }
	.product-grid { gap: 30px 12px; }
	.post-grid { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
	.footer-grid > div:nth-child(n) { justify-self: start; }
}
