/**
 * 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;
}

.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: 2em;
	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: 2em;
	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;
	}
	
	.shopify-product-grid {
		gap: 1em;
	}
}

@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;
}

