/* Gift Customiser front end. Light styling so the theme's fonts and colours apply. */
.gc-options { --gc-accent: currentColor; --gc-border: rgba(0, 0, 0, 0.18); --gc-muted: rgba(0, 0, 0, 0.6); width: 100%; margin: 0 0 1.25em; clear: both; }
.gc-group { display: flex; flex-wrap: wrap; gap: 0 4%; box-sizing: border-box; }
.gc-options.gc-styled { box-sizing: border-box; }
.gc-group.gc-styled { margin-bottom: 1em; }
.gc-group.gc-styled > .gc-field:last-child { margin-bottom: 0; }
.gc-styled .gc-label, .gc-styled .gc-desc, .gc-styled .gc-hint, .gc-styled .gc-swatch-label { color: inherit; }
.gc-field { flex: 0 0 100%; margin: 0 0 1.1em; min-width: 0; }
.gc-field.gc-w-half { flex-basis: 48%; }
.gc-field.gc-w-third { flex-basis: 30.66%; }
.gc-field[hidden] { display: none !important; }
.gc-label { display: block; font-weight: 600; margin: 0 0 0.45em; }
.gc-label abbr.required { color: #b32d2e; text-decoration: none; border: 0; }
.gc-hint { font-weight: 400; color: var(--gc-muted); white-space: nowrap; }
.gc-desc { font-size: 0.875em; color: var(--gc-muted); margin-top: 0.35em; }
.gc-heading { margin: 0.25em 0 0.35em; }
.gc-info > *:last-child { margin-bottom: 0; }

.gc-input input[type="text"], .gc-input input[type="number"], .gc-input input[type="date"], .gc-input textarea, .gc-input select { width: 100%; max-width: 100%; box-sizing: border-box; padding: 0.55em 0.7em; border: 1px solid var(--gc-border); border-radius: 3px; background: #fff; font: inherit; }
.gc-field--text .gc-input, .gc-field--textarea .gc-input { position: relative; }
.gc-counter { display: block; text-align: right; font-size: 0.8em; color: var(--gc-muted); margin-top: 0.2em; }

.gc-choices { display: flex; flex-direction: column; gap: 0.4em; }
.gc-choice { display: flex; align-items: baseline; gap: 0.45em; cursor: pointer; font-weight: 400; margin: 0; }
.gc-choice input { margin: 0; flex: none; }

.gc-swatches { display: flex; flex-wrap: wrap; gap: 0.6em; }
.gc-swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.3em; width: 76px; cursor: pointer; text-align: center; font-weight: 400; margin: 0; }
.gc-swatch-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.gc-swatch-visual { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border: 2px solid transparent; border-radius: 6px; box-shadow: 0 0 0 1px var(--gc-border); overflow: hidden; background: #f5f5f5; transition: box-shadow 0.15s, border-color 0.15s; }
.gc-swatch-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gc-swatch-colour { display: block; width: 100%; height: 100%; }
.gc-swatch-placeholder { font-size: 1.4em; font-weight: 600; color: var(--gc-muted); }
.gc-swatch-label { font-size: 0.8em; line-height: 1.25; word-break: break-word; }
.gc-swatch-label .gc-hint { display: block; white-space: normal; }
.gc-swatch:hover .gc-swatch-visual { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); }
.gc-swatch-input:checked + .gc-swatch-visual { border-color: #fff; box-shadow: 0 0 0 2px #222; }
.gc-swatch-input:focus-visible + .gc-swatch-visual { outline: 2px solid #2271b1; outline-offset: 2px; }
.gc-swatch-input:disabled + .gc-swatch-visual { opacity: 0.4; }

/* Add-ons */
.gca-addons { --gca-border: rgba(0, 0, 0, 0.15); margin: 0 0 1.25em; box-sizing: border-box; clear: both; }
.gca-heading { font-weight: 600; margin: 0 0 0.35em; }
.gca-desc { font-size: 0.875em; color: rgba(0, 0, 0, 0.6); margin: 0 0 0.6em; }
.gc-styled .gca-desc { color: inherit; }
.gca-list { display: grid; gap: 0.75em; }
.gca-item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.35em; padding: 0.5em; border: 1px solid var(--gca-border); border-radius: 6px; background: #fff; transition: border-color 0.15s, box-shadow 0.15s; min-width: 0; }
.gca-item.is-selected { border-color: #222; box-shadow: 0 0 0 1px #222; }
.gca-item.is-out { opacity: 0.55; }
.gca-thumb { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: #f5f5f5; }
.gca-thumb img, .gca-img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; margin: 0 !important; }
.gca-info { display: flex; flex-direction: column; gap: 0.1em; min-width: 0; }
.gca-name { font-weight: 600; font-size: 0.9em; line-height: 1.25; margin: 0; cursor: default; word-break: break-word; }
.gca-price { font-size: 0.9em; }
.gca-price del { opacity: 0.6; }
.gca-stock { font-size: 0.8em; color: #b32d2e; }
.gca-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--gca-border); border-radius: 4px; overflow: hidden; background: #fff; }
.gca-step { appearance: none; border: 0; background: #f3f3f3; color: #222; width: 2em; height: 2.2em; min-height: 0; font-size: 1em; line-height: 1; cursor: pointer; padding: 0; }
.gca-step:hover:not([disabled]) { background: #e6e6e6; }
.gca-step[disabled] { cursor: not-allowed; opacity: 0.5; }
.gca-qty-input { width: 2.6em !important; height: 2.2em !important; min-height: 0 !important; line-height: 2.2em !important; box-shadow: none !important; text-align: center; border: 0 !important; padding: 0 !important; margin: 0 !important; background: #fff; font: inherit; -moz-appearance: textfield; appearance: textfield; }
.gca-qty-input::-webkit-outer-spin-button, .gca-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.gca-layout-grid .gca-list { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.gca-layout-cards .gca-list { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gca-layout-cards .gca-item { padding: 0.75em; }
.gca-layout-list .gca-list { grid-template-columns: 1fr; gap: 0.5em; }
.gca-layout-list .gca-item { flex-direction: row; text-align: left; gap: 0.75em; }
.gca-layout-list .gca-thumb { flex: 0 0 56px; width: 56px; height: 56px; }
.gca-layout-list .gca-info { flex: 1; }


.gc-totals { border: 1px solid rgba(0, 0, 0, 0.18); border-radius: 4px; padding: 0.7em 0.9em; margin: 0 0 1.25em; font-size: 0.95em; width: 100%; box-sizing: border-box; clear: both; }
.gc-totals-row { display: flex; justify-content: space-between; gap: 1em; padding: 0.15em 0; }
.gc-totals-grand { font-weight: 700; border-top: 1px solid rgba(0, 0, 0, 0.18); margin-top: 0.35em; padding-top: 0.45em; }

/* Cart and checkout swatch thumbnails */
.gc-fixed-qty { display: inline-block; min-width: 2em; text-align: center; font-weight: 600; }
.gc-cart-swatch { display: inline-block; width: 18px !important; height: 18px !important; border-radius: 3px; vertical-align: -3px; margin-right: 6px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); background-size: cover; background-position: center; background-repeat: no-repeat; }
.gc-cart-swatch.gca-cart-thumb, .gc-cart-swatch.gc-cart-image { width: 28px !important; height: 28px !important; vertical-align: middle; border-radius: 4px; }

/* One detail per line for items with customisations or add-ons (Block and classic cart, checkout) */
.wc-block-components-product-details:has(.gc-mark) > span { display: block; margin: 0.15em 0; }
.wc-block-components-product-details:has(.gc-mark) > span > span[aria-hidden="true"] { display: none; }
dl.variation:has(.gc-mark) { display: grid; grid-template-columns: auto auto 1fr; grid-auto-flow: row dense; gap: 0.2em 0.4em; align-items: center; }
dl.variation:has(.gc-mark) dt, dl.variation:has(.gc-mark) dd { float: none !important; clear: none !important; margin: 0 !important; padding: 0 !important; }
dl.variation:has(.gc-mark) dd p { margin: 0 !important; display: inline; }
dl.variation:has(.gc-mark) > dt { grid-column: 1 / span 2; }
dl.variation:has(.gc-mark) > dd { grid-column: 3; }

/* Add-on rows: image first, then "Add-on:", then the text */
.wc-block-components-product-details:has(.gc-mark) > span:has(.gca-cart-thumb) { display: flex; align-items: center; gap: 0.4em; flex-wrap: wrap; }
.wc-block-components-product-details:has(.gc-mark) > span:has(.gca-cart-thumb) .wc-block-components-product-details__value { display: contents; }
.wc-block-components-product-details .gca-cart-thumb { order: -1; margin-right: 0; }
dl.variation:has(.gc-mark) > dt:has(+ dd .gca-cart-thumb) { grid-column: 2; }
dl.variation:has(.gc-mark) > dd:has(.gca-cart-thumb), dl.variation:has(.gc-mark) > dd:has(.gca-cart-thumb) > p { display: contents; }
dl.variation:has(.gc-mark) .gca-cart-thumb { grid-column: 1; margin-right: 0; }
dl.variation:has(.gc-mark) dd:has(.gca-cart-thumb) .gc-mark { grid-column: 3; }

/* Narrow containers such as quick view popups */
@media (max-width: 600px) {
	.gc-field.gc-w-half, .gc-field.gc-w-third { flex-basis: 100%; }
}
.adfy-quick-view-modal-content .gc-field.gc-w-half, .adfy-quick-view-modal-content .gc-field.gc-w-third { flex-basis: 100%; }
.adfy-quick-view-modal-content .gc-swatch { width: 64px; }
.adfy-quick-view-modal-content .gc-swatch-visual { width: 52px; height: 52px; }
