/* -------------------------------------------------------
 * Marquee Ticker Bar
 * ----------------------------------------------------- */
:root {
  --marquee-h: 36px;
  --marquee-bg: var(--color-primary);
  --marquee-color: #fff;
  --marquee-font-size: 15px;
  --marquee-font-family: inherit;
}

.marquee-bar {
  width: 100%;
  background: var(--marquee-bg);
  color: var(--marquee-color);
  overflow: hidden;
  padding: 8px 0;
  font-size: var(--marquee-font-size);
  font-family: var(--marquee-font-family);
  font-weight: 400;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.marquee-bar__rotate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  position: relative;
  overflow: hidden;
}

@keyframes marquee-slide-in {
  from {
    opacity: 0;
    transform: translate(-50%, 100%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes marquee-slide-out {
  from {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -150%);
  }
}

.marquee-bar__item {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, 100%);
  opacity: 0;
  pointer-events: none;
}

.marquee-bar__item.is-active {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  animation: marquee-slide-in 0.55s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.marquee-bar__item.is-leaving {
  animation: marquee-slide-out 0.45s cubic-bezier(0.55, 0, 0.78, 0.4) forwards;
}

/* -------------------------------------------------------
 * Site Header / Navbar
 * ----------------------------------------------------- */
/* When marquee is enabled: marquee is in flow above header */
body.has-marquee .site-header {
  position: relative;
  z-index: 500;
}

body.has-marquee .site-wrap {
  padding-top: 0;
}

/* When marquee is disabled: no extra spacing */
body.no-marquee .site-wrap {
  padding-top: 0;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 500;
  overflow: visible;
  isolation: isolate;
}

.site-header .container,
.site-header .navbar {
  overflow: visible;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  flex: 1;
  flex-shrink: 0;
  overflow: visible;
  min-height: 56px;
  margin-left: -12px;
}

.navbar__logo-img {
  display: block;
  width: 200px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
}

.navbar__nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
  justify-content: center;
}

.navbar__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  text-transform: uppercase;
}

@media (hover: hover) {
  .navbar__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
  }
  .navbar__link:hover::after {
    transform: scaleX(1);
  }
}

.navbar__badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: var(--color-primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 20px;
  text-transform: uppercase;
}

.navbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
  flex-shrink: 0;
}

.navbar__cart-btn {
  position: relative;
  background: none;
  border: none;
  padding: 6px;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

@media (hover: hover) {
  .navbar__cart-btn:hover {
    color: var(--color-primary);
  }
}

.navbar__cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  background: var(--color-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  padding: 0;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.navbar__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.is-open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------
 * Hero Slider
 * ----------------------------------------------------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: #111;
  height: calc(100vh - 100px);
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.hero-slider__track {
  position: relative;
  flex: 1;
  min-height: 500px;
  display: flex;
}

.hero-slider__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: stretch;
}

.hero-slider__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  flex: 1;
}

.hero-slider__slide picture {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-slider__bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 0;
}

.hero-slider__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.60) 0%,
    rgba(0, 0, 0, 0.35) 55%,
    rgba(0, 0, 0, 0.10) 100%
  );
  z-index: 1;
}

/* Text entry animations */
.hero-slider__slide .hero-slider__eyebrow,
.hero-slider__slide .hero-slider__title,
.hero-slider__slide .hero-slider__cta {
  opacity: 0;
  transform: translateY(24px);
}

.hero-slider__slide.is-active .hero-slider__eyebrow {
  animation: hero-fade-up 0.9s ease forwards;
}

.hero-slider__slide.is-active .hero-slider__title {
  animation: hero-fade-up 0.9s ease 0.1s forwards;
}

.hero-slider__slide.is-active .hero-slider__cta {
  animation: hero-fade-up 0.9s ease 0.2s forwards;
}

@keyframes hero-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-slider__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
  width: 100%;
  flex: 1;
}

.hero-slider__copy {
  max-width: 560px;
}

.hero-slider__eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero-slider__title {
  margin: 0 0 32px;
  font-size: clamp(42px, 5.5vw, 80px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -1px;
  color: #fff;
}

.hero-slider__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  padding: 16px 36px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--cta-border-radius, 8px);
  transition: background 0.2s ease;
}

@media (hover: hover) {
  .hero-slider__cta:hover {
    background: var(--color-primary-hover);
  }
}

/* -------------------------------------------------------
 * Cart Drawer
 * ----------------------------------------------------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cart-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  z-index: 900;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  will-change: transform;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.cart-drawer__title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.cart-drawer__close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text);
  padding: 4px 8px;
  line-height: 1;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .cart-drawer__close:hover {
    color: var(--color-primary);
  }
}

.cart-drawer__shipping-bar {
  padding: 12px 20px;
  background: #f9fafb;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.cart-drawer__shipping-text {
  font-size: 13px;
  color: var(--color-muted);
  margin: 0 0 8px;
}

.cart-drawer__progress {
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.cart-drawer__progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 2px;
  transition: width 0.4s ease;
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}

.cart-drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--color-muted);
  font-size: 15px;
  gap: 8px;
}

.cart-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item__thumb {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-alt);
}

.cart-item__info {
  flex: 1;
  min-width: 0;
}

.cart-item__name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item__price {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 2px;
}

.cart-item__original-price {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: line-through;
  margin-left: 6px;
  font-weight: 400;
}

.cart-item__meta {
  font-size: 12px;
  color: var(--color-muted);
  margin: 0 0 10px;
  line-height: 1.6;
}

.cart-item__qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item__qty-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 4px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}

@media (hover: hover) {
  .cart-item__qty-btn:hover {
    border-color: var(--color-primary);
  }
}

.cart-item__qty-count {
  width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.cart-item__delete {
  background: none;
  border: none;
  color: var(--color-muted);
  padding: 4px;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .cart-item__delete:hover {
    color: #e53e3e;
  }
}

.cart-drawer__footer {
  flex-shrink: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.cart-drawer__instructions-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 16px;
  cursor: pointer;
}

.cart-drawer__instructions-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.cart-drawer__instructions-body.is-open {
  max-height: 200px;
}

.cart-drawer__instructions-body textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: var(--font-base);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
}

.cart-drawer__subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.cart-drawer__subtotal-label {
  color: var(--color-text);
}

.cart-drawer__subtotal-amount {
  color: var(--color-text);
}

.cart-drawer__btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cart-drawer__view-btn {
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: #fff;
  border-radius: var(--cta-border-radius, 8px);
  text-align: center;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .cart-drawer__view-btn:hover {
    background: var(--color-primary);
    color: #fff;
  }
}

.cart-drawer__checkout-btn {
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-primary);
  border-radius: var(--cta-border-radius, 8px);
  text-align: center;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (hover: hover) {
  .cart-drawer__checkout-btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
  }
}

/* -------------------------------------------------------
 * Responsive — Navbar & Hero
 * ----------------------------------------------------- */
@media (max-width: 1024px) {
  .navbar__nav {
    gap: 20px;
  }
  .navbar__link {
    font-size: 14px;
  }
  .hero-slider__title {
    font-size: clamp(36px, 4.5vw, 62px);
  }
}

@media (max-width: 768px) {
  /* Hero: fill mobile viewport, no letterboxing */
  .hero-slider__bg-image {
    object-fit: cover;
    object-position: center 40%;
  }
  .hero-slider__track {
    min-height: 60vh;
  }
  .navbar__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
    z-index: 400;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  }
  .navbar__nav.is-open {
    display: flex;
  }
  .navbar__link {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    border-bottom: 1px solid var(--color-border);
  }
  .navbar__link:last-child {
    border-bottom: none;
  }
  .navbar__link::after {
    display: none;
  }
  .navbar__hamburger {
    display: flex;
  }
  .site-header {
    position: sticky;
    top: 0;
  }
  body.has-marquee .site-header {
    top: 0;
  }
  .hero-slider__content {
    padding-top: 48px;
    padding-bottom: 48px;
    justify-content: center;
  }
  .hero-slider__copy {
    max-width: 100%;
    text-align: center;
  }
  .hero-slider__eyebrow {
    font-size: 14px;
    letter-spacing: 2px;
  }
  .hero-slider__title {
    margin-bottom: 20px;
    font-size: clamp(36px, 8vw, 52px);
  }
  .hero-slider__cta {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
  }
  .hero-slider__overlay {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.55) 50%,
      rgba(0, 0, 0, 0.75) 100%
    );
  }
}

@media (max-width: 600px) {
  :root {
    --marquee-h: 32px;
    --marquee-font-size: 14px;
  }
  .navbar {
    height: 56px;
  }
  .hero-slider {
    height: calc(100vh - 88px);
  }
  .hero-slider__track {
    min-height: 55vh;
  }
  .hero-slider__content {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .hero-slider__title {
    font-size: clamp(32px, 8vw, 48px);
    margin-bottom: 16px;
  }
  .hero-slider__cta {
    padding: 14px 24px;
    font-size: 16px;
  }
  .cart-drawer {
    width: 100vw;
  }
}
