@import "bootstrap-icons.min.css";
@import "bootstrap.min.css";
@import "bootstrap.theme.css";

@font-face {
   font-family: Roboto;
   src: url(../fonts/Roboto-Regular.ttf);
}

body {
   background-color: var(--app-bg);
   font-family: Roboto;
   font-size: 1rem;
   max-width: 100%;
}

html, body {
   max-width: 100%;
}

a {
   color: var(--bs-card-color);
}

/* #region Avatar */

.avatar {
   width: 2.5rem;
   height: 2.5rem;
   border-radius: 50%;
   overflow: hidden;
   padding: 0;
}

   .avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover; /* Crop instead of shrink */
      display: block;
   }

   .avatar .avatar-status {
      width: 0.75rem;
      height: 0.75rem;
      position: absolute;
      border-radius: 50%;
      bottom: 0px;
      right: 0px;
   }


/* #endregion */

/* #region Cards */

.card {
   border-radius: 8px;
}

   .card .card-header {
   }

   .card .card-footer {
   }

   .card .card-title {
      font-size: 1.2rem;
      font-weight: bold;
   }

.card-icon-badge {
   width: 40px;
   height: 40px;
   flex-shrink: 0;
}
/* #endregion */

/* #region Buttons */

.btn.btn-md {
   width: 36px;
   height: 36px;
   padding: 6px;
}

.btn-circle {
   border-radius: 50%;
   width: 45px;
   height: 45px;
   padding: 0;
   display: inline-flex;
   align-items: center;
   justify-content: center;
}

   /* Adjust sizes as needed */
   .btn-circle.btn-sm {
      width: 35px;
      height: 35px;
   }

   .btn-circle.btn-lg {
      width: 60px;
      height: 60px;
   }

.btn-action {
   color: var(--bs-primary);
}
/* #endregion */

/* #region Form-Control */

.form-control,
.form-select {
   height: 40px;
   padding: 0.75rem 1rem;
   border-radius: 6px;
   font-size: 0.95rem;
   font-weight: 500;
   transition: all .25s ease;
   box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

   .form-control::placeholder {
      font-weight: 400;
   }

   /* Hover */
   .form-control:hover,
   .form-select:hover {
      border-color: #b8c2cc;
   }

   /* Focus */
   .form-control:focus,
   .form-select:focus {
      border-color: var(--bs-primary);
      box-shadow: none !important;
      outline: none;
   }

   /* Disabled */
   .form-control:disabled,
   .form-select:disabled {
      background: #f7f9fb;
      color: #98a2b3;
      border-color: #e5e7eb;
      cursor: not-allowed;
   }

   /* Invalid */
   .form-control.is-invalid,
   .was-validated .form-control:invalid {
      border-color: #ef4444;
   }

      .form-control.is-invalid:focus,
      .was-validated .form-control:invalid:focus {
         box-shadow: 0 0 0 4px rgba(239,68,68,.12);
      }

   /* Valid */
   .form-control.is-valid,
   .was-validated .form-control:valid {
      border-color: #22c55e;
   }

      .form-control.is-valid:focus,
      .was-validated .form-control:valid:focus {
         box-shadow: 0 0 0 4px rgba(34,197,94,.12);
      }

/* Textareas */
textarea.form-control {
   min-height: 120px;
   resize: vertical;
}

/* Input groups */
.input-group-text {
   background: #f8fafc;
   border: 1px solid #d8dee9;
   border-radius: 12px;
   color: #64748b;
}

/* Floating labels */
.form-floating > .form-control {
   height: calc(3.8rem + 2px);
   padding-top: 1.5rem;
}

.form-floating > label {
   color: #64748b;
}

/* #endregion */

/* #region Sidebar */

.sidebar { --sb-width: 264px; --sb-bg: var(--app-primary); --sb-color: rgba(255, 255, 255, .78); font-size:0.9rem; --sb-color-strong: #fff; --sb-hover-bg: rgba(255, 255, 255, .1); --sb-active-bg: #fff; --sb-active-color: var(--app-accent); --sb-indicator: color-mix(in srgb, var(--app-accent) 55%, white); --sb-guide: rgba(255, 255, 255, .22); --sb-heading: rgba(255, 255, 255, .55); position: sticky; top: 0; height: 100vh; height: 100dvh; flex: 0 0 var(--sb-width); width: var(--sb-width); padding: 1.25rem .75rem; background: var(--sb-bg); border-right: 1px solid transparent; overflow-x: hidden; transition: flex-basis .25s ease, width .25s ease, padding .25s ease; }
   /* Variante clara: <aside class="sidebar sidebar-light ..."> (precisa de logo a cores) */
   .sidebar.sidebar-light {
      --sb-bg: var(--bs-body-bg);
      --sb-color: var(--bs-secondary-color);
      --sb-color-strong: var(--bs-emphasis-color);
      --sb-hover-bg: var(--bs-tertiary-bg);
      --sb-active-bg: var(--bs-primary-bg-subtle);
      --sb-active-color: var(--bs-primary-text-emphasis);
      --sb-indicator: var(--bs-primary);
      --sb-guide: var(--bs-border-color);
      --sb-heading: var(--bs-secondary-color);
      border-right-color: var(--bs-border-color);
   }

.sidebar-brand {
   display: block;
   padding: .5rem .75rem 1.5rem;
}

   .sidebar-brand img {
      display: block;
      width: 100%;
      max-width: 200px;
   }

.sidebar-nav {
   flex: 1 1 auto;
   min-height: 0;
   overflow-y: auto;
   overscroll-behavior: contain;
   scrollbar-width: thin;
   scrollbar-color: var(--sb-guide) transparent;
}

   .sidebar-nav .nav {
      gap: .125rem;
      flex-wrap: nowrap;
   }

/* Logo do cliente */
.sidebar .sidebar-brand-cliente img { max-height: 64px; max-width: 100%; width: auto; object-fit: contain; }

/* "powered by RCSoft" */
.sidebar .powered-by { display: flex; align-items: center; justify-content: center; gap: .4rem; margin: -.75rem 0 1rem; font-size: .7rem; color: rgba(255, 255, 255, .5); text-decoration: none; }

   .sidebar .powered-by img { height: 18px !important; width: auto !important; opacity: .75; }

   .sidebar .powered-by:hover { color: rgba(255, 255, 255, .85); }

      .sidebar .powered-by:hover img { opacity: 1; }

.sidebar-heading {
   margin: 1.25rem 0 .375rem;
   padding: 0 .75rem;
   color: var(--sb-heading);
   font-size: .6875rem;
   font-weight: 600;
   letter-spacing: .06em;
   text-transform: uppercase;
}

/* Links */
.sidebar .nav-link {
   display: flex;
   align-items: center;
   gap: .75rem;
   padding: .55rem .75rem;
   border-radius: var(--bs-border-radius-lg);
   color: var(--sb-color);
   font-weight: 500;
   cursor: pointer;
   transition: background-color .15s ease, color .15s ease;
}

   .sidebar .nav-link:hover {
      background: var(--sb-hover-bg);
      color: var(--sb-color-strong);
   }

   .sidebar .nav-link:focus-visible {
      outline: 2px solid var(--sb-indicator);
      outline-offset: 2px;
      box-shadow: none;
   }

   .sidebar .nav-link > .bi:first-child {
      flex: none;
      width: 1.25rem;
      font-size: 0.8rem;
      text-align: center;
   }

.sidebar-nav > .nav > .nav-item > .nav-link.active,
.sidebar-nav > .nav > .nav-item > .nav-link.active:hover {
   background: var(--sb-active-bg);
   color: var(--app-primary);
   font-weight: 600;
}

/* Grupo  */
.sidebar summary.nav-link {
   list-style: none;
   user-select: none;
}

   .sidebar summary.nav-link::-webkit-details-marker {
      display: none;
   }

   .sidebar summary.nav-link.is-parent {
      color: var(--sb-color-strong);
   }

.sidebar .nav-caret {
   margin-left: auto;
   font-size: .75rem;
   transition: transform .2s ease;
}

.sidebar details[open] > summary .nav-caret {
   transform: rotate(180deg);
}

/* Subitens: linha-guia alinhada com o �cone do pai, sem chevrons */
.sidebar .nav-sub {
   position: relative;
   margin: .125rem 0 .5rem 1.375rem;
   padding-left: .75rem;
}
   /* Guia como pseudo-elemento (e n�o border-left) para esbater nas extremidades: cortada a direito, ficava um tra�o solto por baixo do �ltimo item */
   .sidebar .nav-sub::before {
      content: "";
      position: absolute;
      left: 0;
      top: .25rem;
      bottom: .25rem;
      width: 1px;
      background: linear-gradient(to bottom, transparent, var(--sb-guide) .875rem, var(--sb-guide) calc(100% - .875rem), transparent);
   }

   .sidebar .nav-sub .nav-link {
      position: relative;
      padding: .4rem .75rem;
      font-size: 0.85rem;
   }

      .sidebar .nav-sub .nav-link.active {
         background: transparent;
         color: var(--sb-color-strong);
         font-weight: 600;
      }

         .sidebar .nav-sub .nav-link.active::before {
            content: "";
            position: absolute;
            left: calc(-.875rem - 1px);
            top: 50%;
            translate: 0 -50%;
            width: 3px;
            height: 1.125rem;
            border-radius: 3px;
            background: var(--sb-indicator);
            box-shadow: 0 0 10px -2px var(--sb-indicator);
         }

.sidebar-nav { scrollbar-color: transparent transparent; }
   .sidebar-nav:hover { scrollbar-color: var(--sb-guide) transparent; }

.sidebar-footer { margin-top: auto; padding: 1rem .75rem 0; border-top: 1px solid var(--sb-guide); }

.sidebar-toogle {
   position: absolute;
   right: -36px;
   top: 20px;
   background: white;
   border-radius: 0%;
   width: 40px;
   height: 40px;
   border: none;
   z-index: 100;
   cursor: pointer;
   transition: transform 0.3s ease;
   font-size: 1.25em;
   align-items: center;
   padding: 5px 8px;
}

/* Recolher (checkbox) */
.sidebar-control {
   position: fixed;
   opacity: 0;
   pointer-events: none;
}

   .sidebar-control:checked + .app-layout .sidebar {
      flex-basis: 0;
      width: 0;
      padding-right: 0;
      padding-left: 0;
      border-color: transparent;
   }

      .sidebar-control:checked + .app-layout .sidebar > * {
         opacity: 0;
         pointer-events: none;
      }

.app-layout {
   min-width: 0;
   min-height: 100vh;
   align-items: stretch;
}

   .app-layout > .content {
      min-width: 0;
   }

.sidebar-backdrop {
   display: none;
}

@media (max-width: 991.98px) {
   .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      z-index: 1050;
      width: min(var(--sb-width), 86vw);
      height: 100dvh;
      transform: translateX(-100%);
      transition: transform .25s ease;
   }

   .sidebar-control:checked + .app-layout .sidebar {
      width: min(var(--sb-width), 86vw);
      padding: 1.25rem .75rem;
      transform: translateX(0);
   }

      .sidebar-control:checked + .app-layout .sidebar > * {
         opacity: 1;
         pointer-events: auto;
      }

   .sidebar-control:checked ~ .sidebar-backdrop {
      display: block;
      position: fixed;
      inset: 0;
      z-index: 1040;
      background: rgba(15, 23, 42, .42);
   }
}

@media (prefers-reduced-motion: reduce) {
   .sidebar, .sidebar * {
      transition: none !important;
   }
}

/* #endregion */

/* #region Page body */

.content-body {
   display: flex;
   align-items: flex-start;
   min-width: 0;
}

.content-page {
   flex: 1 1 auto;
   min-width: 0;
}

/* #endregion */

/* #region Blazor Default */


.blazor-error-boundary {
   background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
   padding: 1rem 1rem 1rem 3.7rem;
   color: white;
}

   .blazor-error-boundary::after {
      content: "An error has occurred."
   }

.darker-border-checkbox.form-check-input {
   border-color: #929292;
}

/* #endregion */

/* #region page Header */

.page-header-icon {
   border-radius: 50%;
   width: 40px;
   height: 40px;
}

/* #endregion */

/* #region Dashboard grid */

.dashboard-grid {
   display: grid;
   grid-template-columns: repeat(6, minmax(0, 1fr));
   grid-auto-rows: var(--rows-height);
   grid-auto-flow: row;
   align-items: stretch;
   gap: var(--gutter);
}

.dashboard-block {
   position: relative;
   grid-column: span var(--block-col-span);
   grid-row: span var(--block-row-span);
   min-width: 0;
   min-height: 0;
   transition: grid-column .18s ease, grid-row .18s ease;
}

@media (max-width: 1199.98px) {
   .dashboard-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
   }
}

@media (max-width: 950.98px) {
   .dashboard-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-auto-rows: minmax(var(--rows-height), auto);
   }
}

@media (max-width: 600.00px) {
   .dashboard-grid {
      grid-template-columns: 1fr;
      --rows-height: 300px;
      --gutter: 12px;
   }

   .dashboard-block {
      grid-column: span 1;
   }
}

/* #endregion */

/* #region Produtos */

.produto-item {
   transition: box-shadow 0.3s ease, transform 0.3s ease;
}

   .produto-item:hover {
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
      transform: translateY(-4px);
   }
   .produto-item img {
      width: 100%;
      transition: transform 0.3s ease;
   } 
   .produto-item img:hover{
      transform: scale(1.1);
   }

/* #endregion */

/* #region Documentos */

.doc-num {
   font-variant-numeric: tabular-nums;
}

.doc-info {
   min-width: 0;
}

/* Larguras fixas quando a linha fica horizontal (col-xl-*):
   os totais alinham em coluna mesmo com bot�es de texto diferente */
@media (min-width: 1200px) {
   .doc-total {
      width: 9rem;
   }

   .doc-acoes {
      width: 16rem;
   }
}

.doc-item {
   transition: background-color .15s ease;
}

   .doc-item:hover {
      background-color: var(--bs-tertiary-bg);
   }

/* #endregion */

/* #region Acitve Filters */
.active-filter {
   transition: box-shadow 0.3s ease, transform 0.3s ease;
}

   .active-filter:hover {
      cursor: pointer;
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
      transform: translateY(-4px);
   }

/* #endregion */


/* Custom Widths */
.min-w-80px {
   min-width: 80px;
}

.min-w-100px {
   min-width: 100px;
}

.min-w-120px {
   min-width: 120px;
}

.max-w-80px {
   max-width: 80px;
}

.max-w-100px {
   max-width: 100px;
}

.max-w-120px {
   max-width: 120px;
}

/* #region Chat IA */

:root {
   --chat-w: 550px;
   --chat-top: 1rem;
   --chat-bottom: 1.5rem;
   --chat-header: 6.125rem;
   --chat-header-offset: 7.625rem;
}

.chat-trigger {
   position: absolute;
   right: .375rem;
   top: 50%;
   transform: translateY(-50%);
   width: 2rem;
   height: 2rem;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   border: 0;
   border-radius: 50%;
   background: var(--app-accent);
   box-shadow:
      0 0 0 3px color-mix(in srgb, var(--app-accent) 14%, transparent),
      0 2px 6px color-mix(in srgb, var(--app-accent) 30%, transparent);
   cursor: pointer;
   transition: background .12s ease, box-shadow .12s ease;
}

   .chat-trigger:hover {
      background: var(--app-accent-hover);
      box-shadow:
         0 0 0 4px color-mix(in srgb, var(--app-accent) 20%, transparent),
         0 4px 10px color-mix(in srgb, var(--app-accent) 36%, transparent);
   }

   .chat-trigger:focus-visible {
      outline: 2px solid var(--app-accent);
      outline-offset: 2px;
   }

   .chat-trigger.is-open {
      background: var(--app-accent-hover);
      box-shadow:
         0 0 0 4px color-mix(in srgb, var(--app-accent) 24%, transparent),
         0 4px 12px color-mix(in srgb, var(--app-accent) 38%, transparent);
   }

   /* Anel que expande uma vez ao passar o rato/focar. */
   .chat-trigger::after {
      content: "";
      position: absolute;
      inset: -.125rem;
      border: 1px solid color-mix(in srgb, var(--app-accent) 55%, transparent);
      border-radius: 50%;
      opacity: 0;
      pointer-events: none;
   }

   .chat-trigger .gattus-ia-mark {
      transform-origin: center;
      transition: transform .18s cubic-bezier(.2, .8, .2, 1);
   }

   .chat-trigger:hover .gattus-ia-mark,
   .chat-trigger:focus-visible .gattus-ia-mark {
      transform: scale(1.08);
      animation: chat-trigger-pop .45s cubic-bezier(.2, .8, .2, 1);
   }

   .chat-trigger:hover::after,
   .chat-trigger:focus-visible::after {
      animation: chat-trigger-halo .7s ease-out;
   }

@keyframes chat-trigger-pop {
   0% { transform: scale(1); }
   45% { transform: scale(1.16) translateY(-1px); }
   75% { transform: scale(.98); }
   100% { transform: scale(1.08); }
}

@keyframes chat-trigger-halo {
   0% { opacity: .55; transform: scale(.86); }
   70% { opacity: .16; transform: scale(1.3); }
   100% { opacity: 0; transform: scale(1.45); }
}

.gattus-ia-mark {
   display: block;
   width: 1.125rem;
   height: 1.125rem;
}

.chat-typing > span {
   width: .375rem;
   height: .375rem;
   border-radius: 50%;
   background: currentColor;
   opacity: .4;
   animation: chat-typing-blink 1.2s ease-in-out infinite;
}

   .chat-typing > span:nth-child(2) { animation-delay: .2s; }
   .chat-typing > span:nth-child(3) { animation-delay: .4s; }

@keyframes chat-typing-blink {
   0%, 80%, 100% { opacity: .2; }
   40% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
   .chat-typing > span { animation: none; }
}

/* #region Atalhos de vistas */

.gattus-ia-msg a.crm-view-shortcut {
   display: inline-flex;
   align-items: center;
   gap: .375rem;
   margin-top: .5rem;
   padding: .375rem .75rem;
   border: 1px solid var(--app-accent);
   border-radius: .5rem;
   background: var(--app-accent);
   color: #fff;
   font-size: .875rem;
   font-weight: 600;
   line-height: 1.2;
   text-decoration: none;
   box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
   transition: background .12s ease, box-shadow .12s ease;
}

   .gattus-ia-msg a.crm-view-shortcut:hover,
   .gattus-ia-msg a.crm-view-shortcut:focus-visible {
      background: var(--app-accent-hover);
      border-color: var(--app-accent-hover);
      color: #fff;
      text-decoration: none;
      box-shadow: 0 2px 6px rgba(15, 23, 42, .14);
   }

   .gattus-ia-msg a.crm-view-shortcut:focus-visible {
      outline: 2px solid var(--app-accent);
      outline-offset: 2px;
   }

@media (prefers-reduced-motion: reduce) {
   .gattus-ia-msg a.crm-view-shortcut { transition: none; }
}

/* #endregion */

.chat-backdrop {
   position: fixed;
   inset: 0;
   z-index: 1055;
   background: rgba(15, 23, 42, .42);
   opacity: 0;
   pointer-events: none;
   transition: opacity .24s ease;
}

@media (max-width: 991.98px) {
   .chat-backdrop.is-open {
      opacity: 1;
      pointer-events: auto;
   }
}

@media (prefers-reduced-motion: reduce) {
   .chat-backdrop, .chat-trigger {
      transition-duration: .12s !important;
      transition-timing-function: linear !important;
   }

   .chat-trigger .gattus-ia-mark {
      transition: none !important;
   }

   .chat-trigger:hover .gattus-ia-mark,
   .chat-trigger:focus-visible .gattus-ia-mark {
      animation: none !important;
      transform: none;
   }

   .chat-trigger::after {
      display: none;
   }
}

/* #endregion */

/* #region B2B storefront */

.b2b-page { --b2b-radius: 8px; --bs-card-border-color: rgba(15, 23, 42, .08); --b2b-muted: #64748b; --b2b-soft: #f8fafc; --b2b-strong: #0f172a; }

/* ---- Cabeçalho: empresa + carrinho ---------------------------------- */

.b2b-header-chips { justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }

.b2b-account,
.b2b-cart { display: flex; align-items: center; gap: .65rem; padding: .4rem .75rem; border: 1px solid var(--bs-card-border-color); border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }

.b2b-cart { color: inherit; text-decoration: none; padding-left: .45rem; transition: border-color .15s ease, box-shadow .15s ease; }

   .b2b-cart:hover { border-color: color-mix(in srgb, var(--app-accent) 35%, var(--bs-card-border-color)); box-shadow: 0 8px 20px rgba(15, 23, 42, .08); }

.b2b-account-icon,
.b2b-cart-icon { position: relative; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; background: #f1f5f9; color: #475569; font-size: 1rem; }

.b2b-cart.has-items .b2b-cart-icon { background: var(--app-accent); color: #fff; }

.b2b-account-text,
.b2b-cart-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }

.b2b-account-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; font-weight: 700; color: var(--b2b-strong); }

.b2b-account-sub,
.b2b-cart-label { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--b2b-muted); }

   .b2b-cart-label strong { color: var(--b2b-strong); font-weight: 800; }

.b2b-cart-value { font-size: .9rem; font-weight: 800; color: var(--b2b-strong); white-space: nowrap; }

/* ---- Toolbar: categorias + pesquisa --------------------------------- */

.b2b-toolbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; padding: .6rem 0; margin-bottom: 1.5rem; background: color-mix(in srgb, var(--app-bg) 86%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--bs-card-border-color); }

.b2b-cats { flex: 1 1 auto; min-width: 0; }

.b2b-cat-list { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; list-style: none; }

.b2b-cat { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border: 1px solid transparent; border-radius: 999px; color: #475569; font-size: .875rem; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s ease, color .15s ease, border-color .15s ease; }

   .b2b-cat:hover { background: #fff; border-color: var(--bs-card-border-color); color: var(--app-primary); }

   .b2b-cat.active { background: var(--app-primary); border-color: var(--app-primary); color: #fff; box-shadow: 0 6px 14px rgba(51, 65, 85, .20); }

   .b2b-cat.dropdown-toggle::after { margin-left: .1rem; vertical-align: .15em; }

.b2b-dropdown { margin-top: .4rem; padding: .4rem; border: 1px solid var(--bs-card-border-color); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .12); }

   .b2b-dropdown .dropdown-submenu { position: relative; }

      .b2b-dropdown .dropdown-submenu > .b2b-dropdown { top: 0; left: 100%; margin-top: 0; margin-left: .15rem; }

@media (min-width: 992px) {
   .b2b-dropdown .dropdown-submenu:hover > .b2b-dropdown { display: block; }
}

@media (max-width: 991.98px) {
   .b2b-dropdown .dropdown-submenu > .b2b-dropdown { position: static; margin: .25rem 0 .25rem .75rem; border: 0; box-shadow: none; }
}

.b2b-dropdown .dropdown-submenu.submenu-open > .b2b-dropdown { display: block; }

.b2b-submenu-caret { transition: transform .15s ease; }

.b2b-dropdown .dropdown-submenu.submenu-open > a .b2b-submenu-caret { transform: rotate(90deg); }

@media (min-width: 992px) {
   .b2b-dropdown .dropdown-submenu:hover > a .b2b-submenu-caret { transform: rotate(90deg); }
}

.b2b-dropdown-item { display: flex; align-items: center; border-radius: 8px; padding: .45rem .6rem; font-size: .85rem; }

.b2b-dropdown .dropdown-item:hover { background: #f1f5f9; color: var(--app-accent); }

.b2b-dropdown .dropdown-item.active { background: rgba(37, 99, 235, .10); color: var(--app-accent); font-weight: 700; }

.b2b-search { position: relative; flex: 0 1 320px; min-width: 200px; }

.b2b-search-go { position: absolute; left: .35rem; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #94a3b8; font-size: .9rem; transition: background .15s ease, color .15s ease; }

   .b2b-search-go:hover { background: #f1f5f9; color: var(--app-accent); }

.b2b-search-input { width: 100%; height: 42px; padding: 0 2.5rem; border: 1px solid var(--bs-card-border-color); border-radius: 999px; background: #fff; color: var(--b2b-strong); font-size: .875rem; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s ease, box-shadow .15s ease; }

   .b2b-search-input::placeholder { color: #94a3b8; }

   .b2b-search-input:focus { outline: none; border-color: color-mix(in srgb, var(--app-accent) 45%, #fff); box-shadow: 0 0 0 4px rgba(37, 99, 235, .10); }

   .b2b-search-input::-webkit-search-cancel-button { display: none; }

.b2b-search-clear { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f1f5f9; color: var(--b2b-muted); display: grid; place-items: center; }

   .b2b-search-clear:hover { background: #e2e8f0; color: var(--b2b-strong); }

/* ---- Cartões de produto --------------------------------------------- */

.b2b-product { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--bs-card-border-color); border-radius: 8px; background: #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }

   .b2b-product:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--app-accent) 25%, var(--bs-card-border-color)); box-shadow: 0 14px 30px rgba(15, 23, 42, .10); }

   .b2b-product.is-in-cart { border-color: rgba(16, 185, 129, .45); box-shadow: 0 0 0 3px rgba(16, 185, 129, .08); }

.b2b-product-media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; border-bottom: 1px solid var(--bs-card-border-color); background: #fff; }

   .b2b-product-media img { width: 100%; height: 100%; padding: .6rem; object-fit: contain; transition: transform .35s ease; }

.b2b-product:hover .b2b-product-media img { transform: scale(1.04); }

.b2b-product-media-link { display: block; width: 100%; height: 100%; }

.b2b-product-nav { position: absolute; top: 50%; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; transform: translateY(-50%); border: 1px solid var(--bs-card-border-color); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--b2b-strong); box-shadow: 0 .125rem .35rem rgba(15, 23, 42, .12); opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease; }

.b2b-product:hover .b2b-product-nav,
.b2b-product-nav:focus-visible { opacity: 1; }

.b2b-product-nav:hover { border-color: var(--app-accent); color: var(--app-accent); }

.b2b-product-nav-anterior { left: .5rem; }

.b2b-product-nav-seguinte { right: .5rem; }

.b2b-product-dots { position: absolute; bottom: .5rem; left: 50%; z-index: 2; display: flex; gap: .3rem; padding: .25rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .85); transform: translateX(-50%); }

.b2b-product-dot { width: .45rem; height: .45rem; padding: 0; border: 0; border-radius: 50%; background: #94a3b8; opacity: .5; transition: opacity .15s ease, background-color .15s ease; }

.b2b-product-dot:hover { opacity: .8; }

.b2b-product-dot.is-ativa { background: var(--app-accent); opacity: 1; }

.b2b-product-dot:focus-visible { outline: 2px solid var(--app-accent); outline-offset: 2px; }

@media (hover: none) {
   .b2b-product-nav { opacity: 1; }
}

.b2b-product-loading,
.b2b-product-placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: #cbd5e1; }

.b2b-product-placeholder { font-size: 3rem; }

   .b2b-product-placeholder i { padding: 1rem; border-radius: 50%; background: rgba(148, 163, 184, .10); }

.b2b-badge { position: absolute; display: inline-flex; align-items: center; gap: .25rem; padding: .3rem .6rem; border-radius: 999px; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }

.b2b-badge-promo { top: .75rem; left: .75rem; background: var(--bs-danger); color: #fff; box-shadow: 0 6px 14px rgba(220, 38, 38, .28); }

.b2b-badge-cart { top: .75rem; right: .75rem; background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }   

.b2b-product-body { display: flex; flex-direction: column; flex: 1 1 auto; gap: .3rem; padding: .9rem 1rem 1rem; }

.b2b-product-code { font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #94a3b8; }

.b2b-product-title { display: -webkit-box; min-height: 2.7em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: #1e293b; font-size: .95rem; font-weight: 600; line-height: 1.35; text-decoration: none; }

   .b2b-product-title:hover { color: var(--app-accent); }

.b2b-discount { align-self: flex-start; margin-top: .1rem; padding: .15rem .5rem; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: .7rem; font-weight: 800; }

.b2b-in-cart { display: flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; color: #047857; }

.b2b-in-cart-sep { color: #94a3b8; }

.b2b-product-price { display: flex; align-items: baseline; gap: .2rem; margin-top: auto; padding-top: .5rem; }

.b2b-price-value { color: var(--b2b-strong); font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }

.b2b-price-currency { color: var(--b2b-muted); font-size: .85rem; font-weight: 700; }

.b2b-price-old { margin-left: .35rem; color: #94a3b8; font-size: .78rem; text-decoration: line-through; }

.b2b-add { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; margin-top: .65rem; padding: .55rem .9rem; border: 0; border-radius: 12px; background: var(--app-accent); color: #fff; font-size: .85rem; font-weight: 700; transition: background .15s ease, box-shadow .15s ease; }

   .b2b-add:hover { background: var(--app-accent-hover); box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }

   .b2b-add:disabled { opacity: .7; }

/* ---- Catálogo -------------------------------------------------------- */

.b2b-results-head { display: flex; align-items: baseline; gap: .5rem; margin: 0 0 .9rem .15rem; }

.b2b-results-title { color: #94a3b8; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.b2b-results-count { padding: .1rem .5rem; border-radius: 999px; background: rgba(37, 99, 235, .08); color: var(--app-accent); font-size: .78rem; font-weight: 700; }

.b2b-empty { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 4rem 1rem; text-align: center; color: var(--b2b-muted); }

   .b2b-empty > i { margin-bottom: .25rem; color: #cbd5e1; font-size: 2.5rem; }

   .b2b-empty p { margin: 0; }

.b2b-empty-action { margin-top: .5rem; color: var(--app-accent); font-weight: 600; text-decoration: none; }

/* ---- Home ------------------------------------------------------------ */

.b2b-hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; overflow: hidden; margin-bottom: 2.25rem; padding: 2rem 2.25rem; border: 1px solid var(--bs-card-border-color); border-radius: 20px; background: #f4f7ff; box-shadow: 0 10px 24px rgba(15, 23, 42, .04); }

.b2b-hero-copy { min-width: 0; }

.b2b-hero-eyebrow { color: var(--app-accent); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

.b2b-hero h1 { margin: .25rem 0 1.25rem; color: var(--b2b-strong); font-size: clamp(1.6rem, 2.4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }

.b2b-hero-cta { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.15rem; border-radius: 12px; background: var(--app-accent); color: #fff; font-weight: 700; text-decoration: none; }

   .b2b-hero-cta:hover { background: var(--app-accent-hover); color: #fff; }

.b2b-hero-meta { display: grid; gap: .9rem; min-width: 240px; max-width: 320px; padding: 1rem 1.25rem; border: 1px solid var(--bs-card-border-color); border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }

.b2b-hero-meta-row { display: grid; gap: .15rem; }

   .b2b-hero-meta-row span { color: var(--b2b-muted); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

   .b2b-hero-meta-row strong { color: var(--b2b-strong); font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }

.b2b-section + .b2b-section { margin-top: 2.5rem; }

.b2b-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }

.b2b-section-title { position: relative; margin: 0; padding-left: .9rem; color: var(--b2b-strong); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }

   .b2b-section-title::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px; border-radius: 4px; background: var(--app-accent); }

.b2b-section-link { color: var(--app-accent); font-size: .85rem; font-weight: 600; text-decoration: none; }

   .b2b-section-link:hover { color: var(--app-accent-hover); }

.b2b-section-empty { padding: 1.5rem; border: 1px dashed var(--bs-card-border-color); border-radius: 14px; color: var(--b2b-muted); font-size: .85rem; text-align: center; }

.b2b-slider { display: flex; gap: 1rem; overflow-x: auto; padding: .25rem .25rem 1rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }

   .b2b-slider::-webkit-scrollbar { height: 8px; }

   .b2b-slider::-webkit-scrollbar-thumb { border-radius: 999px; background: #cbd5e1; }

   .b2b-slider::-webkit-scrollbar-track { background: transparent; }

.b2b-slide { flex: 0 0 280px; scroll-snap-align: start; }

/* ---- Painéis (carrinho e produto) ----------------------------------- */

.b2b-page .card { border: 1px solid var(--bs-card-border-color); border-radius: var(--b2b-radius); background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }

   .b2b-page .card > .card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--bs-card-border-color); background: transparent; }

      .b2b-page .card > .card-header .card-title { color: var(--b2b-muted); font-size: .76rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

   .b2b-page .card > .card-body { padding: 1.25rem; }

.b2b-page .btn { border-radius: 10px; font-weight: 600; }

.b2b-page .btn-primary { --bs-btn-bg: var(--app-accent); --bs-btn-border-color: var(--app-accent); --bs-btn-hover-bg: var(--app-accent-hover); --bs-btn-hover-border-color: var(--app-accent-hover); --bs-btn-active-bg: var(--app-accent-active); --bs-btn-active-border-color: var(--app-accent-active); }

.b2b-page .btn-danger { --bs-btn-bg: #fee2e2; --bs-btn-border-color: #fecaca; --bs-btn-color: #b91c1c; --bs-btn-hover-bg: #fecaca; --bs-btn-hover-border-color: #fca5a5; --bs-btn-hover-color: #991b1b; }

/* ---- Carrinho -------------------------------------------------------- */

.b2b-table { --bs-table-bg: transparent; margin-bottom: 0; }

   .b2b-table thead th { padding: .6rem .5rem; border-bottom: 1px solid var(--bs-card-border-color); color: #94a3b8; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

   .b2b-table tbody td { border-color: rgba(15, 23, 42, .05); vertical-align: middle; }

   .b2b-table tbody tr:nth-child(odd) td { padding-top: 1rem; padding-bottom: .25rem; border-bottom: 0; }

   .b2b-table tbody tr:nth-child(even) td { padding-top: .25rem; padding-bottom: 1rem; background: #fcfdff; }

   .b2b-table tbody tr:nth-child(even):hover td { background: #f8fafc; }

   .b2b-table .form-control { height: 34px; padding: .2rem .5rem; border-radius: 8px; font-size: .85rem; }

   .b2b-table .btn-danger { width: 36px; height: 36px; padding: 0; border-radius: 10px; }

   .b2b-table a { color: var(--b2b-strong); font-weight: 600; }

.b2b-summary { position: sticky; top: 5rem; }

.b2b-total-main { padding-bottom: .75rem; margin-bottom: .75rem; border-bottom: 1px solid var(--bs-card-border-color); }

.b2b-total-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

   .b2b-total-row strong { color: var(--b2b-strong); font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; }

.b2b-total-sub { margin-top: .15rem; color: var(--b2b-muted); font-size: .8rem; }

.b2b-summary-meta { display: flex; flex-direction: column; gap: .3rem; color: var(--b2b-muted); font-size: .8rem; }

.b2b-meta-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

.b2b-summary .row { margin-bottom: .35rem; color: var(--b2b-muted); font-size: .8rem; }

.b2b-summary hr { margin: 1rem 0; border-color: var(--bs-card-border-color); opacity: 1; }

/* ---- Página de produto ---------------------------------------------- */

.b2b-gallery { overflow: hidden; }

.b2b-page .card > .card-body.b2b-gallery-body { padding: 0; }

.b2b-gallery-media { display: grid; place-items: center; aspect-ratio: 1 / 1; padding: 1.5rem; background: linear-gradient(160deg, #f8fafc, #eef2f7); }

.b2b-gallery-img { max-width: 100%; max-height: 100%; object-fit: contain; }

.b2b-gallery-placeholder { color: #cbd5e1; font-size: 4rem; }

.b2b-buybox { position: sticky; top: 5rem; }

.b2b-buybox-title { margin: .15rem 0 1.25rem; color: var(--b2b-strong); font-size: clamp(1.4rem, 2vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }

.b2b-pack { color: var(--b2b-muted); font-size: .8rem; }

.b2b-price-lg { display: flex; align-items: baseline; gap: .25rem; margin-top: .2rem; }

   .b2b-price-lg .b2b-price-value { font-size: 1.8rem; }

.b2b-price-origin { color: #94a3b8; font-size: .8rem; }

.b2b-pack-legend,
.b2b-qty-label { padding-top: .55rem; color: var(--b2b-muted); font-size: .8rem; }

.b2b-qty .btn { border: 1px solid var(--bs-card-border-color); background: #fff; color: #334155; }

   .b2b-qty .btn:first-child { border-radius: 10px 0 0 10px; }

   .b2b-qty .btn:last-child { border-radius: 0 10px 10px 0; }

.b2b-qty .form-control { height: 40px; border-radius: 0; }

.b2b-cta { margin-top: .75rem; padding: .8rem 1rem; border-radius: 12px; box-shadow: 0 10px 22px rgba(37, 99, 235, .20); }

.b2b-details dt { padding: .35rem 0; border-bottom: 1px dashed rgba(15, 23, 42, .06); }

.b2b-details dd { padding: .35rem 0; border-bottom: 1px dashed rgba(15, 23, 42, .06); font-weight: 500; }

.b2b-product-html { margin-bottom: 1rem; overflow-x: auto; color: #334155; font-size: .9rem; overflow-wrap: anywhere; }

   .b2b-product-html > :last-child { margin-bottom: 0; }

   .b2b-product-html img { max-width: 100%; height: auto; }

   .b2b-product-html table { width: 100%; max-width: 100%; margin-bottom: .75rem; }

   .b2b-product-html iframe,
   .b2b-product-html video { max-width: 100%; }

.b2b-files { display: flex; flex-direction: column; gap: .4rem; }

.b2b-file { display: flex; align-items: center; gap: .5rem; width: 100%; padding: .6rem .75rem; border: 1px solid var(--bs-card-border-color); border-radius: 10px; background: var(--b2b-soft); color: #334155; font-size: .85rem; text-align: left; transition: border-color .15s ease, background .15s ease; }

   .b2b-file:hover { border-color: color-mix(in srgb, var(--app-accent) 35%, var(--bs-card-border-color)); background: #fff; color: var(--app-accent); }

/* ---- Responsivo ------------------------------------------------------ */

@media (max-width: 1399.98px) {
   .b2b-slide { flex-basis: 260px; }
}

@media (max-width: 1199.98px) {
   .b2b-summary { position: static; }
}

@media (max-width: 991.98px) {
   .b2b-buybox { position: static; }
}

@media (max-width: 767.98px) {
   .b2b-toolbar { position: static; }

   .b2b-search { flex-basis: 100%; }

   /* O menu de categorias ocupa a linha toda e empurra a pesquisa e o
      conteudo, em vez de flutuar por cima deles. */
   .b2b-cat-item.dropdown:has(> .b2b-dropdown.show) { flex: 1 1 100%; }

   .b2b-cat-item.dropdown > .b2b-dropdown.show { position: static !important; inset: auto !important; transform: none !important; width: 100%; min-width: 0; margin: .35rem 0 .15rem; }

   .b2b-hero { flex-direction: column; align-items: flex-start; padding: 1.5rem; border-radius: 18px; }

   .b2b-hero-meta { width: 100%; min-width: 0; max-width: none; }

   .b2b-account-name,
   .b2b-account-sub,
   .b2b-cart-label { max-width: 160px; }
}

@media (max-width: 575.98px) {
   .b2b-header-chips { width: auto; justify-content: flex-start; }

   .b2b-account { flex: 0 1 auto; }

   .b2b-account-name,
   .b2b-account-sub { max-width: 110px; }

   .b2b-cart-label { max-width: 80px; }

   .b2b-slide { flex-basis: 240px; }
}

@media (prefers-reduced-motion: reduce) {
   .b2b-product,
   .b2b-product-media img,
   .b2b-add,
   .b2b-hero-cta,
   .b2b-cart,
   .b2b-file { transition: none !important; }
}

/* ---- Correções de responsividade do carrinho ------------------------ */

.b2b-cart-page,
.b2b-cart-page > .row,
.b2b-cart-page > .row > [class*="col-"],
.b2b-cart-page .card,
.b2b-cart-page .card-body,
.b2b-cart-page .table-responsive,
.b2b-cart-lines,
.b2b-cart-summary,
.b2b-cart-data,
.b2b-cart-data > .row,
.b2b-cart-data > .row > [class*="col-"] { min-width: 0; }

   .b2b-cart-page > .row { width: 100%; max-width: 100%; }

.b2b-remove-label { display: none; }

.b2b-cart-page input[type=number],
.b2b-qty input[type=number] { min-width: 2.5rem; }

   .b2b-cart-page input[type=number]::-webkit-inner-spin-button,
   .b2b-cart-page input[type=number]::-webkit-outer-spin-button,
   .b2b-qty input[type=number]::-webkit-inner-spin-button,
   .b2b-qty input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.b2b-cart-page input[type=number],
.b2b-qty input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* Tablet/mobile: cada linha do carrinho passa a cartão. */
@media (max-width: 1279.98px) {
   .b2b-cart-table-wrap { overflow: visible; }

   .b2b-cart-table { display: block; width: 100%; min-width: 0; border-collapse: separate; border-spacing: 0; }

      .b2b-cart-table thead { display: none; }

      .b2b-cart-table tbody { display: grid; gap: 1rem; }

         .b2b-cart-table tbody tr { display: block; }

            .b2b-cart-table tbody tr:nth-child(odd) td { padding: .75rem .9rem !important; border: 1px solid var(--bs-card-border-color); border-bottom: 0; border-radius: 14px 14px 0 0; background: var(--b2b-soft); }

               .b2b-cart-table tbody tr:nth-child(odd) td a { display: block; overflow-wrap: anywhere; white-space: normal; line-height: 1.3; }

            .b2b-cart-table tbody tr:nth-child(even) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .85rem; padding: .9rem; border: 1px solid var(--bs-card-border-color); border-top: 0; border-radius: 0 0 14px 14px; background: #fff; }

               .b2b-cart-table tbody tr:nth-child(even) td { display: flex; flex-direction: column; gap: .2rem; min-width: 0; padding: 0 !important; border: 0 !important; background: transparent !important; text-align: left !important; }

                  .b2b-cart-table tbody tr:nth-child(even) td::before { content: attr(data-label); color: var(--b2b-muted); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

                  .b2b-cart-table tbody tr:nth-child(even) td .form-control { width: 100%; height: 38px; }

                  .b2b-cart-table tbody tr:nth-child(even) td > div.pt-2 { padding-top: 0 !important; }

                  .b2b-cart-table tbody tr:nth-child(even) td .btn { height: 38px; }

               .b2b-cart-table tbody tr:nth-child(even) .b2b-cart-line-remove { grid-column: 1 / -1; align-items: flex-end !important; }

                  .b2b-cart-table tbody tr:nth-child(even) .b2b-cart-line-remove::before { display: none; }

                  .b2b-cart-table tbody tr:nth-child(even) .b2b-cart-line-remove .btn { width: 100%; }

   .b2b-remove-label { display: inline; margin-left: .35rem; }

   .b2b-cart-actions { flex-wrap: wrap; gap: .5rem; }

      .b2b-cart-actions .btn { flex: 1 1 100%; }
}

/* Em tablet/portátil a tabela fica com a largura toda; o resumo passa para baixo. */
@media (min-width: 1200px) and (max-width: 1599.98px) {
   .b2b-cart-lines-col,
   .b2b-cart-summary-col { flex: 0 0 100%; width: 100%; max-width: 100%; }

   .b2b-summary { position: static; }
}

@media (min-width: 1600px) {
   .b2b-cart-lines-col { flex: 0 0 75%; width: 75%; max-width: 75%; }

   .b2b-cart-summary-col { flex: 0 0 25%; width: 25%; max-width: 25%; }
}

/* Em ecrãs intermédios os cartões de dados ficam mais estreitos. */
@media (min-width: 992px) and (max-width: 1279.98px) {
   .b2b-cart-data dt,
   .b2b-cart-data dd { flex: 0 0 100%; max-width: 100%; }

   .b2b-cart-data dd { margin-bottom: .55rem; }
}

/* Colunas mais compactas para a tabela caber sem perder campos. */
@media (min-width: 1200px) {
   .b2b-cart-table th,
   .b2b-cart-table td { padding-left: .2rem; padding-right: .2rem; }

   .b2b-cart-table .min-w-100px { min-width: 56px; }

   .b2b-cart-table .min-w-120px { min-width: 64px; }

   .b2b-cart-table .min-w-80px { min-width: 46px; }

   .b2b-cart-table .max-w-80px { max-width: 46px; }

   .b2b-cart-table .form-control { padding-left: .3rem; padding-right: .3rem; font-size: .78rem; }
}

.b2b-product-html table { overflow-wrap: normal; }

.b2b-product-html th { white-space: nowrap; }

.b2b-product-html td { overflow-wrap: normal; word-break: normal; }

@media (max-width: 575.98px) {
   .b2b-header-host { flex: 1 1 100%; width: 100%; max-width: 100%; min-width: 0; }

   .b2b-header-chips { flex: 1 1 100%; flex-wrap: nowrap; justify-content: flex-end; width: 100%; max-width: 100%; min-width: 0; gap: .35rem; }

   .b2b-account { flex: 1 1 0; max-width: calc(100% - 124px); min-width: 0; padding: .35rem .5rem; gap: .4rem; }

   .b2b-account-text { overflow: hidden; }

   .b2b-cart { flex: 0 0 auto; padding: .35rem .5rem; gap: .4rem; }

   .b2b-account-icon,
   .b2b-cart-icon { width: 34px; height: 34px; }

   .b2b-account-text { flex: 1 1 auto; }

   .b2b-account-name,
   .b2b-account-sub { max-width: 100%; }

   .b2b-cart-label { max-width: 72px; }

   .b2b-cart-value { font-size: .82rem; }

   .b2b-cart-data dt,
   .b2b-cart-data dd { flex: 0 0 100%; max-width: 100%; }

   .b2b-cart-data dd { margin-bottom: .55rem; }

   .b2b-toolbar { position: static; gap: .45rem; padding: .35rem 0 .75rem; margin-bottom: 1rem; }

   .b2b-cats { flex: 1 1 100%; }

   .b2b-cat-list { gap: .3rem; }

   .b2b-cat { padding: .35rem .65rem; font-size: .8rem; }

   .b2b-search { flex: 1 1 100%; }

   .b2b-scales-table { width: 100%; table-layout: fixed; font-size: .75rem; }

      .b2b-scales-table th { padding: .3rem .18rem !important; font-size: .58rem; letter-spacing: 0; }

      .b2b-scales-table td { padding: .35rem .2rem !important; font-size: .72rem; }

         .b2b-scales-table th:first-child,
         .b2b-scales-table td:first-child { width: 28%; }

         .b2b-scales-table th:nth-child(2),
         .b2b-scales-table td:nth-child(2) { width: 26%; }

         .b2b-scales-table th:nth-child(3),
         .b2b-scales-table td:nth-child(3) { width: 23%; }

         .b2b-scales-table th:nth-child(4),
         .b2b-scales-table td:nth-child(4) { width: 23%; }
}

/* Modo Catálogo: cartões com mais destaque e adição direta na listagem,
   mantendo o acesso ao detalhe do produto. */
.b2b-mode-catalogo .b2b-product-media { aspect-ratio: 4 / 3; }
.b2b-mode-catalogo .b2b-product-media img { padding: .9rem; }
.b2b-mode-catalogo .b2b-product-body { gap: .45rem; padding: 1rem 1.1rem 1.15rem; }
.b2b-mode-catalogo .b2b-product-title { min-height: 3.2em; font-size: 1rem; -webkit-line-clamp: 3; }

.b2b-product-meta { display: flex; flex-wrap: wrap; gap: .2rem .75rem; color: #94a3b8; font-size: .72rem; }
.b2b-product-meta span { white-space: nowrap; }

.b2b-detail { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; width: 100%; margin-top: .65rem; padding: .55rem .9rem; border: 1px solid color-mix(in srgb, var(--app-accent) 35%, var(--bs-card-border-color)); border-radius: 12px; background: #fff; color: var(--app-accent); font-size: .85rem; font-weight: 700; text-decoration: none; }
   .b2b-detail:hover { border-color: var(--app-accent); background: rgba(37, 99, 235, .06); color: var(--app-accent-hover); }

.b2b-product-actions { display: flex; align-items: stretch; gap: .45rem; margin-top: .65rem; }
.b2b-product-actions .b2b-add { flex: 1 1 auto; width: auto; margin-top: 0; padding-left: .6rem; padding-right: .6rem; }
.b2b-product-actions .b2b-detail-icon { flex: 0 0 42px; width: 42px; margin-top: 0; padding: .55rem; }

/* Vista de catálogo por separadores: catálogo -> agrupadores (imagem) -> páginas de produtos. */
.b2b-catalog { display: flex; flex-direction: column; gap: 1.25rem; padding-bottom: .5rem; }

.b2b-catalog-loading { display: grid; place-items: center; min-height: 45vh; color: var(--app-accent); }

.b2b-catalog-head { display: flex; flex-direction: column; gap: .15rem; }
.b2b-catalog-head-eyebrow,
.b2b-catalog-cover-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.b2b-catalog-head-eyebrow { color: #94a3b8; }
.b2b-catalog-head-title { margin: 0; color: var(--b2b-strong); font-size: 1.4rem; font-weight: 800; }

.b2b-catalog-cover { overflow: hidden; border: 1px solid var(--bs-card-border-color); border-radius: 20px; background: #fff; box-shadow: 0 12px 30px rgba(15, 23, 42, .07); }
.b2b-catalog-cover-media { position: relative; display: flex; align-items: center; justify-content: center; height: clamp(240px, 30vw, 380px); padding: 1rem; overflow: hidden; background: #f8fafc; border-bottom: 1px solid var(--bs-card-border-color); }
.b2b-catalog-cover-media img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.b2b-catalog-cover-media .spinner-border { color: var(--app-accent); }
.b2b-catalog-cover-placeholder { color: #cbd5e1; font-size: 4rem; }
.b2b-catalog-cover-body { display: flex; flex-direction: column; align-items: flex-start; gap: .45rem; padding: 1.35rem 1.6rem 1.5rem; color: var(--b2b-strong); }
.b2b-catalog-cover-eyebrow { color: var(--b2b-muted); }
.b2b-catalog-cover-title { margin: 0; color: var(--b2b-strong); font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 800; line-height: 1.1; }
.b2b-catalog-cover-meta { margin: 0; color: var(--b2b-muted); font-size: .92rem; }
.b2b-catalog-cover-cta { display: inline-flex; align-items: center; gap: .45rem; margin-top: .65rem; padding: .65rem 1.35rem; border: 0; border-radius: 999px; background: var(--app-accent); color: #fff; font-weight: 700; }
   .b2b-catalog-cover-cta:hover { background: var(--app-accent-hover); color: #fff; }

.b2b-catalog-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.25rem; padding: .6rem .7rem; border: 1px solid var(--bs-card-border-color); border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(15, 23, 42, .06); }
.b2b-catalog-bar-actions { display: flex; align-items: center; gap: .35rem; }
.b2b-catalog-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--bs-card-border-color); border-radius: 12px; background: #fff; color: var(--b2b-muted); transition: border-color .15s ease, color .15s ease, background .15s ease; }
   .b2b-catalog-btn:hover:not(:disabled) { border-color: color-mix(in srgb, var(--app-accent) 40%, var(--bs-card-border-color)); color: var(--app-accent); }
   .b2b-catalog-btn.active { border-color: var(--app-accent); background: rgba(37, 99, 235, .08); color: var(--app-accent); }
   .b2b-catalog-btn:disabled { opacity: .35; }

.b2b-catalog-select { width: auto; min-width: 112px; height: 40px; padding: 0 2rem 0 .65rem; border-radius: 12px; font-size: .82rem; }
.b2b-catalog-layout { min-width: 84px; }
.b2b-catalog-select-catalogo { flex: 1 1 180px; }
.b2b-catalog-select-agrupador { flex: 1 1 220px; }
.b2b-catalog-page { width: 76px; height: 40px; padding: 0 .4rem; border-radius: 12px; font-size: .85rem; text-align: center; }
.b2b-catalog-pager { display: flex; align-items: center; gap: .3rem; margin-left: auto; }

@media (max-width: 767.98px) {
   .b2b-catalog-cover-media { height: 220px; padding: .75rem; }
   .b2b-catalog-cover-body { padding: 1.1rem 1.25rem 1.25rem; }
}

/* Ecrãs estreitos: barra compacta em duas linhas (catálogo/agrupador e, abaixo,
   ações + paginação). As setas simples ficam na lista de páginas. */
@media (max-width: 767.98px) {
   .b2b-catalog-bar { gap: .4rem; padding: .5rem; }

   .b2b-catalog-select-catalogo,
   .b2b-catalog-select-agrupador { flex: 1 1 calc(50% - .3rem); min-width: 0; }
   .b2b-catalog-select-agrupador { order: 2; }
   .b2b-catalog-select-catalogo { order: 1; }
   .b2b-catalog-bar-actions { order: 3; gap: .25rem; }
   .b2b-catalog-pager { order: 4; width: auto; margin-left: auto; gap: .2rem; }

   .b2b-catalog-btn { width: 34px; height: 34px; }
   .b2b-catalog-select { height: 34px; min-width: 0; padding: 0 1.4rem 0 .5rem; font-size: .78rem; }
   .b2b-catalog-layout { width: 66px; min-width: 0; }
   .b2b-catalog-page { width: 58px; height: 34px; padding: 0 .2rem; font-size: .8rem; }

   .b2b-catalog-pager .b2b-catalog-btn:nth-child(2),
   .b2b-catalog-pager .b2b-catalog-btn:nth-child(4) { display: none; }
}

/* #endregion */

/* #region Calendario */

.evento-outlook {
   background-color: #e8f1fb;
   color: #0a4f8a;
   font-weight: 600;
}

.evento-outlook .bi-envelope {
   color: #0F6CBD;
}

/* #endregion */