/* ═══════════════════════════════════════════════════════════
   KAKOARA RECENTLY VIEWED — Persistent Browsing Journey
   Warm Editorial Luxury | Consistent with Kakoara design
   ═══════════════════════════════════════════════════════════ */

/* ─── Section Container ─── */
.k-rv-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid rgba(232, 223, 208, 0.5);
  background: linear-gradient(180deg, transparent 0%, rgba(250, 247, 242, 0.6) 100%);
}

/* ─── Header ─── */
.k-rv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
}

.k-rv-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.k-rv-icon-wrap {
  width: 44px;
  height: 44px;
  background: rgba(198, 93, 59, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #C65D3B;
}

.k-rv-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 700;
  color: #3E2723;
  margin: 0 0 2px;
  line-height: 1.2;
}

.k-rv-subtitle {
  font-size: 0.8rem;
  color: #8B6F47;
  margin: 0;
}

.k-rv-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.k-rv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  border: 1px solid #E8DFD0;
  background: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  font-weight: 600;
  color: #8B6F47;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  white-space: nowrap;
}

.k-rv-btn:hover {
  border-color: #C65D3B;
  color: #C65D3B;
  background: rgba(198, 93, 59, 0.05);
  transform: translateY(-1px);
}

.k-rv-clear {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.k-rv-expand svg {
  transition: transform 0.3s ease;
}

.k-rv-expand.is-expanded svg {
  transform: rotate(180deg);
}

/* ─── Grid ─── */
.k-rv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .k-rv-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

/* ─── Card ─── */
.k-rv-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(232, 223, 208, 0.5);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.k-rv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(62, 39, 35, 0.1);
  border-color: rgba(198, 93, 59, 0.2);
}

.k-rv-card-media {
  aspect-ratio: 3 / 4;
  max-height: 320px;
  overflow: hidden;
  background: #f5f0e8;
  border-radius: 10px;
  position: relative;
  background: #F5F0E8;
}

.k-rv-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.k-rv-card:hover .k-rv-card-media img {
  transform: scale(1.08);
}

.k-rv-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  border-radius: 100px;
  background: linear-gradient(135deg, #C9A96E, #D4845E);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(201, 169, 110, 0.2);
}

.k-rv-card-info {
  padding: 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.k-rv-card-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #C9A96E;
}

.k-rv-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #3E2723;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s;
}

.k-rv-card:hover .k-rv-card-name {
  color: #C65D3B;
}

.k-rv-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.35rem;
}

.k-rv-card-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: #C65D3B;
}

.k-rv-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  font-weight: 600;
  color: #8B6F47;
}

/* ─── CTA ─── */
.k-rv-cta {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(232, 223, 208, 0.3);
}

.k-rv-cta-text {
  font-size: 0.8rem;
  color: #8B6F47;
  margin: 0 0 0.75rem;
}

.k-rv-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  border: 1.5px solid #3E2723;
  background: transparent;
  color: #3E2723;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.k-rv-cta-btn:hover {
  background: #3E2723;
  color: #FAF7F2;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(62, 39, 35, 0.15);
}

/* ─── Animations ─── */
@keyframes kRvFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.k-rv-card {
  animation: kRvFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.k-rv-card:nth-child(1) { animation-delay: 0.05s; }
.k-rv-card:nth-child(2) { animation-delay: 0.1s; }
.k-rv-card:nth-child(3) { animation-delay: 0.15s; }
.k-rv-card:nth-child(4) { animation-delay: 0.2s; }

/* ─── Mobile ─── */
@media (max-width: 480px) {
  .k-rv-card-info { padding: 0.5rem; }
  .k-rv-card-name { font-size: 0.7rem; }
  .k-rv-card-price { font-size: 0.72rem; }
  .k-rv-card-rating { font-size: 0.6rem; }
  .k-rv-cta-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .k-rv-card { animation: none; }
  .k-rv-card-media img { transition: none; }
  .k-rv-card { transition: none; }
}

/* ═══════════════════════════════════════════════════════════
   PWA INSTALL PROMPT — Homepage Utility Bar
   ═══════════════════════════════════════════════════════════ */

.k-install-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--k-cream, #FAF7F2);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-decoration: none;
}

.k-install-prompt:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

.k-install-prompt svg {
  width: 14px;
  height: 14px;
}

/* ─── Trust bar PWA button variant ─── */
.k-trust .k-install-prompt {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.15);
  color: var(--k-cream, #FAF7F2);
}

.k-trust .k-install-prompt:hover {
  background: rgba(255,255,255,0.22);
}

/* ─── Static PWA badge for non-interactive display ─── */
.k-pwa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
}

.k-pwa-badge svg {
  width: 12px;
  height: 12px;
}
