/* ==========================================================================
   House of Alan — Shop & Product Pages Widgets
   Same quiet, spacious, 12 STOREEZ-inspired design language as the
   homepage widgets. Wraps native WooCommerce functionality (gallery,
   variations, add-to-cart, related products) so everything stays dynamic
   and fully functional — only the visual layer is restyled.
   ========================================================================== */

:root {
	--hoa-ink: #171512;
	--hoa-paper: #f7f5f1;
	--hoa-line: #dedad2;
	--hoa-muted: #7a756c;
	--hoa-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

.hoa-section, .hoa-section * { box-sizing: border-box; }
.hoa-container { max-width: 1440px; margin: 0 auto; padding: 0 32px; }
.hoa-eyebrow {
	display: block;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--hoa-muted);
	margin-bottom: 14px;
	font-weight: 500;
}
.hoa-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 30px;
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid currentColor;
	border-radius: 0;
	background: transparent;
	color: inherit;
	transition: background-color .3s var(--hoa-ease), color .3s var(--hoa-ease);
	cursor: pointer;
}
.hoa-btn--solid { background: var(--hoa-ink); color: #fff; border-color: var(--hoa-ink); }
.hoa-btn--solid:hover { background: transparent; color: var(--hoa-ink); }

/* ---------------- Shop Banner ---------------- */
.hoa-shop-banner {
	padding: 72px 0 48px;
	text-align: center;
	background: var(--hoa-paper);
}
.hoa-shop-banner__title {
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 400;
	margin: 0 0 12px;
	letter-spacing: -0.01em;
}
.hoa-shop-banner__desc {
	max-width: 560px;
	margin: 0 auto;
	font-size: 14px;
	color: var(--hoa-muted);
	font-weight: 300;
	line-height: 1.7;
}
.hoa-shop-banner__count {
	margin-top: 14px;
	font-size: 12px;
	letter-spacing: .06em;
	color: var(--hoa-muted);
	text-transform: uppercase;
}

/* ---------------- Shop Grid ---------------- */
.hoa-shop-grid { padding: 40px 0 96px; background: #fff; }
.hoa-shop-grid__toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-bottom: 24px;
	margin-bottom: 32px;
	border-bottom: 1px solid var(--hoa-line);
}
.hoa-shop-grid__result-count { font-size: 12px; color: var(--hoa-muted); letter-spacing: .04em; }
.hoa-shop-grid__sort select {
	border: none;
	background: transparent;
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 4px 20px 4px 0;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23171512'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right center;
}
.hoa-shop-grid__list {
	display: grid;
	grid-template-columns: repeat(var(--hoa-scols, 4), 1fr);
	gap: 32px 12px;
	list-style: none;
	margin: 0 0 56px;
	padding: 0;
}
.hoa-product-card { display: block; text-decoration: none; color: inherit; }
.hoa-product-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 3 / 4;
	background: #f2f0ec;
	margin-bottom: 16px;
}
.hoa-product-card__media img {
	width: 100%; height: 100%; object-fit: cover; display: block;
	transition: opacity .45s var(--hoa-ease);
}
.hoa-product-card__media img.hoa-img--hover { position: absolute; inset: 0; opacity: 0; }
.hoa-product-card:hover .hoa-img--hover { opacity: 1; }
.hoa-product-card:hover .hoa-img--main { opacity: 0; }
.hoa-product-card__title { font-size: 13px; margin: 0 0 4px; font-weight: 400; }
.hoa-product-card__price { font-size: 13px; color: var(--hoa-muted); }
.hoa-product-card__price del { opacity: .55; margin-right: 6px; }
.hoa-product-card__price ins { text-decoration: none; }
.hoa-product-card__out { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--hoa-muted); margin-top: 4px; display: block; }

.hoa-shop-grid__pagination {
	display: flex;
	justify-content: center;
	gap: 18px;
	font-size: 13px;
}
.hoa-shop-grid__pagination a, .hoa-shop-grid__pagination span {
	color: var(--hoa-ink);
	text-decoration: none;
	padding-bottom: 2px;
}
.hoa-shop-grid__pagination .current { border-bottom: 1px solid var(--hoa-ink); }

@media (max-width: 1024px) { .hoa-shop-grid__list { --hoa-scols: 3; } }
@media (max-width: 599px) {
	.hoa-shop-grid__list { --hoa-scols: 2; gap: 20px 10px; }
	.hoa-shop-grid__toolbar { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ---------------- Product Gallery (PDP) ---------------- */
.hoa-product-gallery { width: 100%; }
.hoa-product-gallery .woocommerce-product-gallery { margin: 0; }
.hoa-product-gallery .woocommerce-product-gallery__wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hoa-product-gallery .woocommerce-product-gallery__image { margin: 0; overflow: hidden; }
.hoa-product-gallery .woocommerce-product-gallery__image img { width: 100%; height: auto; display: block; object-fit: cover; }
.hoa-product-gallery .flex-control-thumbs { display: none; } /* hide default thumb strip for a cleaner editorial gallery */
.hoa-product-gallery .onsale { display: none; } /* remove sale ribbon per brief */

@media (max-width: 767px) {
	.hoa-product-gallery .woocommerce-product-gallery__wrapper { grid-template-columns: 1fr; }
}

/* ---------------- Product Summary (PDP) ---------------- */
.hoa-product-summary { max-width: 480px; }
.hoa-product-summary .product_title,
.hoa-product-summary h1 {
	font-size: clamp(22px, 2.6vw, 30px);
	font-weight: 400;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}
.hoa-product-summary .price {
	font-size: 16px;
	color: var(--hoa-ink);
	display: block;
	margin-bottom: 22px;
}
.hoa-product-summary .price del { color: var(--hoa-muted); opacity: .6; margin-right: 8px; }
.hoa-product-summary .price ins { text-decoration: none; }
.hoa-product-summary .woocommerce-product-details__short-description {
	font-size: 14px;
	line-height: 1.7;
	color: var(--hoa-muted);
	font-weight: 300;
	margin-bottom: 28px;
}
.hoa-product-summary .woocommerce-product-details__short-description p:first-child { margin-top: 0; }

/* Restyle native WooCommerce variation form to be quiet + minimal */
.hoa-product-summary form.cart { margin-bottom: 24px; }
.hoa-product-summary table.variations { width: 100%; border: none; margin-bottom: 20px; }
.hoa-product-summary table.variations tr { display: block; margin-bottom: 16px; }
.hoa-product-summary table.variations th {
	text-align: left; padding: 0 0 8px; font-size: 11px; letter-spacing: .1em;
	text-transform: uppercase; color: var(--hoa-muted); font-weight: 500; display: block;
}
.hoa-product-summary table.variations td { padding: 0; display: block; }
.hoa-product-summary table.variations select {
	width: 100%; border: 1px solid var(--hoa-line); background: transparent;
	padding: 12px 14px; font-size: 13px; border-radius: 0; appearance: none;
	-webkit-appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23171512'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.hoa-product-summary .reset_variations { font-size: 11px; text-decoration: underline; color: var(--hoa-muted); margin-left: 4px; }
.hoa-product-summary .quantity { display: inline-block; margin-right: 14px; }
.hoa-product-summary .quantity input {
	width: 64px; padding: 14px 10px; border: 1px solid var(--hoa-line);
	background: transparent; font-size: 13px; text-align: center; border-radius: 0;
}
.hoa-product-summary button.single_add_to_cart_button {
	background: var(--hoa-ink); color: #fff; border: 1px solid var(--hoa-ink);
	padding: 15px 40px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
	border-radius: 0; cursor: pointer; transition: background-color .3s var(--hoa-ease), color .3s var(--hoa-ease);
}
.hoa-product-summary button.single_add_to_cart_button:hover { background: transparent; color: var(--hoa-ink); }
.hoa-product-summary .woocommerce-variation-price .price { margin-bottom: 8px; }
.hoa-product-summary .woocommerce-variation-availability { font-size: 12px; color: var(--hoa-muted); margin-bottom: 12px; }
.hoa-product-summary p.stock { font-size: 12px; letter-spacing: .04em; color: var(--hoa-muted); text-transform: uppercase; margin: 0 0 16px; }
.hoa-product-summary p.stock.out-of-stock { color: #a33; }
.hoa-product-summary .hoa-sku { font-size: 12px; color: var(--hoa-muted); margin-top: 18px; }

/* Color swatches, if attribute name is "color"/"colour" — rendered as circles via JS/CSS enhancement */
.hoa-product-summary table.variations tr.hoa-attr-color td select { display: none; }
.hoa-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.hoa-swatch {
	width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--hoa-line);
	cursor: pointer; position: relative; background-size: cover; background-position: center;
}
.hoa-swatch.is-active { outline: 1px solid var(--hoa-ink); outline-offset: 2px; }

/* ---------------- Product Details Accordion (PDP) ---------------- */
.hoa-product-details { border-top: 1px solid var(--hoa-line); margin-top: 8px; }
.hoa-accordion-item { border-bottom: 1px solid var(--hoa-line); }
.hoa-accordion-item__trigger {
	width: 100%; display: flex; align-items: center; justify-content: space-between;
	background: none; border: none; padding: 18px 0; font-size: 13px; letter-spacing: .04em;
	text-transform: uppercase; cursor: pointer; color: var(--hoa-ink); text-align: left;
	font-family: inherit;
}
.hoa-accordion-item__icon { font-size: 16px; font-weight: 300; transition: transform .3s var(--hoa-ease); }
.hoa-accordion-item.is-open .hoa-accordion-item__icon { transform: rotate(45deg); }
.hoa-accordion-item__panel {
	max-height: 0; overflow: hidden; transition: max-height .35s var(--hoa-ease);
	font-size: 14px; line-height: 1.8; color: var(--hoa-muted); font-weight: 300;
}
.hoa-accordion-item.is-open .hoa-accordion-item__panel { max-height: 800px; }
.hoa-accordion-item__panel-inner { padding: 0 0 22px; }
.hoa-spec-list { list-style: none; margin: 0; padding: 0; }
.hoa-spec-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dotted var(--hoa-line); }
.hoa-spec-list li span:first-child { color: var(--hoa-ink); }

/* ---------------- Product Overview (PDP) — combined gallery slider + info ----------------
   One widget: featured image loads first, arrows/dots step through the rest of the
   WooCommerce gallery, and title/price/description/add-to-cart sit alongside it. */
.hoa-po {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
}
.hoa-po--img-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.hoa-po--img-right .hoa-po-gallery { order: 2; }
.hoa-po--img-right .hoa-po-info { order: 1; }

/* -- Gallery / slider -- */
.hoa-po-gallery { position: relative; }
.hoa-po-viewport {
	position: relative;
	overflow: hidden;
	background: #f2f0ec;
	border-radius: 2px;
}
.hoa-po-ratio-3-4 { aspect-ratio: 3 / 4; }
.hoa-po-ratio-4-5 { aspect-ratio: 4 / 5; }
.hoa-po-ratio-1-1 { aspect-ratio: 1 / 1; }
.hoa-po-ratio-4-3 { aspect-ratio: 4 / 3; }
.hoa-po-track {
	display: flex;
	height: 100%;
	width: 100%;
	transition: transform .5s var(--hoa-ease);
	will-change: transform;
}
.hoa-po-slide {
	flex: 0 0 100%;
	max-width: 100%;
	height: 100%;
}
.hoa-po-slide-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}
.hoa-po-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.88);
	color: var(--hoa-ink);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	backdrop-filter: blur(4px);
	box-shadow: 0 2px 10px rgba(23, 21, 18, 0.12);
	opacity: 0;
	transition: opacity .25s var(--hoa-ease), background-color .25s var(--hoa-ease), transform .25s var(--hoa-ease);
	z-index: 2;
}
.hoa-po-gallery:hover .hoa-po-arrow,
.hoa-po-gallery:focus-within .hoa-po-arrow { opacity: 1; }
.hoa-po-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.hoa-po-arrow--prev { left: 16px; }
.hoa-po-arrow--next { right: 16px; }
.hoa-po-arrow[disabled] { opacity: 0 !important; pointer-events: none; }

.hoa-po-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}
.hoa-po-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: var(--hoa-line);
	cursor: pointer;
	transition: background-color .25s var(--hoa-ease), transform .25s var(--hoa-ease);
}
.hoa-po-dot.is-active { background: var(--hoa-ink); transform: scale(1.35); }

.hoa-po-counter {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 2;
	font-size: 11px;
	letter-spacing: .06em;
	padding: 5px 11px;
	background: rgba(255, 255, 255, 0.88);
	color: var(--hoa-ink);
	border-radius: 20px;
	backdrop-filter: blur(4px);
}
.hoa-po-counter-sep { margin: 0 3px; opacity: .5; }

/* -- Info panel (reuses the same product-summary look) -- */
.hoa-po-info { max-width: 480px; }
.hoa-po--sticky .hoa-po-info { position: sticky; top: 32px; }
.hoa-po-title {
	font-size: clamp(22px, 2.6vw, 30px);
	font-weight: 400;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
}
.hoa-po-rating { margin-bottom: 12px; }
.hoa-po-rating .star-rating { font-size: 13px; color: var(--hoa-ink); }
.hoa-po-price {
	font-size: 16px;
	color: var(--hoa-ink);
	display: block;
	margin-bottom: 22px;
}
.hoa-po-price del { color: var(--hoa-muted); opacity: .6; margin-right: 8px; }
.hoa-po-price ins { text-decoration: none; }
.hoa-po-info .woocommerce-product-details__short-description {
	font-size: 14px;
	line-height: 1.7;
	color: var(--hoa-muted);
	font-weight: 300;
	margin-bottom: 28px;
}
.hoa-po-info .woocommerce-product-details__short-description p:first-child { margin-top: 0; }
.hoa-po-info form.cart { margin-bottom: 24px; }
.hoa-po-info table.variations { width: 100%; border: none; margin-bottom: 20px; }
.hoa-po-info table.variations tr { display: block; margin-bottom: 16px; }
.hoa-po-info table.variations th {
	text-align: left; padding: 0 0 8px; font-size: 11px; letter-spacing: .1em;
	text-transform: uppercase; color: var(--hoa-muted); font-weight: 500; display: block;
}
.hoa-po-info table.variations td { padding: 0; display: block; }
.hoa-po-info table.variations select {
	width: 100%; border: 1px solid var(--hoa-line); background: transparent;
	padding: 12px 14px; font-size: 13px; border-radius: 0; appearance: none;
	-webkit-appearance: none; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23171512'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.hoa-po-info .reset_variations { font-size: 11px; text-decoration: underline; color: var(--hoa-muted); margin-left: 4px; }
.hoa-po-info .quantity { display: inline-block; margin-right: 14px; }
.hoa-po-info .quantity input {
	width: 64px; padding: 14px 10px; border: 1px solid var(--hoa-line);
	background: transparent; font-size: 13px; text-align: center; border-radius: 0;
}
.hoa-po-info button.single_add_to_cart_button {
	background: var(--hoa-ink); color: #fff; border: 1px solid var(--hoa-ink);
	padding: 15px 40px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
	border-radius: 0; cursor: pointer; transition: background-color .3s var(--hoa-ease), color .3s var(--hoa-ease);
}
.hoa-po-info button.single_add_to_cart_button:hover { background: transparent; color: var(--hoa-ink); }
.hoa-po-info .woocommerce-variation-price .price { margin-bottom: 8px; }
.hoa-po-info .woocommerce-variation-availability { font-size: 12px; color: var(--hoa-muted); margin-bottom: 12px; }
.hoa-po-info p.stock { font-size: 12px; letter-spacing: .04em; color: var(--hoa-muted); text-transform: uppercase; margin: 0 0 16px; }
.hoa-po-info p.stock.out-of-stock { color: #a33; }
.hoa-po-info .hoa-sku { font-size: 12px; color: var(--hoa-muted); margin-top: 18px; }
.hoa-po-info table.variations tr.hoa-attr-color td select { display: none; }

@media (max-width: 900px) {
	.hoa-po, .hoa-po--img-right { grid-template-columns: 1fr; gap: 28px; }
	.hoa-po--img-right .hoa-po-gallery, .hoa-po--img-right .hoa-po-info { order: initial; }
	.hoa-po--sticky .hoa-po-info { position: static; }
	.hoa-po-info { max-width: 100%; }
	.hoa-po-arrow { opacity: 1; width: 34px; height: 34px; }
}

/* ---------------- Related Products (PDP) ---------------- */
.hoa-related { padding: 80px 0; background: var(--hoa-paper); }
.hoa-related__heading { font-size: clamp(22px, 3vw, 30px); font-weight: 400; margin: 0 0 32px; }
.hoa-related__list {
	display: grid; grid-template-columns: repeat(var(--hoa-rcols, 4), 1fr);
	gap: 32px 12px; list-style: none; margin: 0; padding: 0;
}
@media (max-width: 1024px) { .hoa-related__list { --hoa-rcols: 3; } }
@media (max-width: 599px) { .hoa-related__list { --hoa-rcols: 2; gap: 20px 10px; } }
