/* ===================================================
   CLIENT.CSS — Client-facing catalog (Mobile-first)
   =================================================== */

/* ===================================================
   HEADER
   =================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.social-links {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  color: #fff;
}

.social-btn:hover {
  transform: scale(1.15) translateY(-2px);
}

.whatsapp-btn {
  background-color: #25D366;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}
.whatsapp-btn:hover {
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.instagram-btn {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  box-shadow: 0 4px 12px rgba(214, 36, 159, 0.4);
}
.instagram-btn:hover {
  box-shadow: 0 6px 16px rgba(214, 36, 159, 0.6);
}

.site-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.logo-text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-extrabold);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 1px;
}

.logo-tagline {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero-section {
  padding: 160px var(--space-lg) var(--space-2xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-title {
  font-size: clamp(32px, 8vw, 64px);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
  letter-spacing: -1px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--color-primary), #d9cbb8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===================================================
   MAIN CONTENT
   =================================================== */
.main-content {
  padding-top: var(--space-lg);
  min-height: calc(100vh - 300px);
}

/* ===================================================
   TOOLBAR
   =================================================== */
.toolbar {
  display: flex;
  gap: var(--space-md);
  padding: 0 var(--space-lg);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
  transition: border-color var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary-glow);
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.7;
}

.sort-box select {
  padding: 9px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
  cursor: pointer;
}

.sort-box select:focus {
  outline: none;
  border-color: var(--color-primary-glow);
}

.category-dropdown-box select {
  padding: 9px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
}

.category-dropdown-box select:focus {
  outline: none;
  border-color: var(--color-primary-glow);
}

@media (max-width: 480px) {
  .toolbar {
    padding: 0 var(--space-md);
    flex-direction: column;
  }
  .category-dropdown-box select,
  .sort-box select {
    width: 100%;
  }
}

/* ===================================================
   PRODUCTS GRID
   =================================================== */
.products-grid {
  padding: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-md);
    gap: var(--space-sm);
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ===================================================
   PRODUCT CARD
   =================================================== */
.product-card {
  background: var(--color-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
  border: 1px solid var(--color-border);
  animation: slideUp 0.5s ease backwards;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--color-primary-glow);
  border-color: var(--color-primary-glow);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--color-surface-alt);
}

.product-card-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
  font-size: 56px;
}

.product-card-info {
  padding: var(--card-padding);
}

.product-card-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--color-text);
  line-height: var(--line-height-tight);
  letter-spacing: -0.5px;
}

.product-card-price {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: #059669; /* Darker green for contrast on light theme */
}

@media (max-width: 480px) {
  .product-card-info {
    padding: var(--space-sm);
  }
  .product-card-name {
    font-size: var(--font-size-sm);
    margin-bottom: 4px;
  }
  .product-card-price {
    font-size: var(--font-size-sm);
  }
}

/* ===================================================
   PRODUCT MODAL
   =================================================== */
.product-modal {
  border: none;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  overflow-y: auto;
  animation: slideUp 0.35s ease;
}

.product-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@media (min-width: 769px) {
  .product-modal {
    max-width: 600px;
    max-height: 90vh;
    margin: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(26, 26, 36, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: none;
  color: var(--color-text);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.modal-close:hover {
  background: rgba(26, 26, 36, 0.95);
}

@media (max-width: 768px) {
  .modal-close {
    top: var(--space-sm);
    right: var(--space-sm);
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

/* Modal Images & Gallery */
.modal-gallery-container {
  position: relative;
  width: 100%;
}

.gallery-arrow {
  position: absolute;
  top: calc(50% - 15px);
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: background var(--transition), transform var(--transition-fast);
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.gallery-arrow.prev-arrow {
  left: 10px;
}

.gallery-arrow.next-arrow {
  right: 10px;
}

.modal-images {
  width: 100%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.modal-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.modal-images img.active-image {
  display: block;
}

.modal-images-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: var(--color-surface-alt);
}

/* Image Dots */
.image-dots {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
  z-index: 5;
}

.image-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.image-dot.active {
  background: #ffffff;
  transform: scale(1.3);
}

/* Modal Content */
.modal-content {
  padding: var(--space-lg);
}

.modal-product-name {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  line-height: var(--line-height-tight);
}

.modal-product-description {
  font-size: var(--font-size-base);
  color: var(--color-text-secondary);
  line-height: var(--line-height);
  margin-bottom: var(--space-lg);
}

.modal-product-price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary);
  margin-bottom: var(--space-lg);
}

/* ===================================================
   SIZE SELECTOR
   =================================================== */
.size-selector {
  margin-bottom: var(--space-md);
}

.selector-label {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-md);
  display: block;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.size-chip {
  min-width: 56px;
  min-height: 48px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  background: var(--color-surface-alt);
  border: 2px solid var(--color-border);
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.size-chip:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-hover);
}

.size-chip.selected {
  border-color: var(--color-primary);
  background: rgba(108, 92, 231, 0.15);
  color: var(--color-primary);
}

/* ===================================================
   COLOR SELECTOR
   =================================================== */
.color-selector {
  margin-bottom: var(--space-md);
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.color-swatch-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}

.color-swatch:hover {
  transform: scale(1.15);
  border-color: var(--color-text-muted);
}

.color-swatch.selected {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.color-swatch.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.color-name {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-xs);
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===================================================
   CTA SECTION
   =================================================== */
.cta-section {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}

.cta-section .btn-whatsapp {
  width: 100%;
}

.cta-hint {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: var(--space-md);
}

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  display: block;
}

.empty-text {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}

/* ===================================================
   LOADING SPINNER
   =================================================== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

.loading-spinner::after {
  content: '';
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spinLoader 0.8s linear infinite;
}

@keyframes spinLoader {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner.hidden {
  display: none;
}

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}
