/* ========================================
   SECTION PRODUTOS - CSS Completo
   ======================================== */

/* ===== CART OVERLAY & SIDEBAR ===== */
.cart-sidebar,
.cart-sidebar * {
  box-sizing: border-box;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -440px;
  width: 440px;
  height: 100%;
  padding: 0px;
  background: #f8fafc;
  box-shadow: -12px 0 32px rgba(15, 23, 42, 0.14);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}

.cart-sidebar.active {
  right: 0;
}

.cart-mobile-summary {
  display: none;
}

.cart-title {
  margin: 0;
  padding: 1.25rem 3rem 0.9rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #eef1f6;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.close-cart {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  width: 1.85rem;
  height: 1.85rem;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: color 0.2s ease, background 0.2s ease;
}

.close-cart:hover {
  color: #111827;
  background: #f1f5f9;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.25rem;
  background: #f8fafc;
}

.cart-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid #eef1f6;
  border-radius: 1.1rem;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.cart-box-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.cart-box-group + .cart-box-group {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px dashed #e2e8f0;
}

.cart-box-group--closed {
  opacity: 0.45;
  filter: grayscale(0.3);
}

.cart-box-group-closed-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.63rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  margin-top: 0.2rem;
}

.cart-box-group-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.15rem;
}

.cart-box-group-header strong {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.cart-box-group-kicker {
  color: #2563eb;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cart-item + .cart-item {
  margin-top: 0.65rem;
}

.cart-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-thumb svg {
  width: 20px;
  height: 20px;
  color: #cbd5e1;
}

.cart-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cart-item-remove {
  width: 1.5rem;
  height: 1.5rem;
  align-self: flex-end;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
  transition: all 0.2s ease;
}

.cart-item-remove:hover {
  background: #fef2f2;
  color: #ef4444;
}

.cart-item-name {
  min-width: 0;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.cart-item-variacao {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}

.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
}

.cart-item-meta strong {
  color: #10b981;
  font-size: 0.92rem;
  font-weight: 900;
}

.cart-item-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  justify-self: end;
}

.cart-item-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.3rem;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.cart-quantity-button {
  width: 1.95rem;
  height: 1.95rem;
  border: none;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  transition: all 0.2s ease;
}

.cart-quantity-button:hover:not(:disabled) {
  background: #10b981;
  color: #fff;
}

.cart-quantity-button:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.cart-quantity-value {
  min-width: 2ch;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
}

.cart-quantity-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cart-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  min-height: 100px;
  padding: 1.15rem 1.5rem calc(1.15rem + env(safe-area-inset-bottom));
  background: #fff;
  border: none;
  border-radius: 1.5rem 1.5rem 0 0;
  box-shadow: 0 -14px 30px rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 1;
}

.cart-total {
  order: 1;
  margin: 0 auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.1rem;
}

.total-label {
  align-self: flex-end;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.total-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #0f172a;
}

.send-order-button {
  order: 3;
  width: auto;
  flex: 1 1 auto;
  max-width: 195px;
  padding: 0.9rem 1.25rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.32);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.send-order-button:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(16, 185, 129, 0.38);
}

.send-order-button:disabled,
.send-order-button--blocked,
.send-order-button--blocked:hover {
  background: #94a3b8;
  cursor: not-allowed;
  opacity: 0.92;
  box-shadow: none;
  transform: none;
}

.send-order-button--blocked {
  flex-basis: 100%;
  max-width: none;
}

.fair-order-gate-notice {
  order: 2;
  flex-basis: 100%;
  border: 1px solid #fde68a;
  border-radius: 0.75rem;
  background: #fffbeb;
  padding: 0.875rem;
  color: #78350f;
}

.fair-order-gate-notice--info {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.fair-order-gate-notice__title {
  font-size: 0.875rem;
  font-weight: 800;
}

.fair-order-gate-notice__detail {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.empty-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.empty-cart-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-cart p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}

#continueShopping {
  padding: 0.75rem 1.5rem;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease;
}

#continueShopping:hover {
  background: #2563eb;
}

/* ===== SEARCH CARD ===== */
#produtos,
#produtos * {
  box-sizing: border-box;
}

#produtos {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

#produtos .content {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 769px) {
  #produtos .content {
    padding-inline: 40px;
  }
}

#produtos .content {
  --riz-products-scale: 0.97;
  zoom: var(--riz-products-scale);
}

@supports not (zoom: 1) {
  #produtos .content {
    transform: scale(var(--riz-products-scale));
    transform-origin: top center;
    width: calc(100% / var(--riz-products-scale));
    margin: 0 auto calc((1 - var(--riz-products-scale)) * -18rem);
  }
}

.search-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.search-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.company-logo {
  max-height: 80px;
  max-width: 200px;
  object-fit: contain;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: #9ca3af;
  font-size: 1.125rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.filter-badge {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
}

.filter-badge.hidden {
  display: none;
}

.remove-filter {
  background: transparent;
  border: none;
  color: #1e40af;
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
  margin-left: 0.5rem;
}

.cart-wrapper {
  display: flex;
  justify-content: center;
}

.cart-button {
  padding: 0.75rem 1.5rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease;
}

.cart-button:hover {
  background: #059669;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.btn-filter {
  flex: 1;
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  background: #e5e7eb;
}

.btn-category-toggle {
  display: none;
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  color: #374151;
  cursor: pointer;
  font-weight: 600;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-category-toggle:hover,
.btn-category-toggle[aria-expanded="true"] {
  background: #e5e7eb;
  color: #111827;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.btn-view {
  padding: 0.75rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view:hover {
  background: #e5e7eb;
}

.btn-view.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ===== CATEGORY MENU ===== */
.category-menu {
  position: sticky;
  top: 1rem;
  height: fit-content;
  min-width: 0;
}

.category-menu.mobile-hidden .menu-content {
  display: none;
}

@media (min-width: 1024px) {
  .category-menu.mobile-hidden .menu-content {
    display: block;
  }
}

@media (min-width: 1025px) {
  /* Especificidade igual à regra .products-grid.grid-view de assets/css/page.css (repeat(3, 1fr)) */
  .products-grid.grid-view {
    grid-template-columns: repeat(4, 1fr);
  }

  .menu-content {
    max-height: calc(78vh + 100px);
  }
}

.menu-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 100%;
}

.menu-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-clear {
  padding: 0.5rem 1rem;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s ease;
}

.btn-clear:hover {
  background: #dc2626;
}

.btn-clear.hidden {
  display: none;
}

.menu-content {
  max-height: 78vh;
  overflow-y: auto;
}

/* ===== SECTIONS, CATEGORIES, SUBCATEGORIES ===== */
.sections-list {
  padding: 0.5rem;
}

.section-item {
  margin-bottom: 0.5rem;
}

.section-header,
.category-header {
  width: 100%;
  padding: 0.75rem 1rem;
  background: #f9fafb;
  border: none;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.section-header:hover,
.category-header:hover {
  background: #f3f4f6;
}

.section-header i,
.category-header i {
  transition: transform 0.2s ease;
}

.section-header.expanded i,
.category-header.expanded i {
  transform: rotate(90deg);
}

.categories-list {
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.category-item {
  margin-bottom: 0.5rem;
}

.subcategories-list {
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.subcategories-list--flat {
  padding-left: 0;
  margin-top: 0;
}

.subcategory-item {
  padding: 0.75rem 1rem;
  background: white;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.subcategory-item:hover {
  background: #eff6ff;
  color: #2563eb;
}

.subcategory-item.active {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.subcategory-item span:last-child {
  background: #e5e7eb;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.subcategory-item.active span:last-child {
  background: #93c5fd;
  color: #1e3a8a;
}

/* ===== PRODUCTS CONTAINER ===== */
.products-container {
  min-height: 400px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.no-products {
  background: white;
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  color: #6b7280;
}

.no-products.hidden {
  display: none;
}

.no-products-content {
  font-size: 1.125rem;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 1.1rem;
  column-gap: 0.5rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.products-grid.list-view {
  grid-template-columns: 1fr;
}

.product-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.product-card:focus-visible {
  outline: 3px solid rgba(16, 185, 129, 0.45);
  outline-offset: 3px;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .products-grid {
  row-gap: 1.1rem;
  column-gap: 0.5rem;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .content {
  --riz-products-scale: 0.86;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .product-card {
  border-radius: 0.9rem;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .product-image-container {
  padding-top: 70%;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .product-info {
  padding: 1rem;
  gap: 0.4rem;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .product-info h3 {
  font-size: 1rem;
  line-height: 1.3;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .product-footer {
  padding-top: 0.6rem;
}

[data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .product-price {
  font-size: 1.1rem;
}

.product-card.list-view {
  flex-direction: row;
}

.product-image-container {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background: #f9fafb;
}

.list-view .product-image-container {
  padding-top: 0;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.product-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  text-align: center;
  color: #64748b;
  background:
    radial-gradient(circle at 30% 20%, rgba(148, 163, 184, 0.18), transparent 34%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

.product-image-placeholder svg {
  width: 3rem;
  height: 3rem;
  color: #94a3b8;
}

.product-image-placeholder span {
  max-width: 9rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-image-placeholder--details {
  position: relative;
  min-height: 320px;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.product-image-placeholder--details svg {
  width: 5rem;
  height: 5rem;
}

.product-card:hover .product-image-container img {
  transform: scale(1.05);
}

.favorite-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 40px;
  height: 40px;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #9ca3af;
  transition: all 0.2s ease;
  z-index: 10;
}

.favorite-btn:hover {
  color: #ef4444;
  transform: scale(1.1);
}

.favorite-btn.active,
.favorite-btn[aria-pressed="true"] {
  color: #ef4444;
}

.product-promo-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn.active i,
.favorite-btn[aria-pressed="true"] i {
  color: #ef4444;
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.product-info > div:first-child {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #111827;
  line-height: 1.4;
}

.product-card-specs {
  margin: 0;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.3;
}

.product-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.product-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 9999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.75rem;
}

.product-price {
  display: inline-flex;
  align-items: flex-start;
  line-height: 1;
  font-size: 1.25rem;
  font-weight: 700;
  color: #10b981;
}

.product-price-currency {
  margin-right: 0.25rem;
}

.product-price-cents {
  position: relative;
  top: -0.45em;
  font-size: 0.52em;
  line-height: 1;
}

.product-price-original {
  display: inline-block;
  margin-right: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

/* ===== PRODUCT DETAIL MODAL ===== */
.product-detail-modal[hidden] {
  display: none !important;
}

/* Seções internas (opções de venda, variações, adicionais, gate) usam
   display:flex/margin fixos nas regras abaixo sem exceção pra quando ficam
   [hidden] — herdam display:flex e a margem continua contando no layout
   mesmo com altura zero, abrindo um vão vazio no modal. Uma regra genérica
   resolve pra todas de uma vez, sem precisar repetir em cada seletor. */
.product-detail-modal [hidden] {
  display: none !important;
  margin: 0 !important;
}

.product-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 200005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

.product-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.product-detail-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  height: min(86dvh, 640px);
  overflow: hidden;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #fff 0%, #fff 58%, #f8fafc 100%);
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.32);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.product-detail-modal__dialog::-webkit-scrollbar {
  width: 8px;
}

.product-detail-modal__dialog::-webkit-scrollbar-track {
  background: transparent;
}

.product-detail-modal__dialog::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.product-detail-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

.product-detail-modal__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(340px, 1.08fr);
  gap: 0;
  height: 100%;
  min-height: 0;
}

.product-detail-modal__media {
  min-height: 0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.85rem, 1.8vw, 1.15rem);
}

.product-detail-modal__image,
.product-detail-modal__placeholder {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.95rem;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
}

.product-detail-modal__image[hidden],
.product-detail-modal__placeholder[hidden] {
  display: none !important;
}

.product-detail-modal__placeholder {
  min-height: 0;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.product-detail-modal__gallery {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-detail-modal__gallery-track {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: 0.95rem;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
  -webkit-overflow-scrolling: touch;
}

.product-detail-modal__gallery-track::-webkit-scrollbar {
  display: none;
}

.product-detail-modal__gallery-image {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  scroll-snap-align: center;
}

.product-detail-modal__gallery-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
}

.product-detail-modal__gallery-thumbs[hidden] {
  display: none !important;
}

.product-detail-modal__gallery-thumb {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 0.6rem;
  border: 2px solid transparent;
  background-color: #e2e8f0;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.product-detail-modal__gallery-thumb:hover {
  opacity: 0.9;
}

.product-detail-modal__gallery-thumb.is-active {
  opacity: 1;
  border-color: #2563eb;
}

.product-detail-modal__info {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-height: 0;
  padding: clamp(1.25rem, 2.2vw, 1.8rem);
  padding-top: clamp(2.55rem, 3vw, 2.9rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.product-detail-modal__eyebrow {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-detail-modal__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.25rem, 1.85vw, 1.75rem);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: 0;
}

.product-detail-modal__promo-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-detail-modal__promo-badge[hidden] {
  display: none;
}

.product-detail-modal__price-original {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: line-through;
}

.product-detail-modal__price-original[hidden] {
  display: none;
}

.product-detail-modal__purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 1.05rem;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.product-detail-modal__price {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.18rem;
  color: #10b981;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 900;
  line-height: 1;
}

.product-detail-modal__price-label {
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.product-detail-modal__quantity {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f8fafc;
  padding: 0.34rem;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.product-detail-modal__quantity[hidden] {
  display: none;
}

.product-detail-modal__quantity-btn {
  width: 2.05rem;
  height: 2.05rem;
  border: 0;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

.product-detail-modal__quantity-btn:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.product-detail-modal__quantity-value {
  min-width: 2.2ch;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.product-detail-modal__variacoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.15rem 0 1rem;
}

.product-detail-modal__variacao-pill {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.product-detail-modal__variacao-pill:hover {
  border-color: #10b981;
}

.product-detail-modal__variacao-pill--active {
  border-color: #047857;
  background: #ecfdf5;
  color: #047857;
}

.product-detail-modal__opcoes-venda {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.15rem 0 0.85rem;
}

.product-detail-modal__opcoes-venda-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.product-detail-modal__opcoes-venda-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-detail-modal__opcao-venda-pill {
  border: 1.5px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  color: #0f172a;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.product-detail-modal__opcao-venda-pill:hover {
  border-color: #10b981;
}

.product-detail-modal__opcao-venda-pill--active {
  border-color: #047857;
  background: #ecfdf5;
  color: #047857;
}

.product-detail-modal__opcao-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
}

.product-detail-modal__opcao-info-disponibilidade {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
}

.product-detail-modal__opcao-info-complemento {
  color: #64748b;
}

.product-detail-modal__about {
  border: 1px solid #dbeafe;
  border-radius: 1.05rem;
  background:
    linear-gradient(180deg, rgba(239, 246, 255, 0.92) 0%, rgba(255, 255, 255, 0.96) 38%),
    #fff;
  padding: 0.95rem;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.product-detail-modal__about-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.product-detail-modal__about-header span {
  width: 0.42rem;
  height: 1.45rem;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.product-detail-modal__about h2 {
  margin: 0;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.product-detail-modal__description {
  display: grid;
  gap: 0.72rem;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.68;
}

.product-detail-modal__description p {
  margin: 0;
}

.product-detail-modal__description p:first-child {
  color: #1e293b;
  font-weight: 620;
}

.product-detail-modal__specs {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.product-detail-modal__specs div {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  padding: 0.58rem 0.65rem;
}

.product-detail-modal__specs dt {
  margin: 0 0 0.18rem;
  color: #64748b;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-transform: uppercase;
}

.product-detail-modal__specs dd {
  margin: 0;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.product-detail-modal__list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-detail-modal__list li {
  position: relative;
  padding-left: 1.05rem;
  color: #334155;
  line-height: 1.55;
}

.product-detail-modal__list li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #10b981;
  content: "";
}

.product-detail-modal__buy {
  margin-top: 0.1rem;
  width: 100%;
  min-height: 2.85rem;
  border: 0;
  border-radius: 0.75rem;
  background: #10b981;
  color: #fff;
  cursor: pointer;
  font-size: 0.94rem;
  font-weight: 850;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.product-detail-modal__buy:hover {
  background: #059669;
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

.product-detail-modal__buy:disabled,
.product-detail-modal__buy--blocked,
.product-detail-modal__buy--blocked:hover {
  background: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.94;
  transform: none;
}

.product-detail-modal__gate {
  display: grid;
  gap: 0.28rem;
  border: 1px solid #fde68a;
  border-radius: 0.85rem;
  background: #fffbeb;
  padding: 0.82rem 0.9rem;
  color: #78350f;
}

.product-detail-modal__gate--info {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}

.product-detail-modal__gate[hidden] {
  display: none !important;
}

.product-detail-modal__gate strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.product-detail-modal__gate span {
  font-size: 0.82rem;
  line-height: 1.45;
}

/* ===== ORDER MODAL ===== */
#orderModal {
  --order-modal-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-family: var(--order-modal-font) !important;
  letter-spacing: 0;
}

#orderModal *:not(i):not(.bx):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not([class*="fa-"]) {
  font-family: var(--order-modal-font) !important;
}

#orderModal.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--cor-primaria, #10b981), var(--cor-secundaria, #059669));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200010;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow: hidden;
}

#orderModal.modal.active,
#orderModal.modal.show {
  display: flex;
}

#orderModal .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#orderModal .modal-content,
#orderModal .order-modal-content {
  background: white;
  border-radius: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  max-width: 720px;
  width: 100%;
  position: relative;
  max-height: calc(100dvh - 2.5rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

#orderModal .modal-content::-webkit-scrollbar,
#orderModal .order-modal-content::-webkit-scrollbar {
  width: 8px;
}

#orderModal .modal-content::-webkit-scrollbar-track,
#orderModal .order-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

#orderModal .modal-content::-webkit-scrollbar-thumb,
#orderModal .order-modal-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.38);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

#orderModal .modal-content::-webkit-scrollbar-thumb:hover,
#orderModal .order-modal-content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.55);
  border: 2px solid transparent;
  background-clip: content-box;
}

#orderModal .close-btn {
  position: absolute;
  top: 0.95rem;
  right: 0.95rem;
  background: white;
  border: 1px solid #e2e8f0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: all 0.2s ease;
  z-index: 2;
}

#orderModal .close-btn:hover {
  border-color: rgba(33, 33, 247, 0.3);
  color: #2121f7;
  transform: translateY(-1px);
}

#orderModal .progress-section {
  width: 100%;
  padding-bottom: 0.35rem;
}

#orderModal .progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

#orderModal .stepTitle {
  font-weight: 600;
  color: #0f172a;
}

#orderModal #stepIndicator {
  font-weight: 700;
  color: var(--cor-primaria, #10b981);
}

#orderModal .progress-bar {
  height: 0.22rem;
  background: #e5e7eb;
  border-radius: 1rem;
  overflow: hidden;
}

#orderModal .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cor-primaria, #10b981), var(--cor-secundaria, #059669));
  transition: width 0.3s ease;
  box-shadow: 0 0 18px color-mix(in srgb, var(--cor-primaria, #10b981) 42%, transparent);
}

#orderModal .step-content {
  min-height: 300px;
  margin-bottom: 1rem;
  overflow: visible;
}

#orderModal .step-content h2,
#orderModal .step-content h3 {
  color: #0f172a;
}

#orderModal .step-content input[type="text"],
#orderModal .step-content input[type="email"],
#orderModal .step-content input[type="number"] {
  border-radius: 0.95rem;
  border-color: #dbe3ee;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

#orderModal .step-content input:focus {
  border-color: color-mix(in srgb, var(--cor-primaria, #10b981) 52%, white) !important;
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--cor-primaria, #10b981) 16%, transparent),
    inset 0 1px 2px rgba(15, 23, 42, 0.03) !important;
}

#orderModal .saved-address-item {
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

#orderModal .checkout-choice-card {
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  padding: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#orderModal .checkout-choice-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

#orderModal .checkout-choice-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
}

#orderModal .checkout-choice-icon svg {
  width: 24px;
  height: 24px;
}

#orderModal .order-summary-card {
  margin-top: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
}

#orderModal .order-summary-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  list-style: none;
}

#orderModal .order-summary-card summary::-webkit-details-marker {
  display: none;
}

#orderModal .order-summary-title {
  min-width: 0;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 700;
}

#orderModal .order-summary-title::after {
  content: "Ver detalhes";
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
}

#orderModal .order-summary-total {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

#orderModal .order-summary-items {
  display: grid;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}

#orderModal .order-summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 0.65rem;
}

#orderModal .order-summary-item-name {
  overflow: hidden;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#orderModal .order-summary-item-variacao {
  color: #64748b;
  font-weight: 500;
}

#orderModal .order-summary-item-meta,
#orderModal .order-summary-empty {
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.8rem;
}

#orderModal .order-summary-item-total {
  flex: 0 0 auto;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

#orderModal .form-input-error {
  border-color: #ef4444 !important;
  background: #fff1f2;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12) !important;
}

#orderModal .change-validation-message {
  margin-top: 0.5rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 500;
}

#orderModal .change-validation-message.is-error {
  color: #dc2626;
}

#orderModal .change-validation-message.is-valid {
  color: #047857;
}

#orderModal .radio-group {
  display: grid;
  gap: 0.85rem;
}

#orderModal .radio-option {
  display: block;
  cursor: pointer;
}

#orderModal .radio-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#orderModal .option-content {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #ffffff;
  padding: 0.95rem;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#orderModal .radio-option:hover .option-content {
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

#orderModal .radio-input:focus-visible + .option-content {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

#orderModal .option-text {
  min-width: 0;
}

#orderModal .option-text h3 {
  margin: 0;
  color: #0f172a;
  font-size: 0.98rem;
  font-weight: 800;
}

#orderModal .option-text p {
  margin: 0.18rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}

#orderModal .payment-extra {
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  background: #f8fbff;
  padding: 0.95rem;
}

#orderModal .change-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

#orderModal .change-option {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  padding: 0.55rem 0.8rem;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

#orderModal .change-option input {
  accent-color: #2563eb;
}

#orderModal .payment-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  flex: 0 0 2.65rem;
  border: 1px solid #dbeafe;
  border-radius: 0.9rem;
  background: #eff6ff;
  color: #2563eb;
}

#orderModal .payment-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

#orderModal .radio-option.selected .payment-icon {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

#orderModal .modal-navigation {
  display: flex;
  gap: 1rem;
}

#orderModal .nav-btn {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  min-height: 54px;
}

#orderModal .back-btn {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #dbe3ee;
}

#orderModal .back-btn:hover {
  background: #eef2f7;
  border-color: #cbd5e1;
}

#orderModal .next-btn,
#orderModal .submit-btn {
  background: linear-gradient(135deg, var(--cor-primaria, #10b981), var(--cor-secundaria, #059669));
  color: white;
  box-shadow: 0 18px 36px color-mix(in srgb, var(--cor-primaria, #10b981) 26%, transparent);
}

#orderModal .next-btn:hover,
#orderModal .submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

#orderModal .nav-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

#orderModal .radio-option.selected > div,
#orderModal .radio-option.selected .option-content {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

/* ===== RESPONSIVE ===== */
/* ===== TRILHOS DO MENU (mobile e, no desktop, layout "topo") =====
   Estes elementos so existem no DOM quando o menu roda em modo trilho,
   por isso as regras nao precisam ficar presas a uma media query. */
.mobile-section-rail,
.mobile-category-rail,
.mobile-subcategory-rail {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.55rem 0.75rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mobile-section-rail::-webkit-scrollbar,
.mobile-category-rail::-webkit-scrollbar,
.mobile-subcategory-rail::-webkit-scrollbar {
  display: none;
}

.mobile-section-rail {
  padding-top: 0.55rem;
  padding-bottom: 0.9rem;
  background: #ffffff;
}

.mobile-section-pill {
  position: relative;
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.mobile-section-pill.active {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.mobile-section-pill.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.58rem;
  width: 0;
  height: 0;
  border-right: 0.4rem solid transparent;
  border-left: 0.4rem solid transparent;
  border-top: 0.48rem solid #2563eb;
  transform: translateX(-50%);
}

.mobile-category-rail {
  padding-top: 0.25rem;
  padding-bottom: 0.9rem;
  background: #ffffff;
}

.mobile-subcategory-rail {
  margin-top: -0.35rem;
  padding-left: 0.75rem;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.mobile-category-pill,
.mobile-subcategory-pill {
  flex: 0 0 auto;
  min-height: 2.25rem;
  margin-bottom: 0;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.mobile-category-pill {
  position: relative;
  width: auto;
  padding: 0.55rem 0.85rem;
  justify-content: center;
}

.mobile-category-pill i {
  display: none;
}

.mobile-category-pill.active,
.mobile-subcategory-pill.active {
  border-color: #93c5fd;
  background: #dbeafe;
  color: #1e40af;
}

.mobile-category-pill.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.58rem;
  width: 0;
  height: 0;
  border-right: 0.4rem solid transparent;
  border-left: 0.4rem solid transparent;
  border-top: 0.48rem solid #2563eb;
  transform: translateX(-50%);
}

.mobile-subcategory-pill {
  display: inline-flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0.78rem;
}

.mobile-subcategory-pill span:last-child {
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.68rem;
}

.mobile-subcategory-pill.active span:last-child {
  background: #93c5fd;
  color: #1e3a8a;
}

/* Arrastar com o mouse (o dedo ja rola nativamente no mobile). */
@media (hover: hover) and (pointer: fine) {
  .mobile-section-rail.rail-scrollable,
  .mobile-category-rail.rail-scrollable,
  .mobile-subcategory-rail.rail-scrollable {
    cursor: grab;
  }

  .mobile-section-rail.rail-dragging,
  .mobile-category-rail.rail-dragging,
  .mobile-subcategory-rail.rail-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
  }
}

@media (max-width: 768px) {
  :root {
    --riz-cart-mobile-collapsed-height: 72px;
  }

  #produtos,
  #produtos .content,
  #produtos .main-content {
    overflow: visible !important;
  }

  #produtos .content {
    --riz-products-scale: 1;
    zoom: 1;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding-inline: 0.5rem;
  }

  [data-cidade-rizomas-empresa-modal] #modal-empresa-scroll-container #produtos .content {
    --riz-products-scale: 0.86;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding-inline: 0;
  }

  .cart-sidebar {
            padding-top: 0px;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(86dvh, 680px);
    max-height: calc(100dvh - env(safe-area-inset-top) - 0.75rem);
    border-radius: 1.4rem 1.4rem 0 0;
    box-shadow: 0 -18px 48px rgba(15, 23, 42, 0.24);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: env(safe-area-inset-bottom);
    /* Minimizado, o avatar (9998-9999) deve ficar NA FRENTE de propósito —
       o carrinho fechado não pode tampar o avatar. Só quando abre (.active,
       abaixo) é que o carrinho passa a dominar a tela. O rodapé "Precisamos
       uns dos outros" (.footer-rizomas, z-index 9998 global em page.css) é
       tratado à parte logo abaixo: esse sempre fica atrás do carrinho,
       minimizado ou não. */
    z-index: 9000 !important;
  }

  /* .footer-rizomas vem de public/assets/css/page.css (site inteiro, fora
     do nosso controle direto aqui) com z-index 9998 — empatado com o
     avatar. Nesta página (produtos), ele deve sempre ficar atrás do
     carrinho, mesmo minimizado; sobrescrevendo só neste arquivo em vez de
     no CSS global pra não afetar páginas sem carrinho. */
  .footer-rizomas {
    z-index: 8000 !important;
  }

  .cart-sidebar.has-items.collapsed {
    transform: translateY(calc(100% - var(--riz-cart-mobile-collapsed-height) - env(safe-area-inset-bottom)));
  }

  .cart-sidebar.active {
    right: 0;
    transform: translateY(0);
    z-index: 999999 !important;
  }

  .cart-sidebar.collapsed .cart-title,
  .cart-sidebar.collapsed .close-cart,
  .cart-sidebar.collapsed .pending-orders-section,
  .cart-sidebar.collapsed .cart-items-list,
  .cart-sidebar.collapsed .cart-footer {
    visibility: hidden;
    pointer-events: none;
  }

  .cart-sidebar.active .cart-mobile-summary {
    display: none;
  }

  .cart-sidebar.has-items.collapsed .cart-mobile-summary {
    display: flex;
  }

  .cart-mobile-summary {
    position: relative;
    width: 100%;
    min-height: var(--riz-cart-mobile-collapsed-height);
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    cursor: pointer;
  }

  .cart-mobile-summary::before {
    content: "";
    position: absolute;
    top: 0.45rem;
    left: 50%;
    width: 2.75rem;
    height: 0.28rem;
    border-radius: 999px;
    background: #cbd5e1;
    transform: translateX(-50%);
  }

  .cart-mobile-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.35rem;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.15;
  }

  .cart-mobile-summary-copy span:last-child {
    font-size: 1rem;
    font-weight: 800;
    color: #10b981;
  }

  .cart-mobile-summary-action {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #10b981;
    color: #ffffff;
    padding: 0.72rem 1rem;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
  }

  .cart-title {
    padding: 1rem 2.75rem 0.85rem 1.1rem;
  }

  .cart-items-list {
    min-height: 0;
    padding: 0.75rem 1rem;
  }

  .cart-item {
    grid-template-columns: 44px minmax(0, 1fr) max-content;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  .cart-item-thumb {
    width: 44px;
    height: 44px;
  }

  .cart-item-controls {
    justify-self: end;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.24rem;
  }

  .cart-quantity-button {
    width: 1.75rem;
    height: 1.75rem;
  }

  .cart-quantity-value {
    font-size: 0.9rem;
  }

  .cart-footer {
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  }

  .search-content {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }

  .search-card {
    margin-bottom: 0;
    padding: 0;
  }

  .search-wrapper {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-input {
    height: 42px;
    background: #fff !important;
    border: 1px solid #e5e7eb;
    font-size: 0.95rem;
  }

  .main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .products-container {
    display: contents;
    min-height: 0;
  }

  .products-container .search-card {
    order: 1;
    position: sticky;
    top: 0;
    z-index: 31;
    background: rgba(248, 250, 252, 0.96) !important;
    backdrop-filter: blur(12px);
    padding: 0.5rem 0 0.35rem;
  }

  .category-menu {
    order: 2;
    position: sticky;
    top: 53px;
    z-index: 30;
  }

  .no-products,
  .products-grid {
    order: 3;
  }

  .controls {
    flex-direction: row;
    flex: 0 0 auto;
    justify-content: flex-end !important;
    width: auto !important;
    gap: 0.375rem;
  }

  .btn-category-toggle {
    display: inline-flex;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 0.6rem;
  }

  .btn-category-toggle i {
    transition: transform 0.2s ease;
  }

  .btn-category-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
  }

  .view-toggle {
    flex: 0 0 auto;
    gap: 0.25rem;
  }

  .btn-view {
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .category-menu .menu-card {
    border-radius: 0.75rem;
  }

  .category-menu .menu-header {
    min-height: 42px;
    padding: 0.625rem 0.75rem;
    gap: 0.5rem;
    border-bottom: 0;
  }

  .category-menu:not(.mobile-hidden) .menu-header {
    border-bottom: 1px solid #e5e7eb;
  }

  .category-menu .menu-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.95rem;
  }

  .category-menu .menu-title i {
    font-size: 0.95rem;
  }

  .category-menu .menu-content {
    max-height: none;
    overflow: visible;
  }


  .btn-clear {
    flex: 0 0 auto;
    min-width: 34px;
    height: 34px;
    justify-content: center;
    border-radius: 0.6rem;
  }

  .btn-clear--disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    opacity: 1;
  }

  .products-grid:not(.list-view) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.5rem !important;
    row-gap: 0.7rem !important;
    align-items: stretch;
  }

  .product-card {
    min-width: 190px;
    height: 100%;
  }

  .product-info h3 {
    font-size: 1rem;
  }

  .product-info {
    padding: 0.875rem;
  }

  .product-price {
    font-size: 1rem;
  }

  #orderModal.modal {
    padding: 1rem;
    align-items: center;
  }

  #orderModal .modal-content,
  #orderModal .order-modal-content {
    border-radius: 1.5rem;
    height: min(88dvh, calc(100dvh - 2rem));
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #orderModal .modal-navigation {
    flex-direction: row;
    align-items: stretch;
    gap: 0.6rem;
  }

  #orderModal .order-modal-body,
  #orderModal .step-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #orderModal .nav-btn {
    min-width: 0;
    min-height: 2.9rem;
    padding: 0.72rem 0.65rem;
    font-size: 0.9rem;
    line-height: 1.12;
  }

  #orderModal .back-btn {
    flex: 0 1 38%;
  }

  #orderModal .next-btn,
  #orderModal .submit-btn {
    flex: 1 1 0;
  }

  #orderModal .checkout-choice-icon {
    display: none;
  }

  .product-detail-modal {
    align-items: flex-end;
    padding: 0;
  }

  .product-detail-modal__dialog {
    width: 100%;
    height: auto;
    max-height: 92dvh;
    overflow-y: auto;
    border-radius: 1.15rem 1.15rem 0 0;
  }

  .product-detail-modal__layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .product-detail-modal__image,
  .product-detail-modal__gallery-image,
  .product-detail-modal__placeholder {
    height: auto;
    min-height: 0;
    max-height: 42dvh;
    aspect-ratio: 16 / 11;
    border-radius: 0;
    box-shadow: none;
  }

  .product-detail-modal__gallery-track {
    border-radius: 0;
    box-shadow: none;
  }

  .product-detail-modal__info {
    gap: 0.85rem;
    min-height: 0;
    overflow: visible;
    padding: 1.15rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
  }

  .product-detail-modal__title {
    font-size: 1.35rem;
  }

  .product-detail-modal__price {
    font-size: 1.55rem;
  }

  .product-detail-modal__purchase-row {
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .product-detail-modal__quantity {
    align-self: center;
  }

  .product-detail-modal__about {
    padding: 0.9rem;
  }

  .product-detail-modal__specs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  #produtos .content {
    padding-inline: 0.35rem;
  }

  .products-grid {
    column-gap: 0.4rem;
    row-gap: 0.65rem;
  }

  .products-grid:not(.list-view) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-card {
    border-radius: 0.875rem;
    min-width: 190px;
  }

  .product-image-container {
    padding-top: 72%;
  }

  .product-info {
    padding: 0.7rem;
    gap: 0.375rem;
  }

  .product-info h3 {
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .product-info > div:first-child {
    font-size: 0.68rem;
  }

  .product-footer {
    gap: 0.45rem;
    padding-top: 0.625rem;
  }

  .product-price {
    font-size: 0.95rem;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none !important;
}

/* ===== MENU NO TOPO (escolha do painel; so afeta o desktop) ===== */
@media (min-width: 769px) {
  #produtos[data-menu-layout="topo"] .main-content {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  #produtos[data-menu-layout="topo"] .products-container {
    display: contents;
  }

  /* Busca e menu tem a mesma largura e se encostam: juntos formam um card unico. */
  #produtos[data-menu-layout="topo"] .products-container .search-card,
  #produtos[data-menu-layout="topo"] .category-menu {
    width: 92%;
    max-width: 92%;
    justify-self: center;
  }

  #produtos[data-menu-layout="topo"] .products-container .search-card {
    order: 1;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
    padding: 1.1rem 1.25rem 0.85rem;
    border-radius: 1rem 1rem 0 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  /* O input continua estreito (60% da pagina), centralizado dentro do card. */
  #produtos[data-menu-layout="topo"] .products-container .search-card .search-content {
    width: 75%;
    max-width: 75%;
    margin-inline: auto;
  }

  #produtos[data-menu-layout="topo"] .category-menu {
    order: 2;
    position: relative;
    top: auto;
    z-index: 2;
    /* Sobe um pouco para os botoes ficarem levemente sobre o input. */
    margin-top: -0.7rem;
  }

  #produtos[data-menu-layout="topo"] .category-menu .menu-card {
    background: transparent !important;
    border-radius: 0 0 1rem 1rem;
    box-shadow: none !important;
  }

  #produtos[data-menu-layout="topo"] .category-menu .menu-header {
    background: transparent !important;
  }

  #produtos[data-menu-layout="topo"] .section-header,
  #produtos[data-menu-layout="topo"] .category-header,
  #produtos[data-menu-layout="topo"] .subcategory-item {
    background: #ffffff !important;
    border: 1px solid transparent;
  }

  #produtos[data-menu-layout="topo"] .subcategory-item:hover {
    background: #eff6ff !important;
  }

  #produtos[data-menu-layout="topo"] .subcategory-item.active {
    background: #dbeafe !important;
    border-color: #2563eb;
  }

  #produtos[data-menu-layout="topo"] .section-header.expanded,
  #produtos[data-menu-layout="topo"] .category-header.expanded {
    border-color: #2563eb;
  }

  #produtos[data-menu-layout="topo"] .category-menu .menu-content {
    max-height: none;
    overflow: visible;
  }

  #produtos[data-menu-layout="topo"] .sections-list {
    padding: 0;
  }

  /* Trilhos mais justos entre si: no desktop o respiro do mobile fica exagerado.
     O padding-bottom guarda so o espaco do triangulinho do pill ativo. */
  #produtos[data-menu-layout="topo"] .mobile-section-rail,
  #produtos[data-menu-layout="topo"] .mobile-category-rail {
    padding-bottom: 0.6rem;
    background: transparent;
  }

  #produtos[data-menu-layout="topo"] .mobile-category-rail {
    padding-top: 0;
  }

  /* Sem divisoria e colado no triangulinho da categoria ativa,
     que desce 0.58rem abaixo do pill. */
  #produtos[data-menu-layout="topo"] .mobile-subcategory-rail {
    margin-top: 0;
    padding-top: 0.1rem;
    padding-bottom: 0.45rem;
    border-top: 0;
    background: transparent;
  }

  /* Descola levemente do input (precisa vir depois das regras acima). */
  #produtos[data-menu-layout="topo"] .sections-list > *:first-child {
    padding-top: 5px;
  }

  #produtos[data-menu-layout="topo"] .mobile-section-rail,
  #produtos[data-menu-layout="topo"] .mobile-category-rail,
  #produtos[data-menu-layout="topo"] .mobile-subcategory-rail {
    justify-content: center;
    justify-content: safe center;
  }

  #produtos[data-menu-layout="topo"] .no-products,
  #produtos[data-menu-layout="topo"] .products-grid {
    order: 3;
    margin-top: 1.75rem;
  }
}
