/* ============================================================
   TIENDA — MR Constructor
   Barra superior, buscador, carrito con total, secciones de
   productos, categorías con foto y selector de cantidad.
   ============================================================ */

/* ---------- Secciones de productos en portada ---------- */
.hm-rail-light { background: #faf7f2; } .hm-rail-white { background: #fff; }
.hm-rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.hm-rail-head .hm-title { margin: 0; }
.hm-rail-sub { margin: 6px 0 0; color: #6a5a49; }
.hm-rail-more { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 12px; font-weight: 800; font-size: .92rem; text-decoration: none; color: #6B4423 !important; border: 2px solid #e5ddd1; background: #fff; transition: all .2s; }
.hm-rail-more:hover { border-color: #f4a825; background: #fff8ea; transform: translateX(3px); }
.hm-rail-white .mc-card { box-shadow: 0 4px 16px rgba(43,29,18,.07); }

/* ---------- Categorías con foto ---------- */
.hm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.hm-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid #ece5da; border-radius: 18px; overflow: hidden; text-decoration: none !important; box-shadow: 0 6px 18px rgba(43,29,18,.06); transition: transform .3s, box-shadow .3s, border-color .3s; }
.hm-tile:hover { transform: translateY(-6px); border-color: rgba(244,168,37,.7); box-shadow: 0 20px 40px rgba(43,29,18,.14); }
.hm-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 16px; background: #fff; mix-blend-mode: multiply; transition: transform .45s; }
.hm-tile:hover img { transform: scale(1.06); }
.hm-tile-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; font-size: 2.4rem; color: #d9c7b2; background: #f7f3ec; }
.hm-tile-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-top: 1px solid #f0e9de; font-weight: 800; color: #2b1d12; font-size: 1rem; }
.hm-tile-label i { color: #e8940f; transition: transform .25s; }
.hm-tile:hover .hm-tile-label i { transform: translateX(5px); }

/* ---------- Selector de cantidad + botón de la tarjeta ---------- */
.mc-actions.mc-buy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: stretch; }
.mc-qty { display: flex; align-items: stretch; border: 2px solid #e5ddd1; border-radius: 12px; overflow: hidden; background: #fff; }
.mc-qty-btn { width: 34px; border: 0; background: #faf7f2; color: #6B4423; font-size: 1.15rem; font-weight: 800; line-height: 1; cursor: pointer; transition: background .15s; }
.mc-qty-btn:hover { background: #f4a825; color: #2b1d12; }
.mc-qty-input { width: 44px; border: 0; text-align: center; font-weight: 800; color: #2b1d12; font-size: .95rem; background: #fff; -moz-appearance: textfield; padding: 0; }
.mc-qty-input::-webkit-outer-spin-button, .mc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mc-qty-input:focus { outline: none; background: #fff8ea; }
.mc-actions.mc-buy a.added_to_cart { grid-column: 1 / -1; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) { .hm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (max-width: 767.98px) {
  .hm-rail-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .mc-actions.mc-buy { grid-template-columns: 1fr; }
  .mc-qty { justify-content: space-between; } .mc-qty-btn { width: 44px; } .mc-qty-input { flex: 1; width: auto; }
  .hm-tile img { padding: 10px; } .hm-tile-label { padding: 11px 12px; font-size: .9rem; }
}
@media (max-width: 575.98px) {
  .hm-rail ul.products.mc-grid { display: flex !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding: 4px 14px 14px !important; margin: 0 -14px !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .hm-rail ul.products.mc-grid::-webkit-scrollbar { display: none; }
  .hm-rail ul.products.mc-grid li.mc-card.product { flex: 0 0 72%; scroll-snap-align: start; }
}

.hm-chips-label { text-align: center; margin: 44px 0 20px !important; }

/* Ajustes de la revisión en celular */
.mc-qty-btn { flex: 0 0 34px; }
@media (max-width: 767.98px) { .mc-qty-btn { flex: 0 0 46px; font-size: 1.25rem; } .hm-tile-label { min-height: 3.6em; } }
@media (max-width: 575.98px) {
  .hm-rail ul.products.mc-grid { scroll-padding: 0 14px; }
  .hm-rail ul.products.mc-grid li.mc-card.product:last-child { margin-right: 14px !important; }
}
.mc-qty { min-width: 0; }
.mc-qty-input { min-width: 0; }
@media (max-width: 767.98px) { .mc-qty-input { flex: 1 1 0; width: 0; } }
