/* Your custom css */

/* --- Accessibility (WCAG contrast) --- */
.product-card .product-content .product-before-content .title,
.product-card .product-content .product-before-content .title a,
.product-card .product-content .product-before-content .price,
.product-card .product-content .product-before-content .price del,
.product-card .product-content .price,
.best-sell-item .price {
  color: #212121 !important;
}

.product-card .product-content .price del {
  color: #4a4a4a !important;
}

.cart-icon-design button,
.cart-icon-design a {
  background-color: #1a1a1a !important;
}

.cart-icon-design button i,
.cart-icon-design a i,
.cart-icon-design button .items,
.cart-icon-design a .items,
.cart-icon-design button .amount,
.cart-icon-design a .amount,
.cart-icon-design button .cartSubtotal,
.cart-icon-design a .cartSubtotal {
  color: #ffffff !important;
}

.cookies-card .cookies-card__content {
  color: #1e2337 !important;
}

.cookies-card .text--base {
  color: #1a1a1a !important;
  font-weight: 600;
  text-decoration: underline;
}

.cookies-card .btn--base {
  background: #1a1a1a !important;
  color: #ffffff !important;
}

.cookies-card .btn--base:hover,
.cookies-card .btn--base:active {
  background: #333333 !important;
  color: #ffffff !important;
}

/* Store AI chat assistant */
body .store-chat-root {
  position: fixed !important;
  right: 1.25rem !important;
  left: auto !important;
  bottom: 1.25rem !important;
  z-index: 10050;
  font-family: inherit;
}

body.scroll-hide-sm .store-chat-root {
  opacity: 0 !important;
  pointer-events: none !important;
}

.body-overlay.active ~ .store-chat-root {
  opacity: 0 !important;
  pointer-events: none !important;
}

.store-chat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: auto;
  max-width: min(280px, calc(100vw - 2rem));
  min-height: 3.35rem;
  padding: 0.6rem 1rem 0.6rem 0.85rem;
  border: none;
  border-radius: 999px;
  background: hsl(var(--base));
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.store-chat-toggle i {
  font-size: 1.45rem;
  line-height: 1;
  flex-shrink: 0;
}

.store-chat-toggle__label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  color: #fff;
  white-space: nowrap;
}

.store-chat-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 7rem));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.store-chat-panel[hidden] {
  display: none !important;
}

body.store-chat-mobile-open {
  overflow: hidden;
}

.store-chat-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: hsl(var(--base));
  color: #fff;
}

.store-chat-panel__header h6 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff !important;
  margin: 0;
}

.store-chat-panel__actions {
  display: flex;
  gap: 0.25rem;
}

.store-chat-panel__actions button {
  background: transparent;
  border: none;
  color: #fff;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.store-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  background: #f8f9fa;
  min-height: 220px;
  max-height: 360px;
}

.store-chat-msg {
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-chat-msg--user {
  align-items: flex-end;
}

.store-chat-msg__bubble {
  max-width: 92%;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  background: #fff;
  border: 1px solid #e9ecef;
}

.store-chat-msg--user .store-chat-msg__bubble {
  background: hsl(var(--base) / 0.12);
  border-color: hsl(var(--base) / 0.25);
}

.store-chat-products {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.35rem;
  width: 100%;
}

.store-chat-product-card {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
}

.store-chat-product-card:hover {
  border-color: hsl(var(--base));
  color: inherit;
}

.store-chat-product-card img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.store-chat-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.8rem;
  min-width: 0;
}

.store-chat-product-card__price {
  color: hsl(var(--base));
  font-weight: 600;
}

.store-chat-product-card__cta {
  font-size: 0.75rem;
  color: #6c757d;
}

.store-chat-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem;
  border-top: 1px solid #e9ecef;
  background: #fff;
}

.store-chat-input {
  flex: 1;
  resize: none;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.875rem;
  max-height: 100px;
}

.store-chat-send {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: hsl(var(--base));
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.store-chat-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.store-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
}

.store-chat-typing__dots {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  height: 1.25rem;
}

.store-chat-typing__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: hsl(var(--base));
  opacity: 0.35;
  animation: store-chat-typing-bounce 1.2s ease-in-out infinite;
}

.store-chat-typing__dot:nth-child(2) {
  animation-delay: 0.15s;
}

.store-chat-typing__dot:nth-child(3) {
  animation-delay: 0.3s;
}

.store-chat-typing__text {
  font-size: 0.8rem;
  color: #6c757d;
  font-style: italic;
}

.store-chat-msg__bubble ul {
  margin: 0.35rem 0 0.35rem 1rem;
  padding: 0;
}

.store-chat-msg__bubble code {
  font-size: 0.8em;
  background: #f1f3f5;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.store-chat-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
  width: 100%;
}

.store-chat-followup-chip {
  border: 1px solid hsl(var(--base) / 0.35);
  background: #fff;
  color: hsl(var(--base));
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1.3;
}

.store-chat-followup-chip:hover {
  background: hsl(var(--base) / 0.08);
}

@keyframes store-chat-typing-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@media (max-width: 575px) {
  .store-chat-root[data-home-route="1"] .store-chat-toggle__label {
    display: none;
  }

  .store-chat-root[data-home-route="1"] .store-chat-toggle {
    width: 3.35rem;
    min-width: 3.35rem;
    height: 3.35rem;
    min-height: 3.35rem;
    padding: 0;
    border-radius: 50%;
  }

  body .store-chat-root {
    right: 0.75rem !important;
    bottom: 4.5rem !important;
  }

  .store-chat-root.store-chat-root--mobile-open {
    inset: 0 !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 11000;
  }

  .store-chat-root.store-chat-root--mobile-open .store-chat-toggle {
    display: none;
  }

  .store-chat-root.store-chat-root--mobile-open .store-chat-panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    bottom: auto;
    right: auto;
    box-shadow: none;
  }

  .store-chat-root.store-chat-root--mobile-open .store-chat-messages {
    max-height: none;
    min-height: 0;
  }

  .store-chat-root.store-chat-root--mobile-open .store-chat-form {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
}