/*
Theme Name: Moto Star
Template: storefront
Description: Tema hijo de Storefront para Moto Star Repuestos & Lubricantes.
Version: 0.1.0
Text Domain: motostar
*/

:root {
  --ms-blue-900: #0b1f4d;
  --ms-blue-700: #1a47a0;
  --ms-blue-500: #2153bc;
  --ms-gold: #dea23d;
  --ms-gold-hover: #c98f2b;
  --ms-gold-dark: #8f5a17;
  --ms-red: #e0242c;
  --ms-ink: #12233d;
  --ms-muted: #55657d;
  --ms-bg-alt: #f1f5fc;
  --ms-line: #d8e1f0;
  --ms-radius: 14px;
  --ms-shadow: 0 6px 24px rgba(10, 42, 92, 0.08);
}

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

/* Shared: buttons, container */
.ms-container { width: min(1080px, 100% - 32px); margin-inline: auto; }
.ms-narrow { width: min(720px, 100% - 32px); }
.ms-btn {
  display: inline-block; cursor: pointer; text-decoration: none;
  background: var(--ms-gold); color: #2b1a00;
  border: 2px solid var(--ms-gold); border-radius: 999px;
  padding: 12px 26px; font: inherit; font-weight: 700; line-height: 1.4;
  transition: background .15s, transform .15s;
}
.ms-btn:hover, .ms-btn:focus { background: var(--ms-gold-hover); border-color: var(--ms-gold-hover); color: #2b1a00; transform: translateY(-1px); }
.ms-btn-small { padding: 8px 18px; }
.ms-btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.ms-btn-ghost:hover, .ms-btn-ghost:focus { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.ms-btn-outline { background: transparent; color: var(--ms-blue-700); border-color: var(--ms-blue-700); }
.ms-btn-outline:hover, .ms-btn-outline:focus { background: var(--ms-blue-700); border-color: var(--ms-blue-700); color: #fff; }
.ms-header :focus-visible, .ms-front :focus-visible, .ms-footer :focus-visible { outline: 3px solid var(--ms-gold); outline-offset: 2px; }

/* Header */
/* Storefront sets overflow-x:hidden on #page, which makes it a scroll container and breaks
   position:sticky (the header never stuck, and the admin-bar offset left a gap). clip avoids that. */
#page.site { overflow-x: clip; overflow-y: visible; }
.ms-header { position: sticky; top: 0; z-index: 100; background: var(--ms-blue-900); box-shadow: 0 2px 12px rgba(0,0,0,.2); }
.admin-bar .ms-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ms-header { top: 46px; } }
/* Below 600px WordPress stops fixing the admin bar, so the header sticks to the top. */
@media (max-width: 600px) { .admin-bar .ms-header { top: 0; } }
.ms-bar { display: flex; align-items: center; justify-content: space-between; min-height: 88px; }
.ms-brand { display: flex; align-items: center; gap: 10px; line-height: 1.1; text-decoration: none; }
.ms-brand img { height: 80px; width: auto; margin: 4px 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.ms-brand-text { color: #fff; font-weight: 800; font-size: 1.35rem; letter-spacing: .3px; }
.ms-brand-text small { display: block; color: var(--ms-gold); font-size: .8rem; font-weight: 600; letter-spacing: .5px; }
.ms-nav { display: flex; align-items: center; gap: 22px; }
.ms-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.ms-nav a { color: #dce9f7; text-decoration: none; font-weight: 500; }
.ms-nav a:hover { color: #fff; }
.ms-nav a.ms-btn { color: #2b1a00; }
.ms-menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; padding: 4px 8px; }
.ms-menu-toggle:hover, .ms-menu-toggle:focus { background: none; color: var(--ms-gold); }

/* Front page */
.ms-front { color: var(--ms-ink); line-height: 1.6; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.ms-front h1, .ms-front h2, .ms-front h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--ms-blue-900); font-weight: 700; }
.ms-front h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: #fff; }
.ms-front h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.ms-front p { margin: 0 0 1em; }

.ms-hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(222,162,61,.35), transparent 45%),
    linear-gradient(135deg, var(--ms-blue-900), var(--ms-blue-700));
  color: #fff; padding: 72px 0;
}
.ms-hero-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.ms-eyebrow { color: var(--ms-gold); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; }
.ms-lead { font-size: 1.15rem; color: #d6e6f8; max-width: 52ch; }
.ms-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ms-trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ms-trust li { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--ms-radius); padding: 14px 18px; color: #d6e6f8; margin: 0; }
.ms-trust strong { display: block; color: var(--ms-gold); }

.ms-section { padding: 72px 0; }
.ms-section.ms-alt { background: var(--ms-bg-alt); }
.ms-sub { color: var(--ms-muted); margin-bottom: 28px; }
.ms-grid { display: grid; gap: 20px; margin-top: 24px; }
.ms-grid-1 { grid-template-columns: 1fr; }
.ms-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ms-grid-3 { grid-template-columns: repeat(3, 1fr); }

.ms-card { background: #fff; border: 1px solid var(--ms-line); border-radius: var(--ms-radius); padding: 24px; box-shadow: var(--ms-shadow); }
.ms-service { display: flex; gap: 20px; align-items: flex-start; }
.ms-icon { flex: none; width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.8rem; border-radius: 14px; background: var(--ms-bg-alt); }
.ms-link { font-weight: 700; text-decoration: none; color: var(--ms-gold-dark); }
.ms-link:hover { text-decoration: underline; }

.ms-product { display: flex; flex-direction: column; align-items: flex-start; }
.ms-product img { width: 100%; height: 260px; object-fit: contain; background: #fff; border-radius: 10px; margin-bottom: 12px; }
.ms-product-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ms-product .ms-price del { color: var(--ms-muted); font-weight: 400; font-size: .9rem; }
.ms-product .ms-price ins { text-decoration: none; }
.ms-product p { flex: 1; color: var(--ms-muted); }
.ms-product .ms-price { flex: none; font-size: 1.4rem; font-weight: 800; color: var(--ms-blue-700); margin-bottom: .6em; }
.ms-product.ms-featured { border: 2px solid var(--ms-red); }
.ms-tag { background: var(--ms-bg-alt); color: var(--ms-blue-700); font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.ms-featured .ms-tag { background: var(--ms-red); color: #fff; }

.ms-checks { list-style: none; padding: 0; margin: 0; }
.ms-checks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.ms-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--ms-gold-dark); font-weight: 800; }

.ms-whatsapp { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.ms-whatsapp img { flex: none; width: 160px; height: 160px; }
.ms-whatsapp h3 { margin-bottom: .25em; }
.ms-whatsapp p { margin: 0 0 .75em; color: var(--ms-muted); }

/* Forms */
.ms-form { display: grid; gap: 16px; }
.ms-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.ms-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ms-form input[type="text"], .ms-form input[type="email"], .ms-form input[type="tel"], .ms-form input[type="number"], .ms-form select, .ms-form textarea {
  font: inherit; padding: 11px 12px; border: 1.5px solid var(--ms-line); border-radius: 10px; background: #fff; color: var(--ms-ink); width: 100%;
}
.ms-form input:focus, .ms-form select:focus, .ms-form textarea:focus { outline: none; border-color: var(--ms-gold); box-shadow: 0 0 0 3px rgba(222,162,61,.25); }
.ms-form fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; }
.ms-form legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.ms-form .ms-radio, .ms-form .ms-check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ms-form .ms-radio input, .ms-form .ms-check input { width: 18px; height: 18px; accent-color: var(--ms-gold-dark); }
.ms-form [hidden] { display: none; }
.ms-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ms-status { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.ms-status.ms-ok { background: #e6f6ee; color: #0a7a52; }
.ms-status.ms-err { background: #fdecea; color: #b3261e; }

/* Footer */
.ms-footer { background: var(--ms-blue-900); color: #b9cde6; padding: 24px 0; text-align: center; }
.ms-footer p { margin: 0; }
.ms-footer a { color: #fff; }

@media (min-width: 801px) and (max-width: 1000px) { .ms-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) {
  .ms-hero-inner, .ms-grid-2, .ms-grid-3, .ms-row { grid-template-columns: 1fr; }
  .ms-brand img { height: 64px; }
  .ms-brand-text { font-size: 1.1rem; }
  .ms-menu-toggle { display: block; }
  .ms-nav, .ms-nav ul {
    flex-direction: column; align-items: flex-start; gap: 14px;
  }
  .ms-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--ms-blue-900); padding: 16px;
  }
  .ms-nav.ms-open { display: flex; }
  .ms-header { position: sticky; }
  .ms-whatsapp { flex-direction: column; text-align: center; }
}

/* Header: cart button */
.ms-bar-right { display: flex; align-items: center; gap: 18px; }
.ms-cart-toggle { position: relative; display: inline-flex; color: #fff; padding: 6px; }
.ms-cart-toggle:hover, .ms-cart-toggle:focus { color: var(--ms-gold); }
.ms-cart-count {
  position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--ms-gold); color: #2b1a00; font-size: .75rem; font-weight: 800; line-height: 1;
}
.ms-cart-count[data-count="0"] { display: none; }

/* Cart drawer */
.ms-overlay { position: fixed; inset: 0; z-index: 998; background: rgba(11, 31, 77, .55); }
.ms-drawer {
  position: fixed; top: 0; right: 0; z-index: 999; width: min(420px, 100vw); height: 100%;
  display: flex; flex-direction: column; background: #fff; box-shadow: -8px 0 32px rgba(0,0,0,.25);
  transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility 0s .25s;
}
.admin-bar .ms-drawer { top: 32px; height: calc(100% - 32px); }
.ms-drawer.ms-open { transform: none; visibility: visible; transition: transform .25s ease; }
body.ms-drawer-open { overflow: hidden; }
.ms-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; background: var(--ms-blue-900); color: #fff; }
.ms-drawer-head h2 { margin: 0; font-size: 1.2rem; color: #fff; }
.ms-drawer-close { background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.ms-drawer-close:hover, .ms-drawer-close:focus { background: none; color: var(--ms-gold); }
.ms-drawer .widget_shopping_cart_content { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 8px 20px 20px; }
.ms-drawer .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; flex: 1; }
.ms-drawer .woocommerce-mini-cart-item { position: relative; padding: 14px 28px 14px 0; border-bottom: 1px solid var(--ms-line); margin: 0; }
.ms-drawer .woocommerce-mini-cart-item a:not(.remove) { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ms-ink); text-decoration: none; }
.ms-drawer .woocommerce-mini-cart-item img { width: 56px; height: 56px; object-fit: contain; margin: 0; float: none; }
.ms-drawer .woocommerce-mini-cart-item .quantity { display: block; margin-top: 4px; color: var(--ms-muted); font-size: .9rem; }
.ms-drawer .woocommerce-mini-cart-item a.remove { position: absolute; top: 14px; right: 0; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--ms-red); font-size: 1.2rem; text-decoration: none; }
.ms-drawer .woocommerce-mini-cart-item a.remove:hover { background: var(--ms-red); color: #fff; }
.ms-drawer .woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 16px 0; font-size: 1.1rem; }
.ms-drawer .woocommerce-mini-cart__buttons { display: grid; gap: 10px; margin: 0; }
.ms-drawer .woocommerce-mini-cart__buttons .button {
  display: block; text-align: center; padding: 12px 20px; border-radius: 999px; font-weight: 700; text-decoration: none;
  background: transparent; color: var(--ms-blue-700); border: 2px solid var(--ms-blue-700);
}
.ms-drawer .woocommerce-mini-cart__buttons .button.checkout { background: var(--ms-gold); border-color: var(--ms-gold); color: #2b1a00; }
.ms-drawer .woocommerce-mini-cart__buttons .button:hover { background: var(--ms-blue-700); border-color: var(--ms-blue-700); color: #fff; }
.ms-drawer .woocommerce-mini-cart__buttons .button.checkout:hover { background: var(--ms-gold-hover); border-color: var(--ms-gold-hover); color: #2b1a00; }
.ms-drawer .woocommerce-mini-cart__empty-message { margin: 32px 0; text-align: center; color: var(--ms-muted); }
.ms-add-to-cart.ms-loading { opacity: .6; pointer-events: none; }
@media (max-width: 782px) { .admin-bar .ms-drawer { top: 46px; height: calc(100% - 46px); } }
@media (prefers-reduced-motion: reduce) { .ms-drawer, .ms-drawer.ms-open { transition: none; } }
@media (max-width: 800px) { .ms-bar-right { gap: 8px; } }

/* ---------- WooCommerce inner pages ---------- */
body.woocommerce, body.woocommerce-page { color: var(--ms-ink); }
.site-content > .col-full { padding-top: 24px; padding-bottom: 56px; }
.woocommerce-breadcrumb, .storefront-breadcrumb .woocommerce-breadcrumb { color: var(--ms-muted); font-size: .9rem; }
.woocommerce-breadcrumb a { color: var(--ms-blue-700); }
.woocommerce-products-header__title, .woocommerce-page h1.page-title, .entry-title, .product_title { color: var(--ms-blue-900); font-weight: 700; }
.woocommerce-result-count { color: var(--ms-muted); }
.woocommerce-ordering select, .woocommerce form .input-text, .woocommerce form select, .woocommerce .quantity .qty {
  font: inherit; padding: 10px 12px; border: 1.5px solid var(--ms-line); border-radius: 10px; background: #fff; color: var(--ms-ink);
}
.woocommerce-ordering select:focus, .woocommerce form .input-text:focus, .woocommerce .quantity .qty:focus {
  outline: none; border-color: var(--ms-gold); box-shadow: 0 0 0 3px rgba(222,162,61,.25);
}

/* Buttons */
body .button, body a.button, body button.button, body input.button, body .button.alt, body button.alt, body a.button.alt, body input[type="submit"].alt, body #respond input#submit {
  background: var(--ms-gold); border: 2px solid var(--ms-gold); color: #2b1a00;
  border-radius: 999px; padding: 11px 24px; font-weight: 700; text-decoration: none; text-shadow: none;
}
body .button:hover, body a.button:hover, body button.button:hover, body input.button:hover, body .button.alt:hover, body button.alt:hover, body a.button.alt:hover {
  background: var(--ms-gold-hover); border-color: var(--ms-gold-hover); color: #2b1a00;
}
body .button:disabled, body .button.disabled { opacity: .5; }

/* Product grid */
body.woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 24px; padding: 0; }
body.woocommerce ul.products::before, body.woocommerce ul.products::after { display: none; }
body.woocommerce ul.products li.product {
  float: none; width: auto; margin: 0; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--ms-line); border-radius: var(--ms-radius); padding: 20px; box-shadow: var(--ms-shadow);
}
body.woocommerce ul.products li.product img { width: 100%; height: 220px; object-fit: contain; margin: 0 0 12px; }
body.woocommerce ul.products li.product .woocommerce-loop-product__title { color: var(--ms-blue-900); font-size: 1.1rem; font-weight: 700; padding: 0; }
body.woocommerce ul.products li.product .price { color: var(--ms-blue-700); font-weight: 800; font-size: 1.25rem; margin-bottom: 12px; }
body.woocommerce ul.products li.product .button { margin-top: auto; text-align: center; }
body.woocommerce span.onsale { background: var(--ms-red); color: #fff; border-radius: 999px; min-height: 0; min-width: 0; padding: 4px 12px; line-height: 1.4; }

/* Single product */
.woocommerce div.product .woocommerce-product-gallery img { border-radius: var(--ms-radius); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--ms-blue-700); font-weight: 800; font-size: 1.6rem; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--ms-muted); }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.woocommerce div.product .product_meta { color: var(--ms-muted); font-size: .9rem; }
.ms-quote-note { padding: 12px 16px; background: var(--ms-bg-alt); border-left: 4px solid var(--ms-gold); border-radius: 8px; font-size: .95rem; }
.ms-quote-note a { color: var(--ms-gold-dark); font-weight: 700; }
.woocommerce-tabs ul.tabs li.active { border-bottom: 3px solid var(--ms-gold); }
.woocommerce-tabs ul.tabs li a { color: var(--ms-blue-900); font-weight: 600; }
.related.products > h2, .up-sells > h2 { color: var(--ms-blue-900); }

/* Cart, checkout, notices */
.woocommerce table.shop_table { border: 1px solid var(--ms-line); border-radius: var(--ms-radius); border-collapse: separate; overflow: hidden; }
.woocommerce table.shop_table th { color: var(--ms-blue-900); }
.woocommerce-checkout #payment { background: var(--ms-bg-alt); border-radius: var(--ms-radius); }
.woocommerce-checkout #payment div.payment_box { background: #fff; color: var(--ms-ink); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
body .woocommerce-message { background: var(--ms-blue-700); color: #fff; border-radius: 10px; }
body .woocommerce-info { background: var(--ms-blue-500); color: #fff; border-radius: 10px; }
body .woocommerce-error { background: var(--ms-red); color: #fff; border-radius: 10px; }
body .woocommerce-message a, body .woocommerce-info a, body .woocommerce-error a { color: #fff; }
body .woocommerce-message .button, body .woocommerce-info .button { background: var(--ms-gold); color: #2b1a00; }

@media (max-width: 1000px) { body.woocommerce ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { body.woocommerce ul.products { grid-template-columns: 1fr; } }

/* Cart drawer: refinements */
.ms-drawer :focus-visible { outline: 3px solid var(--ms-gold); outline-offset: 2px; }
.ms-drawer-close:focus-visible { outline-color: #fff; }
.ms-drawer .woocommerce-mini-cart-item { padding: 16px 32px 16px 0; }
.ms-drawer .woocommerce-mini-cart-item a:not(.remove) { align-items: flex-start; line-height: 1.3; }
.ms-drawer .woocommerce-mini-cart-item img { width: 64px; height: 64px; padding: 4px; background: var(--ms-bg-alt); border-radius: 10px; flex: none; }
.ms-drawer .woocommerce-mini-cart-item .quantity { margin: -34px 0 0 76px; position: relative; color: var(--ms-ink); font-weight: 600; }
.ms-drawer .woocommerce-mini-cart-item .quantity .amount { color: var(--ms-blue-700); font-weight: 800; }
.ms-drawer .woocommerce-mini-cart-item a.remove { top: 16px; background: var(--ms-bg-alt); font-size: 1.1rem; font-weight: 700; }
.ms-drawer .woocommerce-mini-cart-item a.remove::before { display: none; }
.ms-drawer .woocommerce-mini-cart__total {
  align-items: baseline; margin: 16px 0 14px; padding-top: 14px; border-top: 2px solid var(--ms-line);
  color: var(--ms-ink); font-size: 1rem;
}
.ms-drawer .woocommerce-mini-cart__total strong { font-weight: 600; color: var(--ms-muted); }
.ms-drawer .woocommerce-mini-cart__total .amount { color: var(--ms-blue-900); font-size: 1.4rem; font-weight: 800; }
.ms-drawer .woocommerce-mini-cart__buttons .button::after { margin-left: 8px; }

/* Cart drawer: item layout (image | name + stepper) and quantity stepper */
.ms-drawer .woocommerce-mini-cart-item { display: grid; grid-template-columns: 64px 1fr; column-gap: 12px; row-gap: 8px; align-items: start; }
.ms-drawer .woocommerce-mini-cart-item a:not(.remove) { display: contents; }
.ms-drawer .woocommerce-mini-cart-item img { grid-column: 1; grid-row: 1 / span 2; }
.ms-drawer .woocommerce-mini-cart-item .quantity { grid-column: 2; grid-row: 2; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0; position: static; }
.ms-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--ms-line); border-radius: 999px; background: #fff; }
.ms-stepper .ms-step {
  width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--ms-blue-700); font-size: 1.2rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.ms-stepper .ms-step:hover:not(:disabled) { background: var(--ms-bg-alt); color: var(--ms-blue-900); }
.ms-stepper .ms-step:disabled { color: var(--ms-line); cursor: not-allowed; }
.ms-step-value { min-width: 28px; text-align: center; font-weight: 700; color: var(--ms-ink); }
.ms-qty-price { color: var(--ms-muted); font-weight: 500; }
.ms-drawer .widget_shopping_cart_content.ms-busy { opacity: .6; pointer-events: none; }
.ms-drawer-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: #fdecea; color: #b3261e; font-weight: 600; font-size: .9rem; }

/* Product grids (shop, related, up-sells): beat Storefront's float/width rules */
body.woocommerce ul.products li.product,
body.woocommerce-page ul.products li.product,
body.woocommerce .related ul.products li.product,
body.woocommerce .up-sells ul.products li.product {
  float: none !important; width: auto !important; max-width: none; margin: 0 !important; clear: none !important;
}
body.woocommerce .related ul.products, body.woocommerce .up-sells ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
body.woocommerce ul.products li.product .button { white-space: normal; width: 100%; box-sizing: border-box; }
.related.products, .up-sells.products { overflow: hidden; margin-top: 40px; }
.related.products > h2, .up-sells.products > h2 { font-weight: 700; text-align: center; margin-bottom: 24px; }
@media (max-width: 1000px) { body.woocommerce .related ul.products, body.woocommerce .up-sells ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { body.woocommerce .related ul.products, body.woocommerce .up-sells ul.products { grid-template-columns: 1fr; } }

/* Cart drawer item: photo on the left (absolute), name and stepper stacked on the right */
.ms-drawer .woocommerce-mini-cart-item { display: block; position: relative; min-height: 96px; padding: 16px 36px 16px 76px; }
.ms-drawer .woocommerce-mini-cart-item a:not(.remove) { display: block; }
.ms-drawer .woocommerce-mini-cart-item img { position: absolute; left: 0; top: 16px; margin: 0; }
.ms-drawer .woocommerce-mini-cart-item .quantity { display: flex; margin: 10px 0 0; }
.ms-drawer .woocommerce-mini-cart-item a.remove { background: none; width: 28px; height: 28px; }
.ms-drawer .woocommerce-mini-cart-item a.remove::before { display: block; color: var(--ms-muted); font-size: 1.4rem; line-height: 1; }
.ms-drawer .woocommerce-mini-cart-item a.remove:hover { background: none; }
.ms-drawer .woocommerce-mini-cart-item a.remove:hover::before { color: var(--ms-red); }
.ms-drawer-close:focus { outline: none; }
.ms-drawer-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Floating WhatsApp button */
.ms-wa-float {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  background: #25d366; color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.3);
  transition: transform .15s, box-shadow .15s;
}
.ms-wa-float:hover, .ms-wa-float:focus { color: #fff; transform: scale(1.08); box-shadow: 0 8px 22px rgba(0,0,0,.38); }
.ms-wa-float:focus-visible { outline: 3px solid var(--ms-gold); outline-offset: 3px; }
@media (max-width: 600px) { .ms-wa-float { left: 14px; bottom: 14px; width: 52px; height: 52px; } }
@media (prefers-reduced-motion: reduce) { .ms-wa-float { transition: none; } }

/* Header search */
.ms-search-toggle { display: inline-flex; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
.ms-search-toggle:hover, .ms-search-toggle:focus { background: none; color: var(--ms-gold); }
.ms-search { background: var(--ms-blue-700); padding: 12px 0; }
.ms-search[hidden] { display: none; }
.ms-search-form { display: flex; gap: 10px; align-items: center; }
.ms-search-form input[type="search"] {
  flex: 1; min-width: 0; font: inherit; padding: 11px 16px; border: 2px solid transparent; border-radius: 999px; background: #fff; color: var(--ms-ink);
}
.ms-search-form input[type="search"]:focus { outline: none; border-color: var(--ms-gold); box-shadow: 0 0 0 3px rgba(222,162,61,.35); }
