:root {
  --mp-bg: #f6f4fb;
  --mp-card: #ffffff;
  --mp-border: rgba(123, 47, 190, 0.16);
  --mp-purple: #7b2fbe;
  --mp-purple-dark: #5f2294;
  --mp-text: #22163f;
  --mp-text-muted: #7d6ca5;
  --mp-radius-md: 18px;
  --mp-radius-lg: 22px;
  --mp-shadow-soft: 0 10px 24px rgba(103, 70, 145, 0.1);
  --mp-header-offset: 88px;
}

@media (max-width: 768px) {
  :root {
    --mp-header-offset: 82px;
  }
}

body.mp-modern-page {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  background: radial-gradient(circle at top, #fcfbff 0%, var(--mp-bg) 46%);
  color: var(--mp-text);
}

.mp-modern-page .header {
  background: #ffffff !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--mp-border);
  box-shadow: 0 2px 18px rgba(102, 51, 153, .08);
}

html {
  background-color: #ffffff;
}

.mp-modern-main {
  padding-top: var(--mp-header-offset);
  padding-bottom: 98px;
}

.mp-context-card {
  background: linear-gradient(140deg, #fff 0%, #f7efff 100%);
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  padding: 18px;
  box-shadow: var(--mp-shadow-soft);
  margin-bottom: 16px;
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mp-context-eyebrow { font-size: 12px; font-weight: 700; color: var(--mp-text-muted); letter-spacing: .05em; text-transform: uppercase; }
.mp-context-title { font-size: 1.15rem; font-weight: 800; margin: 4px 0; }
.mp-context-meta { font-size: .92rem; color: var(--mp-text-muted); margin-bottom: 0; }

.mp-rubro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.mp-rubro-item {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 14px;
  text-align: center;
  padding: 10px 8px;
  color: var(--mp-text);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 700;
}
.mp-rubro-item.active { background: #efe1ff; color: var(--mp-purple-dark); border-color: rgba(123,47,190,.35); }

.mp-page-shell {
  max-width: 980px;
  margin: 0 auto;
}

.mp-catalog-section {
  margin-bottom: 18px;
}

.mp-catalog-card {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  padding: 16px;
  box-shadow: var(--mp-shadow-soft);
}

.mp-catalog-head {
  margin-bottom: 14px;
}

.mp-catalog-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--mp-text);
  margin: 0 0 4px;
}

.mp-catalog-subtitle {
  font-size: .84rem;
  color: var(--mp-text-muted);
  margin: 0;
  line-height: 1.45;
}

.mp-modern-page .search-wrapper .input-group {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  overflow: hidden;
}
.mp-modern-page .search-wrapper .input-group-text,
.mp-modern-page .search-wrapper .form-control {
  border: 0;
  background: transparent;
}

.mp-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mp-catalog-link {
  text-decoration: none;
  display: block;
  width: 100%;
}

.mp-catalog-item {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 18px;
  min-height: 118px;
  box-shadow: 0 8px 20px rgba(100,60,150,.10);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.mp-catalog-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(100,60,150,.14);
  border-color: rgba(123,47,190,.28);
}

.mp-catalog-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid var(--mp-border);
  background: #f7efff;
  color: var(--mp-purple-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.mp-catalog-label {
  color: var(--mp-text);
  font-weight: 700;
  font-size: .9rem;
  line-height: 1.3;
  margin: 0;
}

.mp-modern-page .member,
.mp-modern-page .producto,
.mp-commerce-card,
.mp-product-card {
  border: 1px solid var(--mp-border) !important;
  border-radius: var(--mp-radius-md) !important;
  background: var(--mp-card) !important;
  padding: 12px !important;
  box-shadow: var(--mp-shadow-soft);
}
.mp-modern-page .member-content .nombre-comercio,
.mp-modern-page .producto h3 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--mp-text);
}
.mp-modern-page .member-content .direccion,
.mp-modern-page .member-content .horario,
.mp-modern-page .product-desc { color: var(--mp-text-muted); }
.mp-modern-page .product-price { color: var(--mp-purple-dark); font-weight: 800; }

.mp-modern-page .estado {
  border-radius: 999px;
  border: 0;
  font-weight: 700;
}

.mp-modern-page .promo-slider-section img {
  border-radius: 16px;
  border: 1px solid var(--mp-border);
}



.mp-search-card {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  padding: 16px;
  box-shadow: var(--mp-shadow-soft);
  margin-bottom: 16px;
}

.mp-search-pill {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: 999px;
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 10px;
}

.mp-search-pill input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: var(--mp-text);
}

.mp-commerce-list {
  display: grid;
  gap: 12px;
}

.mp-commerce-card {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  position: relative;
}

.mp-commerce-thumb {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.mp-commerce-icon {
  width: 100px;
  height: 80px;
  border-radius: 10px;
  border: 1px solid var(--mp-border);
  background: #f7efff;
  color: var(--mp-purple-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}

.mp-bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 1050;
  display: none;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--mp-border);
  border-radius: 20px;
  box-shadow: var(--mp-shadow-soft);
  padding: 8px;
}

.mp-bottom-nav__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mp-bottom-nav__item {
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--mp-text-muted);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: .72rem;
  font-weight: 700;
}

.mp-bottom-nav__item i {
  font-size: 1.1rem;
}

.mp-bottom-nav__item.is-active {
  background: linear-gradient(145deg, #7b2fbe 0%, #5f2294 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(95, 34, 148, .35);
}

.mp-bottom-nav__item--cart {
  cursor: pointer;
}
@media (max-width: 768px) {
  .mp-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mp-catalog-item { min-height: 110px; padding: 12px; }
  .mp-catalog-icon { width: 52px; height: 52px; font-size: 1.2rem; }
  .mp-catalog-label { font-size: .84rem; }
  .mp-bottom-nav { display: block; }
  .mp-modern-main { padding-bottom: 112px; }
}

@media (min-width: 769px) {
  .mp-bottom-nav {
    display: none !important;
  }
}

.mp-bottom-nav__item--cart {
  position: relative;
}

.mp-cart-badge {
  position: absolute;
  top: 6px;
  right: 18%;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f43f5e;
  color: #fff;
  font-size: .67rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
  pointer-events: none;
}

.mp-cart-badge.is-hidden {
  display: none;
}

.cart-modal-content {
  border-radius: 24px;
  border: 1px solid rgba(123, 47, 190, .14);
  background: linear-gradient(165deg, #ffffff 0%, #fbf7ff 100%);
  box-shadow: 0 18px 48px rgba(95, 34, 148, .16);
}

.cart-modal-header {
  border-bottom: 1px solid rgba(123, 47, 190, .14);
  padding: 18px 20px 14px;
}

.cart-modal-title {
  margin: 0;
  color: #3f1f63;
  font-size: 1.1rem;
  font-weight: 800;
}

.cart-modal-subtitle {
  margin: 4px 0 0;
  color: var(--mp-text-muted);
  font-size: .82rem;
}

.cart-modal-body {
  padding: 14px 18px;
}

.cart-commerce-title {
  font-size: .82rem;
  font-weight: 800;
  color: #6f4a98;
  margin: 6px 4px 8px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.cart-commerce-group {
  display: grid;
  gap: 10px;
}

.cart-item-subtotal {
  color: #4f237e;
}

.cart-modal-footer {
  border-top: 1px solid rgba(123, 47, 190, .14);
  padding: 12px 18px 18px;
  justify-content: space-between;
}

.cart-btn-secondary,
.cart-btn-primary {
  border-radius: 999px;
  font-weight: 700;
  padding: .5rem .95rem;
}

.mp-swal-popup {
  border-radius: 18px;
  border: 1px solid rgba(123, 47, 190, .16);
}

.mp-swal-title {
  color: #3f1f63;
  font-weight: 800;
}

.mp-swal-confirm,
.mp-swal-cancel {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  padding: .52rem 1rem;
}

.mp-swal-confirm {
  background: linear-gradient(145deg, #ef476f 0%, #e11d48 100%);
  color: #fff;
}

.mp-swal-cancel {
  background: #f3ecff;
  color: #5f2294;
}

.floating-cart {
  display: none !important;
}

/* Cart modal refinements */
.cart-items-stack {
  display: grid;
  gap: 16px;
}

.cart-commerce-section {
  display: grid;
  gap: 10px;
}

.cart-commerce-group {
  display: grid;
  gap: 14px;
}

.cart-item {
  border: 1px solid rgba(123, 47, 190, .18);
  border-radius: 16px;
  background: linear-gradient(165deg, #ffffff 0%, #f9f3ff 100%);
  box-shadow: 0 10px 22px rgba(95, 34, 148, .08);
  padding: 14px;
  gap: 12px;
}

.cart-item + .cart-item {
  margin-top: 0;
}

.cart-item-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.cart-item-media {
  width: 88px;
  flex: 0 0 88px;
}

.cart-item-image {
  width: 100%;
  max-height: 88px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(123, 47, 190, .16);
}

.cart-item-content {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}

.cart-item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.cart-item-name {
  font-weight: 800;
  font-size: .96rem;
  color: #3a225a;
}

.cart-item-price {
  font-weight: 800;
  color: #5f2294;
  white-space: nowrap;
}

.cart-item-meta {
  margin: 0;
  font-size: .73rem;
  color: #6d5a8c;
}

.cart-item-desc {
  margin: 0;
  font-size: .78rem;
  color: #56436f;
  line-height: 1.35;
}

.cart-extras-label {
  display: block;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: .03em;
  font-size: .63rem;
  color: #6f4a98;
}

.cart-item-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px dashed rgba(123, 47, 190, .24);
}

.cart-item-qty {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8f4ff;
  border: 1px solid rgba(123, 47, 190, .2);
  border-radius: 999px;
  padding: 4px;
}

.cart-qty-btn {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #5f2294;
  box-shadow: 0 4px 10px rgba(95, 34, 148, .12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:hover {
  color: #fff;
  background: linear-gradient(145deg, #7b2fbe 0%, #5f2294 100%);
}

.cart-qty-input {
  width: 46px;
  text-align: center;
  border: 0;
  background: transparent;
  color: #3a225a;
  font-weight: 800;
  padding: 0;
  box-shadow: none !important;
}

.cart-action-btn {
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  padding: .32rem .66rem;
  border: 1px solid transparent;
}

.cart-action-btn--soft {
  background: #efe5ff;
  color: #5f2294;
}

.cart-action-btn--danger {
  background: #fff0f4;
  color: #b42349;
  border-color: rgba(180, 35, 73, .2);
}

.cart-item-subtotal-wrap {
  margin-left: auto;
  text-align: right;
  display: grid;
  gap: 6px;
}

.order-item-actions {
  justify-content: flex-end;
}

.mp-cart-badge:empty {
  display: none !important;
}

/* Realizar orden modal */
#myModal .modal-content {
  border-radius: 24px;
  border: 1px solid rgba(123, 47, 190, .18);
  box-shadow: 0 18px 44px rgba(95, 34, 148, .14);
  background: linear-gradient(170deg, #ffffff 0%, #fbf8ff 100%);
}

#myModal .modal-header {
  border-bottom: 1px solid rgba(123, 47, 190, .16);
  padding: 18px 20px;
  background: linear-gradient(180deg, #f8f1ff 0%, #ffffff 100%);
}

#myModal .modal-title {
  color: #3f1f63 !important;
  font-weight: 800;
  margin: 0;
}

.order-modal-layout {
  margin: 0;
}

.order-modal-hero {
  margin-bottom: 2px;
}

.order-modal-title {
  color: #3f1f63;
  font-size: 1.22rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.order-modal-hero .product-price {
  color: #5f2294;
  font-size: 1.12rem;
  font-weight: 800;
}

.order-modal-hero .product-image {
  border-radius: 14px;
  border: 1px solid rgba(123, 47, 190, .18);
  box-shadow: 0 8px 18px rgba(95, 34, 148, .12);
  object-fit: cover;
}

.order-modal-image {
  width: 100%;
  max-width: 250px;
  height: 200px;
}

.order-modal-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(123, 47, 190, 0) 0%, rgba(123, 47, 190, .32) 50%, rgba(123, 47, 190, 0) 100%);
  margin: 8px 0 14px;
}

.order-modal-label {
  font-size: .83rem;
  font-weight: 700;
  color: #4f3b73;
  margin-bottom: 6px;
}

.order-modal-qty,
.order-modal-extras,
.two-kilo-extras {
  background: #fff;
  border: 1px solid rgba(123, 47, 190, .14);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(95, 34, 148, .08);
}

.order-modal-extras,
.two-kilo-extras {
  display: grid;
  gap: 10px;
}

.order-modal-extra-item,
.two-kilo-extras .extras-item {
  border: 1px solid rgba(123, 47, 190, .16);
  border-radius: 12px;
  background: #fff;
  padding: 8px 10px;
}

.order-modal-footer {
  border-top: 1px solid rgba(123, 47, 190, .16);
  background: linear-gradient(180deg, #ffffff 0%, #f7efff 100%);
  backdrop-filter: blur(6px);
  padding: 14px 18px;
}

.order-modal-btn-secondary,
.order-modal-btn-primary {
  border-radius: 999px;
  min-height: 42px;
  padding: .5rem 1rem;
  font-weight: 700;
}

.order-modal-btn-primary {
  color: #fff !important;
}

.mp-search-card {
  margin-bottom: 14px;
}

.mp-catalog-card + .datalist-wrapper,
.mp-search-card + .mp-catalog-card {
  margin-top: 12px;
}

@media (max-width: 575px) {
  .cart-item-main {
    flex-direction: column;
  }

  .cart-item-media {
    width: 100%;
    flex-basis: auto;
  }

  .cart-item-image {
    max-height: 130px;
  }

  .cart-item-subtotal-wrap {
    margin-left: 0;
    width: 100%;
  }
}
