/* Marine Quotes – storefront */
:root {
	--mq-accent: #f59e10;
	--mq-accent-hover: #0a7c96;
	--mq-ink: #1d2b36;
	--mq-muted: #5f6d78;
	--mq-line: #e2e7eb;
	--mq-error: #c62828;
	--mq-ok: #2e7d32;
}

/* Popup */
html.mq-modal-open { overflow: hidden; }
.mq-modal[hidden] { display: none !important; }
.mq-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mq-modal-overlay { position: absolute; inset: 0; background: rgba(10, 20, 30, .72); }
.mq-modal-box { position: relative; background: #fff; color: var(--mq-ink); width: 100%; max-width: 980px; max-height: calc(100vh - 32px); overflow: auto; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.mq-modal-close { position: absolute; top: 8px; right: 10px; z-index: 2; width: 40px; height: 40px; border: 0; background: transparent; font-size: 30px; line-height: 1; color: var(--mq-muted); cursor: pointer; }
.mq-modal-close:hover { color: var(--mq-ink); }
.mq-modal-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; padding: 32px; }
.mq-gallery-main img { width: 100%; height: auto; display: block; border-radius: 4px; }
.mq-gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mq-thumb { padding: 0; border: 2px solid transparent; background: none; cursor: pointer; width: 64px; border-radius: 3px; }
.mq-thumb img { display: block; width: 100%; height: auto; }
.mq-thumb.is-active { border-color: var(--mq-accent); }
.mq-title { margin: 0 32px 8px 0 !important; font-size: 24px !important; line-height: 1.25 !important; }
.mq-price { font-size: 20px; font-weight: 600; margin: 0 0 12px; color: var(--mq-accent-hover); }
.mq-description { color: var(--mq-muted); font-size: 14px; margin-bottom: 16px; }
.mq-details-link { margin-top: 18px; font-size: 14px; }
.mq-loading { display: flex; align-items: center; justify-content: center; min-height: 320px; }
.mq-spinner { width: 36px; height: 36px; border: 3px solid var(--mq-line); border-top-color: var(--mq-accent); border-radius: 50%; animation: mq-spin .8s linear infinite; }
@keyframes mq-spin { to { transform: rotate(360deg); } }

/* Add-to-quote form */
.mq-form { margin: 12px 0; }
.mq-attribute { margin-bottom: 12px; }
.mq-attribute label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; }
.mq-attribute select { width: 100%; max-width: 360px; }
.mq-variation-info { min-height: 1.5em; margin-bottom: 10px; }
.mq-variation-price { font-size: 18px; font-weight: 600; color: var(--mq-accent-hover); margin-right: 10px; }
.mq-variation-sku { color: var(--mq-muted); font-size: 13px; }
.mq-add-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.mq-add-row .mq-qty { width: 80px; text-align: center; }
.mq-form .mq-add, .mq-request-form .mq-send { background: var(--mq-accent) !important; border-color: var(--mq-accent) !important; color: #fff !important; }
.mq-form .mq-add:hover, .mq-request-form .mq-send:hover { background: var(--mq-accent-hover) !important; border-color: var(--mq-accent-hover) !important; }
.mq-add:disabled, .mq-send:disabled { opacity: .6; cursor: not-allowed; }
.is-loading { position: relative; color: transparent !important; }
.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: mq-spin .8s linear infinite; }
.mq-message { margin-top: 12px; }
.mq-success { color: var(--mq-ok); font-weight: 600; margin-bottom: 8px; }
.mq-success-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mq-success-actions .button { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 3px; font-size: 13px; font-weight: 600; text-transform: uppercase; text-decoration: none !important; line-height: 1.2; cursor: pointer; border: 1px solid var(--mq-accent-hover); }
.mq-success-actions .button.alt { background: var(--mq-accent-hover) !important; color: #fff !important; }
.mq-success-actions .mq-continue { background: #fff !important; color: var(--mq-accent-hover) !important; }
.mq-error { color: var(--mq-error); }

/* Floating quote button */
.mq-fab[hidden] { display: none !important; }
.mq-fab { position: fixed; right: 20px; bottom: 20px; z-index: 99990; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 30px; background: var(--mq-accent); color: #fff !important; text-decoration: none !important; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-weight: 600; }
.mq-fab:hover { background: var(--mq-accent-hover); }
.mq-fab-count { background: #fff; color: var(--mq-ink); border-radius: 12px; min-width: 24px; height: 24px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }

/* Quote page */
.mq-list { width: 100%; margin-bottom: 12px; }
.mq-list th, .mq-list td { vertical-align: middle; padding: 10px 8px; }
.mq-col-thumb { width: 80px; }
.mq-col-thumb img { width: 64px; height: auto; display: block; }
.mq-col-qty { width: 100px; }
.mq-col-qty .mq-qty { width: 72px; text-align: center; }
.mq-col-total { text-align: right; white-space: nowrap; }
.mq-col-remove { width: 40px; text-align: center; }
.mq-remove { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--mq-muted); cursor: pointer; }
.mq-remove:hover { color: var(--mq-error); }
.mq-item-name { font-weight: 600; }
.mq-item-meta { color: var(--mq-muted); font-size: 13px; }
.mq-list-actions { text-align: right; }
.mq-quote-page.is-empty .mq-request-form { display: none; }
.mq-request-form { margin-top: 32px; }
.mq-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.mq-field { margin: 0 0 14px; }
.mq-field-wide { grid-column: 1 / -1; }
.mq-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.mq-field input, .mq-field textarea { width: 100%; }
.mq-field.has-error input, .mq-field.has-error textarea { border-color: var(--mq-error) !important; }
.mq-field-error { color: var(--mq-error); font-size: 13px; }
.mq-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.mq-form-message { margin-bottom: 12px; }
.mq-sent { padding: 24px; border: 1px solid var(--mq-line); border-left: 4px solid var(--mq-ok); background: #f6fbf6; font-size: 16px; }

/* Slide-out quote panel */
.mq-drawer[hidden] { display: none !important; }
.mq-drawer { position: fixed; inset: 0; z-index: 100001; }
.mq-drawer-overlay { position: absolute; inset: 0; background: rgba(10, 20, 30, .55); opacity: 0; transition: opacity .25s ease; }
.mq-drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; background: #fff; color: var(--mq-ink); display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.25); transform: translateX(100%); transition: transform .25s ease; }
.admin-bar .mq-drawer-panel { top: 32px; }
@media (max-width: 782px) { .admin-bar .mq-drawer-panel { top: 46px; } }
.mq-drawer.is-open .mq-drawer-overlay { opacity: 1; }
.mq-drawer.is-open .mq-drawer-panel { transform: none; }
.mq-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--mq-line); }
.mq-drawer-head h2 { margin: 0 !important; font-size: 20px !important; line-height: 1.3 !important; }
.mq-drawer-count { color: var(--mq-muted); font-weight: 400; }
.mq-drawer-close { width: 40px; height: 40px; border: 0; background: transparent; font-size: 30px; line-height: 1; color: var(--mq-muted); cursor: pointer; }
.mq-drawer-close:hover { color: var(--mq-ink); }
.mq-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 24px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mq-drawer-items { list-style: none; margin: 0; padding: 0; }
.mq-drawer-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--mq-line); align-items: start; }
.mq-drawer-thumb img { width: 64px; height: 64px; object-fit: cover; display: block; border-radius: 3px; }
.mq-drawer-info .mq-item-name { display: block; font-size: 14px; line-height: 1.35; margin-bottom: 2px; }
.mq-drawer-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.mq-stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--mq-line); border-radius: 4px; overflow: hidden; }
.mq-stepper .mq-step { width: 32px; border: 0; background: #f4f6f8; color: var(--mq-ink); font-size: 16px; cursor: pointer; }
.mq-stepper .mq-step:hover { background: var(--mq-line); }
.mq-stepper .mq-qty { width: 48px; border: 0 !important; text-align: center; padding: 4px 0 !important; height: 32px !important; -moz-appearance: textfield; }
.mq-stepper .mq-qty::-webkit-inner-spin-button, .mq-stepper .mq-qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mq-drawer-price { font-weight: 600; white-space: nowrap; }
.mq-drawer-total { display: flex; justify-content: space-between; padding: 14px 0 4px; font-size: 16px; }
.mq-drawer-body .mq-request-form { margin-top: 20px; padding-top: 16px; border-top: 2px solid var(--mq-line); }
.mq-drawer-body .mq-request-title { font-size: 17px !important; margin: 0 0 12px !important; }
.mq-drawer-body .mq-fields { grid-template-columns: 1fr 1fr; gap: 0 12px; }
.mq-drawer-body .mq-field-email, .mq-drawer-body .mq-field-address, .mq-drawer-body .mq-field-tournamentname { grid-column: 1 / -1; }
.mq-drawer-body .mq-field label { font-size: 13px; }
.mq-drawer-body .mq-send { width: 100%; }
.mq-drawer-body .mq-empty { text-align: center; padding: 40px 0; color: var(--mq-muted); }
.mq-quote-box.is-empty .mq-request-form { display: none; }
.mq-sent strong { display: block; margin-bottom: 6px; }
button.mq-fab, .mq-fab { cursor: pointer; }

@media (max-width: 760px) {
	.mq-modal { padding: 0; align-items: stretch; }
	.mq-modal-box { max-height: 100vh; border-radius: 0; }
	.mq-modal-product { grid-template-columns: 1fr; gap: 18px; padding: 52px 16px 24px; }
	.mq-fields { grid-template-columns: 1fr; }
	.mq-list thead { display: none; }
	.mq-list tr { display: grid; grid-template-columns: 72px 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--mq-line); }
	.mq-list td { padding: 0; border: 0 !important; }
	.mq-list .mq-col-thumb { grid-row: span 3; }
	.mq-list .mq-col-remove { grid-row: 1; grid-column: 3; }
	.mq-list .mq-col-qty, .mq-list .mq-col-total { grid-column: 2; text-align: left; }
	.mq-list tfoot tr { grid-template-columns: 1fr auto; }
	.mq-fab-label { display: none; }
	.mq-drawer-panel { width: 100%; }
	.mq-drawer-body .mq-fields { grid-template-columns: 1fr; }
}
