/*
Theme Name: Blocksy Child
Theme URI: https://creativethemes.com/blocksy/
Description: Stella Shop child theme of Blocksy
Author: Stella Shop
Template: blocksy
Version: 1.0.0
Text Domain: blocksy-child
*/

/* =========================================================
   Stella Shop – custom styles
   Mirrors the reference site's custom CSS (hero carousel,
   category grid, reviews marquee, new-item cards, product
   cards, variation buttons) with the same timings/effects.
   ========================================================= */

/* ---------- Final sale CTA product colours ---------- */
@media (min-width: 691px) and (max-width: 1000px) {
	.final-sale-home-cta [data-products] {
		--shop-columns: repeat(3, minmax(0, 1fr));
	}
}

.final-sale-home-cta .product {
	--theme-text-color: rgba(255, 255, 255, 0.5);
	--theme-heading-color: #fff;
}

/* ---------- Product cards ---------- */
.woocommerce ul.products li.product figure {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex !important;
	align-items: center;
	justify-content: center;
	position: relative;
}

/* Product image: fill space proportionally */
.woocommerce ul.products li.product figure img,
.ct-media-container img {
	border-radius: 16px;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	display: block !important;
	transition: transform 0.4s ease;
}

/* Product without photo yet: keep the card's image area as a pink block */
.woocommerce ul.products li.product figure:empty,
.woocommerce ul.products li.product figure:not(:has(.ct-media-container)) {
	aspect-ratio: 3 / 4;
	border-radius: 16px;
	margin-bottom: 25px;
	position: relative;
	overflow: hidden;
}

/* the "image": a pink block that zooms on hover like Blocksy's zoom-in effect */
.woocommerce ul.products li.product figure:not(:has(.ct-media-container))::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--theme-palette-color-2), #fbe3e8);
	transition: transform 0.4s ease;
}

.woocommerce ul.products li.product:hover figure:not(:has(.ct-media-container))::before {
	transform: scale(1.08);
}

.woocommerce ul.products li.product figure:not(:has(.ct-media-container)) .onsale,
.woocommerce ul.products li.product figure:not(:has(.ct-media-container)) .out-of-stock-badge {
	position: absolute;
	top: 15px;
	left: 15px;
	right: auto;
	width: max-content;
	z-index: 2;
}

/* Empty image placeholder look (until real photos are uploaded) */
.woocommerce ul.products li.product figure .ct-media-container:not(:has(img)),
.ct-media-container.ct-placeholder {
	background: var(--theme-palette-color-2);
	border-radius: 16px;
	aspect-ratio: 3 / 4;
	width: 100%;
}

/* ---------- Hero carousel ---------- */
.hero-carousel {
	position: relative;
	overflow: hidden;
	height: 80vh;
	padding-top: 10vh;
	border-radius: 16px;
	background: var(--theme-palette-color-2);
}

@media (max-width: 768px) {
	.hero-carousel {
		height: 55vh;
		padding-top: 2vh;
	}
}

.hero-carousel .slides img,
.hero-carousel .slides .slide-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1.5s;
}

.hero-carousel .slides .slide-placeholder {
	display: flex;
	align-items: flex-end;
	justify-content: flex-end;
	padding: 24px 32px;
	color: rgba(19, 17, 23, 0.45);
	font-family: 'Allura', cursive;
	font-size: 2.4rem;
	background: linear-gradient(135deg, var(--theme-palette-color-2), var(--theme-palette-color-1));
}

/* Each empty slide gets its own tint so the fade is visible before photos exist */
.hero-carousel .slides .slide-placeholder--1 { background: linear-gradient(135deg, #fbe7ec, #e8a2a9); }
.hero-carousel .slides .slide-placeholder--2 { background: linear-gradient(135deg, #f3e6f7, #c9a7d6); }
.hero-carousel .slides .slide-placeholder--3 { background: linear-gradient(135deg, #e9eefb, #a2b6df); }
.hero-carousel .slides .slide-placeholder--4 { background: linear-gradient(135deg, #fff3e0, #f4c48a); }
.hero-carousel .slides .slide-placeholder--5 { background: linear-gradient(135deg, #e6f6f2, #9fd6c5); }
.hero-carousel .slides .slide-placeholder--6 { background: linear-gradient(135deg, #f8edf0, #d9dadc); }
.hero-carousel .slides .slide-placeholder--7 { background: linear-gradient(135deg, #fde2e6, #f2a0b0); }

.hero-carousel .slides img.active,
.hero-carousel .slides .slide-placeholder.active {
	opacity: 1;
}

.hero-carousel .overlay {
	position: absolute;
	top: 50%;
	transform: translate(0%, -25%);
	background: rgba(248, 237, 240, 0.5);
	color: black;
	text-align: left;
	padding: 2vw 4vw;
	border-radius: 10px;
	max-width: 90%;
	width: fit-content;
}

.hero-carousel .overlay .overlay-title {
	font-family: 'Allura', cursive;
	font-size: 3em;
	font-weight: bold;
	line-height: 1.1;
	display: block;
}

.hero-carousel .overlay h2 {
	font-size: clamp(1.5rem, 4vw, 3rem);
	font-family: 'Montserrat', sans-serif;
	margin-bottom: 0.5em;
}

.hero-carousel .overlay p {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(1rem, 2vw, 1.5rem);
	margin-bottom: 1em;
}

.hero-carousel .btn {
	display: inline-block;
	background: #FFEDF0;
	color: black;
	padding: 0.8em 1.6em;
	font-size: clamp(0.9rem, 1.5vw, 1.2rem);
	text-decoration: none;
	font-family: 'Montserrat', sans-serif;
	border-radius: 6px;
	transition: background 0.3s;
}

.hero-carousel .btn:hover {
	background: #f7efff;
}

/* ---------- Categories grid (Our Items page) ---------- */
.categories-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 25px;
	padding: 40px;
}

.category-item {
	position: relative;
	overflow: hidden;
	border-radius: 15px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease;
}

.category-item:hover {
	transform: translateY(-5px);
}

.category-item:hover .category-info {
	background-color: var(--theme-palette-color-1);
}

.category-image {
	width: 100%;
	height: 250px;
	background-size: cover;
	background-position: center;
	background-color: var(--theme-palette-color-2);
	filter: brightness(0.85);
}

.category-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--theme-palette-color-2);
	color: black;
	text-align: center;
	padding: 15px 0;
	transition: background-color 0.3s ease;
}

.category-info h3 {
	margin: 0;
	font-size: 1.2rem;
	color: black;
}

.category-info p {
	margin: 5px 0 0;
	font-size: 0.9rem;
	opacity: 0.9;
}

@media (max-width: 600px) {
	.category-image {
		height: 220px;
	}
}

/* ---------- Reviews marquee ---------- */
.reviews-slider-container {
	overflow-x: hidden;
	width: 100%;
	position: relative;
	padding: 20px 0;
}

.reviews-slider {
	display: flex;
	gap: 20px;
	width: max-content;
	animation: scrollReviews 30s linear infinite;
	scroll-behavior: smooth;
}

.review-card {
	width: 80vw;
	height: 25vh;
	flex-shrink: 0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
	background: #fff;
}

.review-photo,
.review-card img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: 50% 50%;
}

/* Infinite seamless loop */
@keyframes scrollReviews {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

/* Stop animation + enable scroll */
.reviews-slider-container:hover .reviews-slider {
	animation: none;
}

.reviews-slider-container:hover {
	overflow-x: auto;
	cursor: grab;
}

@media (min-width: 600px) {
	.review-card {
		width: 30vw;
	}
}

/* ---------- New items / second items rows ---------- */
.new-items-row,
.second-items-row {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	justify-content: center;
}

.new-item-card,
.second-item-card {
	height: 60vh;
	position: relative;
	flex: 1 1 45%;
	overflow: hidden;
	border-radius: 16px;
	cursor: pointer;
	transition: transform 0.3s ease;
	background: var(--theme-palette-color-2);
}

.new-item-card img,
.second-item-card img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.new-item-card:hover img,
.second-item-card:hover img {
	transform: scale(1.05);
}

.overlay-text {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.overlay-text p {
	color: white;
	font-size: clamp(1rem, 2vw, 1.2rem);
	text-align: center;
	font-weight: 500;
}

@media (max-width: 768px) {
	.new-item-card,
	.second-item-card {
		height: 35vh;
	}

	.overlay-text {
		padding: 0rem;
	}
}

/* ---------- Gift selector (kept for parity) ---------- */
.gift-selector {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	cursor: pointer;
}

.gift-box {
	position: relative;
	width: 180px;
	height: 180px;
	border: 2px dashed #ccc;
	border-radius: 12px;
	overflow: hidden;
	background: #f9f9f9;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.3s;
}

.gift-box:hover {
	border-color: #000;
}

.plus-icon {
	font-size: 2.5rem;
	color: #aaa;
}

.gift-overlay {
	position: absolute;
	bottom: 0;
	width: 100%;
	background: rgba(0, 0, 0, 0.6);
	color: white;
	font-size: 0.9rem;
	padding: 6px;
	text-align: center;
}

.gift-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gift-name {
	margin-top: 8px;
	font-size: 1rem;
	font-weight: 500;
}

.go-to-stickers {
	margin-top: 10px;
	margin-bottom: 10px;
	display: inline-block;
	padding: 10px 10px;
	background-color: var(--theme-palette-color-1);
	color: white;
	text-decoration: none;
	font-weight: 600;
	transition: background 0.2s;
}

.go-to-stickers:hover {
	color: white;
	background-color: var(--theme-palette-color-2);
}

/* ---------- Variation buttons (product page) ---------- */
.wc-variation-buttons {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 15px;
}

.variation-btn {
	padding: 8px 14px;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
	border-radius: 4px;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.variation-btn.active {
	background: var(--theme-palette-color-1);
	color: #fff;
	border-color: var(--theme-palette-color-2);
}

/* Hide the native select once buttons are rendered */
.wc-variation-wrapper .wc-variation-buttons + select,
.wc-variation-wrapper select.has-variation-buttons {
	display: none;
}

/* ---------- Personalisation text fields ---------- */
#brode-text-wrapper {
	margin-bottom: 10px;
}

#brode-text-wrapper label {
	display: block;
	margin-bottom: 4px;
}

#brode-text-wrapper input {
	width: 100%;
	padding: 5px;
	margin-bottom: 10px;
}

/* ---------- Section headers ("Check out new products" + title + VIEW ALL) ---------- */
.stella-section-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin: 40px 0 20px;
}

.stella-section-header .stella-kicker {
	margin: 0 0 4px;
	color: var(--theme-text-color);
}

.stella-section-header h2 {
	margin: 0;
}

.stella-section-header .stk-button,
.stella-view-all {
	display: inline-flex;
	align-items: center;
	min-height: 45px;
	padding: 5px 20px;
	background: var(--theme-palette-color-1);
	color: var(--theme-palette-color-4);
	font-size: 15px;
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none;
	transition: filter 0.3s ease, background 0.3s ease;
}

.stella-view-all:hover {
	filter: brightness(0.9);
}

@media (max-width: 689.98px) {
	.stella-section-header {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

/* ---------- Empty image placeholders (replace with real photos later) ---------- */
.stella-img-placeholder {
	width: 100%;
	height: 100%;
	min-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--theme-palette-color-2), #fbe3e8);
	color: var(--theme-palette-color-1);
	font-family: 'Allura', cursive;
	font-size: 1.6rem;
	transition: transform 0.3s ease;
}

.new-item-card:hover .stella-img-placeholder,
.second-item-card:hover .stella-img-placeholder {
	transform: scale(1.05);
}

.stella-img-placeholder--review {
	height: 100%;
	background: #fff;
	border: 2px dashed var(--theme-palette-color-2);
	box-sizing: border-box;
	font-size: 1.3rem;
}

/* ---------- Page header band (Our Items / About Us) ---------- */
.stella-page-header {
	background: var(--theme-palette-color-2);
	padding: 40px 20px;
	margin-top: 0;
	margin-bottom: 30px;
}

.stella-page-header .ct-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	text-align: center;
	margin-bottom: 8px;
	--theme-text-color: var(--wp--preset--color--black, #000);
}

.stella-page-header .wp-block-shortcode {
	text-align: center;
}

.stella-page-header h2 {
	margin: 0;
}

/* ---------- About page blocks ---------- */
.stella-about-block {
	background: var(--theme-palette-color-1);
	border-radius: 16px;
	padding: 40px 30px;
	margin-bottom: 40px;
}

.stella-about-block--alt {
	background: var(--theme-palette-color-4);
	border-radius: 0;
}

.stella-about-gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 30px;
}

.stella-about-gallery .stella-img-placeholder {
	aspect-ratio: 3 / 4;
	border-radius: 12px;
}

.stella-about-gallery--small {
	grid-template-columns: repeat(2, 1fr);
	margin-bottom: 0;
}

@media (max-width: 689.98px) {
	.stella-about-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Footer extras ---------- */
.stella-footer-socials {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin: 0 0 21px;
}

.stella-social-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 45px;
	height: 45px;
	background: var(--theme-palette-color-1);
	color: #fff;
	transition: filter 0.3s ease;
}

.stella-social-btn:hover {
	filter: brightness(0.9);
	color: #fff;
}

.stella-social-btn svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.stella-footer-logo {
	font-family: 'Allura', cursive;
	font-size: 2.6rem;
	color: var(--theme-palette-color-4);
	line-height: 1;
}

/* Offcanvas socials on the dark panel */
#offcanvas [data-id="socials"] .ct-social-box a {
	--theme-icon-color: rgba(255, 255, 255, 0.5);
	--theme-icon-hover-color: var(--theme-palette-color-7);
}

/* Site title used until the logo image is uploaded */
.site-title {
	font-family: 'Allura', cursive;
	font-size: 34px !important;
	font-weight: 700;
}

/* ---------- Full-width banner strip (livraison) ---------- */
.stella-banner-strip {
	background: var(--theme-palette-color-4);
	color: #fff;
	text-align: center;
	padding: 60px 20px;
}

.stella-banner-strip h5,
.stella-banner-strip p {
	color: #fff;
	margin: 0;
}

.stella-banner-strip h5 {
	margin-top: 10px;
}

.stella-banner-strip svg {
	width: 40px;
	height: 40px;
	fill: currentColor;
}
