/*
Theme Name: J and J Flooring and Design
Theme URI: https://alatech.com/
Author: Alatech
Description: Informational website theme for J & J Flooring, Tuscaloosa, AL. On activation it imports the company photos and logo into the Media Library and creates the Home, Our Floors, Gallery and Contact pages, and saves every contact-form request as a Lead in the admin.
Version: 1.2.0
Requires at least: 6.5
Tested up to: 7.1
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: j-and-j-flooring-and-design
*/

/* ---------- Header ---------- */
.jj-header {
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .jj-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .jj-header { top: 0; position: relative; } }
.jj-header__inner { padding-block: 0.6rem; }
.jj-header .wp-block-navigation { font-weight: 600; font-size: 0.98rem; }
.jj-header .wp-block-navigation a { text-decoration: none; }
.jj-header .wp-block-navigation a:hover { color: var(--wp--preset--color--plum-mid); }
.jj-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--plum-mid); }
.jj-header .wp-block-site-logo img { display: block; }
@media (max-width: 600px) {
	.jj-header .jj-header-call { display: none; }
}

/* ---------- Bands / sections ---------- */
.jj-band { padding-block: clamp(3rem, 7vw, 5.5rem); }
.jj-band--soft { background: var(--wp--preset--color--lavender); }
.jj-band--cream { background: var(--wp--preset--color--cream); }
.jj-band--plum {
	background: var(--wp--preset--color--plum);
	color: var(--wp--preset--color--base);
}
.jj-band--plum h2, .jj-band--plum h3, .jj-band--plum a { color: var(--wp--preset--color--base); }
.jj-band--tight { padding-block: clamp(2rem, 4vw, 3rem); }

.jj-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.16em;
	font-size: 0.8rem !important;
	font-weight: 700;
	color: var(--wp--preset--color--plum-mid);
	margin-bottom: 0.5rem !important;
}
.jj-band--plum .jj-eyebrow { color: var(--wp--preset--color--lilac); }
.jj-lede { font-size: clamp(1.08rem, 1.6vw, 1.22rem); max-width: 38em; }
.jj-center { text-align: center; }
.jj-center .jj-lede { margin-inline: auto; }

/* ---------- Hero ---------- */
.jj-hero h1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.05; margin-top: 0; }
.jj-hero-photos { gap: 1rem !important; }
.jj-hero-photos .wp-block-column:nth-child(2) { margin-top: 3rem; }
.jj-hero-photos img, .jj-photo img, .jj-card img {
	border-radius: 10px;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	box-shadow: 0 14px 40px -18px rgba(43, 13, 69, 0.45);
}

/* ---------- Cards ---------- */
.jj-cards { gap: 1.5rem !important; }
.jj-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	padding: 1.6rem 1.5rem 1.4rem;
}
.jj-card h3 { margin-top: 0.2rem; font-size: 1.35rem; }
.jj-card p { margin-bottom: 0; }
.jj-card__mark {
	width: 2.6rem; height: 2.6rem; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--plum);
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700; font-size: 1.1rem;
	margin: 0 0 0.9rem !important;
}

/* ---------- Floors page ---------- */
.jj-floor { align-items: center !important; gap: clamp(1.5rem, 4vw, 3.5rem) !important; }
.jj-floor + .jj-floor { margin-top: clamp(3rem, 6vw, 4.5rem); }
.jj-floor ul { padding-left: 1.2rem; }
.jj-floor li { margin-bottom: 0.35rem; }
.jj-floor .wp-block-columns { gap: 0.9rem !important; }
.jj-swatch {
	border-radius: 12px; aspect-ratio: 4 / 3;
	display: grid; place-items: center; text-align: center;
	color: var(--wp--preset--color--plum);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.6rem; padding: 1.5rem;
}
.jj-swatch--carpet { background: repeating-linear-gradient(45deg, #efe8f6 0 6px, #e6dcf1 6px 12px); }
.jj-swatch--vinyl { background: repeating-linear-gradient(90deg, #f4efe8 0 22%, #ebe3d8 22% 23%, #f0e9df 23% 47%, #ebe3d8 47% 48%); }
.jj-swatch small { display: block; font-family: var(--wp--preset--font-family--body); font-size: 0.85rem; color: var(--wp--preset--color--ink-soft); margin-top: .4rem; }

/* ---------- Gallery ---------- */
.wp-block-gallery.jj-gallery { gap: 0.9rem !important; }
.wp-block-gallery.jj-gallery .wp-block-image img { border-radius: 8px; aspect-ratio: 3 / 4; object-fit: cover; }
.wp-block-gallery.jj-gallery .wp-block-image figcaption {
	background: linear-gradient(0deg, rgba(43, 13, 69, .75), rgba(43, 13, 69, 0));
	border-radius: 0 0 8px 8px; font-size: .85rem;
}

/* ---------- Contact ---------- */
.jj-contact-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.jj-contact-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.jj-contact-list strong { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--plum-mid); }
.jj-contact-list a { font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.jj-map iframe { width: 100%; height: 320px; border: 0; border-radius: 12px; display: block; }

.jj-form { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: clamp(1.25rem, 3vw, 2rem); }
.jj-form .jj-field { margin-bottom: 1rem; }
.jj-form label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.jj-form .jj-req { color: var(--wp--preset--color--plum-mid); }
.jj-form input, .jj-form select, .jj-form textarea {
	width: 100%; box-sizing: border-box;
	padding: .75rem .85rem; font: inherit; color: inherit;
	border: 1px solid #cfc4da; border-radius: 8px; background: #fff;
}
.jj-form input:focus, .jj-form select:focus, .jj-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--plum-mid); outline-offset: 1px; border-color: transparent;
}
.jj-form .jj-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .jj-form .jj-row { grid-template-columns: 1fr; } }
.jj-form .jj-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }
.jj-form button {
	background: var(--wp--preset--color--plum); color: #fff; border: 0; cursor: pointer;
	padding: .9rem 1.6rem; border-radius: 999px; font: inherit; font-weight: 700;
}
.jj-form button:hover { background: var(--wp--preset--color--plum-mid); }
.jj-notice { padding: 1rem 1.2rem; border-radius: 10px; margin-bottom: 1.2rem; font-weight: 600; }
.jj-notice--ok { background: #e8f5ec; color: #1d5a2f; }
.jj-notice--err { background: #fbeaea; color: #8a1f1f; }

/* ---------- Page title band ---------- */
.jj-page-head { background: var(--wp--preset--color--lavender); padding-block: clamp(2.5rem, 6vw, 4rem); }
.jj-page-head h1 { margin: 0; font-size: clamp(2.2rem, 4.5vw, 3.2rem); }

/* ---------- Footer ---------- */
.jj-footer { background: var(--wp--preset--color--plum); color: #e9ddf5; font-size: .95rem; }
.jj-footer a { color: #fff; }
.jj-footer h3 { color: #fff; font-size: 1.1rem; margin-bottom: .6rem; }
.jj-footer .wp-block-site-logo img { border-radius: 50%; background: #fff; }
.jj-footer__base { border-top: 1px solid rgba(255,255,255,.15); font-size: .85rem; color: #cbb8e0; }

.jj-center .wp-block-buttons, .wp-block-buttons.jj-center { justify-content: center; }
.jj-center > .wp-block-heading, .jj-center > p { text-align: center; }

.jj-band--plum .wp-block-button__link {
	background: #fff !important;
	color: var(--wp--preset--color--plum) !important;
}
.jj-band--plum .wp-block-button__link:hover { background: var(--wp--preset--color--lilac) !important; }
.jj-band--plum .is-style-outline .wp-block-button__link { background: transparent !important; color: #fff !important; border-color: #fff; }
main > .wp-block-post-content { margin-top: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + .alignfull,
main > .jj-page-head + .wp-block-post-content { margin-block-start: 0 !important; }
.wp-block-post-content > :last-child { margin-block-end: 0; }
.jj-footer { margin-block-start: 0 !important; }
@media (max-width: 781px) {
	.wp-block-gallery.jj-gallery.columns-5 .wp-block-image,
	.wp-block-gallery.jj-gallery.columns-4 .wp-block-image { width: calc(50% - 0.45rem) !important; flex-grow: 0 !important; }
}
@media (min-width: 782px) {
	.wp-block-gallery.jj-gallery .wp-block-image { flex-grow: 0 !important; }
}
@media (max-width: 781px) {
	.wp-block-columns.jj-hero-photos { flex-wrap: nowrap !important; }
	.wp-block-columns.jj-hero-photos > .wp-block-column { flex-basis: 50% !important; }
	.jj-hero-photos .wp-block-column:nth-child(2) { margin-top: 1.5rem; }
	.jj-floor .wp-block-columns { flex-wrap: nowrap !important; }
	.jj-floor .wp-block-columns > .wp-block-column { flex-basis: 50% !important; }
}

/* ---------- v1.2: home + gallery ---------- */
.jj-section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.jj-section-head .jj-lede { margin-inline: auto; }

.jj-strip-band { padding-block: 0; }
.jj-strip {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(4, 1fr);
}
.jj-strip li + li { border-left: 1px solid rgba(255,255,255,.14); }
.jj-strip a {
	display: block; padding: 1.4rem 1.25rem; text-decoration: none; color: #fff !important;
	transition: background .2s;
}
.jj-strip a:hover { background: rgba(255,255,255,.07); }
.jj-strip strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: 1.2rem; font-weight: 600; }
.jj-strip span { display: block; font-size: .9rem; color: var(--wp--preset--color--lilac); margin-top: .15rem; }
@media (max-width: 781px) {
	.jj-strip { grid-template-columns: 1fr 1fr; }
	.jj-strip li:nth-child(3) { border-left: 0; }
	.jj-strip li:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.14); }
}

.jj-swatch--tall { aspect-ratio: 3 / 4; box-shadow: 0 14px 40px -18px rgba(43, 13, 69, 0.35); }
.jj-floor .wp-block-buttons { margin-top: 1.25rem; }

.jj-gallery-head { align-items: flex-end !important; margin-bottom: 1.5rem; }
.jj-gallery-head h2 { margin-bottom: 0; }
.jj-gallery-head .jj-lede { margin-bottom: 0; }
.wp-block-buttons.jj-right { justify-content: flex-end; }
@media (max-width: 781px) { .wp-block-buttons.jj-right { justify-content: flex-start; } }

.wp-block-gallery.jj-gallery { gap: 1rem !important; }
.wp-block-gallery.jj-gallery .wp-block-image img {
	border-radius: 10px;
	box-shadow: 0 14px 40px -18px rgba(43, 13, 69, 0.45);
}
.wp-block-gallery.jj-gallery .wp-block-image figcaption { border-radius: 0 0 10px 10px; padding-bottom: .7rem; }
@media (min-width: 782px) {
	.wp-block-gallery.jj-gallery.columns-3 .wp-block-image { width: calc((100% - 2rem) / 3) !important; }
	.wp-block-gallery.jj-gallery.columns-4 .wp-block-image { width: calc((100% - 3rem) / 4) !important; }
}

.jj-work-row { gap: 1rem !important; }
@media (max-width: 781px) {
	.jj-work-row { flex-wrap: wrap !important; }
	.jj-work-row > .wp-block-column { flex-basis: calc(50% - .5rem) !important; }
}
@media (max-width: 781px) {
	.wp-block-columns.jj-work-row:not(.is-not-stacked-on-mobile) > .wp-block-column { flex-basis: calc(50% - .5rem) !important; flex-grow: 0; }
}
.jj-swatch { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; }
.jj-swatch small { margin-top: 0; }
