.card {
  position: relative;
}

.card.is-popular {
  border-color: var(--line);
  box-shadow: none;
}

.card.is-popular:hover {
  box-shadow: 0 12px 30px #0002;
}

.popular-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid #ffd27a;
  border-radius: 4px;
  background: linear-gradient(110deg, #7d0900, #e33100 35%, #ff8500 65%, #9d1000);
  background-size: 220% 100%;
  color: #fff;
  font: 700 10px 'DM Mono', monospace;
  letter-spacing: .13em;
  box-shadow: 0 0 10px #ff3b00, 0 0 24px #ff850099;
  animation: fire-sweep 1.8s linear infinite, fire-pulse 1.15s ease-in-out infinite alternate;
}

.popular-badge::after {
  content: '';
  position: absolute;
  inset: -60% -25%;
  background: linear-gradient(100deg, transparent 35%, #fff7 50%, transparent 65%);
  transform: translateX(-80%);
  animation: fire-shine 2.1s ease-in-out infinite;
}

.popular-badge span {
  font-size: 15px;
  filter: drop-shadow(0 0 4px #ffe55c);
  animation: flame-dance .65s ease-in-out infinite alternate;
}

@keyframes fire-sweep {
  to { background-position: -220% 0; }
}

@keyframes fire-pulse {
  to { box-shadow: 0 0 14px #ff3b00, 0 0 34px #ff8500c7; }
}

@keyframes fire-shine {
  55%, 100% { transform: translateX(90%); }
}

@keyframes flame-dance {
  to { transform: translateY(-2px) rotate(4deg) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .popular-badge,
  .popular-badge::after,
  .popular-badge span {
    animation: none;
  }
}
.product-card-link,
.product-title-link {
  color: inherit;
  text-decoration: none;
}

.product-card-link {
  display: block;
}

.card-flip-link {
  perspective: 1100px;
}

.card-flip {
  position: relative;
  display: block;
  height: 290px;
}

.has-model .card-flip {
  transform-style: preserve-3d;
  transition: transform .62s cubic-bezier(.2,.72,.2,1);
}

.card-face {
  display: block;
  width: 100%;
  height: 100%;
}

.has-model .card-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-face img {
  width: 100%;
  height: 100%;
}

.card-model-face {
  transform: rotateY(180deg);
}

.card-model-label {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 8px 10px;
  background: #111e;
  color: #fff;
  font: 700 9px 'DM Mono', monospace;
  letter-spacing: .09em;
}

.card.has-model:hover .card-flip,
.card-flip-link:focus-visible .card-flip,
.card.has-model.show-model .card-flip {
  transform: rotateY(180deg);
}

.card-model-toggle {
  display: none;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.message-product,
.detail-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  text-align: center;
  text-decoration: none;
  font: 700 10px 'DM Mono', monospace;
  letter-spacing: .08em;
}

.message-product {
  min-height: 39px;
  padding: 8px;
}

.message-product:hover,
.message-product:focus-visible,
.detail-message:hover,
.detail-message:focus-visible {
  background: #111;
  color: #fff;
}

.detail-message {
  width: 100%;
  min-height: 49px;
  margin-top: 10px;
  padding: 12px;
}

.chat-modal.open {
  display: grid;
  place-items: center;
}

.chat-box {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 30px;
  border: 1px solid #333;
  background: #faf9f7;
  box-shadow: 0 24px 70px #0007;
}

.chat-box h2 {
  margin: 8px 42px 8px 0;
  font: 600 clamp(32px, 5vw, 48px)/.95 Oswald, sans-serif;
}

.chat-product {
  margin: 0 0 18px;
  color: #615b53;
  font-weight: 700;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 95px;
  max-height: 210px;
  overflow: auto;
  padding: 14px;
  border: 1px solid #d4d0c9;
  background: #eee9e2;
}

.chat-bubble {
  max-width: 86%;
  margin: 0;
  padding: 11px 13px;
  border-radius: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.business-bubble {
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  background: #fff;
}

.customer-bubble {
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  background: #111;
  color: #fff;
}

.chat-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.chat-contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.chat-form label {
  display: grid;
  gap: 6px;
  color: #4e4942;
  font: 700 10px 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chat-form input,
.chat-form textarea {
  width: 100%;
  border: 1px solid #aaa;
  background: #fff;
  padding: 12px;
  color: #111;
  font: 16px Arial, sans-serif;
  text-transform: none;
}

.chat-form textarea {
  min-height: 105px;
  resize: vertical;
}

.chat-form button {
  min-height: 49px;
  border: 0;
  background: #c62919;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.chat-form button:disabled {
  cursor: wait;
  opacity: .6;
}

.chat-status {
  min-height: 20px;
  margin: 0;
  color: #a92315;
  font-weight: 700;
}

.chat-safety {
  margin: 14px 0 0;
  color: #6d675f;
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .has-model .card-flip {
    transition: none;
  }
}

.filters a {
  background: transparent;
  border: 1px solid #aaa;
  color: #111;
  padding: 9px 13px;
  cursor: pointer;
  font: 10px 'DM Mono', monospace;
  text-decoration: none;
}

.filters a.active,
.filters a:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.nav-links {
  gap: clamp(10px, 1.7vw, 28px) !important;
}

.service-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav .service-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #111;
  padding: 10px 12px;
  font: 700 10px 'DM Mono', monospace;
  letter-spacing: .07em;
  white-space: nowrap;
}

.nav .service-links .refund-link {
  background: #c62919;
  border-color: #c62919;
  color: #fff;
}

.nav .service-links a:hover,
.nav .service-links a:focus-visible {
  background: #111;
  border-color: #111;
  color: #fff;
}

@media (max-width: 850px) {
  .nav {
    padding-inline: 12px;
  }

  .brand {
    padding-right: 10px;
  }

  .brand img {
    width: 112px;
  }
}

.auth-actions .account-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #111;
  background: #fff;
  color: #111;
  padding: 10px 12px;
  cursor: pointer;
  font: 10px 'DM Mono', monospace;
  letter-spacing: .07em;
}

.auth-actions .account-link.signup {
  background: #111;
  color: #fff;
}

.auth-actions .account-link:hover,
.auth-actions .account-link:focus-visible {
  background: #c62919;
  border-color: #c62919;
  color: #fff;
}

body.account-open {
  overflow: hidden;
}

.account-modal[hidden] {
  display: none;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .72);
}

.account-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #faf9f7;
  border-top: 5px solid #c62919;
  padding: 34px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.account-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 38px;
  height: 38px;
  border: 1px solid #bbb;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.account-brand {
  margin: 0 45px 8px 0;
  color: #c62919;
  font: 700 10px 'DM Mono', monospace;
  letter-spacing: .14em;
}

.account-panel h2 {
  margin: 0 45px 8px 0;
  font: 600 38px/1 Oswald, sans-serif;
}

.account-intro,
.account-security {
  color: #625e57;
  line-height: 1.45;
}

.account-panel form,
#accountCredentials,
#accountCodeFields {
  display: grid;
  gap: 14px;
}

#accountCredentials[hidden],
#accountCodeFields[hidden] {
  display: none;
}

.account-panel form {
  margin-top: 22px;
}

.account-panel label {
  display: grid;
  gap: 7px;
  font: 700 10px 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #aaa;
  border-radius: 0;
  background: #fff;
  padding: 12px;
  font: 16px Arial, sans-serif;
}

.account-panel input:focus {
  outline: 3px solid rgba(198, 41, 25, .18);
  border-color: #c62919;
}

.account-submit {
  min-height: 50px;
  border: 0;
  background: #111;
  color: #fff;
  cursor: pointer;
  font: 700 11px 'DM Mono', monospace;
  letter-spacing: .08em;
}

.account-submit:hover,
.account-submit:focus-visible {
  background: #c62919;
}

.account-submit:disabled {
  cursor: wait;
  opacity: .65;
}

.account-status {
  min-height: 20px;
  margin: 14px 0;
  color: #a31f14;
  font-weight: 700;
  line-height: 1.4;
}

.account-switch {
  border: 0;
  background: transparent;
  padding: 0;
  color: #111;
  cursor: pointer;
  font: 700 10px 'DM Mono', monospace;
  text-decoration: underline;
}

.account-security {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #ddd;
  font-size: 12px;
}

@media (max-width: 520px) {
  .account-modal {
    padding: 10px;
  }

  .account-panel {
    padding: 28px 20px;
  }
}
