/**
 * Shopify Products Blocks Styles
 */

/* Product Card Styles */
.shopify-product-card {
	display: block;
	margin-bottom: 1.5em;
	max-width: 20rem !important;
	width: 100%;
	box-sizing: border-box;
}

.shopify-product-card__link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.shopify-product-card__image {
	position: relative;
	overflow: hidden;
	margin-bottom: 1em;
	width: 100%;
}

/* Adapt to image - no fixed aspect ratio */
.shopify-product-card__image--adapt {
	position: relative;
}

.shopify-product-card__image--adapt img {
	position: relative;
	width: 100%;
	height: auto;
	display: block;
}

/* Fixed aspect ratios */
.shopify-product-card__image--square {
	position: relative;
	padding-bottom: 100%;
}

.shopify-product-card__image--portrait {
	position: relative;
	padding-bottom: 125%;
}

.shopify-product-card__image--landscape {
	position: relative;
	padding-bottom: 75%;
}

/* Image styles for fixed aspect ratios */
.shopify-product-card__image--square img,
.shopify-product-card__image--portrait img,
.shopify-product-card__image--landscape img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Image shape styles */
.shopify-product-card__image--rounded {
	border-radius: 8px;
}

.shopify-product-card__image--rounded img {
	border-radius: 8px;
}

.shopify-product-card__image--circle {
	border-radius: 50%;
	overflow: hidden;
}

.shopify-product-card__image--circle img {
	border-radius: 50%;
}

/* Hover image effect */
.shopify-product-card__image--has-hover {
	position: relative;
}

.shopify-product-card__image-secondary {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.3s ease;
	object-fit: cover;
}

.shopify-product-card__image--has-hover:hover .shopify-product-card__image-primary {
	opacity: 0;
}

.shopify-product-card__image--has-hover:hover .shopify-product-card__image-secondary {
	opacity: 1;
}

.shopify-product-card__content {
	padding: 0.5em 0;
}

/* Alignment classes - increased specificity */
.shopify-product-card--align-left .shopify-product-card__link .shopify-product-card__content,
.shopify-product-card--align-left .shopify-product-card__content {
	text-align: left !important;
}

.shopify-product-card--align-center .shopify-product-card__link .shopify-product-card__content,
.shopify-product-card--align-center .shopify-product-card__content {
	text-align: center !important;
}

.shopify-product-card--align-right .shopify-product-card__link .shopify-product-card__content,
.shopify-product-card--align-right .shopify-product-card__content {
	text-align: right !important;
}

.shopify-product-card__title {
	margin: 0 0 0.5em 0;
	font-size: 1.29em;
	font-weight: 400;
	color: #333;
	line-height: 1.3;
}

.shopify-product-card__price {
	font-size: 1.05em;
	font-weight: 400;
	color: #000;
	margin-top: 0.5em;
}

.shopify-product-card__vendor {
	font-size: 0.875em;
	color: #666;
	margin-bottom: 0.25em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.shopify-product-card__rating {
	margin: 0.5em 0;
	font-size: 0.9em;
	color: #666;
}

.shopify-product-card__quick-add {
	position: absolute;
	bottom: 1em;
	left: 50%;
	transform: translateX(-50%);
	background-color: #000;
	color: #fff;
	border: none;
	padding: 0.75em 1.5em;
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.3s ease;
	z-index: 10;
}

.shopify-product-card__image:hover .shopify-product-card__quick-add {
	opacity: 1;
}

.shopify-product-card__quick-add:hover {
	background-color: #333;
}

/* Card Style Variations */
.shopify-product-card--default {
	border: none;
	border-radius: 0;
	padding: 0;
}

/* Default card — tagline */
.shopify-product-card--default .shopify-product-card__tagline {
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #888;
	font-weight: 500;
	margin-bottom: 0.25em;
}

/* Default card — description */
.shopify-product-card--default .shopify-product-card__description {
	font-size: 0.875em;
	color: #666;
	line-height: 1.5;
	margin: 0 0 0.25em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Default card — CTA button */
.shopify-product-card--default .wp-element-button {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 0.5em;
	box-sizing: border-box;
}

.shopify-product-card--minimal .shopify-product-card__image {
	border-radius: 0;
}

.shopify-product-card--rounded .shopify-product-card__image {
	border-radius: 8px;
}

.shopify-product-card--bordered {
	border: 2px solid #000;
}

/* Collection Card Styles */
.shopify-collection-card {
	display: block;
	margin-bottom: 1.5em;
}

.shopify-collection-card__link {
	text-decoration: none;
	color: inherit;
	display: block;
}

.shopify-collection-card__image {
	position: relative;
	overflow: hidden;
	margin-bottom: 1em;
}

.shopify-collection-card__image--square {
	padding-bottom: 100%;
}

.shopify-collection-card__image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shopify-collection-card__content {
	padding: 0.5em 0;
}

/* Collection Card Alignment - increased specificity */
.shopify-collection-card--align-left .shopify-collection-card__link .shopify-collection-card__content,
.shopify-collection-card--align-left .shopify-collection-card__content {
	text-align: left !important;
}

.shopify-collection-card--align-center .shopify-collection-card__link .shopify-collection-card__content,
.shopify-collection-card--align-center .shopify-collection-card__content {
	text-align: center !important;
}

.shopify-collection-card--align-right .shopify-collection-card__link .shopify-collection-card__content,
.shopify-collection-card--align-right .shopify-collection-card__content {
	text-align: right !important;
}

.shopify-collection-card__title {
	margin: 0 0 0.5em 0;
	font-size: 1.29em;
	font-weight: 400;
	color: #333;
	line-height: 1.3;
}

/* Collection Card Style Variations */
.shopify-collection-card--default {
	border: none;
	border-radius: 0;
	padding: 0;
}

.shopify-collection-card--minimal .shopify-collection-card__image {
	border-radius: 0;
}

.shopify-collection-card--rounded .shopify-collection-card__image {
	border-radius: 8px;
}

.shopify-collection-card--bordered {
	border: 2px solid #000;
	padding: 1em;
}

/* Collection Card Image Aspect Ratios */
.shopify-collection-card__image--portrait {
	padding-bottom: 125%;
}

.shopify-collection-card__image--landscape {
	padding-bottom: 75%;
}

.shopify-collection-card__description {
	font-size: 0.9em;
	color: #666;
	line-height: 1.5;
	text-align: inherit;
}

/* Product Grid */
.shopify-product-grid {
	display: grid;
	gap: 1.25em;
	margin-bottom: 2em;
	width: 100%;
}

/* Dynamic column classes */
.shopify-product-grid--columns-1 {
	grid-template-columns: repeat(1, minmax(0, 20rem));
}

.shopify-product-grid--columns-2 {
	grid-template-columns: repeat(2, minmax(0, 20rem));
}

.shopify-product-grid--columns-3 {
	grid-template-columns: repeat(3, minmax(0, 20rem));
}

.shopify-product-grid--columns-4 {
	grid-template-columns: repeat(4, minmax(0, 20rem));
}

.shopify-product-grid--columns-5 {
	grid-template-columns: repeat(5, minmax(0, 20rem));
}

.shopify-product-grid--columns-6 {
	grid-template-columns: repeat(6, minmax(0, 20rem));
}

/* Section Label Block */
.shopify-section-label {
	margin-bottom: 0.5em;
}

/* Outer group wrapper (full bleed with background) */
.wp-block-group.shopify-product-grid-outer-group,
.shopify-product-grid-outer-group {
	background-color: #ededed !important;
	padding: 2em 0;
}

/* Ensure full bleed for outer group */
.wp-block-group.alignfull.shopify-product-grid-outer-group {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* Inner group wrapper (constrained content) */
.wp-block-group.shopify-product-grid-inner-group,
.shopify-product-grid-inner-group {
	max-width: 100%;
	margin: 0 auto;
	padding: 0 1em;
}

/* Legacy support (deprecated) */
.shopify-product-grid-header-group {
	margin-bottom: 1.5em;
}

.shopify-section-label__content {
	font-size: 0.875em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #666;
}

/* Section Label Alignment */
.shopify-section-label--align-left .shopify-section-label__content {
	text-align: left;
}

.shopify-section-label--align-center .shopify-section-label__content {
	text-align: center;
}

.shopify-section-label--align-right .shopify-section-label__content {
	text-align: right;
}

/* Section Heading Block */
.shopify-section-heading {
	margin: 0 0 0.5em 0;
}

.shopify-section-heading__content {
	margin: 0;
	font-weight: 600;
}

.shopify-section-heading--small .shopify-section-heading__content {
	font-size: 1.5em;
}

.shopify-section-heading--medium .shopify-section-heading__content {
	font-size: 2em;
}

.shopify-section-heading--large .shopify-section-heading__content {
	font-size: 2.5em;
}

/* Section Heading Alignment */
.shopify-section-heading--align-left .shopify-section-heading__content {
	text-align: left;
}

.shopify-section-heading--align-center .shopify-section-heading__content {
	text-align: center;
}

.shopify-section-heading--align-right .shopify-section-heading__content {
	text-align: right;
}

/* Legacy support for product grid header (deprecated - use separate blocks) */
.shopify-product-grid__header {
	grid-column: 1 / -1;
	margin-bottom: 1.5em;
}

.shopify-product-grid__label {
	font-size: 0.875em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.5em;
	color: #666;
}

.shopify-product-grid__heading {
	margin: 0 0 0.5em 0;
	font-weight: 600;
}

.shopify-product-grid__heading--small {
	font-size: 1.5em;
}

.shopify-product-grid__heading--medium {
	font-size: 2em;
}

.shopify-product-grid__heading--large {
	font-size: 2.5em;
}

.shopify-product-grid__description {
	margin: 0.5em 0;
}

.shopify-product-grid__description--subtitle {
	font-size: 1.1em;
	font-weight: 400;
	color: #666;
}

.shopify-product-grid__description--regular {
	font-size: 1em;
}

.shopify-product-grid__description--body {
	font-size: 0.95em;
	line-height: 1.6;
}

.shopify-product-grid__items {
	display: contents;
}

.shopify-product-grid__item {
	min-width: 0;
	display: grid;
	justify-items: start;
}

.shopify-product-grid__item .shopify-product-card {
	height: 100%;
	display: flex;
	flex-direction: column;
	max-width: 20rem;
	width: 100%;
}

.shopify-product-grid__footer {
	grid-column: 1 / -1;
	margin-top: 1em;
	text-align: center;
}

/* WordPress button wrapper alignment */
.shopify-product-grid__footer .wp-block-button {
	text-align: center;
}

/* Ensure WordPress button styles are applied */
.shopify-product-grid__view-all-wrapper .wp-block-button__link {
	text-decoration: none;
}

/* Override WordPress button styles to match theme if needed */
.shopify-product-grid__view-all-wrapper .wp-block-button__link.is-style-outline {
	border: 2px solid currentColor;
	background-color: transparent;
}

.shopify-product-grid__view-all-wrapper .wp-block-button__link.is-style-link {
	border: none;
	background: transparent;
	text-decoration: underline;
	padding: 0.5em 1em;
}

.shopify-product-grid__view-all-wrapper .wp-block-button__link.is-style-link:hover {
	text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.shopify-product-grid--mobile-1 {
		grid-template-columns: repeat(1, 1fr) !important;
	}

	.shopify-product-grid--mobile-2 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 480px) {
	.shopify-product-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Alignment - override default center alignment when set */
.shopify-product-card[data-alignment="left"] .shopify-product-card__content,
.shopify-collection-card[data-alignment="left"] .shopify-collection-card__content {
	text-align: left;
}

.shopify-product-card[data-alignment="center"] .shopify-product-card__content,
.shopify-collection-card[data-alignment="center"] .shopify-collection-card__content {
	text-align: center;
}

.shopify-product-card[data-alignment="right"] .shopify-product-card__content,
.shopify-collection-card[data-alignment="right"] .shopify-collection-card__content {
	text-align: right;
}

/* ==========================================================================
   Elevated Card
   ========================================================================== */

/* Elevated cards match default card width */
.shopify-product-card--elevated {
	max-width: 20rem;
}

/* In grids, elevated cards fill their column */
.shopify-product-grid--elevated .shopify-product-card--elevated {
	max-width: none;
}

.shopify-product-card--elevated {
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.shopify-product-card--elevated:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

/* Image area */
.shopify-product-card__image-area {
	position: relative;
	background: #FAF6F1;
	padding: 1.25em;
	overflow: hidden;
}

.shopify-product-card__image-area img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
	transition: transform 0.4s ease;
}

.shopify-product-card--elevated:hover .shopify-product-card__image-area img {
	transform: scale(1.05);
}

/* Content area */
.shopify-product-card--elevated .shopify-product-card__content {
	padding: 1.25em;
	display: flex;
	flex-direction: column;
	gap: 0.35em;
	flex: 1;
}

/* Tagline */
.shopify-product-card__tagline {
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: #888;
	font-weight: 500;
}

/* Title (elevated) */
.shopify-product-card--elevated .shopify-product-card__title {
	margin: 0;
	font-size: 1.15em;
	font-weight: 600;
	font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
	line-height: 1.3;
}

.shopify-product-card--elevated .shopify-product-card__title a {
	color: #1a1a1a;
	text-decoration: none;
}

.shopify-product-card--elevated .shopify-product-card__title a:hover {
	color: #D4A853;
}

/* Description (elevated) */
.shopify-product-card--elevated .shopify-product-card__description {
	font-size: 0.875em;
	color: #666;
	line-height: 1.5;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Price (elevated) */
.shopify-product-card--elevated .shopify-product-card__price {
	font-size: 1em;
	font-weight: 400;
	color: #1a1a1a;
	margin-top: 0.25em;
	white-space: nowrap;
}

/* Elevated card — CTA uses theme button */
.shopify-product-card--elevated .wp-element-button {
	display: block;
	width: 100%;
	text-align: center;
	margin-top: 0.75em;
	box-sizing: border-box;
}

/* Grid elevated overrides */
.shopify-product-grid--elevated .shopify-product-grid__item .shopify-product-card--elevated {
	max-width: none;
}

.shopify-product-grid--elevated .shopify-product-grid__item {
	justify-items: stretch;
}

/* ==========================================================================
   Inline Card
   ========================================================================== */

.shopify-product-card--inline {
	background: var(--sp-inline-card-bg, #FAF6F1);
	border-left: 4px solid var(--sp-inline-card-accent, #D4A853);
	border-radius: 12px;
	overflow: hidden;
	max-width: 100%;
	margin: 1.5em 0;
}

/* Context bar */
.shopify-product-card__inline-context {
	padding: 0.6em 1.25em;
	font-size: 0.7em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #888;
	font-weight: 600;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	display: flex;
	align-items: center;
	gap: 0.5em;
}

.shopify-product-card__inline-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #2D8F4E;
	display: inline-block;
	flex-shrink: 0;
}

/* Body (horizontal layout) */
.shopify-product-card__inline-body {
	display: flex;
	gap: 1.5em;
	padding: 1.25em;
	align-items: center;
}

/* Image column */
.shopify-product-card__inline-image {
	flex: 0 0 200px;
	width: 200px;
}

.shopify-product-card__inline-image img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 8px;
}

.shopify-product-card__inline-image a {
	display: block;
}

/* Content column */
.shopify-product-card__inline-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	min-width: 0;
}

.shopify-product-card--inline .shopify-product-card__title {
	margin: 0;
	font-size: 1.2em;
	font-weight: 600;
	line-height: 1.3;
}

.shopify-product-card--inline .shopify-product-card__title a {
	color: #1a1a1a;
	text-decoration: none;
}

.shopify-product-card--inline .shopify-product-card__title a:hover {
	color: #D4A853;
}

.shopify-product-card--inline .shopify-product-card__description {
	font-size: 0.875em;
	color: #666;
	line-height: 1.5;
	margin: 0;
}

.shopify-product-card--inline .shopify-product-card__price {
	font-size: 1em;
	font-weight: 400;
	color: #1a1a1a;
	margin: 0;
}

/* Variant pills */
.shopify-product-card__variant-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.25em;
	margin-bottom: 0.75em;
}

.shopify-product-card__variant-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em;
}

.shopify-product-card__variant-label {
	font-size: 0.75em;
	color: #888;
	font-weight: 500;
}

.shopify-product-card__variant-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.2em 0.6em;
	border: 1px solid #D4A853;
	border-radius: 999px;
	font-size: 0.7em;
	color: #D4A853;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

a.shopify-product-card__variant-pill:hover {
	background: #D4A853;
	color: #fff;
}

/* Inline actions */
.shopify-product-card__inline-actions {
	margin-top: 0.5em;
}

/* Inline responsive */
@media (max-width: 600px) {
	.shopify-product-card__inline-body {
		flex-direction: column;
	}

	.shopify-product-card__inline-image {
		flex: none;
		width: 100%;
	}
}

/* ==========================================================================
   Slim Card — compact horizontal layout for sidebars & rails
   ========================================================================== */

.shopify-product-card--slim {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
}

/* Context bar */
.shopify-product-card__slim-context {
	padding: 0.5em 1em;
	font-size: 0.65em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #888;
	font-weight: 600;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	display: flex;
	align-items: center;
	gap: 0.5em;
}

/* Body — horizontal link */
.shopify-product-card__slim-body {
	display: flex;
	gap: 1em;
	padding: 0.85em 1em;
	align-items: center;
	text-decoration: none;
	color: inherit;
	transition: background 0.2s ease;
}

.shopify-product-card__slim-body:hover {
	background: #faf6f1;
}

/* Thumbnail */
.shopify-product-card__slim-image {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 8px;
	overflow: hidden;
	background: #FAF6F1;
}

.shopify-product-card__slim-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Content */
.shopify-product-card__slim-content {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15em;
}

.shopify-product-card--slim .shopify-product-card__title {
	margin: 0;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: #1a1a1a;
}

.shopify-product-card--slim .shopify-product-card__price {
	font-size: 0.85em;
	font-weight: 400;
	color: #666;
	margin: 0;
}

/* CTA as text link */
.shopify-product-card__slim-cta {
	font-size: 0.8em;
	font-weight: 600;
	color: var(--sp-inline-card-accent, #D4A853);
	margin-top: 0.1em;
}