:root {
	--olma-ink: #17211b;
	--olma-muted: #637069;
	--olma-line: #d9dfdb;
	--olma-green: #146b43;
	--olma-bg: #f4f6f4;
}

* { box-sizing: border-box; }
html { min-height: 100%; overflow-x: hidden; }
body.olma-3d-preview-page { margin: 0; background: var(--olma-bg); color: var(--olma-ink); font-family: Arial, sans-serif; min-height: 100%; overflow-x: hidden; }
.olma-3d-shell { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .75fr); min-height: 100vh; width: 100%; }
.olma-3d-viewer { display: flex; flex-direction: column; min-height: 100vh; padding: 20px; }
.olma-3d-back { color: var(--olma-ink); font-size: 14px; font-weight: 700; margin-bottom: 14px; text-decoration: none; }
.olma-3d-viewer-title { color: var(--olma-green); font-size: 20px; margin: 8px 0 14px; }
.olma-3d-model-stage { display: flex; flex: 1; min-height: 520px; overflow: hidden; position: relative; width: 100%; }
model-viewer, .olma-3d-no-model { background: #e7ebe8; border: 1px solid var(--olma-line); border-radius: 6px; flex: 1; min-height: 520px; min-width: 0; overflow: hidden; width: 100%; }
model-viewer { display: block; touch-action: pan-y; }
.olma-3d-no-model { align-items: center; display: flex; justify-content: center; color: var(--olma-muted); }
.olma-3d-dimensions { background: rgba(255,255,255,.92); border: 1px solid var(--olma-line); border-radius: 4px; bottom: 14px; display: grid; gap: 3px; left: 14px; max-width: calc(100% - 28px); padding: 8px 10px; pointer-events: none; position: absolute; z-index: 3; }
.olma-3d-dimensions span { color: var(--olma-muted); font-size: 11px; font-weight: 700; }
.olma-3d-dimensions strong { color: var(--olma-green); font-size: 15px; }
.olma-3d-controls { background: #fff; border-left: 1px solid var(--olma-line); padding: 32px; }
.olma-3d-controls h1 { font-size: 28px; line-height: 1.15; margin: 0 0 28px; }
.olma-3d-controls h2 { font-size: 15px; margin: 24px 0 10px; }
.olma-3d-swatches { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.olma-3d-swatch { align-items: center; background: #fff; border: 1px solid var(--olma-line); border-radius: 5px; color: var(--olma-ink); cursor: pointer; display: flex; font-weight: 600; gap: 10px; line-height: 1.25; min-height: 48px; min-width: 0; overflow-wrap: anywhere; padding: 7px 9px; text-align: left; }
.olma-3d-swatch span { border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.28); flex: 0 0 28px; height: 28px; width: 28px; }
.olma-3d-swatch.is-active { background: #edf7f1; border-color: var(--olma-green); box-shadow: inset 0 0 0 1px var(--olma-green); }
.olma-3d-swatch:disabled { cursor: not-allowed; opacity: .42; }
.olma-3d-presets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.olma-3d-presets button { background: #edf3ef; border: 1px solid #cad8cf; border-radius: 4px; color: var(--olma-green); cursor: pointer; padding: 7px 10px; }
.olma-3d-size-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.olma-3d-size-grid label { color: var(--olma-muted); display: grid; font-size: 12px; font-weight: 700; gap: 5px; }
.olma-3d-size-grid input { border: 1px solid var(--olma-line); border-radius: 4px; font-size: 16px; min-height: 42px; padding: 8px; width: 100%; }
.olma-3d-summary { border-bottom: 1px solid var(--olma-line); border-top: 1px solid var(--olma-line); margin-top: 24px; padding: 9px 0; }
.olma-3d-summary p { align-items: center; display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; margin: 9px 0; }
.olma-3d-summary strong { font-size: 18px; }
.olma-3d-price-row strong { align-items: center; display: flex; flex-wrap: wrap; gap: 7px 10px; justify-content: flex-end; }
#olma-regular-price { color: #6f7772; font-size: 16px; font-weight: 600; text-decoration: line-through; }
#olma-price { color: #101713; font-size: 22px; font-weight: 800; }
#olma-display-discount, .olma-display-discount { background: var(--olma-discount-bg, #c62828); border-radius: 4px; color: #fff; display: inline-flex; font-size: 15px; font-weight: 800; line-height: 1; margin-left: 5px; padding: 7px 9px; vertical-align: middle; }
.olma-price-presentation { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 6px 9px; }
.olma-price-presentation del { color: #727972; font-size: .88em; font-weight: 600; opacity: 1; }
.olma-price-presentation ins { color: #111712; font-size: 1.12em; font-weight: 800; text-decoration: none; }
.olma-discount-color-0 { --olma-discount-bg: #c62828; }
.olma-discount-color-1 { --olma-discount-bg: #ad1457; }
.olma-discount-color-2 { --olma-discount-bg: #6a1b9a; }
.olma-discount-color-3 { --olma-discount-bg: #1565c0; }
.olma-discount-color-4 { --olma-discount-bg: #00796b; }
.olma-discount-color-5 { --olma-discount-bg: #2e7d32; }
.olma-discount-color-6 { --olma-discount-bg: #b45309; }
.olma-discount-color-7 { --olma-discount-bg: #37474f; }
.olma-3d-quantity-offer { background: #f4f8f5; border-left: 3px solid var(--olma-green); color: var(--olma-ink); font-size: 13px; line-height: 1.5; margin: 12px 0; padding: 9px 10px; }
.olma-3d-quantity { align-items: center; display: flex; gap: 12px; justify-content: space-between; margin: 12px 0; }
.olma-3d-quantity label { color: var(--olma-ink); font-size: 14px; font-weight: 800; }
.olma-3d-quantity-stepper { border: 1px solid var(--olma-line); border-radius: 5px; display: grid; flex: 0 0 150px; grid-template-columns: 42px 1fr 42px; min-height: 44px; overflow: hidden; }
.olma-3d-quantity-stepper button { background: #f8faf9; border: 0; color: var(--olma-green); cursor: pointer; font-size: 20px; font-weight: 800; line-height: 1; padding: 0; }
.olma-3d-quantity-stepper button:hover { background: #edf7f1; }
.olma-3d-quantity-stepper input { appearance: textfield; border: 0; border-left: 1px solid var(--olma-line); border-right: 1px solid var(--olma-line); color: var(--olma-ink); font-size: 16px; font-weight: 800; min-width: 0; text-align: center; width: 100%; }
.olma-3d-quantity-stepper input::-webkit-outer-spin-button,
.olma-3d-quantity-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.olma-3d-note, .olma-3d-status { color: var(--olma-muted); font-size: 12px; line-height: 1.45; }
.olma-3d-model-note { font-size: 18px; font-weight: 500; line-height: 1.6; margin: 14px 2px 0; }
.olma-3d-status { color: var(--olma-green); font-weight: 700; min-height: 18px; }
.olma-3d-limit { background: #edf7f1; border-left: 3px solid var(--olma-green); color: var(--olma-green); font-size: 12px; font-weight: 700; margin: 0 0 12px; padding: 8px 10px; }
.olma-3d-proportional { align-items: center; border: 1px solid var(--olma-line); border-radius: 4px; cursor: pointer; display: flex; font-size: 14px; font-weight: 700; gap: 8px; margin-bottom: 12px; min-height: 42px; padding: 8px 10px; }
.olma-3d-proportional input { height: 18px; margin: 0; width: 18px; }
.olma-3d-add { background: var(--olma-green); border: 0; border-radius: 5px; color: #fff; cursor: pointer; font-size: 16px; font-weight: 700; min-height: 48px; padding: 10px 18px; width: 100%; }
.olma-3d-add:disabled { cursor: not-allowed; opacity: .45; }
.olma-3d-actions { display: grid; gap: 10px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.olma-3d-return { align-items: center; border: 1px solid var(--olma-green); border-radius: 5px; color: var(--olma-green); display: flex; font-weight: 700; justify-content: center; min-height: 48px; padding: 10px 14px; text-align: center; text-decoration: none; }
.olma-3d-return:hover { background: #edf7f1; color: var(--olma-green); }
.olma-3d-preview-link { margin-top: 18px !important; }
.olma-3d-preview-link .button { background: var(--olma-green) !important; border-color: var(--olma-green) !important; color: #fff !important; }
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option,
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option:hover {
	cursor: pointer !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option .variable-item-contents,
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option span {
	opacity: 1 !important;
	pointer-events: auto !important;
	text-decoration: none !important;
}
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option .variable-item-contents::before,
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option::before,
.woo-variation-swatches .variable-items-wrapper .variable-item.olma-3d-custom-size-option::after {
	background-image: none !important;
	content: none !important;
	display: none !important;
}
.olma-cart-price-stack { align-items: center; display: inline-flex; flex-wrap: wrap; gap: 5px 8px; }
.olma-cart-price-stack del { color: #777; font-size: .88em; opacity: 1; }
.olma-cart-price-stack ins { color: #146b43; font-size: 1.08em; font-weight: 800; text-decoration: none; }
.olma-cart-quantity-discount { color: #c62828; font-size: 12px; font-weight: 800; }
.olma-header-cart-discount { display: none !important; }
.olma-block-cart-prices { align-items: flex-end; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; }
.olma-block-cart-prices del { color: #778079; font-size: 12px; line-height: 1.2; opacity: 1; }
.olma-block-cart-prices .olma-block-cart-base { color: #525d56; }
.olma-block-cart-final { color: #17211b; font-size: 16px; line-height: 1.25; }
.olma-block-cart-percent { color: #146b43; font-size: 11px; font-weight: 800; }
.woocommerce-mini-cart .olma-mini-cart-quantity { align-items: center; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.woocommerce-mini-cart .olma-cart-price-stack,
.woocommerce-mini-cart .olma-block-cart-prices { align-items: center; display: inline-flex; flex-direction: row; flex-wrap: wrap; gap: 4px 6px; white-space: normal; }
.woocommerce-mini-cart .olma-cart-price-stack del,
.woocommerce-mini-cart .olma-block-cart-prices del { color: rgba(255,255,255,.52); font-size: 12px; }
.woocommerce-mini-cart .olma-cart-price-stack ins,
.woocommerce-mini-cart .olma-block-cart-final { color: #35b779; font-size: 13px; font-weight: 800; }
.woocommerce-mini-cart .olma-cart-quantity-discount,
.woocommerce-mini-cart .olma-block-cart-percent { background: transparent; color: #35b779; font-size: 11px; }
.woocommerce ul.products li.product-category:nth-child(8n+1) .olma-category-discount-badge { background: #c62828 !important; }
.woocommerce ul.products li.product-category:nth-child(8n+2) .olma-category-discount-badge { background: #ad1457 !important; }
.woocommerce ul.products li.product-category:nth-child(8n+3) .olma-category-discount-badge { background: #6a1b9a !important; }
.woocommerce ul.products li.product-category:nth-child(8n+4) .olma-category-discount-badge { background: #1565c0 !important; }
.woocommerce ul.products li.product-category:nth-child(8n+5) .olma-category-discount-badge { background: #00796b !important; }
.woocommerce ul.products li.product-category:nth-child(8n+6) .olma-category-discount-badge { background: #2e7d32 !important; }
.woocommerce ul.products li.product-category:nth-child(8n+7) .olma-category-discount-badge { background: #b45309 !important; }
.woocommerce ul.products li.product-category:nth-child(8n+8) .olma-category-discount-badge { background: #37474f !important; }

@media (min-width: 1200px) {
	.olma-3d-shell { grid-template-columns: minmax(0, 2fr) minmax(390px, .72fr); height: 100vh; min-height: 720px; overflow: hidden; }
	.olma-3d-viewer { height: 100vh; min-height: 720px; padding: 16px; }
	.olma-3d-model-stage { flex: none; height: calc(100vh - 164px); min-height: 550px; }
	model-viewer, .olma-3d-no-model { height: 100%; min-height: 0; }
	.olma-3d-controls { height: 100vh; overflow-y: auto; padding: 24px 26px; }
	.olma-3d-controls h1 { margin-bottom: 22px; }
	.olma-3d-controls .olma-3d-note { font-size: 14px; line-height: 1.55; }
}

@media (max-width: 850px) {
	.olma-3d-shell { display: block; min-height: 100svh; overflow-x: hidden; }
	.olma-3d-viewer { min-height: auto; padding: 12px; }
	.olma-3d-back { display: inline-flex; margin-bottom: 8px; }
	.olma-3d-viewer-title { font-size: 18px; margin: 4px 0 10px; }
	.olma-3d-model-stage { height: clamp(320px, 56svh, 460px); min-height: 0; width: 100%; }
	.olma-3d-composite-stage { grid-template-columns: 1fr; }
	model-viewer, .olma-3d-no-model { height: 100%; min-height: 0; }
	.olma-3d-controls { border-left: 0; border-top: 1px solid var(--olma-line); padding: 22px 16px 36px; }
	.olma-3d-actions { grid-template-columns: 1fr; }
	.olma-3d-controls h1 { font-size: 23px; margin-bottom: 20px; }
	.olma-3d-swatches { grid-template-columns: 1fr 1fr; }
	.olma-3d-size-grid { grid-template-columns: 1fr 1fr; }
	.olma-3d-dimensions { bottom: 8px; left: 8px; }
	.olma-3d-model-note { font-size: 16px; }
	.olma-3d-controls .olma-3d-note { font-size: 14px; }
}

@media (max-width: 480px) {
	.olma-3d-viewer { padding: 8px; }
	.olma-3d-model-stage { height: clamp(280px, 50svh, 390px); min-height: 0; }
	.olma-3d-controls { padding: 18px 12px 28px; }
	.olma-3d-swatches { gap: 6px; }
	.olma-3d-swatch { font-size: 13px; min-height: 44px; padding: 6px; }
	.olma-3d-swatch span { flex-basis: 24px; height: 24px; width: 24px; }
	.olma-3d-size-grid { grid-template-columns: 1fr; }
	.olma-3d-actions { bottom: 0; background: #fff; margin: 0 -12px -28px; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); position: sticky; z-index: 5; }
	.olma-3d-dimensions { bottom: 6px; left: 6px; max-width: calc(100% - 12px); }
	.olma-3d-dimensions strong { font-size: 13px; }
	.olma-3d-model-note { font-size: 14px; line-height: 1.45; }
}

@media (max-width: 360px) {
	.olma-3d-swatches { grid-template-columns: 1fr; }
}

.olma-3d-explode-toggle { align-items: center; display: inline-flex; gap: 8px; font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.olma-3d-composite-stage { background: #e7ebe8; border: 1px solid var(--olma-line); border-radius: 6px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); overflow: auto; padding: 10px; position: relative; }
.olma-3d-composite-stage .olma-3d-part-model-wrap { background: #e7ebe8; border: 1px solid var(--olma-line); border-radius: 6px; height: auto; min-height: 260px; min-width: 0; overflow: hidden; position: relative; width: 100%; pointer-events: auto; }
.olma-3d-composite-stage .olma-3d-part-model-wrap span { background: rgba(255,255,255,.86); border: 1px solid var(--olma-line); border-radius: 4px; font-size: 12px; font-weight: 700; left: 10px; padding: 4px 7px; position: absolute; top: 10px; z-index: 4; }
.olma-3d-composite-stage .olma-3d-part-model-wrap small { background: rgba(255,255,255,.9); border: 1px solid var(--olma-line); border-radius: 4px; bottom: 10px; color: var(--olma-green); display: none; font-size: 12px; font-weight: 700; left: 10px; padding: 4px 7px; position: absolute; z-index: 4; }
.olma-3d-composite-stage .olma-3d-part-model-wrap small:not(:empty) { display: inline-flex; }
.olma-3d-composite-stage .olma-3d-part-model { background: transparent; border: 0; border-radius: 0; left: 0; min-height: 260px; min-width: 0; position: absolute; top: 0; touch-action: pan-y; width: 100%; height: 100%; }
.olma-3d-part-color-group { border-top: 1px solid var(--olma-line); padding-top: 10px; }
.olma-3d-part-color-group:first-child { border-top: 0; padding-top: 0; }
.olma-3d-part-color-group h3 { font-size: 14px; margin: 8px 0; }
.olma-3d-shell[data-composite="1"] .olma-3d-proportional { display: none; }
.olma-3d-shell[data-composite="1"] .olma-3d-size-grid label:not(:first-child) { display: none; }
.olma-3d-shell[data-composite="1"] .olma-3d-size-grid { grid-template-columns: 1fr; }
.olma-3d-shell[data-composite="1"] .olma-3d-dimensions { display: none; }
