/* msd Shop – gleiche Gestaltung wie msd.swiss: eckig, flach, Rot #c8484a, Titel dünn in Grossbuchstaben.
   Schrift kommt vom Theme (Titillium Web auf msd.swiss). */
:root { --msd-red: #c8484a; --msd-red-dark: #a83a3c; --msd-line: #e6e3df; --msd-muted: #666; --msd-ink: #333; --msd-ease: cubic-bezier(.23, 1, .32, 1); }
.msd-shop *, .msd-buy * { box-sizing: border-box; }

/* Seitentitel (Shop, Warenkorb, Kasse) wie «Kontakt», «Mitmachen» auf der Startseite */
.msd-shop-page .entry-title, .msd-shop-page h1.main_title {
	font-size: 40px; font-weight: 300; text-transform: uppercase; letter-spacing: 1px; color: var(--msd-ink); line-height: 1.2; margin: 0 0 28px; padding: 0;
}
@media (max-width: 767px) { .msd-shop-page .entry-title, .msd-shop-page h1.main_title { font-size: 30px; } }

/* Knöpfe wie «Spenden» */
.msd-btn {
	display: inline-block; background: var(--msd-red); color: #fff !important; border: 0; border-radius: 0; padding: 12px 24px;
	font-size: 16px; font-weight: 500; text-transform: uppercase; letter-spacing: 0; line-height: 1.2; cursor: pointer; text-decoration: none; box-shadow: none;
	transition: background-color .35s ease;
}
.msd-btn:hover { background: var(--msd-red-dark); }
.msd-btn.is-secondary { background: transparent; color: var(--msd-red) !important; border: 1px solid var(--msd-red); padding: 11px 23px; }
.msd-btn.is-secondary:hover { background: var(--msd-red); color: #fff !important; }
.msd-btn:disabled { opacity: .6; cursor: wait; }
.msd-link { background: none; border: 0; color: var(--msd-muted); font-size: 20px; cursor: pointer; padding: 0 6px; }
.msd-link:hover { color: var(--msd-red); }

/* Kategorien */
.msd-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.msd-cats a {
	padding: 6px 14px; border: 1px solid var(--msd-line); text-decoration: none; color: var(--msd-ink);
	font-size: 14px; text-transform: uppercase; letter-spacing: .5px; transition: background-color .35s ease, border-color .35s ease, color .35s ease;
}
.msd-cats a:hover { border-color: var(--msd-red); color: var(--msd-red); }
.msd-cats a.is-active { background: var(--msd-red); border-color: var(--msd-red); color: #fff; }

/* Artikelkarten: Bild füllt die Fläche, beim Darüberfahren leichter Zoom */
.msd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 30px; }
@media (max-width: 600px) { .msd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
.msd-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: #fff; }
.msd-card-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #f4f2ef; }
.msd-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--msd-ease); }
.msd-card-title { padding: 14px 0 2px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--msd-ink); transition: color .35s ease; }
.msd-card-price { padding: 0 0 4px; color: var(--msd-muted); font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
	.msd-card:hover .msd-card-img img { transform: scale(1.04); }
	.msd-card:hover .msd-card-title { color: var(--msd-red); }
}
.msd-card:focus-visible { outline: 2px solid var(--msd-red); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .msd-card-img img { transition: none; } .msd-card:hover .msd-card-img img { transform: none; } }

/* Kaufbox */
.msd-buy { margin: 24px 0; padding: 24px; border: 1px solid var(--msd-line); display: grid; gap: 14px; max-width: 520px; background: #fff; }
.msd-price { font-size: 1.4em; font-weight: 600; margin: 0; color: var(--msd-ink); }
.msd-tiers, .msd-info, .msd-small { color: var(--msd-muted); font-size: .92em; margin: 0; }

/* Formulare */
.msd-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; flex: 1; }
.msd-field span { font-size: .9em; font-weight: 600; color: var(--msd-ink); }
.msd-shop input[type=text], .msd-shop input[type=email], .msd-shop input[type=tel], .msd-shop input[type=number], .msd-shop select, .msd-shop textarea,
.msd-buy input[type=number], .msd-buy select {
	border: 1px solid #d6d2cd; border-radius: 0; padding: 10px 12px; font: inherit; width: 100%; background: #fff; color: var(--msd-ink);
	transition: border-color .35s ease;
}
.msd-shop input:focus, .msd-shop select:focus, .msd-shop textarea:focus, .msd-buy input:focus, .msd-buy select:focus { outline: none; border-color: var(--msd-red); }
.msd-qty input { max-width: 120px; }
.msd-row { display: flex; gap: 12px; }
@media (max-width: 600px) { .msd-row { flex-direction: column; gap: 0; } }
.msd-checkout fieldset { border: 0; padding: 0; margin: 0 0 28px; }
.msd-checkout legend { font-weight: 600; font-size: 20px; color: var(--msd-ink); margin-bottom: 12px; padding: 0; }
.msd-radio, .msd-check { display: block; margin: 6px 0; cursor: pointer; }
.msd-radio input, .msd-check input { accent-color: var(--msd-red); }
.msd-shop [hidden] { display: none !important; }
.msd-error { color: var(--msd-red); font-size: .88em; }
.msd-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* Tabellen (Warenkorb, Kasse, Bestätigung) */
.msd-table { width: 100%; border-collapse: collapse; margin: 0 0 20px; }
.msd-table th, .msd-table td { padding: 12px 8px; border-bottom: 1px solid var(--msd-line); text-align: left; vertical-align: top; }
.msd-table .num { text-align: right; white-space: nowrap; }
.msd-table tfoot td { font-weight: 600; }
.msd-total td { font-size: 1.1em; border-bottom: 2px solid var(--msd-ink); }
.msd-qty-input { max-width: 90px; }
.msd-discount { color: var(--msd-red); }
.msd-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }

.msd-notice { padding: 12px 16px; background: #f4f2ef; border-left: 4px solid #4f7a5a; }
.msd-notice.is-error { border-left-color: var(--msd-red); }
.msd-notice a { color: var(--msd-red); }
.msd-cart-link { text-decoration: none; }
.msd-badge { display: inline-block; min-width: 20px; padding: 0 6px; background: var(--msd-red); color: #fff; font-size: 12px; text-align: center; }

/* Artikelseite (templates/single-artikel.php) */
.msd-back { margin: 0 0 24px; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.msd-back a { color: var(--msd-muted); text-decoration: none; transition: color .35s ease; }
.msd-back a:hover { color: var(--msd-red); }
.msd-product-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.msd-product-grid.no-image { grid-template-columns: minmax(0, 760px); }
.msd-product-image { background: #f4f2ef; aspect-ratio: 4 / 5; overflow: hidden; }
.msd-product-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.msd-product-body .entry-title { margin: 0 0 16px; padding: 0; font-size: 40px; font-weight: 300; line-height: 1.15; color: var(--msd-ink); }
@media (max-width: 800px) {
	.msd-product-grid { grid-template-columns: 1fr; gap: 24px; }
	.msd-product-body .entry-title { font-size: 30px; }
}
#main-content.msd-single .container::before { display: none; }
/* Handy: Kategorien kompakt umbrechen, alle sichtbar, nichts ragt über den Rand */
@media (max-width: 600px) {
	.msd-cats { gap: 6px; margin: 0 0 24px; }
	.msd-cats a { padding: 5px 10px; font-size: 12px; letter-spacing: .3px; }
}

/* Abstand oben und unten wie die Abschnitte der Website (50 px), damit der Inhalt nicht am Footer klebt */
.msd-shop-page #main-content .container, #main-content.msd-single .container { padding-top: 50px !important; padding-bottom: 50px !important; }
#main-content.msd-single #content-area { padding: 0; }

/* Warenkorb-Symbol in der Navi (nur sichtbar, wenn etwas im Warenkorb liegt; siehe shop.js) */
.msd-nav-cart { position: relative; display: inline-flex; align-items: center; color: rgba(0, 0, 0, .6); text-decoration: none; transition: color .35s ease; }
.msd-nav-cart:hover { color: var(--msd-red); }
.msd-nav-cart svg { display: block; }
.msd-nav-cart-n {
	position: absolute; top: -7px; right: -11px; min-width: 17px; height: 17px; padding: 0 4px;
	background: var(--msd-red); color: #fff; font-size: 11px; font-weight: 600; line-height: 17px; text-align: center;
}
.et-l--header .msd-nav-cart-item > a { padding-right: 6px !important; }
.msd-nav-cart--mobil { display: none; }
@media (max-width: 980px) {
	.msd-nav-cart--mobil {
		display: flex; justify-content: center; position: fixed; top: 15px; right: 78px; width: 46px; height: 46px;
		background: #fff; color: var(--msd-red); z-index: 100001;
	}
	body.admin-bar .msd-nav-cart--mobil { top: 61px; }
	.msd-nav-cart--mobil .msd-nav-cart-n { top: 5px; right: 3px; }
	html:has(#msd-toggle-checkbox:checked) .msd-nav-cart--mobil { display: none; }
}
.msd-shop > :last-child, .msd-shop form > :last-child { margin-bottom: 0; }

/* Hinweis Auslandversand unter «Land» */
.msd-ausland { margin: -4px 0 18px; }

/* ---------- Aktionen und Produkt des Monats ---------- */
.msd-card { position: relative; }
.msd-old-price { color: var(--msd-muted); font-weight: 400; margin-right: 2px; }
.msd-sale-price { color: var(--msd-red); text-decoration: none; font-weight: 600; }
.msd-sale-bis { margin: -6px 0 12px; }

.msd-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; margin: 0 0 40px; background: #f7f7f7; color: inherit; text-decoration: none; overflow: hidden; }
/* Bild füllt die ganze Höhe des Blocks (so hoch wie der Text daneben, mindestens 320 px) */
.msd-feature-img { display: block; position: relative; min-height: 320px; overflow: hidden; background: #eee; }
.msd-feature-img img { position: absolute; inset: 0; }
.msd-feature-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--msd-ease); }
.msd-feature-body { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; padding: 32px 36px; }
.msd-feature-title { font-size: 26px; line-height: 1.2; font-weight: 300; color: var(--msd-ink); text-transform: uppercase; letter-spacing: .02em; }
.msd-feature-text { color: var(--msd-muted); line-height: 1.6; }
.msd-feature-price { font-size: 20px; font-weight: 600; color: var(--msd-ink); }
.msd-feature .msd-btn { margin-top: 4px; }
@media (hover: hover) { .msd-feature:hover .msd-feature-img img { transform: scale(1.03); } }
@media (max-width: 760px) {
  .msd-feature { grid-template-columns: 1fr; margin-bottom: 28px; }
  .msd-feature-img { min-height: 0; aspect-ratio: 4 / 3; }
  .msd-feature-body { padding: 22px 20px 26px; }
  .msd-feature-title { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .msd-feature-img img { transition: none; } .msd-feature:hover .msd-feature-img img { transform: none; } }

/* Etiketten im msd-Design: rotes Rechteck, weisse fette Grossbuchstaben, kleiner Pfeil unten */
.msd-etiketten { display: flex; flex-wrap: wrap; gap: 12px 10px; margin: 0 0 18px; }
.msd-card .msd-etiketten, .msd-feature-img .msd-etiketten { position: absolute; top: 12px; left: 12px; z-index: 2; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0; pointer-events: none; }
.msd-etikett { position: relative; display: inline-block; background: var(--msd-red); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1; padding: 7px 10px; white-space: nowrap; }
.msd-etikett::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border-style: solid; border-width: 6px 6px 0 6px; border-color: var(--msd-red) transparent transparent transparent; }
.msd-etikett.is-highlight { background: var(--msd-ink); }
.msd-etikett.is-highlight::after { border-top-color: var(--msd-ink); }
@media (max-width: 600px) {
  .msd-card .msd-etiketten { top: 8px; left: 8px; gap: 10px; }
  .msd-card .msd-etikett { font-size: 10px; letter-spacing: .03em; padding: 5px 7px; }
  .msd-card .msd-etikett::after { border-width: 5px 5px 0 5px; bottom: -5px; }
}
