/*
Theme Name:   Art by Benish
Theme URI:    https://example.com
Description:  Gallery-first WordPress theme for an artist portfolio and WooCommerce shop.
Author:       Studio
Template:     portfolio-base
Version:      1.0.0
Text Domain:  artist-theme
*/

/* ==========================================================================
   Design tokens (mirrors theme.json — kept here as a fallback / quick reference)
   ========================================================================== */
:root {
	--artist-color-bg: #faf8f5;
	--artist-color-surface: #ffffff;
	--artist-color-ink: #2b2926;
	--artist-color-muted: #6f6b65;
	--artist-color-accent: #b56a4d;
	--artist-color-border: #e4e0da;
}

/* ==========================================================================
   Global
   ========================================================================== */
body {
	background-color: var(--artist-color-bg);
	color: var(--artist-color-ink);
}

a {
	color: var(--artist-color-ink);
}

/* ==========================================================================
   Buttons & CTAs — one consistent color (the nav bar's ink) everywhere,
   including WooCommerce's own classic templates (shop loop, single product
   Add to Cart, cart, checkout), which theme.json's button-element styling
   doesn't reach since those don't carry the wp-element-button class.
   Hover is a lightness shift of the same color, not a different hue.
   ========================================================================== */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wp-block-button__link,
.wp-element-button,
.wc-block-components-button,
.wpforms-submit {
	background-color: var(--artist-color-ink) !important;
	border-color: var(--artist-color-ink) !important;
	color: #fff !important;
	font-weight: 400 !important;
	padding: 0.8rem 1.75rem !important;
	/* The parent theme was constraining these to a narrow fixed width, which made
	   "Add to cart" wrap onto two lines and look badly misaligned. */
	width: auto !important;
	white-space: nowrap !important;
	/* The parent theme sets a fixed height on generic buttons which fought with our
	   padding above and pushed the label off-center — let padding/line-height
	   determine height naturally instead. */
	height: auto !important;
	line-height: normal !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
.wc-block-components-button:hover,
.wpforms-submit:hover {
	background-color: var(--artist-color-ink) !important;
	border-color: var(--artist-color-ink) !important;
	color: #fff !important;
	filter: brightness(1.2);
}

.woocommerce .is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	color: var(--artist-color-ink) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background-color: var(--artist-color-ink) !important;
	color: #fff !important;
	filter: none;
}

/* The parent theme's default header/nav is replaced site-wide by the hamburger +
   full-screen overlay nav (see inc/site-chrome.php / assets/css/site-chrome.css). */
.site-header {
	display: none !important;
}

/* The parent theme's default page-title banner is replaced everywhere by either the
   hero slider (Home) or .artist-page-header (every other page). */
.entry-hero {
	display: none !important;
}

.content-wrap,
.content-area {
	margin-top: 0 !important;
}

/* Home is the fullscreen slider only, truly edge-to-edge — the parent theme's
   .entry-content-wrap normally carries padding for boxed content, which
   would otherwise leave a gap above/around the slider. */
.home .entry-content-wrap {
	padding: 0 !important;
}

/* Home is the fullscreen slider only — the footer (widgets/legal links)
   only belongs on the rest of the site. */
.home .site-footer {
	display: none !important;
}

.home .content-area {
	margin-bottom: 0 !important;
}

/* ==========================================================================
   Hero slider — real Swiper.js instance (see assets/js/site.js). The
   `.artist-hero-*` classes carry our own visual design on top of Swiper's
   own `.swiper` / `.swiper-slide` / `.swiper-pagination` structure.
   ========================================================================== */
/* Full-bleed via WordPress's own alignfull mechanism (the block wrapper in
   bulk-content.php's home content), not a manual 100vw hack — avoids
   scrollbar-width/measurement issues that broke Swiper's initial sizing. */
.artist-hero-slider {
	position: relative;
	width: 100%;
	height: 100vh;
	min-height: 560px;
	overflow: hidden;
	background-color: var(--artist-color-ink);
}

.artist-hero-slider .swiper-slide {
	background-size: cover;
	background-position: center;
	position: relative;
}

.artist-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.5) 100%);
	pointer-events: none;
	z-index: 1;
}

.artist-hero-content {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 1.5rem;
	color: #fff;
	text-align: center;
}

/* Slider typography is intentionally the same light-weight, wide-tracking
   uppercase treatment as .artist-desktop-nav — one consistent voice across
   the fixed menu and the hero. */
.artist-hero-content h1 {
	color: #fff;
	font-family: var(--wp--preset--font-family--body, "Inter", sans-serif);
	font-weight: 300;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	line-height: 1.15;
	font-size: clamp(2.25rem, 7vw, 4.5rem);
	margin: 0 0 1rem;
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.artist-hero-content p {
	max-width: 42ch;
	margin: 0 0 2rem;
	font-size: 0.85rem;
	font-weight: 300;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	opacity: 0.8;
}

.artist-hero-btn {
	display: inline-block;
	padding: 0.85rem 2.5rem;
	border: 1px solid rgba(255, 255, 255, 0.65);
	/* Matches the Add to Cart buttons' radius instead of a full pill, so the
	   hero CTA reads as the same button family as the rest of the site. */
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(4px);
	color: #fff !important;
	text-decoration: none;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-size: 0.7rem;
	font-weight: 400;
	transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.artist-hero-btn:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: #fff;
	transform: scale(1.03);
}

.artist-hero-scroll-cue {
	position: absolute;
	right: 2rem;
	bottom: 2rem;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.65rem;
	font-weight: 300;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	writing-mode: vertical-rl;
}

.artist-hero-scroll-cue::before {
	content: "";
	display: block;
	width: 1px;
	height: 2.5rem;
	background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 600px) {
	.artist-hero-scroll-cue {
		display: none;
	}
}

/* Slide navigation is pagination dots only — autoplay, swipe, and keyboard
   arrows already cover the rest, so separate Prev/Next buttons would just
   be redundant clutter on top of a single-purpose hero. */
.artist-hero-slider .swiper-pagination {
	bottom: 2.5rem !important;
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	z-index: 2;
}

.artist-hero-slider .swiper-pagination-bullet {
	width: 9px;
	height: 9px;
	background: rgba(255, 255, 255, 0.4);
	opacity: 1;
	border-radius: 50%;
	margin: 0;
	transition: transform 0.25s ease, background-color 0.25s ease;
}

.artist-hero-slider .swiper-pagination-bullet-active {
	background: #fff;
	transform: scale(1.3);
}

/* ==========================================================================
   Gallery-first layout helpers
   ========================================================================== */
.artist-full-bleed {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

.artist-section {
	padding-block: clamp(3rem, 6vw, 7rem);
}

/* Category / commission CTA blocks on the Home page */
.artist-cta-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.artist-cta-card {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border-radius: 2px;
	text-decoration: none;
}

.artist-cta-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.artist-cta-card:hover img {
	transform: scale(1.04);
}

.artist-cta-card__label {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 1.25rem;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
	color: #fff;
	font-size: 1.05rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* Pull-quote used on the About page pattern */
.artist-pull-quote {
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
	line-height: 1.4;
	max-width: 40ch;
	margin-inline: auto;
	text-align: center;
	color: var(--artist-color-ink);
}

/* Commission process steps */
.artist-steps {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	counter-reset: artist-step;
}

.artist-step {
	counter-increment: artist-step;
	text-align: center;
}

.artist-step::before {
	content: counter(artist-step);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin-bottom: 0.75rem;
	border-radius: 50%;
	border: 1px solid var(--artist-color-ink);
	color: var(--artist-color-ink);
	font-family: var(--wp--preset--font-family--display, serif);
}

/* ==========================================================================
   WooCommerce — Shop / product grid
   ========================================================================== */
.woocommerce ul.products,
.wc-block-grid__products {
	--artist-grid-gap: 2rem;
}

.woocommerce ul.products li.product,
.wc-block-grid__product {
	position: relative;
}

.woocommerce ul.products li.product img {
	border-radius: 2px;
}

/* "Sold" badge/ribbon (see inc/sold-badge.php for the PHP side) */
.artist-sold-badge {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 2;
	padding: 0.3rem 0.75rem;
	background: var(--artist-color-ink);
	color: #fff;
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 1px;
}

.woocommerce ul.products li.product.artist-is-sold img {
	opacity: 0.55;
}

.artist-sold-badge--single {
	position: static;
	display: inline-block;
	margin-bottom: 0.75rem;
}

/* ==========================================================================
   Product detail page
   ========================================================================== */
.woocommerce div.product .artist-product-meta {
	margin-top: 1.5rem;
	border-top: 1px solid var(--artist-color-border);
	padding-top: 1.5rem;
	font-size: 0.9rem;
	color: var(--artist-color-muted);
}

.woocommerce div.product .artist-product-meta dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.4rem 1rem;
	margin: 0;
}

.woocommerce div.product .artist-product-meta dt {
	font-weight: 600;
	color: var(--artist-color-ink);
}

.woocommerce div.product .artist-shipping-note {
	margin-top: 1rem;
	font-size: 0.85rem;
	font-style: italic;
	color: var(--artist-color-muted);
}

/* Featured paintings shortcode/block grid — see inc/featured-paintings.php */
.artist-featured-grid {
	display: grid;
	gap: 1.75rem;
	grid-template-columns: repeat(var(--artist-featured-cols, 3), 1fr);
}

@media (max-width: 782px) {
	.artist-featured-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.artist-featured-grid {
		grid-template-columns: 1fr;
	}
}

.artist-featured-grid figure {
	margin: 0;
}

.artist-featured-grid img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 2px;
}

.artist-featured-grid figcaption {
	margin-top: 0.6rem;
	font-size: 0.9rem;
}

.artist-featured-grid .price {
	color: var(--artist-color-muted);
}
