/* MM Deals store features. Uses the theme's tokens (--navy, --accent, --line ...). */

.mmds-i { width: 22px; height: 22px; flex: none; display: block; }
.mmd-btn--line { background: #fff !important; color: var(--navy) !important; box-shadow: inset 0 0 0 1.5px var(--navy) !important; }
.mmd-btn--line:hover { background: #f1f4f8 !important; }
.mmd-noscroll { overflow: hidden; }
.loading { opacity: .65; pointer-events: none; }

/* WooCommerce's "View cart" link after an AJAX add: the drawer replaces it. */
ul.products li.product a.added_to_cart, .mmd-compare a.added_to_cart { display: none !important; }

/* ---------- Header wishlist ---------- */
.mmd-wish { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: #fff; text-decoration: none; }
.mmd-wish .mmds-i { width: 26px; height: 26px; }
.mmd-wish:hover { color: #ffd2b0; }
.mmd-wish__count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-sizing: border-box; }
.mmd-wish__count[hidden] { display: none; }

/* ---------- Mini cart drawer ---------- */
.mmd-drawer[hidden] { display: none; }
.mmd-drawer { position: fixed; inset: 0; z-index: 100000; }
.mmd-drawer__overlay { position: absolute; inset: 0; background: rgba(12, 24, 40, .55); opacity: 0; transition: opacity .2s ease; }
.mmd-drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; outline: none; box-shadow: -8px 0 30px rgba(0,0,0,.15); }
.mmd-drawer.is-open .mmd-drawer__overlay { opacity: 1; }
.mmd-drawer.is-open .mmd-drawer__panel { transform: none; }
.mmd-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.mmd-drawer__head h2 { margin: 0; font-size: 26px; }
.mmd-drawer__close { background: none !important; border: 0; color: var(--ink) !important; padding: 10px !important; margin: -10px; box-shadow: none !important; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.mmd-drawer__added { margin: 0; padding: 10px 18px; background: #eaf6ee; color: #1d6b3a; font-weight: 600; font-size: 15px; }
.mmd-drawer__added { display: flex; align-items: center; gap: 8px; }
.mmd-drawer__added[hidden] { display: none; }
.mmd-drawer .widget_shopping_cart_content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.mmd-drawer .woocommerce-mini-cart { list-style: none; margin: 0; padding: 4px 18px; overflow-y: auto; flex: 1; }
.mmd-drawer .woocommerce-mini-cart-item { position: relative; display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 12px; padding: 14px 32px 14px 0 !important; border-bottom: 1px solid #eef1f4; font-size: 15px; line-height: 1.35; }
.mmd-drawer .woocommerce-mini-cart-item a:not(.remove) { grid-column: 2; color: var(--ink); text-decoration: none; font-weight: 600; display: contents; }
.mmd-drawer .woocommerce-mini-cart-item img { grid-row: 1 / 3; grid-column: 1; width: 64px !important; max-width: none !important; height: 64px !important; box-sizing: border-box; padding: 4px; object-fit: contain; margin: 0 !important; float: none !important; border: 1px solid #eef1f4; border-radius: 6px; }
.mmd-drawer .woocommerce-mini-cart-item .quantity { grid-column: 2; color: var(--muted); font-size: 14px; margin-top: 4px; display: block; }
.mmd-drawer .woocommerce-mini-cart-item a.remove { position: absolute; right: 0; top: 12px; width: 28px; height: 28px; line-height: 26px; text-align: center; border-radius: 50%; color: var(--muted) !important; font-size: 20px; text-decoration: none; }
.mmd-drawer .woocommerce-mini-cart-item a.remove:hover { background: #fde8eb; color: var(--sale) !important; }
.mmd-drawer .woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 0; padding: 14px 18px; border-top: 2px solid var(--line); font-size: 18px; }
.mmd-drawer .woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: 0; padding: 0 18px 18px; }
.mmd-drawer .woocommerce-mini-cart__buttons .button { display: block; width: 100%; text-align: center; margin: 0 !important; box-sizing: border-box; padding: 14px; font-size: 16px; }
.mmd-drawer .woocommerce-mini-cart__empty-message { padding: 30px 18px; text-align: center; color: var(--muted); font-size: 16px; }
.mmd-drawer .mmd-ship { margin: 14px 18px 4px; }

/* ---------- Free shipping progress ---------- */
.mmd-ship { background: #fff8f2; border: 1px solid #fbe0c4; border-radius: var(--radius); padding: 12px 14px; }
.mmd-ship[hidden] { display: none; }
.mmd-ship__msg { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.mmd-ship__msg b { color: var(--accent-text); }
.mmd-ship__track { height: 8px; background: #f3dcc6; border-radius: 4px; overflow: hidden; }
.mmd-ship__track span { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.mmd-ship.is-free { background: #eaf6ee; border-color: #c7e7d1; }
.mmd-ship.is-free .mmd-ship__msg b { color: #1d6b3a; }
.mmd-ship.is-free .mmd-ship__track { background: #c7e7d1; }
.mmd-ship.is-free .mmd-ship__track span { background: #2f9e5b; }
.woocommerce-cart .entry-content > .mmd-ship, .wp-block-woocommerce-cart ~ .mmd-ship, .entry-content > .mmd-ship { margin: 0 0 18px; }

/* ---------- Cards: wishlist heart ---------- */
ul.products li.product { position: relative; }
.mmd-heart { position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px; padding: 0 !important; border-radius: 50%; background: rgba(255,255,255,.92) !important; color: var(--navy) !important; box-shadow: 0 1px 4px rgba(18,38,63,.18) !important; display: grid; place-items: center; border: 0; }
.mmd-heart .mmds-i { width: 20px; height: 20px; }
.mmd-heart:hover { color: var(--sale) !important; }
.mmd-heart.is-on { color: var(--sale) !important; }
.mmd-heart.is-on .mmds-i, .mmd-pdp-btn.is-on .mmds-i--heart { fill: currentColor; }
@media (max-width: 767px) { .mmd-heart { top: 6px; right: 6px; width: 36px; height: 36px; } }

/* ---------- Product page: wishlist and compare ---------- */
.mmd-pdp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.mmd-pdp-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff !important; color: var(--navy) !important; border: 1px solid var(--line) !important; border-radius: 999px; padding: 9px 16px !important; font-weight: 600; font-size: 15px; box-shadow: none !important; min-height: 44px; }
.mmd-pdp-btn:hover { border-color: var(--navy) !important; }
.mmd-pdp-btn .mmds-i { width: 20px; height: 20px; }
.mmd-pdp-btn.is-on { border-color: var(--accent) !important; background: #fff4ea !important; }
.mmd-pdp-btn.is-on .mmds-i--heart { color: var(--sale); }

/* ---------- Pairs well with ---------- */
.mmd-pairs { clear: both; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 8px 0 24px; }
.mmd-pairs h2 { margin: 0 0 14px; font-size: 26px; }
.mmd-pairs__body { display: grid; gap: 16px; }
.mmd-pairs__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mmd-pairs__item { border: 1px solid #eef1f4; border-radius: 8px; padding: 10px; }
.mmd-pairs__item label { display: grid; grid-template-columns: 22px 64px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; cursor: pointer; margin: 0; }
.mmd-pairs__item input { grid-row: 1 / 3; width: 20px; height: 20px; accent-color: var(--accent-dark); margin: 0; }
.mmd-pairs__img { grid-row: 1 / 3; }
.mmd-pairs__img img { width: 64px; height: 64px; object-fit: contain; display: block; margin: 0 !important; }
.mmd-pairs__name { font-size: 15px; line-height: 1.3; align-self: end; }
.mmd-pairs__price { font-weight: 700; align-self: start; margin-top: 2px; }
.mmd-pairs__price del { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.mmd-pairs__price ins { text-decoration: none; color: var(--sale); }
.mmd-pairs__link { display: inline-block; margin: 6px 0 0 96px; font-size: 14px; font-weight: 600; color: var(--accent-text); }
.mmd-pairs__buy { background: var(--bg); border-radius: 8px; padding: 14px; }
.mmd-pairs__buy p { margin: 0; color: var(--muted); }
.mmd-pairs__total { font-family: var(--head); font-size: 30px; font-weight: 700; color: var(--ink) !important; margin: 0 0 10px !important; }
.mmd-pairs__buy .mmd-btn { width: 100%; text-align: center; }
@media (min-width: 1100px) {
	/* The block sits under the product summary column, so keep the list layout and size it up. */
	.mmd-pairs__img img { width: 72px; height: 72px; }
	.mmd-pairs__item label { grid-template-columns: 22px 72px minmax(0, 1fr); }
	.mmd-pairs__link { margin-left: 104px; }
}

/* ---------- Recently viewed ---------- */
.mmd-recent { clear: both; margin: 26px 0 10px; }
.mmd-recent[hidden] { display: none; }
.mmd-recent h2 { font-size: 26px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.mmd-recent--cart { margin-top: 34px; }

/* ---------- Sticky add to cart (phones only) ---------- */
.mmd-sticky { display: none; }
@media (max-width: 767px) {
	.mmd-sticky { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(18,38,63,.12); padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .2s ease; }
	.mmd-sticky.is-on { transform: none; }
	.mmd-sticky img { width: 44px !important; height: 44px; object-fit: contain; margin: 0 !important; }
	.mmd-sticky__info { min-width: 0; display: flex; flex-direction: column; }
	.mmd-sticky__name { font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.mmd-sticky__price { font-weight: 700; font-size: 16px; }
	.mmd-sticky__price del { display: none; }
	.mmd-sticky__price ins { text-decoration: none; color: var(--sale); }
	.mmd-sticky .mmd-btn { padding: 12px 16px; font-size: 15px; white-space: nowrap; }
	body.mmd-has-sticky { padding-bottom: 68px; }
	body.mmd-has-sticky .mmd-cbar { bottom: 66px; }
}

/* ---------- Live search ---------- */
.mmd-suggest-host { position: relative; }
.mmd-suggest { position: absolute; z-index: 9999; background: #fff; border-radius: 10px; box-shadow: 0 12px 34px rgba(12,24,40,.25); overflow: hidden; max-height: 70vh; overflow-y: auto; color: var(--ink); }
.mmd-suggest[hidden] { display: none; }
.mmd-suggest ul { list-style: none; margin: 0; padding: 0; }
.mmd-suggest__terms { padding: 8px !important; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); }
.mmd-suggest__terms a { display: inline-flex; gap: 6px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.mmd-suggest__terms a span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.mmd-suggest__items a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 12px; text-decoration: none; color: var(--ink); border-bottom: 1px solid #f0f2f5; }
.mmd-suggest__items a:hover, .mmd-suggest__items a:focus, .mmd-suggest__terms a:focus, .mmd-suggest__terms a:hover { background: #fff4ea; outline: none; }
.mmd-suggest__items img { width: 48px; height: 48px; object-fit: contain; }
.mmd-suggest__name { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mmd-suggest__name small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.mmd-suggest__price { font-weight: 700; font-size: 14px; white-space: nowrap; text-align: right; }
.mmd-suggest__price del { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.mmd-suggest__price ins { text-decoration: none; color: var(--sale); }
.mmd-suggest__all { display: block; padding: 12px; text-align: center; font-weight: 700; color: var(--accent-text); text-decoration: none; background: #fafbfc; }
.mmd-suggest__all:hover, .mmd-suggest__all:focus { background: #fff4ea; outline: none; text-decoration: underline; }
.mmd-suggest__none { margin: 0; padding: 14px; color: var(--muted); font-size: 14px; }

/* ---------- Category filters ---------- */
.storefront-sorting { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.mmd-filter { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; order: -1; }
.mmd-filter__menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; background: #fff; border: 1.5px solid var(--navy); color: var(--navy); border-radius: 8px; padding: 9px 14px; font-weight: 700; font-size: 15px; min-height: 44px; box-sizing: border-box; }
.mmd-filter__menu > summary::-webkit-details-marker { display: none; }
.mmd-filter__menu > summary .mmds-i { width: 18px; height: 18px; }
.mmd-filter__menu[open] > summary { background: var(--navy); color: #fff; }
.mmd-filter__n { background: var(--accent); color: #fff; border-radius: 9px; min-width: 18px; height: 18px; font-size: 12px; line-height: 18px; text-align: center; padding: 0 4px; }
.mmd-filter__panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 50; width: min(560px, calc(100vw - 32px)); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(12,24,40,.18); padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; max-height: 70vh; overflow-y: auto; box-sizing: border-box; padding-bottom: 0; }
.mmd-filter__panel fieldset { border: 0; margin: 0 0 8px !important; padding: 0 !important; min-width: 0; background: none !important; }
.mmd-filter__panel legend { font-family: var(--head); font-size: 18px; font-weight: 700; color: var(--navy); padding: 0 !important; margin: 0 0 4px !important; background: none !important; }
.mmd-filter__brands { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); column-gap: 14px; }
.mmd-filter__brands legend { grid-column: 1 / -1; }
.mmd-filter__opt { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; cursor: pointer; margin: 0; }
.mmd-filter__opt input { width: 18px; height: 18px; accent-color: var(--accent-dark); margin: 0; }
.mmd-filter__opt span { color: var(--muted); font-size: 13px; }
.mmd-filter__go { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding-top: 10px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; padding-bottom: 14px; margin-top: 4px; }
.mmd-filter__go a { font-weight: 700; color: var(--accent-text); }
.mmd-filter__chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mmd-filter__chips a { display: inline-flex; align-items: center; gap: 4px; background: #fff4ea; border: 1px solid #f7d8bd; color: var(--ink); border-radius: 999px; padding: 6px 8px 6px 12px; font-size: 14px; font-weight: 600; text-decoration: none; min-height: 36px; box-sizing: border-box; }
.mmd-filter__chips a .mmds-i { width: 16px; height: 16px; color: var(--accent-dark); }
.mmd-filter__chips a:hover { border-color: var(--accent); }
@media (max-width: 767px) {
	.mmd-filter__menu { position: static; }
	.mmd-filter__panel { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 82vh; border-radius: 16px 16px 0 0; grid-template-columns: 1fr; padding: 18px 16px 0; z-index: 100001; }
	.mmd-filter__menu[open]::before { content: ""; position: fixed; inset: 0; background: rgba(12,24,40,.55); z-index: 100000; }
	.mmd-filter__brands { grid-template-columns: 1fr 1fr; }
	.mmd-filter__go { bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
	.mmd-filter__go .mmd-btn { flex: 1; text-align: center; }
}

/* ---------- Floating compare bar ---------- */
.mmd-cbar { position: fixed; right: 20px; bottom: 20px; z-index: 9991; display: flex; align-items: center; gap: 14px; background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 12px 10px 18px; box-shadow: 0 10px 30px rgba(12,24,40,.35); width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; }
.mmd-cbar[hidden] { display: none; }
.mmd-cbar p { margin: 0; font-size: 15px; }
.mmd-cbar__clear { background: none !important; color: #c9d3df !important; box-shadow: none !important; padding: 8px !important; font-weight: 600; text-decoration: underline; }
.mmd-cbar .mmd-btn { padding: 10px 16px; white-space: nowrap; }
.mmd-cbar .mmd-btn.is-disabled { background: #2b3f5c !important; color: #c9d3df !important; }
@media (max-width: 767px) {
	.mmd-cbar { left: 8px; right: 8px; bottom: 8px; transform: none; width: auto; justify-content: space-between; padding: 8px 8px 8px 14px; gap: 8px; }
	.mmd-cbar p { font-size: 14px; }
}
body.mmd-has-cbar .mmd-footer__base { padding-bottom: 72px; }

/* ---------- Wishlist page ---------- */
.mmd-wishlist__empty { font-size: 17px; color: var(--muted); padding: 20px 0; }
.mmd-wishlist__note { margin-top: 20px; color: var(--muted); }
.mmd-loading { color: var(--muted); }

/* ---------- Compare page ---------- */
.mmd-compare__grid { --n: 3; display: grid; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.mmd-compare__row { display: grid; grid-template-columns: 180px repeat(var(--n), minmax(0, 1fr)); border-top: 1px solid var(--line); }
.mmd-compare__row:first-child { border-top: 0; }
.mmd-compare__row--head { grid-template-columns: 180px repeat(var(--n), minmax(0, 1fr)); }
.mmd-compare__row--head::before { content: ""; }
.mmd-compare__row.is-same { background: #fafbfc; }
.mmd-compare__label { padding: 12px 14px; font-weight: 700; color: var(--navy); background: #f6f8fa; }
.mmd-compare__cell { padding: 12px 14px; border-left: 1px solid #eef1f4; position: relative; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
.mmd-compare__row--head .mmd-compare__cell { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.mmd-compare__row--head .mmd-compare__cell > a:not(.mmd-compare__remove):not(.button) { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; }
.mmd-compare__row--head img { width: 100%; max-width: 160px; aspect-ratio: 1; object-fit: contain; margin: 0 auto !important; display: block; }
.mmd-compare__name { font-weight: 600; line-height: 1.3; }
.mmd-compare__price { font-weight: 700; font-size: 18px; }
.mmd-compare__price del { color: var(--muted); font-weight: 400; font-size: 14px; }
.mmd-compare__price ins { text-decoration: none; color: var(--sale); }
.mmd-compare__row--head .button { margin-top: auto; text-align: center; }
.mmd-compare__remove { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.15); z-index: 1; }
.mmd-compare__remove .mmds-i { width: 16px; height: 16px; }
.mmd-compare__remove:hover { color: var(--sale); }
.mmd-compare__none { color: #9aa3ae; }
.mmd-compare__more { margin-top: 16px; color: var(--muted); }
.mmd-compare__more a { font-weight: 700; color: var(--accent-text); }
@media (max-width: 767px) {
	/* Label on its own line above the values so 2 or 3 product columns fit a phone. */
	.mmd-compare__row, .mmd-compare__row--head { grid-template-columns: repeat(var(--n), minmax(0, 1fr)); }
	.mmd-compare__row--head::before { display: none; }
	.mmd-compare__label { grid-column: 1 / -1; padding: 8px 10px; font-size: 14px; }
	.mmd-compare__cell { padding: 10px; font-size: 14px; }
	.mmd-compare__cell:first-of-type, .mmd-compare__row--head .mmd-compare__cell:first-child { border-left: 0; }
	.mmd-compare__row--head .button { font-size: 13px; padding: 10px 6px; }
	.mmd-compare__name { font-size: 13px; }
	.mmd-compare__price { font-size: 16px; }
}
