/* ============================================================
   Earta — pure albanian food
   Layout, nav links and product card styling.
   The marquee motion is driven by JavaScript (script.js).
   ============================================================ */

* {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
}

/* ---------- Header nav links ---------- */
.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1a16;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: #5c7a4f;
  transition: width 0.25s ease;
}

.nav-link:hover {
  color: #5c7a4f;
}

.nav-link:hover::after {
  width: 100%;
}

summary.nav-link {
  list-style: none;
}

summary.nav-link::-webkit-details-marker {
  display: none;
}

/* ---------- Header shrink on scroll ---------- */
.site-header {
  transition: box-shadow 0.3s ease;
}

.site-header .header-inner {
  transition: padding 0.3s ease;
}

.site-header .logo-text {
  line-height: 1;
  transition: font-size 0.3s ease;
}

.site-header .logo-sub {
  display: block;
  overflow: hidden;
  max-height: 1.25rem;
  transition: opacity 0.3s ease, margin-top 0.3s ease, max-height 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 12px 30px -18px rgba(28, 26, 22, 0.25);
}

.site-header.is-scrolled .header-inner {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.site-header.is-scrolled .logo-text {
  font-size: 1.5rem;
}

.site-header.is-scrolled .logo-sub {
  opacity: 0;
  margin-top: 0;
  max-height: 0;
}

/* ---------- Vertical product marquee (olives) ---------- */
.marquee-column {
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
}

.marquee-column::-webkit-scrollbar {
  display: none;
}

.marquee-track {
  display: flex;
  flex-direction: column;
}

/* Spacing between cards — using margin (not flex gap) so that the
   duplicated set is pixel-identical and the loop is seamless. */
.marquee-track .card {
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.marquee-column img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

/* ---------- Horizontal marquee ---------- */
.h-marquee-row {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-x;
}

.h-marquee-row::-webkit-scrollbar {
  display: none;
}

.h-marquee-track {
  display: flex;
  width: max-content;
}

.h-marquee-track .card {
  width: 17rem;
  flex-shrink: 0;
  margin-right: 1.5rem;
}

/* ---------- Card polish ---------- */
.card {
  background: #ffffff;
  border-radius: 1.5rem; /* rounded-3xl */
  overflow: hidden;
  box-shadow: 0 22px 45px -22px rgba(28, 26, 22, 0.18);
  border: 1px solid #f1eee7;
}

.card .card-img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.card:hover .card-img {
  transform: scale(1.05);
}

/* ---------- Header logo image ---------- */
.site-header .logo-img {
  height: 3.75rem;
  width: auto;
  transition: height 0.3s ease;
}

.site-header.is-scrolled .logo-img {
  height: 2.5rem;
}

/* ---------- Sticky back-to-top button ---------- */
.go-top {
  position: fixed;
  right: 0;
  top: 50%;
  margin-top: -2.5rem;
  z-index: 50;
  width: 5rem;
  height: 5rem;
  border-radius: 1rem 0 0 1rem;
  border: 1px solid #ece7df;
  border-right: none;
  background: #ffffff;
  box-shadow: -10px 0 26px -12px rgba(28, 26, 22, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.go-top img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.go-top:hover {
  transform: translateX(-2px);
  box-shadow: -14px 0 32px -12px rgba(28, 26, 22, 0.5);
}

/* ---------- Mobile adjustments ---------- */
@media (max-width: 640px) {
  .site-header .logo-img {
    height: 2.5rem;
  }
  .site-header.is-scrolled .logo-img {
    height: 2rem;
  }
  .go-top {
    width: 3.5rem;
    height: 3.5rem;
    margin-top: -1.75rem;
  }
  .h-marquee-track .card {
    width: 15rem;
  }
}

/* ---------- Swipe mode indicator ---------- */
.marquee-column.swipe-mode,
.h-marquee-row.swipe-mode {
  box-shadow: inset 0 0 0 2px #5c7a4f;
}
