/*
Theme Name: BlockShop
Author: WP Emaan
Description: A block-based WooCommerce store theme with product filters.
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.0
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blockshop
Tags: e-commerce, four-columns, wide-blocks, block-patterns, block-styles, featured-images, full-site-editing, rtl-language-support, sticky-post, template-editing, threaded-comments, translation-ready
*/

/*
 * Copyright (c) 2026 WP Emaan
 * License: GNU General Public License v2 or later
 */

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--contrast);
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-color: var(--wp--preset--color--primary);
	text-decoration-thickness: 0.5px !important;
	text-underline-offset: 0.05em;
}

/* Reset browser default margins for blockquote element */
.wp-block-pullquote blockquote {
	margin: 0;
}

/* Search button inside style */
.wp-block-search__button-inside .wp-block-search__inside-wrapper {
	padding: 4px;
}

/* Adjust font size for comment reply title */
.wp-block-post-comments-form .comment-reply-title {
	font-size: var(--wp--preset--font-size--large);
}

/* Remove the bottom margin from the button */
.wp-block-post-comments-form .form-submit {
	margin-bottom: 0;
}

/*
 * Responsive menu container padding.
 * This ensures the responsive container inherits the same
 * spacing defined above. This behavior may be built into
 * the Block Editor in the future.
 */
.wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
}

/* Adjust the top padding for the submenu items */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
	padding-top: var(--wp--preset--spacing--30);
}

/* Override the Gutenberg style to theme style */
.wp-block-post-author__byline,
.wp-block-post-author__bio {
	font-size: inherit;
}

/* Round the avatar and reset the vertical alignment */
.wp-block-post-author__avatar img {
	border-radius: 999px;
	line-height: 0;
}

/* Style tag cloud outline style  */
.wp-block-tag-cloud.is-style-outline a {
	border-color: var(--wp--preset--color--tertiary);
	border-radius: 999px;
	padding: 0 0.5rem;
}

.wp-block-tag-cloud.is-style-outline a:hover {
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--primary);
}

/* Remove the default margin from author bio */
.wp-block-post-author__bio {
	margin: 0;
}

/* Remove the default margin from term description. */
.wp-block-term-description p:first-child {
	margin-top: 0;
}

.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

/* Normalise font sizes for the latest comments and latest posts widgets */
.wp-block-latest-comments__comment-excerpt p,
.wp-block-latest-comments__comment-date,
.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
	font-size: inherit;
}

/* Adjust font colour in the Calendar widget */
.wp-block-calendar table:where(:not(.has-text-color)) {
	color: var(--wp--preset--color--foreground);
}

/* Fix border radius setting for the avatar block */
.wp-block-avatar a,
.wp-block-avatar img {
	border-radius: inherit;
	vertical-align: middle;
}

/* Fix line height for various fields */
.wp-block-search__input,
.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]),
.wp-block-post-comments-form .comment-form textarea {
	line-height: inherit;
}

/* Style  border colour for search and Jetpack subscription blocks */
.wp-block-search__input,
.wp-block-search__button-inside .wp-block-search__inside-wrapper,
.wp-block-jetpack-subscriptions.wp-block-jetpack-subscriptions__supports-newline form input[type="email"] {
	border-color: var(--wp--preset--color--tertiary);
}

/* Needed to style input field for various Jetpack blocks */
.wp-block-jetpack-contact-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea,
.wp-block-jetpack-mailchimp input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-revue input:not([type="submit"]):not([type="checkbox"]) {
	background-color: #fff;
	border: 1px solid var(--wp--preset--color--tertiary);
	font-size: inherit;
	line-height: inherit;
	padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form label {
	font-weight: 400;
}

.wp-block-jetpack-contact-form.contact-form label span {
	opacity: 0.7;
}

.wp-block-jetpack-contact-form.contact-form select {
	padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form textarea {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Style the feedback you get after submitting the contact form */
div[id^="contact-form-"] h4 {
	font-size: var(--wp--preset--font-size--medium);
	font-weight: inherit;
	line-height: 1.555555556;
}

div[id^="contact-form-"] .contact-form-submission {
	margin: 0;
	padding: 0;
}

/* Adjust vertical margins in the mailchimp block */
.wp-block-jetpack-mailchimp .wp-block-jetpack-button,
.wp-block-jetpack-mailchimp p {
	margin: var(--wp--preset--spacing--40) 0;
}

/* Adjust the size of the consent text in mailchimp block */
#wp-block-jetpack-mailchimp_consent-text {
	font-size: var(--wp--preset--font-size--small);
	margin-bottom: 0;
}

/* Remove underline from the price after discounted */
ins {
	text-decoration: none;
}

/* Fix the hardcoded wide width value in the stylesheet for TT3 */
.woocommerce.woocommerce-page main {
	max-width: calc(var(--wp--style--global--wide-size) + var(--wp--style--root--padding-right) + var(--wp--style--root--padding-left));
}

/* WooCommerce storefront styling */
.woo-site-notice {
	background: linear-gradient(105deg, #5b2ab7, #782bd2) !important;
}

.woo-site-notice p {
	margin: 0;
	font-weight: 600;
}

.woo-header-main {
	background: #fff;
	border-bottom: 1px solid #eeeaf3;
}

.woo-header-main__inner {
	display: grid !important;
	grid-template-columns: minmax(205px, 1fr) minmax(260px, 1.65fr) minmax(105px, 0.75fr);
	align-items: center;
	gap: clamp(16px, 3vw, 40px);
	padding: 15px 24px;
}

.woo-brand {
	position: relative;
	padding-left: 64px;
}

.woo-brand::before {
	position: absolute;
	top: 2px;
	left: 0;
	display: grid;
	width: 48px;
	height: 48px;
	border-radius: 12px 12px 10px 10px;
	background: linear-gradient(145deg, #8c4de0, #5b20bd);
	color: #fff;
	content: "W";
	font-size: 25px;
	font-weight: 800;
	place-items: center;
}

.woo-brand::after {
	position: absolute;
	top: -5px;
	left: 12px;
	width: 23px;
	height: 17px;
	border: 3px solid #5b20bd;
	border-bottom: 0;
	border-radius: 15px 15px 0 0;
	content: "";
}

.woo-brand__name {
	margin: 0;
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.05;
	white-space: nowrap;
}

.woo-brand__name span {
	color: #641cc7;
}

.woo-brand__tagline {
	margin: 3px 0 0;
	font-size: 0.72rem;
	font-weight: 600;
	line-height: 1.1;
	text-align: right;
}

.woo-header-search {
	width: 100%;
	margin: 0;
}

.woo-header-search .wp-block-search__inside-wrapper {
	min-height: 42px;
	overflow: hidden;
	border: 1px solid #ded9e8;
	border-radius: 999px;
	background: #f8f7fa;
}

.woo-header-search .wp-block-search__input {
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 0 16px;
	font-size: 0.9rem;
}

.woo-header-search .wp-block-search__button {
	min-width: 48px;
	margin: 0;
	border-radius: 0;
	background: #641cc7;
}

.woo-header-actions {
	gap: 16px;
	justify-content: flex-end;
}

.woo-header-actions .wc-block-mini-cart__button,
.woo-header-actions .wc-block-customer-account__account-link {
	color: #17152b;
}

.woo-header-actions .wc-block-mini-cart__button:hover,
.woo-header-actions .wc-block-customer-account__account-link:hover {
	color: #641cc7;
}

.woo-navigation-wrap {
	border-bottom: 1px solid #eeeaf3;
	background: #fff;
}

.woo-navigation-wrap .wp-block-navigation {
	padding: 0 24px;
}

.woo-navigation-wrap .wp-block-navigation-item__content {
	padding: 11px 15px;
	border-radius: 0;
	color: #17152b;
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
}

.woo-navigation-wrap .wp-block-navigation-item__content:hover,
.woo-navigation-wrap .current-menu-item > .wp-block-navigation-item__content {
	background: #641cc7;
	color: #fff;
}

.woo-home-hero {
	overflow: hidden;
	background:
		radial-gradient(ellipse at 82% 55%, rgba(198, 164, 255, 0.55), transparent 38%),
		linear-gradient(110deg, #f8f4ff 0%, #efe6ff 100%);
}

.woo-home-hero__columns {
	align-items: center;
	gap: 24px;
	min-height: 318px;
	margin: 0 auto;
	padding: 22px 24px;
}

.woo-home-hero__content {
	padding: 8px 0;
}

.woo-home-hero__eyebrow {
	display: inline-block;
	margin: 0 0 10px;
	padding: 5px 15px;
	border-radius: 999px;
	background: #e4d4ff;
	color: #39126f;
	font-size: 0.82rem;
	font-weight: 700;
}

.woo-home-hero__title {
	max-width: 620px;
	margin: 0 0 5px;
	color: #17152b;
	font-size: clamp(2.35rem, 4vw, 3.15rem);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.08;
}

.woo-gradient-text {
	background: linear-gradient(100deg, #6814c6, #872bd5);
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.woo-home-hero__subtitle {
	margin: 0 0 11px;
	font-size: clamp(1.25rem, 2.3vw, 1.7rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.25;
}

.woo-home-hero__description {
	max-width: 460px;
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
}

.woo-home-hero__buttons {
	gap: 12px;
	margin-top: 20px;
}

.woo-home-hero__buttons .wp-block-button__link {
	min-height: 44px;
	padding: 12px 23px;
	font-weight: 700;
}

.woo-home-hero__buttons .woo-button-primary .wp-block-button__link {
	background: linear-gradient(105deg, #7022ca, #5a20b8);
}

.woo-home-hero__buttons .woo-button-secondary .wp-block-button__link {
	border: 1.5px solid #641cc7;
	background: transparent;
	color: #3a176c;
}

.woo-home-hero__buttons .woo-button-secondary .wp-block-button__link:hover {
	background: #641cc7;
	color: #fff;
}

.woo-home-hero__image,
.woo-home-hero__image img {
	width: 100%;
	margin: 0;
}

.woo-home-hero__image img {
	max-height: 330px;
	object-fit: contain;
}

.woo-benefits {
	border-bottom: 1px solid #eeeaf3;
	background: #fff;
}

.woo-benefits__columns {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0 !important;
	margin: 0 auto;
	padding: 17px 24px;
}

.woo-benefit {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
	margin: 0 !important;
	padding: 7px 18px;
	border-right: 1px solid #e8e3ee;
}

.woo-benefit:first-child {
	padding-left: 0;
}

.woo-benefit:last-child {
	padding-right: 0;
	border-right: 0;
}

.woo-benefit__icon {
	display: grid;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	color: #641cc7;
	place-items: center;
}

.woo-benefit__icon svg {
	width: 39px;
	height: 39px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.3;
}

.woo-benefit h3 {
	margin: 0 0 3px;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.25;
}

.woo-benefit p {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.35;
}

.woo-home-section {
	margin-top: 38px;
	margin-bottom: 42px;
	padding-right: 24px;
	padding-left: 24px;
}

.woo-section-heading {
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 17px;
}

.woo-section-heading h2 {
	position: relative;
	margin: 0;
	padding-bottom: 9px;
	font-size: clamp(1.6rem, 2.5vw, 2rem);
	font-weight: 800;
	letter-spacing: -0.035em;
}

.woo-section-heading h2::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 76px;
	height: 3px;
	border-radius: 3px;
	background: #641cc7;
	content: "";
}

.woo-category-list .wc-block-product-categories-list {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woo-category-list .wc-block-product-categories-list-item {
	min-width: 0;
	padding: 10px 10px 12px;
	border-radius: 9px;
	background: #f0e8ff;
	text-align: center;
}

.woo-category-list .wc-block-product-categories-list-item:nth-child(6n + 2) {
	background: #fff0f5;
}

.woo-category-list .wc-block-product-categories-list-item:nth-child(6n + 3) {
	background: #f1f2f4;
}

.woo-category-list .wc-block-product-categories-list-item:nth-child(6n + 4) {
	background: #fff0f3;
}

.woo-category-list .wc-block-product-categories-list-item:nth-child(6n + 5) {
	background: #f0eaff;
}

.woo-category-list .wc-block-product-categories-list-item:nth-child(6n) {
	background: #edf5ff;
}

.woo-category-list .wc-block-product-categories-list-item > a {
	display: flex;
	height: 100%;
	flex-direction: column;
	align-items: center;
	color: #17152b;
	text-decoration: none;
}

.woo-category-list .wc-block-product-categories-list-item__image {
	display: grid;
	width: 100%;
	height: 125px;
	margin: 0 0 6px;
	place-items: center;
}

.woo-category-list .wc-block-product-categories-list-item__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.woo-category-list .wc-block-product-categories-list-item__name {
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.25;
}

.woo-category-list .wc-block-product-categories-list-item-count {
	color: #575467;
	font-size: 0.75rem;
}

.woo-category-list .wc-block-product-categories-list-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 22px rgba(48, 23, 83, 0.1);
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.woo-featured-products {
	margin-top: 55px;
	margin-bottom: 70px;
}

.woo-featured-products .wp-block-post-template {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.woo-featured-products .wp-block-post-template > li {
	overflow: hidden;
	padding: 12px;
	border: 1px solid #eeeaf3;
	border-radius: 10px;
	background: #fff;
}

.woo-featured-products .wp-block-woocommerce-product-image img {
	width: 100%;
	border-radius: 7px;
	object-fit: contain;
}

.woo-featured-products .wp-block-post-title a {
	color: #17152b;
	font-weight: 600;
	text-decoration: none;
}

.woo-featured-products .wp-block-woocommerce-product-price {
	color: #641cc7;
	font-weight: 700;
}

@media (max-width: 900px) {
	.woo-header-main__inner {
		grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.4fr) auto;
		gap: 16px;
		padding-right: 20px;
		padding-left: 20px;
	}

	.woo-home-hero__columns {
		min-height: 300px;
	}

	.woo-home-hero__title {
		font-size: clamp(2rem, 4.5vw, 2.7rem);
	}

	.woo-benefit {
		gap: 9px;
		padding-right: 10px;
		padding-left: 10px;
	}

	.woo-benefit__icon {
		flex-basis: 34px;
		width: 34px;
		height: 34px;
	}

	.woo-benefit__icon svg {
		width: 33px;
		height: 33px;
	}

	.woo-category-list .wc-block-product-categories-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 680px) {
	.woo-header-main__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 13px;
		padding: 14px 18px;
	}

	.woo-brand {
		padding-left: 54px;
	}

	.woo-brand::before {
		width: 42px;
		height: 42px;
		font-size: 22px;
	}

	.woo-brand::after {
		left: 10px;
		width: 20px;
		height: 15px;
	}

	.woo-header-search {
		grid-column: 1 / -1;
		grid-row: 2;
	}

	.woo-header-actions {
		gap: 9px;
	}

	.woo-navigation-wrap .wp-block-navigation {
		justify-content: flex-start;
		overflow-x: auto;
		padding-right: 12px;
		padding-left: 12px;
		white-space: nowrap;
	}

	.woo-navigation-wrap .wp-block-navigation__container {
		flex-wrap: nowrap;
	}

	.woo-home-hero__columns {
		flex-direction: column;
		gap: 0;
		padding: 28px 22px 18px;
	}

	.woo-home-hero__content,
	.woo-home-hero__visual {
		flex-basis: 100% !important;
		width: 100%;
	}

	.woo-home-hero__title {
		font-size: clamp(2.15rem, 9vw, 3rem);
	}

	.woo-home-hero__subtitle {
		font-size: 1.35rem;
	}

	.woo-home-hero__image img {
		max-height: 250px;
	}

	.woo-benefits__columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		row-gap: 12px;
		padding: 18px;
	}

	.woo-benefit {
		padding: 8px 10px;
		border-right: 0;
	}

	.woo-benefit:nth-child(odd) {
		border-right: 1px solid #e8e3ee;
	}

	.woo-benefit:first-child {
		padding-left: 10px;
	}

	.woo-home-section {
		margin-top: 30px;
		margin-bottom: 32px;
		padding-right: 18px;
		padding-left: 18px;
	}

	.woo-category-list .wc-block-product-categories-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.woo-category-list .wc-block-product-categories-list-item__image {
		height: 112px;
	}

	.woo-featured-products .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.woo-category-list .wc-block-product-categories-list-item {
		transition: none;
	}
}
