/* ==========================================================
   Store marquee bar + popup (includes/store-marquee.php)
   ========================================================== */

.sm-bar {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 64px;
  background: #ffffff;
  border-bottom: 3px solid #cb4a02;
  box-shadow: 0 6px 24px rgba(38, 25, 20, 0.08);
  font-family: "Inter", sans-serif;
  z-index: 2;
}

/* ---------- label ---------- */

.sm-label {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 34px 0 22px;
  background: linear-gradient(135deg, #cb4a02 0%, #a23a00 100%);
  color: #ffffff;
  clip-path: polygon(0 0, 100% 0, calc(100% - 18px) 100%, 0 100%);
  z-index: 1;
}

.sm-label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 17px;
  animation: sm-pulse 2.4s ease-in-out infinite;
}

.sm-label-text {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes sm-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  50%      { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
}

/* ---------- scrolling track ---------- */

.sm-viewport {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.sm-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  will-change: transform;
}

.sm-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin: 0 6px;
  padding: 0 16px 0 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #261914;
  font: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sm-item:hover,
.sm-item:focus-visible {
  background: #fff1ec;
  border-color: #ffdbce;
  outline: none;
}

.sm-item + .sm-item::before {
  content: "";
  width: 6px;
  height: 6px;
  margin: 0 8px 0 -14px;
  border-radius: 2px;
  background: #cb4a02;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

.sm-item-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff1ec;
  border: 1px solid #ffdbce;
  color: #a23a00;
  font-size: 16px;
}

.sm-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.sm-item-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #a23a00;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sm-item-text {
  font-size: 15px;
  font-weight: 500;
  color: #261914;
}

/* ---------- controls ---------- */

.sm-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 0 12px;
  background: #ffffff;
}

.sm-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #e1bfb3;
  border-radius: 50%;
  background: #ffffff;
  color: #a23a00;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sm-ctrl:hover,
.sm-ctrl:focus-visible,
.sm-ctrl.is-paused {
  background: #cb4a02;
  border-color: #cb4a02;
  color: #ffffff;
  outline: none;
}

/* ---------- popup ---------- */

.sm-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.sm-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.sm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 25, 20, 0.6);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

.sm-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(38, 25, 20, 0.35);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-family: "Inter", sans-serif;
}

.sm-modal.is-open .sm-modal-dialog {
  transform: none;
}

.sm-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #261914;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(38, 25, 20, 0.15);
}

.sm-modal-close:hover {
  background: #cb4a02;
  color: #ffffff;
}

.sm-modal-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 20%, rgba(203, 74, 2, 0.12), transparent 55%),
    radial-gradient(circle at 85% 80%, rgba(0, 96, 152, 0.10), transparent 55%),
    #fff8f6;
  border-bottom: 1px solid #fce3da;
}

.sm-modal-img {
  display: none;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.sm-modal-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #ffdbce;
  color: #a23a00;
  font-size: 44px;
}

.sm-modal.has-logo .sm-modal-img { display: block; }
.sm-modal.has-logo .sm-modal-placeholder { display: none; }

.sm-modal-body {
  padding: 24px 28px 28px;
  text-align: center;
}

.sm-modal-chip {
  display: inline-block;
  padding: 5px 14px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(162, 58, 0, 0.1);
  color: #a23a00;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sm-modal-title {
  margin: 0 0 6px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #261914;
}

.sm-modal-person {
  margin: 0 0 14px;
  color: #594138;
  font-size: 14px;
}

.sm-modal-text {
  margin: 0 0 22px;
  color: #261914;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-line;
  word-wrap: break-word;
}

.sm-modal-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #cb4a02 0%, #a23a00 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(162, 58, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sm-modal-call:hover,
.sm-modal-call:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(162, 58, 0, 0.4);
}

.sm-modal-web {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 20px;
  border: 2px solid #cb4a02;
  border-radius: 12px;
  background: #ffffff;
  color: #cb4a02;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sm-modal-web:hover,
.sm-modal-web:focus-visible {
  background: #cb4a02;
  color: #ffffff;
  transform: translateY(-2px);
}

body.sm-modal-lock {
  overflow: hidden;
}

/* ---------- responsive ---------- */

@media (max-width: 767px) {
  .sm-bar {
    height: 52px;
  }

  .sm-label {
    padding: 0 26px 0 14px;
  }

  .sm-label-text {
    display: none;
  }

  .sm-controls {
    padding: 0 10px 0 4px;
    gap: 4px;
  }

  .sm-prev,
  .sm-next {
    display: none;
  }

  .sm-ctrl {
    width: 32px;
    height: 32px;
  }

  .sm-item {
    height: 38px;
  }

  .sm-item-text {
    font-size: 14px;
  }

  .sm-modal-banner {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sm-label-icon {
    animation: none;
  }
}
