/*
 * Tabeer Commerce frontend.
 * Every themeable value is a --tc-* variable. Each falls back to the HolguinMedia theme
 * variable (--hm-*) and then to a neutral default, so the catalogue adopts a HolguinMedia
 * site automatically and still looks clean anywhere else. Override --tc-* to restyle.
 * Breakpoints: 640px, 1025px, 1351px. Mobile first.
 */
.tc-main,
.wp-block[class*="wp-block-tabeer-"],
[class*="wp-block-tabeer-"] {
	--tc-color-heading: var(--hm-primary, #14171f);
	--tc-color-text: var(--hm-foreground, #3c4049);
	--tc-color-muted: var(--hm-tertiary, #5b606b);
	--tc-color-bg: var(--hm-background, #fff);
	--tc-color-tint: #f3f4f7;
	--tc-color-line: #dcdfe6;
	--tc-color-action: var(--hm-btn-primary-bg, var(--hm-primary, #14171f));
	--tc-color-action-text: var(--hm-btn-primary-text, #fff);
	--tc-color-action-hover: var(--hm-btn-primary-hover-bg, var(--hm-secondary, #000));
	--tc-color-whatsapp: var(--tc-color-action);
	--tc-color-whatsapp-text: var(--tc-color-action-text);
	--tc-color-whatsapp-hover: var(--tc-color-action-hover);
	--tc-color-focus: var(--hm-primary, #1a5fd0);
	--tc-font: var(--hm-font-family, inherit);
	--tc-font-heading: var(--hm-heading-font, var(--tc-font));
	--tc-radius: var(--hm-btn-primary-radius-tl, 4px);
	--tc-gap: var(--hm-gap-small, 20px);
	--tc-gap-medium: var(--hm-gap-medium, 35px);
	--tc-gap-large: var(--hm-gap-large, 50px);
	--tc-section: var(--hm-section-padding, 70px);
	--tc-container: var(--hm-container-desktop, 1290px);
	--tc-transition: 160ms ease;
}

.tc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Layout */
.tc-container { width: 100%; max-width: var(--hm-container-phone, 610px); margin-left: auto; margin-right: auto; padding-left: var(--tc-gap); padding-right: var(--tc-gap); box-sizing: border-box; }
.tc-page { padding-top: var(--tc-gap-medium); padding-bottom: var(--tc-section); color: var(--tc-color-text); font-family: var(--tc-font); }
.tc-page > * + * { margin-top: var(--tc-gap-medium); }
.tc-page *, .tc-page *::before, .tc-page *::after { box-sizing: border-box; }
[class*="wp-block-tabeer-"], [class*="wp-block-tabeer-"] *, [class*="wp-block-tabeer-"] *::before, [class*="wp-block-tabeer-"] *::after { box-sizing: border-box; }
[class*="wp-block-tabeer-"] a:focus-visible, [class*="wp-block-tabeer-"] button:focus-visible { outline: 3px solid var(--tc-color-focus); outline-offset: 3px; }
.tc-section { margin-top: var(--tc-section); }
.tc-section__head { max-width: 640px; margin-bottom: var(--tc-gap-medium); }
.tc-section__head--row { max-width: none; display: grid; gap: var(--tc-gap); align-items: end; }
.tc-heading, .tc-subheading, .tc-title, .tc-summary__title { font-family: var(--tc-font-heading); color: var(--tc-color-heading); line-height: 1.05; margin: 0 0 0.4em; }
.tc-title { font-size: var(--hm-h1-size-mobile, 2.2rem); }
.tc-heading { font-size: var(--hm-h2-size-mobile, 1.75rem); }
.tc-subheading { font-size: var(--hm-h3-size-mobile, 1.35rem); }
.tc-intro, .tc-lead { color: var(--tc-color-muted); margin: 0; }
.tc-lead { max-width: 720px; font-size: 1.1rem; }
.tc-lead p { margin: 0 0 0.6em; }
.tc-empty { color: var(--tc-color-muted); padding: var(--tc-gap) 0; }
.tc-textlink { color: var(--tc-color-heading); font-weight: 700; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 2px; justify-self: start; }
.tc-page a:focus-visible, .tc-page button:focus-visible, .tc-page select:focus-visible, .tc-page summary:focus-visible { outline: 3px solid var(--tc-color-focus); outline-offset: 3px; }

/* Breadcrumb */
.tc-breadcrumb { font-size: 0.8125rem; color: var(--tc-color-muted); }
.tc-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tc-breadcrumb li + li::before { content: "/"; margin-right: 6px; }
.tc-breadcrumb a { color: inherit; }

/* Buttons */
.tc-button, .tc-whatsapp { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--tc-font); font-weight: 700; line-height: 1; text-decoration: none; border: 2px solid transparent; border-radius: var(--tc-radius); cursor: pointer; transition: background var(--tc-transition), border-color var(--tc-transition), color var(--tc-transition); }
.tc-button { background: var(--tc-color-action); color: var(--tc-color-action-text); padding: 15px 26px; font-size: 1rem; }
.tc-button:hover { background: var(--tc-color-action-hover); }
.tc-button--small { padding: 12px 18px; font-size: 0.875rem; }
.tc-whatsapp--primary { background: var(--tc-color-whatsapp); color: var(--tc-color-whatsapp-text); border-color: var(--tc-color-whatsapp); padding: 15px 26px; font-size: 1rem; }
.tc-whatsapp--primary:hover { background: var(--tc-color-whatsapp-hover); border-color: var(--tc-color-whatsapp-hover); color: var(--tc-color-whatsapp-text); }
.tc-whatsapp--card { flex-direction: row-reverse; margin: 0 18px 18px; padding: 11px 14px; font-size: 0.875rem; background: var(--tc-color-action); color: var(--tc-color-action-text); }
.tc-whatsapp--card:hover { background: var(--tc-color-action-hover); color: var(--tc-color-action-text); }
.tc-icon { flex: none; }

/* Product grid and card */
.tc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tc-grid > li { display: flex; min-width: 0; }
.tc-card { display: flex; flex-direction: column; width: 100%; background: var(--tc-color-bg); border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); overflow: hidden; transition: border-color var(--tc-transition); }
.tc-card:hover { border-color: var(--tc-color-heading); }
.tc-card__media { display: block; aspect-ratio: 1 / 1; background: var(--tc-color-tint); border-bottom: 1px solid var(--tc-color-line); }
.tc-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-card__body { display: grid; gap: 5px; align-content: start; flex: 1; padding: 18px; }
.tc-card__brand, .tc-card__fits { font-size: 0.8125rem; color: var(--tc-color-muted); }
.tc-card__title { font-family: var(--tc-font-heading); font-size: 1.125rem; line-height: 1.15; margin: 0; }
.tc-card__title a { color: var(--tc-color-heading); text-decoration: none; }
.tc-card__title a:hover { text-decoration: underline; }
.tc-card__price { font-family: var(--tc-font-heading); font-weight: 700; font-size: 1.0625rem; color: var(--tc-color-heading); }

/* Category tiles */
.tc-tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.tc-tile { display: block; height: 100%; border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); overflow: hidden; text-decoration: none; color: var(--tc-color-heading); background: var(--tc-color-bg); transition: border-color var(--tc-transition); }
.tc-tile:hover { border-color: var(--tc-color-heading); }
.tc-tile__media { display: block; aspect-ratio: 4 / 3; background: var(--tc-color-tint); }
.tc-tile__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-tile__text { display: block; padding: 14px 18px 18px; }
.tc-tile__title { display: block; font-family: var(--tc-font-heading); font-weight: 700; font-size: 1.375rem; line-height: 1.05; }
.tc-tile__sub { display: block; margin-top: 4px; font-size: 0.875rem; color: var(--tc-color-muted); }

/* Brands row */
.tc-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--tc-gap-medium); padding: var(--tc-gap) 0; border-top: 1px solid var(--tc-color-line); border-bottom: 1px solid var(--tc-color-line); }
.tc-brands__label { margin: 0; font-family: var(--tc-font); font-size: 0.8125rem; font-weight: 600; color: var(--tc-color-muted); }
.tc-brands__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin: 0; padding: 0; list-style: none; font-family: var(--tc-font-heading); font-weight: 700; font-size: 1.375rem; color: var(--tc-color-heading); }
.tc-brands__list a { color: inherit; text-decoration: none; }
.tc-brands__list a:hover { text-decoration: underline; }
.tc-brands__list img { display: block; max-height: 36px; width: auto; }

/* Shop layout */
.tc-shop { display: grid; gap: var(--tc-gap-medium); }
.tc-shop__main { min-width: 0; }
.tc-shop__main > * + * { margin-top: var(--tc-gap); }

/* Filters */
.tc-filters { border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); }
.tc-filters > summary { cursor: pointer; list-style: none; padding: 14px 18px; font-weight: 700; color: var(--tc-color-heading); }
.tc-filters > summary::-webkit-details-marker { display: none; }
.tc-filters > summary::after { content: "+"; float: right; }
.tc-filters[open] > summary::after { content: "\2212"; }
.tc-filters__body { display: grid; gap: var(--tc-gap); padding: 0 18px 18px; }
.tc-filter { min-width: 0; margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--tc-color-line); }
.tc-filter legend { float: left; width: 100%; margin-bottom: 8px; padding: 0; font-family: var(--tc-font-heading); font-weight: 700; font-size: 1.125rem; color: var(--tc-color-heading); }
.tc-filter__option { clear: both; display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 0.875rem; cursor: pointer; }
.tc-filter__option input { flex: none; width: 18px; height: 18px; accent-color: var(--tc-color-heading); }
.tc-filter__count { margin-left: auto; font-size: 0.8125rem; color: var(--tc-color-muted); }
.tc-filters__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding-top: 14px; border-top: 1px solid var(--tc-color-line); }
.tc-filters__clear { font-size: 0.875rem; font-weight: 600; color: var(--tc-color-heading); }

/* Price range: two native range inputs over one track */
.tc-price__values { clear: both; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-family: var(--tc-font-heading); font-weight: 700; font-size: 1.0625rem; color: var(--tc-color-heading); }
.tc-price__values span { font-family: var(--tc-font); font-weight: 400; font-size: 0.8125rem; color: var(--tc-color-muted); }
.tc-range { --tc-range-from: 0%; --tc-range-to: 100%; position: relative; height: 44px; margin: 4px 12px 0; }
.tc-range__track, .tc-range__fill { position: absolute; top: 50%; height: 4px; margin-top: -2px; }
.tc-range__track { left: -12px; right: -12px; border-radius: 2px; background: var(--tc-color-line); }
.tc-range__fill { left: var(--tc-range-from); right: calc(100% - var(--tc-range-to)); background: var(--tc-color-heading); }
.tc-range input[type="range"] { -webkit-appearance: none; appearance: none; position: absolute; left: -12px; top: 0; width: calc(100% + 24px); height: 44px; margin: 0; padding: 0; background: none; pointer-events: none; outline: none; }
.tc-range input[type="range"]::-webkit-slider-runnable-track { height: 44px; background: none; }
.tc-range input[type="range"]::-moz-range-track { height: 44px; background: none; }
.tc-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px; margin-top: 10px; border-radius: 50%; background: var(--tc-color-heading); border: 3px solid var(--tc-color-bg); outline: 1px solid var(--tc-color-heading); cursor: grab; }
.tc-range input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--tc-color-heading); border: 3px solid var(--tc-color-bg); outline: 1px solid var(--tc-color-heading); cursor: grab; }
.tc-range input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--tc-color-focus); outline-offset: 2px; }
.tc-range input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--tc-color-focus); outline-offset: 2px; }

/* Toolbar and pagination */
.tc-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; padding-bottom: 14px; border-bottom: 1px solid var(--tc-color-line); font-size: 0.875rem; color: var(--tc-color-muted); }
.tc-toolbar__count { margin: 0; }
.tc-sort { display: flex; align-items: center; gap: 8px; margin: 0; }
.tc-sort select { font: inherit; color: var(--tc-color-heading); background: var(--tc-color-bg); border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); padding: 9px 12px; }
.tc-js .tc-sort__go { display: none; }
.tc-pagination { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); color: var(--tc-color-heading); font-size: 0.875rem; font-weight: 700; text-decoration: none; }
.tc-pagination a.page-numbers:hover { border-color: var(--tc-color-heading); }
.tc-pagination .page-numbers.current { background: var(--tc-color-heading); border-color: var(--tc-color-heading); color: var(--tc-color-bg); }

/* Single product */
.tc-product-top { display: grid; gap: var(--tc-gap-medium); }
.tc-gallery { display: grid; gap: 12px; min-width: 0; }
.tc-gallery__main { margin: 0; aspect-ratio: 1 / 1; background: var(--tc-color-tint); border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); overflow: hidden; }
.tc-gallery__main img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tc-gallery__thumb { aspect-ratio: 1 / 1; padding: 0; background: var(--tc-color-tint); border: 1px solid var(--tc-color-line); border-radius: var(--tc-radius); overflow: hidden; cursor: pointer; transition: border-color var(--tc-transition); }
.tc-gallery__thumb:hover, .tc-gallery__thumb[aria-pressed="true"] { border-color: var(--tc-color-heading); }
.tc-gallery__thumb[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--tc-color-heading); }
.tc-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tc-summary { display: grid; gap: 14px; align-content: start; }
.tc-summary > * { margin: 0; }
.tc-summary__terms { display: flex; gap: 8px; font-size: 0.875rem; color: var(--tc-color-muted); }
.tc-summary__terms a { color: inherit; font-weight: 600; }
.tc-summary__title { font-size: var(--hm-h2-size-mobile, 1.75rem); }
.tc-summary__fits { font-size: 0.875rem; color: var(--tc-color-muted); }
.tc-summary__price { font-family: var(--tc-font-heading); font-weight: 700; font-size: var(--hm-h3-size-mobile, 1.375rem); line-height: 1; color: var(--tc-color-heading); }
.tc-summary__price small { display: block; margin-top: 6px; font-family: var(--tc-font); font-weight: 400; font-size: 0.8125rem; color: var(--tc-color-muted); }
.tc-summary__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tc-summary__actions .tc-whatsapp { flex: 1 1 240px; }
.tc-facts { border-top: 1px solid var(--tc-color-line); font-size: 0.875rem; }
.tc-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--tc-color-line); }
.tc-facts dt { color: var(--tc-color-muted); }
.tc-facts dd { margin: 0; text-align: right; font-weight: 700; color: var(--tc-color-heading); }
.tc-facts dd a { color: inherit; }
.tc-product-details { display: grid; gap: var(--tc-gap-medium); max-width: 820px; padding-top: var(--tc-gap-large); border-top: 1px solid var(--tc-color-line); }
.tc-prose > :first-child { margin-top: 0; }
.tc-prose > :last-child { margin-bottom: 0; }
.tc-fitlist { margin: 0; padding: 0; list-style: none; }
.tc-fitlist li { padding: 10px 0; border-top: 1px solid var(--tc-color-line); }
.tc-fitlist li:last-child { border-bottom: 1px solid var(--tc-color-line); }
.tc-specs { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.tc-specs th, .tc-specs td { padding: 11px 0; text-align: left; vertical-align: top; border-top: 1px solid var(--tc-color-line); }
.tc-specs tr:last-child th, .tc-specs tr:last-child td { border-bottom: 1px solid var(--tc-color-line); }
.tc-specs th { width: 40%; padding-right: 16px; font-weight: 400; color: var(--tc-color-muted); }
.tc-specs td { font-weight: 700; color: var(--tc-color-heading); }

@media (min-width: 640px) {
	.tc-container { max-width: var(--hm-container-tablet, 630px); }
	.tc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tc-gap); }
	.tc-tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--tc-gap); }
	.tc-tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-section__head--row { grid-template-columns: 1fr auto; }
}
@media (min-width: 1025px) {
	.tc-container { max-width: var(--hm-container-laptop, 954px); }
	.tc-title { font-size: var(--hm-h1-size, 3.25rem); }
	.tc-heading { font-size: var(--hm-h2-size, 2.375rem); }
	.tc-subheading { font-size: var(--hm-h3-size, 1.75rem); }
	.tc-summary__title { font-size: var(--hm-h2-size, 2.375rem); }
	.tc-summary__price { font-size: var(--hm-h3-size, 1.75rem); }
	.tc-shop { grid-template-columns: 250px minmax(0, 1fr); gap: var(--tc-gap-large); align-items: start; }
	.tc-product-top { grid-template-columns: 1fr 1fr; gap: var(--tc-gap-large); align-items: start; }
	.tc-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tc-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tc-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.tc-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.tc-tile-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tc-tile-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.tc-tile-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1351px) {
	.tc-container { max-width: var(--tc-container); }
}
@media (prefers-reduced-motion: reduce) {
	.tc-page *, [class*="wp-block-tabeer-"] * { transition: none !important; }
}
