/*
 * EEB Single Product styles — Destry-inspired 2-col layout, emerald accent.
 * Loaded only on is_product() via wp_enqueue_scripts.
 */

/* Theme variables — fallback values; override with the theme's actual tokens if they exist. */
:root {
	--eeb-emerald: #0f6b4f;
	--eeb-emerald-dark: #0a4f3a;
	--eeb-emerald-50: #e6f1ed;
	--eeb-gray-50: #f7f7f7;
	--eeb-gray-100: #ececec;
	--eeb-gray-300: #cfcfcf;
	--eeb-gray-500: #7a7a7a;
	--eeb-gray-700: #4a4a4a;
	--eeb-gray-900: #1a1a1a;
}

/* Layout — make .eeb-single-product a normal block so the inner .eeb-sp-layout
   can be a proper 2-col grid that fills the parent. Use compound selector to
   outrank .type-product { display: grid !important; } from style.css. */
.eeb-single-product.type-product,
.eeb-single-product.product {
	display: block !important;
}
.eeb-sp-layout {
	display: grid !important;
	grid-template-columns: 1fr !important;
	gap: 32px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
}
.eeb-sp-layout > * { min-width: 0; }
@media (min-width: 992px) {
	.eeb-sp-layout {
		grid-template-columns: 1fr 1fr !important;
		gap: 56px !important;
		padding: 40px 24px !important;
	}
}
@media (min-width: 992px) {
	.eeb-sp-layout {
		grid-template-columns: 1fr 1fr;
		gap: 56px;
		padding: 40px 24px;
	}
}

.eeb-sp-gallery { width: 100%; position: relative; min-width: 0; }
.eeb-sp-gallery .woocommerce-product-gallery,
.eeb-sp-gallery .woocommerce-product-gallery__wrapper,
.eeb-sp-gallery .flex-viewport { width: 100% !important; max-width: 100% !important; opacity: 1 !important; transition: none !important; }
.eeb-sp-gallery .flex-viewport { height: auto !important; overflow: visible !important; }
.eeb-sp-gallery .woocommerce-product-gallery__wrapper,
.eeb-sp-gallery .flex-viewport .slides { display: block !important; transform: none !important; width: 100% !important; }
.eeb-sp-gallery .woocommerce-product-gallery__wrapper li,
.eeb-sp-gallery .flex-viewport .slides li { display: block !important; float: none !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; }
.eeb-sp-gallery .woocommerce-product-gallery__image,
.eeb-sp-gallery .flex-viewport .slides .woocommerce-product-gallery__image { width: 100% !important; max-width: 100% !important; display: block !important; float: none !important; margin: 0; position: relative !important; }
.eeb-sp-gallery .woocommerce-product-gallery__image:not(.eeb-sp-active) { display: none !important; }
.eeb-sp-gallery .woocommerce-product-gallery__image a { display: block; width: 100%; }
.eeb-sp-gallery .woocommerce-product-gallery__image img,
.eeb-sp-gallery .flex-viewport .slides img { width: 100% !important; max-width: 100% !important; height: auto !important; display: block; }
.eeb-sp-gallery .flex-control-thumbs { display: flex !important; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.eeb-sp-gallery .flex-control-thumbs li { width: calc(25% - 6px) !important; float: none !important; margin: 0 !important; cursor: pointer; }
.eeb-sp-gallery .flex-control-thumbs li img { width: 100% !important; height: auto; display: block; opacity: .7; transition: opacity .2s; }
.eeb-sp-gallery .flex-control-thumbs li.active img,
.eeb-sp-gallery .flex-control-thumbs li:hover img { opacity: 1; }
.eeb-sp-info    { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.eeb-sp-title { font-family: "Libre Baskerville", Georgia, serif; font-size: 28px; font-weight: 700; color: #1a1a2e; margin: 0; }
@media (min-width: 992px) { .eeb-sp-title { font-size: 34px; } }

.eeb-sp-price .price { font-family: "Lato", sans-serif; font-size: 22px; font-weight: 700; color: var(--eeb-emerald); margin: 0; }
.eeb-sp-price del   { color: #7a7a7a; font-weight: 400; margin-left: 8px; }

.eeb-sp-section-title { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--eeb-gray-700); margin: 14px 0 8px; }

/* Pills (size) */
.eeb-variation-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.eeb-var-btn { background: #fff; border: 1px solid var(--eeb-gray-300); color: var(--eeb-gray-900); padding: 10px 16px; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 600; min-width: 52px; text-align: center; }
.eeb-var-btn:hover { border-color: var(--eeb-emerald); }
.eeb-var-btn.active { background: var(--eeb-emerald); color: #fff; border-color: var(--eeb-emerald); }

/* Color swatches */
.eeb-var-btn.color-swatch { padding: 4px; border-radius: 50%; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; }
.eeb-var-btn.color-swatch .swatch-dot { display: block; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.eeb-var-btn.color-swatch.active { border-color: var(--eeb-emerald); box-shadow: 0 0 0 2px var(--eeb-emerald-50); }

/* Hide native select behind the swatches (variation logic still works). */
.eeb-single-product table.variations select { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* Qty stepper */
.eeb-sp-qty { display: inline-flex; align-items: center; border: 1px solid var(--eeb-gray-300); border-radius: 4px; overflow: hidden; }
.eeb-sp-qty button { background: #fff; border: 0; padding: 10px 14px; cursor: pointer; font: inherit; color: var(--eeb-gray-700); }
.eeb-sp-qty input { border: 0; width: 48px; text-align: center; font: inherit; padding: 10px 0; -moz-appearance: textfield; }
.eeb-sp-qty input::-webkit-outer-spin-button, .eeb-sp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* CTA */
.eeb-sp-atc { background: var(--eeb-emerald); color: #fff; border: 0; padding: 14px 20px; font: inherit; font-weight: 700; width: 100%; border-radius: 4px; cursor: pointer; text-transform: uppercase; letter-spacing: .04em; }
.eeb-sp-atc:hover { background: var(--eeb-emerald-dark); }
.eeb-sp-wishlist { background: transparent; color: var(--eeb-gray-900); border: 1px solid var(--eeb-gray-300); padding: 12px 20px; font: inherit; font-weight: 600; width: 100%; border-radius: 4px; cursor: pointer; margin-top: 8px; }
.eeb-sp-wishlist:hover { border-color: var(--eeb-emerald); color: var(--eeb-emerald); }

/* Share */
.eeb-sp-share { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--eeb-gray-700); margin-top: 10px; }
.eeb-sp-share a { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: var(--eeb-gray-50); color: var(--eeb-gray-700); }
.eeb-sp-share a:hover { background: var(--eeb-emerald); color: #fff; }

/* Trust rows */
.eeb-sp-trust { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--eeb-gray-100); }
.eeb-sp-trust-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--eeb-gray-700); }
.eeb-sp-trust-row svg { flex: 0 0 18px; margin-top: 2px; color: var(--eeb-emerald); }
.eeb-sp-trust-row strong { color: var(--eeb-gray-900); display: block; font-size: 13px; }

/* Tabs */
.eeb-sp-tabs .wc-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--eeb-gray-100); padding: 0; margin: 24px 0 0; list-style: none; }
.eeb-sp-tabs .wc-tabs li { padding: 12px 0; }
.eeb-sp-tabs .wc-tabs li a { color: var(--eeb-gray-700); text-decoration: none; font-weight: 600; }
.eeb-sp-tabs .wc-tabs li.active a { color: var(--eeb-emerald); border-bottom: 2px solid var(--eeb-emerald); }

/* Size chart tab — boutique-style tab content matching the standalone
   /es/guia-de-tallas/ page. Forces the WC tab panel to span the full
   content width (Storefront's default layout right-aligns it next to
   the product gallery). */
.eeb-single-product #tab-eeb_size_chart,
.eeb-single-product .eeb-sizeguide-tab {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.eeb-single-product .eeb-sizeguide-tab {
	font-family: 'Libre Baskerville', Georgia, serif;
	color: var(--eeb-gray-900, #1a1a1a);
}
.eeb-sizeguide-tab__head{
	text-align:center;
	max-width:60ch;
	margin:0 auto 48px;
}
.eeb-sizeguide-tab__eyebrow{
	font-family:'Josefin Sans', sans-serif;
	font-size:.74rem;
	font-weight:500;
	letter-spacing:.42em;
	text-transform:uppercase;
	color:#b8924d;
	display:block;
	margin:0 0 16px;
}
.eeb-sizeguide-tab__title{
	font-family:'Marcellus','Libre Baskerville',Georgia,serif;
	font-weight:400;
	font-size:1.85rem;
	line-height:1.15;
	color:#0f6b4f;
	margin:0 0 18px;
	letter-spacing:.005em;
}
.eeb-sizeguide-tab__title::after{
	content:"";
	display:block;
	width:42px;height:1px;
	background:#b8924d;
	margin:18px auto 0;
	opacity:.7;
}
.eeb-sizeguide-tab__lead{
	font-style:italic;
	font-size:1rem;
	line-height:1.65;
	color:#444;
	margin:18px auto 0;
	max-width:54ch;
}
/* Two-column grid for the two measurement tables so they sit side by
   side on desktop — full panel width split in half with breathing
   room between. Collapses to a single column on mobile. */
.eeb-sizeguide-tab__grid{
	display:grid;
	grid-template-columns:1fr 1fr;
	gap:32px;
	max-width:760px;
	margin:0 auto 48px;
}
.eeb-sizeguide-tab__panel{
	margin:0;
}
.eeb-sizeguide-tab__sub{
	font-family:'Marcellus',Georgia,serif;
	font-style:normal;
	font-weight:400;
	font-size:1.2rem;
	line-height:1.2;
	color:#0f6b4f;
	text-align:center;
	margin:0 0 18px;
	letter-spacing:.005em;
	position:relative;
	padding-bottom:12px;
}
.eeb-sizeguide-tab__sub::after{
	content:"";
	display:block;
	width:36px;height:1px;
	background:#b8924d;
	margin:10px auto 0;
	opacity:.7;
}
.eeb-sizeguide-tab .eeb-sizeguide-table{
	width:100%;
	max-width:560px;
	margin:0 auto;
	border-collapse:collapse;
	font-family:'Source Sans 3', sans-serif;
	font-size:.92rem;
}
.eeb-sizeguide-tab .eeb-sizeguide-table th{
	font-family:'Josefin Sans',sans-serif;
	font-size:.68rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;
	color:#0f6b4f;
	text-align:left;
	padding:10px 16px;
	border-bottom:2px solid #0f6b4f;
	background:transparent;
}
.eeb-sizeguide-tab .eeb-sizeguide-table td{
	padding:12px 16px;
	border-bottom:1px solid #ececec;
	vertical-align:top;
	line-height:1.5;
}
.eeb-sizeguide-tab .eeb-sizeguide-table tbody tr:last-child td{border-bottom:0}
.eeb-sizeguide-tab .eeb-sizeguide-table td:first-child{
	width:60px;
	font-family:'Marcellus',Georgia,serif;
	font-size:1.1rem;
	color:#b8924d;
	font-weight:400;
	text-align:center;
	vertical-align:middle;
}
.eeb-sizeguide-tab__more{
	display:inline-block;
	margin-top:8px;
	font-family:'Josefin Sans',sans-serif;
	font-size:.7rem;
	font-weight:600;
	letter-spacing:.2em;
	text-transform:uppercase;
	color:#0f6b4f;
	text-decoration:none;
	border-bottom:1px solid #0f6b4f;
	padding-bottom:4px;
	transition:color .25s ease, border-color .25s ease;
}
.eeb-sizeguide-tab__more:hover{color:#b8924d;border-bottom-color:#b8924d}
@media (max-width:768px){
	.eeb-sizeguide-tab__title{font-size:1.5rem}
	.eeb-sizeguide-tab__grid{grid-template-columns:1fr;gap:24px}
	.eeb-sizeguide-tab .eeb-sizeguide-table th,
	.eeb-sizeguide-tab .eeb-sizeguide-table td{padding:10px 10px}
	.eeb-sizeguide-tab .eeb-sizeguide-table td:first-child{width:48px;font-size:1rem}
}

/* Deprecated — kept for backwards compatibility with old .eeb-size-chart-table markup. */
.eeb-size-chart-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.eeb-size-chart-table th, .eeb-size-chart-table td { padding: 10px 12px; border-bottom: 1px solid var(--eeb-gray-100); text-align: left; }
.eeb-size-chart-table th { background: var(--eeb-gray-50); font-weight: 700; }

/* Related grid */
.eeb-related-section { max-width: 1200px; margin: 48px auto; padding: 0 16px; }
.eeb-related-section h2 { font-family: "Libre Baskerville", Georgia, serif; font-size: 22px; font-weight: 700; color: #1a1a2e; margin: 0 0 6px; }
.eeb-related-section h2::after { content: ''; display: block; width: 64px; height: 2px; background: var(--eeb-emerald); margin-top: 8px; }
.eeb-related-grid { display: grid; grid-template-columns: 1fr; gap: 24px; list-style: none; padding: 24px 0 0; margin: 0; }
@media (min-width: 600px) { .eeb-related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .eeb-related-grid { grid-template-columns: repeat(3, 1fr); } }

.eeb-related-card { background: #fff; border: 0; border-radius: 6px; overflow: hidden; transition: box-shadow .2s; position: relative; }
.eeb-related-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.eeb-related-card-image { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--eeb-gray-50); }
.eeb-related-card-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.eeb-related-card-image img.eeb-related-hover { opacity: 0; }
.eeb-related-card:hover .eeb-related-card-image img.eeb-related-hover { opacity: 1; }
.eeb-related-card-image img.eeb-related-main { opacity: 1; }
.eeb-related-badge { position: absolute; top: 12px; left: 12px; background: var(--eeb-emerald); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 2px; text-transform: uppercase; letter-spacing: .04em; }
.eeb-related-card-body { padding: 16px; text-align: center; }
.eeb-related-category { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--eeb-gray-500); margin-bottom: 6px; }
.eeb-related-title { font-family: "Libre Baskerville", Georgia, serif; font-size: 15px; font-weight: 700; color: #1a1a2e; margin: 0 0 6px; line-height: 1.3; }
.eeb-related-rating { font-size: 12px; color: var(--eeb-gray-700); margin-bottom: 6px; }
.eeb-related-price { font-size: 15px; font-weight: 700; color: var(--eeb-emerald); }
.eeb-related-price .regular { color: var(--eeb-gray-500); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.eeb-related-atc { display: block; margin: 12px 16px 16px; padding: 10px 12px; text-align: center; border: 1px solid var(--eeb-emerald); color: var(--eeb-emerald); background: #fff; text-decoration: none; font-weight: 700; font-size: 12px; letter-spacing: .08em; border-radius: 4px; text-transform: uppercase; }
.eeb-related-atc:hover { background: var(--eeb-emerald); color: #fff; }


/* Storefront breadcrumb: drop default bottom margin on single product */
.eeb-single-product .storefront-breadcrumb,
.single-product .storefront-breadcrumb { margin-bottom: 0 !important; }

/* Additional information notes — supplier info appended after the
   WooCommerce attributes table on the Additional information tab. */
.eeb-additional-notes{
	margin-top:36px;
	padding-top:32px;
	border-top:1px solid var(--eeb-gray-100);
}
.eeb-additional-notes__block{margin-bottom:32px}
.eeb-additional-notes__block:last-child{margin-bottom:0}
.eeb-additional-notes__heading{
	font-family:'Marcellus',Georgia,serif;
	font-weight:400;
	font-size:1.05rem;
	color:var(--eeb-gray-900, #1a1a1a);
	margin:0 0 12px;
	letter-spacing:.005em;
	position:relative;
	padding-bottom:10px;
}
.eeb-additional-notes__heading::after{
	content:"";
	display:block;
	width:32px;height:1px;
	background:var(--eeb-emerald);
	margin:10px 0 0;
	opacity:.7;
}
.eeb-additional-notes p{
	margin:0 0 8px;
	line-height:1.65;
	color:var(--eeb-gray-700, #4a4a4a);
	font-size:.95rem;
}
.eeb-additional-notes__list{
	margin:0 0 0 1.2em;
	padding:0;
	color:var(--eeb-gray-700, #4a4a4a);
}
.eeb-additional-notes__list li{
	margin-bottom:10px;
	line-height:1.6;
	font-size:.95rem;
}
.eeb-additional-notes__list li:last-child{margin-bottom:0}

/* Additional information tab — boutique styling matching the size guide
   page. Wraps the WC attributes table and the supplier notes (added
   via eeb_render_additional_info_notes) in a consistent design. */
.woocommerce-Tabs-panel--additional_information h2,
.woocommerce-Tabs-panel--additional_information .woocommerce-Tabs-panel h2,
.eeb-single-product .woocommerce-Tabs-panel--additional_information > h2 {
	font-family: 'Marcellus', 'Libre Baskerville', Georgia, serif !important;
	font-weight: 400 !important;
	font-size: 1.7rem !important;
	color: var(--eeb-gray-900, #1a1a1a) !important;
	text-align: center;
	margin: 0 0 28px !important;
	letter-spacing: .005em;
	position: relative;
	padding-bottom: 14px;
}
.woocommerce-Tabs-panel--additional_information > h2::after,
.eeb-single-product .woocommerce-Tabs-panel--additional_information > h2::after {
	content: "";
	display: block;
	width: 42px;
	height: 1px;
	background: var(--eeb-emerald, #0f6b4f);
	margin: 14px auto 0;
	opacity: .7;
}

/* WooCommerce attribute table — clean two-column layout with the
   boutique's emerald/gold accent. */
.eeb-single-product .woocommerce-product-attributes {
	width: 100%;
	max-width: 560px;
	margin: 0 auto 8px !important;
	border-collapse: collapse;
	font-family: 'Source Sans 3', sans-serif;
	font-size: .95rem;
}
.eeb-single-product .woocommerce-product-attributes th,
.eeb-single-product .woocommerce-product-attributes td {
	padding: 14px 18px;
	text-align: left;
}
.eeb-single-product .woocommerce-product-attributes th {
	background: #f7f5f0;
	font-family: 'Josefin Sans', sans-serif;
	font-size: .68rem;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--eeb-emerald, #0f6b4f);
	width: 40%;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.eeb-single-product .woocommerce-product-attributes td {
	font-family: 'Libre Baskerville', Georgia, serif;
	font-style: italic;
	color: var(--eeb-gray-700, #444);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.eeb-single-product .woocommerce-product-attributes tr:last-child th,
.eeb-single-product .woocommerce-product-attributes tr:last-child td {
	border-bottom: 0;
}
.eeb-single-product .woocommerce-product-attributes td p {
	margin: 0;
}
