/* Medico Vouchers: makes the WooCommerce pages look like the rest of medico-hennef.de.
   Tokens match medico-core / design-package (petrol + green, Figtree, 14px radius). */
body.woocommerce, body.woocommerce-page, body.woocommerce-cart, body.woocommerce-checkout, body.woocommerce-account {
	--mv-petrol: #24400E; --mv-green: #4A8519; --mv-green-text: #3F7016;
	--mv-tint: #EEF3E3; --mv-cream: #FBFAF6; --mv-line: #E3E5DA; --mv-ink: #20241C; --mv-muted: #4A4A46;
	--mv-radius: 14px; --mv-shadow: 0 1px 2px rgba(36,64,14,.05), 0 12px 32px -12px rgba(36,64,14,.18);
	color: var(--mv-ink);
}

/* Page frame */
.woocommerce-page .site-main, .woocommerce-page main, .woocommerce-cart .site-main, .woocommerce-checkout .site-main {
	max-width: 1100px; margin: 0 auto; padding: 56px 24px 88px;
}
.woocommerce h1, .woocommerce h2, .woocommerce h3, .woocommerce-page h1, .woocommerce-page h2,
.woocommerce-page .page-title, .woocommerce-page .product_title {
	color: var(--mv-petrol); font-weight: 600; letter-spacing: -.02em; line-height: 1.2;
}
.woocommerce-breadcrumb { display: none; }

/* Product page: image + info as two calm cards */
.woocommerce div.product { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; width: 100%; max-width: 1100px; margin: 0 auto; }
.woocommerce div.product div.images, .woocommerce div.product .woocommerce-product-gallery,
.woocommerce div.product div.summary { float: none !important; flex: 1 1 420px; width: auto !important; max-width: 100%; margin: 0 !important; min-width: 0; }
.woocommerce div.product .woocommerce-product-gallery__wrapper, .woocommerce div.product .woocommerce-product-gallery__image { width: 100% !important; }
.woocommerce div.product div.images img { width: 100% !important; height: auto; border-radius: 22px; box-shadow: var(--mv-shadow); }
.woocommerce div.product .woocommerce-product-gallery__trigger { display: none; }
.woocommerce div.product p.price .woocommerce-Price-amount, .woocommerce div.product span.price .woocommerce-Price-amount { color: var(--mv-green-text); }
.woocommerce div.product .product_title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 10px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--mv-green-text) !important; font-size: 1.15rem; font-weight: 600; }
.woocommerce div.product form.cart { margin-top: 18px; }
.woocommerce div.product .product_meta, .woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related { display: none; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--mv-muted); }
/* Amount picker: chips + own amount */
.mv-amount { border: 0; padding: 0; margin: 6px 0 20px; }
.mv-amount legend { font-weight: 600; color: var(--mv-petrol); margin-bottom: 10px; padding: 0; }
.mv-chips { display: flex; flex-wrap: wrap; gap: 10px; }
/* !important: Hello's reset and the Elementor kit style every <button> pink/square. */
body .mv-amount .mv-chip {
	min-width: 76px; padding: 12px 18px !important; border-radius: 999px !important; border: 1.5px solid var(--mv-line) !important;
	background: #fff !important; color: var(--mv-petrol) !important; font-family: inherit !important; font-size: 1rem !important;
	font-weight: 600 !important; line-height: 1.2 !important; text-transform: none !important; cursor: pointer;
	transition: border-color .2s, background .2s, transform .2s;
}
body .mv-amount .mv-chip:hover { border-color: var(--mv-green) !important; transform: translateY(-1px); }
body .mv-amount .mv-chip:focus-visible { outline: 3px solid rgba(74,133,25,.35); outline-offset: 2px; }
body .mv-amount .mv-chip[aria-pressed="true"] { background: var(--mv-petrol) !important; border-color: var(--mv-petrol) !important; color: #fff !important; }
.mv-own { display: block; margin: 16px 0 8px; font-size: .92rem; color: var(--mv-muted); font-weight: 500; }
.mv-input { position: relative; max-width: 200px; }
.woocommerce .mv-input input { width: 100%; padding-right: 40px !important; font-weight: 600; font-size: 1.05rem; }
.mv-input span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--mv-muted); font-weight: 600; pointer-events: none; }

/* Live amount badge on the voucher picture */
.woocommerce div.product .woocommerce-product-gallery { position: relative; }
.mv-badge {
	position: absolute; top: 22px; right: 22px; z-index: 5; padding: 12px 20px; border-radius: 999px;
	background: var(--mv-petrol); color: #fff; font-weight: 700; font-size: 1.35rem; letter-spacing: .01em;
	box-shadow: 0 10px 24px -8px rgba(36,64,14,.55); opacity: 0; transform: scale(.85); transition: opacity .25s, transform .25s;
}
.mv-badge.is-on { opacity: 1; transform: scale(1); }
.mv-badge.pop { animation: mv-pop .35s ease; }
@keyframes mv-pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .mv-badge, .mv-badge.pop, .mv-chip { animation: none; transition: none; } }
@media (max-width: 800px) { .woocommerce div.product { gap: 28px; } }

/* Fields */
.woocommerce input[type="text"], .woocommerce input[type="email"], .woocommerce input[type="tel"],
.woocommerce input[type="number"], .woocommerce input[type="password"], .woocommerce textarea,
.woocommerce select, .woocommerce .select2-selection {
	border: 1.5px solid var(--mv-line) !important; border-radius: 12px !important; background: #fff;
	padding: 12px 14px !important; font: inherit; color: var(--mv-ink); min-height: 48px; box-shadow: none;
}
.woocommerce input:focus, .woocommerce textarea:focus, .woocommerce select:focus {
	outline: none; border-color: var(--mv-green) !important; box-shadow: 0 0 0 3px rgba(74,133,25,.18);
}
.woocommerce form .form-row label { font-weight: 600; color: var(--mv-petrol); }

/* Buttons */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #place_order,
.wc-block-components-button:not(.is-link) {
	background: var(--mv-green) !important; color: #fff !important; border: 0 !important; border-radius: 999px !important;
	padding: 14px 28px !important; font-weight: 600; font-size: 1rem; line-height: 1.2; transition: transform .2s, background .2s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce #place_order:hover,
.wc-block-components-button:not(.is-link):hover { background: var(--mv-green-text) !important; transform: translateY(-2px); }
.woocommerce button.button:disabled, .woocommerce button.button:disabled[disabled] { opacity: .5; transform: none; }

/* Cart + checkout cards */
.woocommerce table.shop_table { border: 1px solid var(--mv-line); border-radius: var(--mv-radius); border-collapse: separate; overflow: hidden; background: #fff; box-shadow: var(--mv-shadow); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { border-color: var(--mv-line); padding: 16px 18px; }
.woocommerce table.shop_table thead th { background: var(--mv-tint); color: var(--mv-petrol); font-weight: 600; }
.woocommerce .cart_totals, .woocommerce-checkout #order_review, .woocommerce-checkout-review-order-table { color: var(--mv-ink); }
.woocommerce-checkout #payment { background: var(--mv-tint); border-radius: var(--mv-radius); }
.woocommerce-checkout #payment div.payment_box { background: #fff; border-radius: 12px; color: var(--mv-muted); }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
.woocommerce-checkout #payment ul.payment_methods { border-color: var(--mv-line); }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	border: 0; border-left: 5px solid var(--mv-green); border-radius: 12px; background: var(--mv-tint); color: var(--mv-ink); padding: 16px 20px 16px 52px;
}
.woocommerce-error { border-left-color: #C75300; background: #FDF1E8; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--mv-green); }
.woocommerce-error::before { color: #C75300; }
.woocommerce-message .button { margin-left: 12px; }

/* Order received: the code is the hero */
.woocommerce-order-received code, .woocommerce-order code {
	display: inline-block; background: var(--mv-tint); border: 2px dashed var(--mv-green); border-radius: 12px;
	padding: 8px 16px; color: var(--mv-petrol); font-weight: 600; letter-spacing: .12em; font-size: 1.25rem;
}

/* Design choice: two thumbnails */
.mv-design-row { display: flex; gap: 14px; flex-wrap: wrap; }
.mv-design { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; color: var(--mv-petrol); font-size: .92rem; }
.mv-design input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mv-design img { width: 110px; height: auto; border-radius: 10px; border: 2px solid var(--mv-line); transition: border-color .2s, transform .2s, box-shadow .2s; }
.mv-design:hover img { transform: translateY(-2px); }
.mv-design input:checked + img { border-color: var(--mv-petrol); box-shadow: 0 0 0 3px rgba(36,64,14,.18); }
.mv-design input:focus-visible + img { outline: 3px solid rgba(74,133,25,.45); outline-offset: 2px; }

/* Für / Von */
.mv-names { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; max-width: 420px; }
.mv-names legend { grid-column: 1 / -1; }
.mv-names label { font-weight: 600; color: var(--mv-petrol); }
.woocommerce .mv-names input { width: 100%; }

/* PDF link on thank-you page and account */
.mv-pdf-link { display: inline-block; margin-top: 8px; font-weight: 600; color: var(--mv-green-text); }

/* ===== Block cart + checkout (Warenkorb / Kasse) ===== */
/* One column width for the page title and the block, so both start on the same line. */
.woocommerce-cart .site-main, .woocommerce-checkout .site-main, .woocommerce-account .site-main { max-width: 1140px; padding-left: 24px; padding-right: 24px; }
.woocommerce-cart .site-main .page-header, .woocommerce-checkout .site-main .page-header, .woocommerce-account .site-main .page-header,
.woocommerce-cart .site-main .page-content, .woocommerce-checkout .site-main .page-content, .woocommerce-account .site-main .page-content { max-width: none; width: 100%; margin: 0; padding: 0; }
.woocommerce-cart .entry-title, .woocommerce-checkout .entry-title, .woocommerce-account .entry-title { color: var(--mv-petrol); font-weight: 600; letter-spacing: -.02em; margin: 0 0 28px; }
.woocommerce-cart .alignwide, .woocommerce-checkout .alignwide { max-width: 100% !important; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }

/* Cards */
.wp-block-woocommerce-cart .wc-block-cart__main, .wp-block-woocommerce-cart .wc-block-cart__sidebar,
.wp-block-woocommerce-checkout .wc-block-checkout__main, .wp-block-woocommerce-checkout .wc-block-checkout__sidebar {
	background: #fff; border: 1px solid var(--mv-line); border-radius: 22px; padding: 26px 28px !important; box-shadow: var(--mv-shadow);
}
.wp-block-woocommerce-cart .wc-block-cart__main { align-self: start; }
.wc-block-cart-items { border: 0 !important; }
.wc-block-cart-items th, .wc-block-cart-items .wc-block-cart-items__header { color: var(--mv-petrol) !important; font-weight: 600 !important; letter-spacing: .04em; }
.wc-block-cart-items td, .wc-block-cart-items tr { border-color: var(--mv-line) !important; }
.wc-block-components-sidebar .wc-block-components-title, .wc-block-cart__totals-title { color: var(--mv-petrol) !important; font-weight: 600 !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label { color: var(--mv-petrol); font-weight: 700; }

/* Product line: name, picture, clutter */
.wc-block-components-product-name, a.wc-block-components-product-name { color: var(--mv-petrol) !important; font-weight: 600; text-decoration: none !important; font-size: 1.05rem; }
.wc-block-components-product-name:hover { color: var(--mv-green-text) !important; }
.wc-block-cart-item__image img, .wc-block-components-order-summary-item__image img { border-radius: 10px; border: 1px solid var(--mv-line); }
.wc-block-components-product-metadata__description { display: none; } /* the long product text */
.wc-block-components-product-details { color: var(--mv-muted); font-size: .9rem; }
.wc-block-components-product-details__name { font-weight: 600; color: var(--mv-petrol); }
.wc-block-cart-item__remove-link { color: var(--mv-muted) !important; }

/* Buttons: no theme underline, site green, pill */
.wc-block-components-button, .wc-block-components-button:hover, .wc-block-components-button .wc-block-components-button__text,
.wp-block-woocommerce-empty-cart-block .wp-block-button__link { text-decoration: none !important; }
.wp-block-woocommerce-empty-cart-block .wp-block-button__link {
	background: var(--mv-green) !important; color: #fff !important; border-radius: 999px !important; padding: 14px 28px !important; font-weight: 600; border: 0;
}
.wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover { background: var(--mv-green-text) !important; }
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { min-height: 54px; font-size: 1.05rem !important; }

/* Coupon field + other links */
.wc-block-components-totals-coupon a, .wc-block-components-panel__button { color: var(--mv-petrol) !important; text-decoration: none !important; font-weight: 600; }
.wc-block-components-text-input input, .wc-block-components-combobox input, .wc-block-components-textarea, .wc-blocks-components-select select {
	border: 1.5px solid var(--mv-line) !important; border-radius: 12px !important; background: #fff !important;
}
.wc-block-components-text-input input:focus, .wc-block-components-combobox input:focus { border-color: var(--mv-green) !important; box-shadow: 0 0 0 3px rgba(74,133,25,.18) !important; }
.wc-block-components-checkbox .wc-block-components-checkbox__input:checked { background: var(--mv-green) !important; border-color: var(--mv-green) !important; }
.wc-block-components-radio-control__input:checked { border-color: var(--mv-green) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--mv-green) !important; }
.wc-block-components-radio-control-accordion-option, .wc-block-components-radio-control__option { border-color: var(--mv-line) !important; }
.wp-block-woocommerce-checkout a:not(.wc-block-components-button) { color: var(--mv-green-text); }

/* Empty cart: only the message and the button, no product grid */
.wp-block-woocommerce-empty-cart-block { text-align: center; padding: 30px 0 10px; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator,
.wp-block-woocommerce-empty-cart-block .wp-block-product-new,
.wp-block-woocommerce-empty-cart-block .wc-block-grid,
.wp-block-woocommerce-empty-cart-block h2:not(.wc-block-cart__empty-cart__title) { display: none !important; }
.wc-block-cart__empty-cart__title { color: var(--mv-petrol); font-weight: 600; }

@media (max-width: 700px) {
	.wp-block-woocommerce-cart .wc-block-cart__main, .wp-block-woocommerce-cart .wc-block-cart__sidebar,
	.wp-block-woocommerce-checkout .wc-block-checkout__main, .wp-block-woocommerce-checkout .wc-block-checkout__sidebar { padding: 18px 16px !important; border-radius: 16px; }
}
