/* Traiga brand overrides */

.traiga-brand-logo {
  height: 28px;
  width: auto;
}

/* Global loading overlay - shown automatically on every form submit across
   the whole app (see templates/layout/master.html), since this is a
   server-rendered app with no other visual change until the next page
   arrives. Blocks further clicks underneath while visible, which doubles
   as double-submit protection app-wide. */
.global-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.global-loading-overlay.is-visible {
  display: flex;
}
:root[data-bs-theme="dark"] .global-loading-overlay {
  background: rgba(37, 41, 60, 0.75);
}
.global-loading-overlay-logo {
  /* The source file is a wide wordmark (~2.4:1), not a square icon - a
     fixed width+height box squished it sideways. width+height:auto keeps
     its real proportions, max-width just keeps it from looking huge on
     wide screens (framed, not filling the page). */
  width: 70%;
  max-width: 220px;
  height: auto;
  animation: global-loading-pulse 1.1s ease-in-out infinite;
}
@keyframes global-loading-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.14);
    opacity: 1;
  }
}

.layout-navbar .traiga-brand-logo {
  height: 32px;
}

.authentication-wrapper .traiga-brand-logo {
  height: 44px;
}

/* Login/register/forgot-password - the vendor template's default look here
   is just a plain white card over generic gray decorative trees, which
   reads as unbranded/generic. Gives the page a soft brand-blue backdrop
   and recolors those same vendor illustrations (trees + triangle mask)
   toward the store's primary blue (#4dabe1) instead of swapping in new art
   that doesn't exist yet - filter values computed to turn pure black into
   var(--bs-primary) exactly (CSS Filter Effects spec matrices, solved
   numerically), so light/white areas of the art stay close to unchanged. */
.authentication-wrapper {
  background: radial-gradient(ellipse at top, rgba(var(--bs-primary-rgb), 0.12) 0%, rgba(var(--bs-primary-rgb), 0.02) 55%, transparent 100%);
}
.authentication-wrapper .card {
  border-top: 3px solid var(--bs-primary);
  box-shadow: 0 0.5rem 2rem rgba(var(--bs-primary-rgb), 0.12);
}
.authentication-wrapper .authentication-image,
.authentication-wrapper .authentication-image-object-left,
.authentication-wrapper .authentication-image-object-right {
  filter: invert(37%) sepia(58%) saturate(366%) hue-rotate(158deg) brightness(144%) contrast(119%);
  opacity: 0.85;
}

/* Community feed - vertical, Instagram/Facebook-style timeline */
.feed-post-image {
  max-height: 600px;
  object-fit: cover;
}
.feed-user-panel {
  position: sticky;
  top: 1.5rem;
}

/* Footer social icons - solid circles instead of plain glyphs */
.social-icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: #fff !important;
  font-size: 1.25rem;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.social-icon-circle:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}
.social-icon-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}
.social-icon-tiktok {
  background-color: #000000;
}

/* ===== Landing page: illustrated design (no photography available yet -
   see traiga_app conversation; swap in real photos later by replacing the
   .landing-hero background and dropping real <img>s where noted below) ===== */

/* Hero */
.landing-hero {
  position: relative;
  background: linear-gradient(135deg, #5fb8ea 0%, #2f8fcb 55%, #1d5f8f 100%);
  overflow: hidden;
  box-shadow: 0 1.5rem 3rem rgba(31, 100, 150, 0.35);
}
.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 2px, transparent 2px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}
.landing-hero::after {
  content: "";
  position: absolute;
  top: -35%;
  right: -10%;
  width: 55%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
  pointer-events: none;
}
.landing-hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
}
.landing-hero-stickers {
  position: relative;
  height: 100%;
  min-height: 360px;
}
.landing-hero-sticker {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
  color: #fff;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.12);
  animation: traiga-float 5s ease-in-out infinite;
}
@keyframes traiga-float {
  0%, 100% { transform: translateY(0) rotate(var(--sticker-rotate, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--sticker-rotate, 0deg)); }
}
.landing-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50rem;
  padding: 0.4rem 1rem;
}

/* Bigger, bolder call-to-action buttons used on the landing page */
.landing-btn-xl {
  padding-block: 0.9rem;
  padding-inline: 2.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: 50rem;
  box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.landing-btn-xl:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.9rem 1.75rem rgba(0, 0, 0, 0.22);
}

/* "Ver todas / Ver toda la tienda / ..." links next to section titles */
.landing-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 1rem;
  border-radius: 50rem;
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary);
  font-weight: 600;
  font-size: 0.8125rem;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.landing-link-pill:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.18);
  color: var(--bs-primary);
  transform: translateX(2px);
}

/* Category cards */
.category-card {
  position: relative;
  overflow: hidden;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
}
.category-card-icon {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  font-size: 1.75rem;
  color: #fff;
  box-shadow: 0 0.4rem 0.9rem rgba(0, 0, 0, 0.12);
}

.category-card-icon-img {
  object-fit: cover;
}

/* Shop catalog - categories panel stays in view while only the product
   grid scrolls (col-lg-9's normal content flow). Only from lg up - with
   the two columns stacked on narrower screens, a sticky categories panel
   would just eat scroll space above the products instead of helping. */
@media (min-width: 992px) {
  .shop-categories-panel {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }
}

/* Product cards */
.product-card {
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.12);
}
.product-card-media {
  overflow: hidden;
  height: 200px;
  border-radius: 0.5rem 0.5rem 0 0;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.product-card:hover .product-card-media img {
  transform: scale(1.08);
}
@media (min-width: 992px) {
  .product-card-media {
    height: 240px;
  }
}

/* Product detail page hero image - object-fit: contain so the whole photo
   always shows inside the frame (never cropped), growing on wider screens
   for more presence instead of staying a fixed small box. */
.product-detail-media {
  height: 340px;
  border-radius: 0.5rem;
}
.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (min-width: 992px) {
  .product-detail-media {
    height: 440px;
  }
}
@media (min-width: 1400px) {
  .product-detail-media {
    height: 520px;
  }
}

/* Product detail gallery thumbnail rail - horizontal scroll strip below
   the main photo on phones, vertical column to its left from md up (see
   shop_product_detail.html, which also flips flex-direction/order at the
   same breakpoint). */
.product-gallery-thumbs {
  overflow-x: auto;
  overflow-y: visible;
  padding-bottom: 2px;
}
@media (min-width: 768px) {
  .product-gallery-thumbs {
    overflow-x: visible;
    overflow-y: auto;
    flex: 0 0 64px;
    max-height: 440px;
  }
}
@media (min-width: 1400px) {
  .product-gallery-thumbs {
    max-height: 520px;
  }
}
.product-gallery-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.product-gallery-thumb:hover {
  opacity: 1;
}
.product-gallery-thumb.active {
  opacity: 1;
  border-color: #4dabe1;
}
.product-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card-ribbon {
  position: absolute;
  top: 0.75rem;
  left: 0;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem 0.25rem 0.5rem;
  border-radius: 0 50rem 50rem 0;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Community teaser */
.community-teaser-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.06) 0%, rgba(var(--bs-primary-rgb), 0.02) 100%);
}
.community-teaser-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(var(--bs-primary-rgb), 0.08) 2px, transparent 2px);
  background-size: 26px 26px;
  pointer-events: none;
}
.landing-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  border-radius: 50rem;
  padding: 0.35rem 1rem;
}
.teaser-panel {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.teaser-panel:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.1);
  border-color: transparent;
}
.teaser-icon-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.teaser-panel-stat {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

/* Trust / features bar */
.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 1.15rem 1.25rem;
  border-radius: 1rem;
  background-color: var(--bs-body-bg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trust-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.9rem 1.5rem rgba(0, 0, 0, 0.1);
}
.trust-icon-circle {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 0.4rem 0.9rem rgba(0, 0, 0, 0.18);
}

/* Final CTA */
.landing-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, #4dabe1 0%, #1d5f8f 100%);
  box-shadow: 0 1.25rem 2.5rem rgba(31, 100, 150, 0.3);
}
.landing-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 2px, transparent 2px);
  background-size: 24px 24px;
  pointer-events: none;
}
.landing-cta h5 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.order-status-badge {
  letter-spacing: 0.02em;
}

/* Live preview shown under any <input type="file" data-file-preview> the
   instant a file is chosen - see src/assets/js/file-preview.js. */
.file-preview-img {
  max-height: 120px;
  max-width: 100%;
  object-fit: cover;
}
.file-preview-thumb {
  position: relative;
  display: inline-block;
}
.file-preview-remove {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--bs-body-bg);
  background-color: var(--bs-danger);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  box-shadow: 0 0.125rem 0.35rem rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.file-preview-remove:hover {
  transform: scale(1.1);
}
.file-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.file-preview-chip .file-preview-remove {
  position: static;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 0.75rem;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

/* Front navbar's cart/notifications icons: .btn-icon's own CSS sets a fixed
   icon-size on any .icon-base inside it (1.29rem), which quietly overrides
   the .icon-xl class via a more specific selector. These rules win instead
   (same specificity, later in the stylesheet) so the icon is actually big. */
.nav-icon-btn-lg.btn-icon {
  block-size: 2.75rem;
  inline-size: 2.75rem;
}
.nav-icon-btn-lg .icon-xl,
.nav-icon-btn-lg .icon-xl::before {
  block-size: 1.75rem;
  font-size: 1.75rem;
  inline-size: 1.75rem;
}

/* Storefront header (public pages only - the account/staff dashboard navbar
   keeps the default template look since it already sits next to a sidebar) */
.layout-without-menu .layout-navbar.navbar-detached {
  background-color: var(--bs-body-bg);
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.04);
  /* The vendor theme's base .layout-navbar rule hardcodes flex-wrap:nowrap
     (core.css, meant for the dashboard navbar which only ever holds icons
     next to a persistent sidebar). On the public front navbar the same
     element also holds the full nav-links menu (Inicio/Tienda/Cursos/
     Comunidad) inside .navbar-collapse, which needs to drop to its own
     line below the logo+toggler row when open on mobile - nowrap forces
     it to stay in that same row instead, squeezing/overlapping everything.
     Only this public navbar needs the override; the dashboard one keeps
     the vendor's nowrap behavior untouched. */
  flex-wrap: wrap;
}
.layout-without-menu .layout-navbar .traiga-brand-logo {
  height: 38px;
}
@media (max-width: 991.98px) {
  /* The mobile nav-links panel (#frontNavbarCollapse) otherwise sits
     transparent against whatever content scrolls underneath it once open -
     give it its own solid background so the menu options stand out
     clearly, like a proper dropdown panel instead of floating text. */
  #frontNavbarCollapse {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    padding: 1rem 1.25rem;
    margin-block-start: 0.5rem;
  }
}
.navbar-front-link {
  position: relative;
  font-weight: 500;
  padding-block: 0.4rem !important;
}
.navbar-front-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--bs-primary);
  transition: right 0.2s ease;
}
.navbar-front-link:hover,
.navbar-front-link.active {
  color: var(--bs-primary) !important;
}
.navbar-front-link:hover::after,
.navbar-front-link.active::after {
  right: 0;
}
.navbar-front-icons {
  padding-inline-end: 0.75rem;
  margin-inline-end: 0.5rem;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.post-products-scroll {
  max-height: 360px;
  overflow-y: auto;
}

.post-products-picker {
  max-height: 260px;
  overflow-y: auto;
}

/* Chat emoji picker (shared by the support widget, the full-page chat and
   the staff reply view) */
.chat-emoji-toggle {
  flex-shrink: 0;
}
.chat-emoji-panel {
  display: none;
  position: absolute;
  bottom: 100%;
  margin-bottom: 0.5rem;
  z-index: 20;
  width: 236px;
  max-height: 180px;
  overflow-y: auto;
  padding: 0.5rem;
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: var(--bs-box-shadow);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.125rem;
}
.chat-emoji-panel:not(.open) {
  display: none;
}
.chat-emoji-panel.open {
  display: grid;
}
.chat-emoji-option {
  background: none;
  border: none;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 0.25rem;
  cursor: pointer;
}
.chat-emoji-option:hover {
  background-color: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.05));
}
.chat-input-wrapper {
  position: relative;
}
.support-widget-bubble a,
.chat-bubble a {
  color: inherit;
  text-decoration: underline;
  word-break: break-word;
}
.chat-attachment-image {
  max-width: 220px;
  max-height: 220px;
  border-radius: 0.5rem;
  object-fit: cover;
}
.chat-attachment-file {
  text-decoration: underline;
}
label.btn input[type="file"] {
  display: none;
}

/* Sidebar community feed widget */
.sidebar-feed-item {
  padding: 0 0.5rem;
}
.sidebar-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-feed-post {
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  min-width: 0;
}
.sidebar-feed-post:hover {
  background-color: var(--bs-tertiary-bg, rgba(0, 0, 0, 0.03));
}
.sidebar-feed-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 0.4rem;
  flex-shrink: 0;
}
.sidebar-feed-more {
  padding: 0.25rem 0.5rem;
}

/* Footer */
.traiga-footer .traiga-footer-top .footer-link {
  color: var(--bs-body-color);
  text-decoration: none;
}
.traiga-footer .traiga-footer-top .footer-link:hover {
  color: var(--bs-primary);
}

/* Rich-text editor (Quill) */
.rich-editor-container .ql-toolbar.ql-snow {
  border-color: var(--bs-border-color);
  border-radius: 0.5rem 0.5rem 0 0;
  background-color: var(--bs-tertiary-bg, #f8f8f8);
}
.rich-editor-container .ql-container.ql-snow {
  border-color: var(--bs-border-color);
  border-radius: 0 0 0.5rem 0.5rem;
  min-height: 10rem;
  font-family: inherit;
  font-size: 1rem;
}
.rich-editor-container .ql-editor {
  min-height: 10rem;
}
.rich-editor-container .ql-editor.ql-blank::before {
  color: var(--bs-secondary-color);
  font-style: normal;
}

/* Rendered rich-text content (posts, product descriptions) */
.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 0.5rem 0;
}
.rich-content p:last-child {
  margin-bottom: 0;
}
.rich-content blockquote {
  border-left: 3px solid var(--bs-primary);
  padding-left: 1rem;
  color: var(--bs-secondary-color);
  margin: 0.75rem 0;
}
.rich-content ul,
.rich-content ol {
  padding-left: 1.5rem;
}

/* Floating support chat widget */
.support-widget-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1080;
  box-shadow: 0 0.5rem 1.5rem rgba(var(--bs-success-rgb), 0.45);
  border: none;
}
.support-widget-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 22rem;
  max-width: calc(100vw - 2rem);
  height: 28rem;
  max-height: calc(100vh - 8rem);
  z-index: 1079;
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.support-widget-panel.open {
  display: flex;
}
.support-widget-messages {
  flex: 1 1 auto;
  overflow-y: auto;
}
.support-widget-bubble {
  max-width: 70%;
  width: fit-content;
  align-self: flex-start;
  border-radius: 0.75rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}
.support-widget-bubble.mine {
  background-color: var(--bs-primary);
  color: #fff;
  margin-left: auto;
}
.support-widget-bubble.theirs {
  background-color: #4b4b4b;
  color: #fff;
}
