/* ===================================
   Vetrina Module Styles
   Stitch Premium Curated Design v3.0
   =================================== */

/* ===== Section Container ===== */
#vetrina-view {
  background-color: var(--bg-dark-primary, #11201C);
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

/* ===== Pull-to-refresh ===== */
#vetrina-content {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#vetrina-content.refreshing {
  opacity: 0.5;
  transform: translateY(20px);
}

/* Module container (legacy) */
#module-vetrina {
  min-height: calc(100vh - 120px);
  background-color: var(--bg-dark-primary);
  color: var(--text-dark-primary);
}

/* ===== Main Container ===== */
.vetrina-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4) calc(var(--space-12) * 2 + 110px);
}

/* ===== Hero Section ===== */
.vetrina-hero {
  text-align: center;
  margin-bottom: var(--space-10);
}

.vetrina-title {
  font-family: var(--font-ui);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: var(--weight-bold);
  color: var(--text-dark-primary);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.vetrina-subtitle {
  font-family: var(--font-ui);
  font-size: clamp(0.9375rem, 3.5vw, 1.0625rem);
  font-weight: var(--weight-light);
  color: var(--text-dark-muted);
  line-height: var(--leading-relaxed);
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

/* ===== Search & Filter ===== */
.vetrina-filters {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.vetrina-search {
  flex: 1;
  min-width: 200px;
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dark-medium);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--text-dark-primary);
  transition: border-color var(--duration-fast) var(--ease-in-out);
}

.vetrina-search:focus {
  outline: none;
  border-color: var(--brand-green);
}

.vetrina-search::placeholder {
  color: var(--text-dark-muted);
}

.vetrina-category-select {
  padding: var(--space-3);
  min-width: 180px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-dark-medium);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--text-dark-primary);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2311D473' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.vetrina-category-select:focus {
  outline: none;
  border-color: var(--brand-green);
}

.vetrina-category-select option {
  background: var(--bg-dark-primary);
  color: var(--text-dark-primary);
}

/* ===== Results Count ===== */
.vetrina-results-count {
  margin-bottom: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-dark-muted);
}

/* ===== Activities Grid ===== */
.vetrina-activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* ===== Activity Card ===== */
.vetrina-activity-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark-subtle);
  transition: transform var(--duration-normal) var(--ease-in-out),
              box-shadow var(--duration-normal) var(--ease-in-out);
}

.vetrina-activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.vetrina-activity-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: var(--bg-dark-secondary);
}

.vetrina-activity-content {
  padding: var(--space-4);
}

.vetrina-activity-category {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: rgba(17, 212, 115, 0.1);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.vetrina-activity-name {
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-dark-primary);
  margin: 0 0 var(--space-1);
  line-height: var(--leading-snug);
}

.vetrina-activity-location {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-dark-muted);
}

/* ===== Loading State ===== */
.vetrina-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-10);
  color: var(--text-dark-muted);
}

/* ===== Vetrina Header ===== */
.vetrina-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky, 100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4, 16px) var(--space-4, 16px) var(--space-2, 8px);
  background: rgba(17, 32, 28, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.vetrina-header-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: var(--text-dark-primary, rgba(255, 255, 255, 0.9));
}

.vetrina-header-menu .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 24;
}

.vetrina-header-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: var(--text-lg, 18px);
  font-weight: var(--weight-bold, 700);
  color: var(--text-dark-primary, rgba(255, 255, 255, 0.9));
  letter-spacing: -0.015em;
}

.vetrina-header-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--text-dark-primary, rgba(255, 255, 255, 0.9));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.vetrina-header-search:hover {
  opacity: 0.8;
}

.vetrina-header-search .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 24;
}

/* ===== Search Panel ===== */
.vetrina-search-panel {
  padding: var(--space-3, 12px) var(--space-4, 16px);
  background: rgba(17, 32, 28, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vetrina-search-panel[hidden] {
  display: none;
}

.vetrina-search-container {
  display: flex;
  gap: var(--space-3, 12px);
  flex-wrap: wrap;
}

.vetrina-search-input {
  flex: 1;
  min-width: 200px;
  padding: var(--space-3, 12px);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md, 6px);
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: var(--text-base, 16px);
  color: var(--text-dark-primary, rgba(255, 255, 255, 0.9));
  transition: border-color 0.2s ease;
}

.vetrina-search-input:focus {
  outline: none;
  border-color: var(--brand-green, #11D473);
}

.vetrina-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== Vetrina Headline ===== */
.vetrina-headline {
  padding: var(--space-6) var(--space-4) var(--space-3);
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: var(--weight-bold);
  color: var(--text-dark-primary);
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
}

/* ===== Content Container ===== */
.vetrina-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding: var(--space-4);
}

/* ===== Curated Section ===== */
.vetrina-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.vetrina-section-title {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--text-dark-subtle);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ===== Grid Layouts ===== */
.vetrina-grid {
  display: grid;
  gap: var(--space-4);
}

/* 2 columns, 3 rows - Boutique layout */
.vetrina-grid--boutique {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, auto);
}

/* 2 columns, 2 rows - Art layout */
.vetrina-grid--art {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, auto);
}

/* 2 columns - Dining layout */
.vetrina-grid--dining {
  grid-template-columns: repeat(2, 1fr);
}

/* ===== Gallery Card ===== */
.vetrina-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Card sizing variants */
.vetrina-card--featured {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 280px;
}

.vetrina-card--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.vetrina-card--tall {
  aspect-ratio: 3 / 4;
}

.vetrina-card--square {
  aspect-ratio: 1;
}

.vetrina-card--landscape {
  aspect-ratio: 4 / 3;
}

.vetrina-card--video {
  aspect-ratio: 16 / 9;
}

.vetrina-card--portrait {
  grid-column: span 2;
  aspect-ratio: 3 / 2;
}

/* Card overlay gradient */
.vetrina-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.10) 50%, transparent);
  pointer-events: none;
}

/* ===== Card Action Button ===== */
.vetrina-card-action {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: var(--text-dark-secondary);
  font-size: 20px;
  font-weight: var(--weight-light);
  cursor: pointer;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  z-index: 2;
}

/* ===== Card Title ===== */
.vetrina-card-title {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  color: var(--text-dark-primary);
  line-height: var(--leading-tight);
  z-index: 2;
}

/* ===== Card Image (for img tag approach) ===== */
.vetrina-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Coming Soon State ===== */
.vetrina-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 200px);
  padding: var(--space-8);
  text-align: center;
}

.vetrina-coming-soon-icon {
  font-size: 64px;
  margin-bottom: var(--space-6);
  opacity: 0.6;
}

.vetrina-coming-soon-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  color: var(--text-dark-primary);
  margin-bottom: var(--space-2);
}

.vetrina-coming-soon-text {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  color: var(--text-dark-muted);
  max-width: 300px;
  line-height: var(--leading-relaxed);
}

.vetrina-coming-soon-eta {
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: rgba(232, 171, 48, 0.1);
  border: 1px solid rgba(232, 171, 48, 0.2);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--brand-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== Section Divider ===== */
.vetrina-divider {
  width: 100%;
  height: 1px;
  background: var(--border-dark-subtle);
  margin: var(--space-4) 0;
}

/* ===== Spacer ===== */
.vetrina-spacer {
  height: calc(var(--space-10, 40px) + 80px);
}

/* ===== Enhanced Card Styles (Stitch Design) ===== */
.vetrina-card {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vetrina-card:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.vetrina-card:active {
  transform: scale(0.98);
}

/* Card sizes based on position in grid */
.vetrina-grid--boutique .vetrina-card:first-child {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 280px;
}

.vetrina-grid--boutique .vetrina-card:not(:first-child) {
  aspect-ratio: 1;
  min-height: 140px;
}

.vetrina-grid--art .vetrina-card:nth-child(1),
.vetrina-grid--art .vetrina-card:nth-child(2) {
  aspect-ratio: 1;
  min-height: 140px;
}

.vetrina-grid--art .vetrina-card:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.vetrina-grid--dining .vetrina-card:first-child {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}

.vetrina-grid--dining .vetrina-card:not(:first-child) {
  aspect-ratio: 3 / 4;
}

/* ===== Card Action Button (Add/Bookmark) ===== */
.vetrina-card-action {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  cursor: pointer;
  opacity: 0.9;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  z-index: 2;
}

.vetrina-card-action:hover {
  background: rgba(17, 212, 115, 0.3);
  transform: scale(1.1);
}

.vetrina-card-action .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'opsz' 20;
}

/* ===== Section Filter Highlight ===== */
.vetrina-section[data-highlighted="true"] {
  animation: sectionHighlight 1s ease;
}

@keyframes sectionHighlight {
  0% {
    background: rgba(17, 212, 115, 0.1);
  }
  100% {
    background: transparent;
  }
}

/* Hide sections when filtered */
.vetrina-section[hidden] {
  display: none;
}

/* ===== Empty State ===== */
.vetrina-empty-state {
  grid-column: span 2;
  text-align: center;
  padding: var(--space-8, 32px);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: var(--text-sm, 14px);
}

/* ===== Loading Skeleton ===== */
.vetrina-skeleton {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s infinite;
  border-radius: var(--radius-lg, 8px);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== Minimal Cards Grid Container (Free Tier) ===== */
.minimal-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3, 12px);
  margin-top: var(--space-4, 16px);
  grid-column: 1 / -1; /* Span full width of parent grid */
}

/* ===== Minimal Cards (Free Tier) ===== */
.vetrina-card--minimal {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-dark-subtle, rgba(255, 255, 255, 0.1));
  border-radius: var(--radius-lg, 12px);
  padding: var(--space-3, 12px);
  aspect-ratio: auto;
  min-height: auto;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vetrina-card--minimal::before {
  display: none; /* No gradient overlay for minimal cards */
}

.vetrina-card--minimal:hover {
  border-color: var(--brand-green, #11D473);
  background: rgba(17, 212, 115, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 212, 115, 0.15);
}

.vetrina-card--minimal:active {
  transform: translateY(0);
}

.minimal-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-1, 4px);
}

.minimal-card-content .category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-2, 8px);
}

.minimal-card-content .category-icon .material-symbols-outlined {
  font-size: 2rem;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48;
  color: var(--brand-green, #11D473);
}

.minimal-card-content .business-name {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: var(--text-sm, 14px);
  font-weight: var(--weight-semibold, 600);
  color: var(--text-dark-primary, rgba(255, 255, 255, 0.9));
  margin: 0;
  line-height: var(--leading-tight, 1.25);
  /* Truncate long names */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.minimal-card-content .business-category {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: var(--text-xs, 11px);
  font-weight: var(--weight-medium, 500);
  color: var(--brand-green, #11D473);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.minimal-card-content .business-location {
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: var(--text-xs, 11px);
  color: var(--text-dark-muted, rgba(255, 255, 255, 0.5));
  margin: 0;
}

