/* AMD Garage — front-end shortcodes.
 * Uses the theme's design tokens where present (--c-ink #1d2530,
 * --c-action #ffa500) and falls back to literals so it also works standalone. */

/* ---- Price table ---------------------------------------------------- */
.amd-price-table { margin: 1.5rem 0; }
.amd-price-table__title { margin: 0 0 .75rem; font-size: 1.25rem; }
.amd-price-table__grid { width: 100%; border-collapse: collapse; }
.amd-price-table__grid th,
.amd-price-table__grid td {
	padding: .75rem 1rem;
	text-align: left;
	border-bottom: 1px solid rgba(29, 37, 48, .12);
	vertical-align: top;
}
.amd-price-table__grid th { font-weight: 600; }
.amd-price-table__item { display: block; }
.amd-price-table__note { display: block; font-weight: 400; opacity: .7; font-size: .85em; margin-top: 2px; }
.amd-price-table__price { text-align: right; white-space: nowrap; font-weight: 700; }
.amd-price-table__unit { display: block; font-weight: 400; opacity: .7; font-size: .8em; }
.amd-price--poa { color: var(--c-action, #c47d00); font-weight: 700; }
.amd-price--free { color: #1a7f37; }
.amd-price-table__footnote { margin: .75rem 0 0; font-size: .85rem; opacity: .75; }

/* ---- Service cards -------------------------------------------------- */
.amd-service-cards {
	list-style: none; margin: 1.5rem 0; padding: 0;
	display: grid; gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.amd-service-card > a,
.amd-service-card > div {
	display: flex; flex-direction: column; gap: .4rem; height: 100%;
	padding: 1.25rem; text-decoration: none; color: inherit;
	border: 1px solid rgba(29, 37, 48, .14); border-radius: 10px; background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.amd-service-card > a:hover { border-color: var(--c-action, #ffa500); box-shadow: 0 6px 18px rgba(29, 37, 48, .08); }
.amd-service-card__icon { color: var(--c-ink, #1d2530); }
.amd-service-card__icon svg { width: 44px; height: 44px; }
.amd-service-card__title { font-size: 1.1rem; }
.amd-service-card__copy { font-size: .9rem; opacity: .8; }
.amd-service-card__price { margin-top: auto; font-weight: 700; color: var(--c-action, #c47d00); }

/* ---- Enquiry form --------------------------------------------------- */
.amd-enquiry { margin: 1.5rem 0; max-width: 560px; }
.amd-enquiry__title { margin: 0 0 1rem; }
.amd-field { display: flex; flex-direction: column; gap: .35rem; margin: 0 0 1rem; }
.amd-field label { font-weight: 600; font-size: .9rem; }
.amd-field label span { color: #b32d2e; }
.amd-field input,
.amd-field select,
.amd-field textarea {
	width: 100%; padding: .6rem .75rem; font: inherit;
	border: 1px solid rgba(29, 37, 48, .3); border-radius: 8px; background: #fff;
}
.amd-field input:focus,
.amd-field select:focus,
.amd-field textarea:focus {
	outline: 2px solid var(--c-action, #ffa500); outline-offset: 1px; border-color: transparent;
}
.amd-field--submit { margin-top: .5rem; }
.amd-enquiry__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.amd-enquiry__alert { padding: .75rem 1rem; border-radius: 8px; margin: 0 0 1rem; font-weight: 600; }
.amd-enquiry__alert--ok { background: #d8f0dd; color: #1a7f37; }
.amd-enquiry__alert--err { background: #fde2e1; color: #b32d2e; }

/* Fallback submit button if the theme's .btn--action is unavailable. */
.amd-enquiry .btn--action:not([class*="btn--"]),
.amd-enquiry button[type="submit"]:not(.btn) {
	display: inline-flex; align-items: center; gap: .5rem;
	padding: .7rem 1.4rem; font-weight: 700; cursor: pointer;
	background: var(--c-action, #ffa500); color: var(--c-on-action, #1d2530);
	border: 0; border-radius: 8px;
}

/* ---- Breadcrumb ----------------------------------------------------- */
.amd-breadcrumb { font-size: .85rem; opacity: .8; margin: 0 0 1rem; }
.amd-breadcrumb a { color: inherit; text-decoration: none; }
.amd-breadcrumb a:hover { text-decoration: underline; }
.amd-breadcrumb__sep { opacity: .5; margin: 0 .25rem; }

/* ---- Subcategory chips --------------------------------------------- */
.amd-subcats { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 0 1.5rem; }
.amd-chip {
	display: inline-block; padding: .4rem .9rem; border-radius: 999px;
	border: 1px solid rgba(29, 37, 48, .18); text-decoration: none; color: inherit;
	font-size: .9rem; background: #fff;
}
.amd-chip:hover { border-color: var(--c-action, #ffa500); background: rgba(255, 165, 0, .08); }

.amd-section-title { margin: 2rem 0 1rem; font-size: 1.3rem; }

/* ---- Product grid --------------------------------------------------- */
.amd-products { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; }
.amd-products--cols-2 { grid-template-columns: repeat(2, 1fr); }
.amd-products--cols-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.amd-products--cols-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.amd-products--cols-5 { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.amd-products--cols-6 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.amd-product-card > a {
	display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit;
	border: 1px solid rgba(29, 37, 48, .14); border-radius: 10px; overflow: hidden; background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.amd-product-card > a:hover { border-color: var(--c-action, #ffa500); box-shadow: 0 6px 18px rgba(29, 37, 48, .08); }
.amd-product-card__media { display: block; aspect-ratio: 4 / 3; background: #f3f4f5; overflow: hidden; }
.amd-product-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.amd-product-card__noimg { display: block; width: 100%; height: 100%; background: repeating-linear-gradient(45deg, #f3f4f5, #f3f4f5 10px, #ecedee 10px, #ecedee 20px); }
.amd-product-card__brand { padding: .6rem .8rem 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; opacity: .6; }
.amd-product-card__title { padding: .2rem .8rem; font-size: .95rem; }
.amd-product-card__price { margin-top: auto; padding: .4rem .8rem .8rem; font-weight: 700; color: var(--c-action, #c47d00); }

/* ---- Single product ------------------------------------------------- */
.amd-product__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 720px) { .amd-product__layout { grid-template-columns: 1.1fr 1fr; gap: 2rem; } }
.amd-product__brand { text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; opacity: .6; margin: 0; }
.amd-product__title { margin: .2rem 0; }
.amd-product__price { font-size: 1.8rem; font-weight: 800; color: var(--c-ink, #1d2530); margin: .5rem 0; }
.amd-product__price small { font-size: .9rem; font-weight: 400; opacity: .6; margin-left: .35rem; }
.amd-product__lede { font-size: 1.05rem; opacity: .85; }
.amd-product__meta { display: grid; gap: .5rem; margin: 1rem 0; }
.amd-product__meta div { display: flex; gap: .5rem; border-bottom: 1px solid rgba(29, 37, 48, .1); padding-bottom: .4rem; }
.amd-product__meta dt { font-weight: 600; min-width: 90px; }
.amd-product__meta dd { margin: 0; }
.amd-product__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.amd-product__desc { margin-top: 2rem; }
.amd-product__noimg { aspect-ratio: 4 / 3; border-radius: 10px; background: repeating-linear-gradient(45deg, #f3f4f5, #f3f4f5 12px, #ecedee 12px, #ecedee 24px); }

/* ---- Media gallery (front) ----------------------------------------- */
.amd-media__main img { width: 100%; height: auto; border-radius: 10px; display: block; }
.amd-media__thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: .75rem 0 0; }
.amd-media__thumbs li { width: 72px; height: 72px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(29, 37, 48, .12); }
.amd-media__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.amd-media__video { margin-top: 1rem; position: relative; aspect-ratio: 16 / 9; }
.amd-media__video iframe, .amd-media__video video { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 10px; }

/* ---- Brands strip --------------------------------------------------- */
.amd-brands-strip { margin: 1.5rem 0; }
.amd-brands-strip__title { margin: 0 0 1rem; font-size: 1.1rem; }
.amd-brands-strip__list {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: center;
}
.amd-brands-strip__item img { max-height: 44px; width: auto; filter: grayscale(1); opacity: .75; transition: filter .15s ease, opacity .15s ease; }
.amd-brands-strip__item img:hover { filter: none; opacity: 1; }
.amd-brands-strip__item span { font-weight: 600; opacity: .7; }
