/* Vesmat Shop – vyskakovací okno, panel košíku, tlačítka. Barvy = původní web (#176c35). */
:root { --vsm-green: #176c35; --vsm-green-dark: #0f4f26; --vsm-text: #1b1b1b; --vsm-muted: #666; --vsm-line: #e3e3e3; --vsm-bg: #fff; --vsm-soft: #f3f8f4; }
html.vsm-lock { overflow: hidden; }

/* ---------- tlačítka v obsahu ---------- */
a.vesmat-add { cursor: pointer; }
a.vesmat-add.ico.eshop:not(.button)::before { color: var(--vsm-green); }
a.vesmat-btn, .vesmat-btn.button { display: inline-flex !important; align-items: center; justify-content: center; gap: .4em; padding: .7em 1.2em !important; background: var(--vsm-green) !important; color: #fff !important; border-radius: 4px; text-decoration: none !important; font-weight: 500; line-height: 1.1; border: 0; }
a.vesmat-btn:hover { background: #3f3f3f !important; }
a.vesmat-btn.ico.eshop::before { color: #fff; margin-right: .2em; }
a.vesmat-btn-ghost { background: #fff !important; color: var(--vsm-green) !important; border: 1px solid var(--vsm-green) !important; }

/* ---------- nákupní box na stránce druhu ---------- */
.vesmat-buybox { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; margin: 0 0 1.5em; background: var(--vsm-soft); border: 1px solid #cfe5d6; border-left: 4px solid var(--vsm-green); border-radius: 6px; }
.vesmat-buybox-text strong { display: block; font-family: 'Teko', sans-serif; font-size: 22px; font-weight: 400; line-height: 1; }
.vesmat-buybox-text span { color: var(--vsm-green); font-weight: 600; }
.vesmat-buybox-sizes { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
a.vesmat-chip { display: inline-block; padding: .4em .8em; border: 1px solid #b9d8c3; border-radius: 2em; background: #fff; color: var(--vsm-text) !important; text-decoration: none !important; font-size: 14px; }
a.vesmat-chip::before { display: none !important; }
a.vesmat-chip:hover { border-color: var(--vsm-green); background: var(--vsm-green); color: #fff !important; }

/* ---------- ceník: ceny jako tlačítka ---------- */
button.vsm-price { display: inline-flex; align-items: center; gap: .45em; padding: .35em .6em; border: 1px solid transparent; border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; white-space: nowrap; transition: all .15s; }
button.vsm-price i::before { content: "\f07a"; font: normal normal 300 14px/1 'FontAwesome'; color: var(--vsm-green); opacity: .55; }
button.vsm-price:hover, button.vsm-price:focus-visible { border-color: var(--vsm-green); background: var(--vsm-green); color: #fff; }
button.vsm-price:hover i::before, button.vsm-price:focus-visible i::before { color: #fff; opacity: 1; font-weight: 400; }
tr.vsm-row:hover td { background: #f6faf7; }

/* ---------- plovoucí košík ---------- */
.vesmat-float-cart { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 58px; height: 58px; border-radius: 50%; background: var(--vsm-green); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); text-decoration: none; }
.vesmat-float-cart::before { content: "\f07a"; font: normal normal 400 22px/1 'FontAwesome'; color: #fff; }
.vesmat-float-cart .vesmat-cart-count { position: absolute; top: -4px; right: -4px; background: #fff; color: var(--vsm-green); border: 2px solid var(--vsm-green); }
.vesmat-float-cart[data-count="0"] { display: none; }
@media (min-width: 768px) { .vesmat-float-cart { right: 24px; bottom: 90px; } }

/* ---------- overlay ---------- */
.vsm-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(15, 20, 18, .55); opacity: 0; transition: opacity .2s; }
.vsm-overlay.is-open { opacity: 1; }
.vsm-close { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; color: #555; border-radius: 50%; }
.vsm-close:hover { background: #f0f0f0; }

/* ---------- modal ---------- */
.vsm-modal { position: fixed; z-index: 9999; left: 50%; top: 50%; width: min(620px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; transform: translate(-50%, -46%); opacity: 0; transition: all .2s; background: var(--vsm-bg); color: var(--vsm-text); border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.35); font-family: 'Roboto', sans-serif; font-size: 15px; line-height: 1.4; }
.vsm-modal.is-open { transform: translate(-50%, -50%); opacity: 1; }
.vsm-modal-body { padding: 22px 22px 18px; }
.vsm-loading, .vsm-error { padding: 40px 0; text-align: center; color: var(--vsm-muted); }
.vsm-product { display: flex; gap: 16px; padding-right: 30px; margin-bottom: 14px; }
.vsm-img { flex: 0 0 110px; }
.vsm-img img { width: 110px; height: 110px; object-fit: cover; border-radius: 6px; }
.vsm-title { font-family: 'Teko', sans-serif; font-weight: 400; font-size: 30px; line-height: 1; margin: 0 0 6px; color: var(--vsm-text); }
.vsm-short { margin: 0 0 6px; color: var(--vsm-muted); font-size: 14px; }
.vsm-links { margin: 0; font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.vsm-links a { color: var(--vsm-green); }
.vsm-sizes { border: 0; margin: 0 0 12px; padding: 0; }
.vsm-sizes legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.vsm-size { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--vsm-line); border-radius: 6px; cursor: pointer; transition: all .15s; }
.vsm-size:hover { border-color: #9cc9aa; }
.vsm-size:has(input:checked) { border-color: var(--vsm-green); background: var(--vsm-soft); box-shadow: inset 0 0 0 1px var(--vsm-green); }
.vsm-size input { accent-color: var(--vsm-green); width: 18px; height: 18px; margin: 0; }
.vsm-size-main b { font-weight: 600; text-transform: capitalize; }
.vsm-size-main small { display: block; color: var(--vsm-muted); font-size: 13px; }
.vsm-size-ship { font-size: 12px; color: var(--vsm-muted); text-align: right; }
.vsm-size-ship.ship-post { color: var(--vsm-green); }
.vsm-size-ship.ship-pickup { color: #9a5b00; }
.vsm-size-price { font-weight: 700; white-space: nowrap; min-width: 70px; text-align: right; }
.vsm-size.is-disabled { opacity: .5; cursor: not-allowed; }
.vsm-extra { display: block; margin: 0 0 12px; font-weight: 600; }
.vsm-extra select { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font: inherit; font-weight: 400; }
.vsm-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; }
.vsm-qty { display: inline-flex; align-items: stretch; border: 1px solid #ccc; border-radius: 6px; overflow: hidden; }
.vsm-qty button { width: 40px; border: 0; background: #f4f4f4; font-size: 20px; cursor: pointer; color: var(--vsm-text); }
.vsm-qty button:hover { background: #e8e8e8; }
.vsm-qty input { width: 54px; border: 0; text-align: center; font: inherit; font-weight: 600; -moz-appearance: textfield; }
.vsm-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.vsm-qty span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; font-weight: 600; }
.vsm-qty-sm button { width: 30px; font-size: 16px; }
.vsm-total { text-align: right; }
.vsm-total small { display: block; color: var(--vsm-muted); font-size: 12px; text-transform: uppercase; }
.vsm-total b { font-size: 22px; color: var(--vsm-green); }
.vsm-btn { display: flex; align-items: center; justify-content: center; width: 100%; padding: 13px 16px; border: 1px solid var(--vsm-green); border-radius: 6px; background: #fff; color: var(--vsm-green) !important; font: 600 16px/1.1 'Roboto', sans-serif; text-decoration: none !important; cursor: pointer; transition: all .15s; }
.vsm-btn:hover { background: var(--vsm-soft); }
.vsm-btn-primary { background: var(--vsm-green); color: #fff !important; }
.vsm-btn-primary:hover { background: var(--vsm-green-dark); }
.vsm-btn:disabled { opacity: .5; cursor: not-allowed; }
.vsm-btn.is-loading { opacity: .7; cursor: progress; }
.vsm-msg { color: #b32d2e; margin: 8px 0 0; font-weight: 600; }
.vsm-note { font-size: 13px; color: var(--vsm-muted); margin: 10px 0 0; padding: 8px 10px; background: #fafafa; border-radius: 4px; }
.vsm-added { text-align: center; padding: 6px 10px 0; }
.vsm-check { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: var(--vsm-green); color: #fff; font-size: 30px; line-height: 56px; }
.vsm-added h2 { font-family: 'Teko', sans-serif; font-weight: 400; font-size: 32px; margin: 0 0 8px; color: var(--vsm-text); }
.vsm-added-sum { font-weight: 600; }
.vsm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 6px; }
.vsm-added a.vsm-show-cart { color: var(--vsm-green); font-size: 14px; }

/* ---------- drawer ---------- */
.vsm-drawer { position: fixed; z-index: 9999; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: var(--vsm-bg); color: var(--vsm-text); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease-out; box-shadow: -10px 0 40px rgba(0,0,0,.25); font-family: 'Roboto', sans-serif; font-size: 15px; }
.vsm-drawer.is-open { transform: none; }
.vsm-drawer-head { position: relative; padding: 18px 20px; border-bottom: 1px solid var(--vsm-line); background: var(--vsm-green); color: #fff; }
.vsm-drawer-head strong { font-family: 'Teko', sans-serif; font-weight: 400; font-size: 28px; line-height: 1; }
.vsm-drawer-head .vsm-close { color: #fff; top: 10px; }
.vsm-drawer-head .vsm-close:hover { background: rgba(255,255,255,.15); }
.vsm-drawer-body { flex: 1; overflow: auto; padding: 0 20px 20px; display: flex; flex-direction: column; }
.vsm-empty { padding: 30px 0 16px; text-align: center; color: var(--vsm-muted); }
.vsm-items { list-style: none; margin: 0; padding: 0; }
.vsm-items li { position: relative; display: flex; gap: 12px; padding: 14px 28px 14px 0; border-bottom: 1px solid var(--vsm-line); }
.vsm-items li::before { display: none !important; }
.vsm-items li.is-loading { opacity: .5; }
.vsm-items img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; flex: 0 0 64px; }
.vsm-item-info { flex: 1; min-width: 0; }
.vsm-item-info > a { color: var(--vsm-text); font-weight: 600; text-decoration: none; }
.vsm-item-info small { display: block; color: var(--vsm-muted); font-size: 13px; }
.vsm-item-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.vsm-line { font-weight: 700; }
.vsm-remove { position: absolute; top: 12px; right: 0; width: 26px; height: 26px; border: 0; background: transparent; font-size: 20px; color: #999; cursor: pointer; border-radius: 50%; }
.vsm-remove:hover { color: #b32d2e; background: #fbeaea; }
.vsm-drawer-foot { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }
.vsm-subtotal { display: flex; justify-content: space-between; font-size: 18px; margin: 0; }
.vsm-subtotal b { color: var(--vsm-green); }

/* ---------- košík / pokladna ---------- */
.vesmat-ship-note { margin: 0 0 1.2em; padding: 10px 14px; background: var(--vsm-soft); border-left: 4px solid var(--vsm-green); border-radius: 4px; }
.vesmat-species-link { margin-top: 1em; }

@media (max-width: 520px) {
	.vsm-modal { top: auto; bottom: 0; left: 0; width: 100vw; max-height: 92vh; border-radius: 14px 14px 0 0; transform: translateY(30px); }
	.vsm-modal.is-open { transform: none; }
	.vsm-img { flex-basis: 76px; } .vsm-img img { width: 76px; height: 76px; }
	.vsm-size { grid-template-columns: 22px 1fr auto; }
	.vsm-size-ship { grid-column: 2 / 4; text-align: left; order: 5; }
	.vsm-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .vsm-modal, .vsm-drawer, .vsm-overlay { transition: none; } }
.vsm-overlay[hidden], .vsm-modal[hidden], .vsm-drawer[hidden] { display: none !important; }
