/* Store — Layout */

/* =========================================
   MiniTiendAI — Store Styles
   Tokens, reset, themes & dark-mode vars
   are in their own shared CSS files.
   ========================================= */

body {
  background: linear-gradient(160deg, var(--background-color) 0%, var(--bg-muted) 40%, var(--bg-body) 100%);
}


/* Store Layout */
.store-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
  min-height: 100vh;
}

/* ============================================
   STORE HEADER - Premium Design
   ============================================ */
.store-header {
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-14) var(--space-8);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  text-align: center;
}

.store-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.store-header::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 60%;
  height: 150%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
  animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(3deg);
  }
}

.store-info {
  position: relative;
  z-index: var(--z-sidebar);
}

.store-name {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-4);
  letter-spacing: 0;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  line-height: 1.15;
  text-wrap: balance;
}

.store-description {
  font-size: var(--text-lg);
  opacity: 0.95;
  margin-bottom: var(--space-7);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-relaxed);
  text-wrap: balance;
}

.store-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--space-4) var(--space-7);
  border-radius: var(--radius-full);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-base);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) {
  .contact-link:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  }
}

.contact-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: var(--primary-focus-ring);
}

.contact-link i {
  font-size: var(--text-xl);
}

/* Business Details & Social */
.business-details {
  margin-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  width: 100%;
}

.business-info {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
}

/* ============================================
   SOCIAL LINKS (Icon-Only Style)
   ============================================ */
.social-links {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  color: white;
  text-decoration: none;
  font-size: var(--text-xl);
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: var(--primary-focus-ring);
}

@media (hover: hover) {
  .social-link:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }

  /* Social Media Platform Colors on Hover */
  .social-instagram:hover {
    background: linear-gradient(135deg, var(--brand-instagram-start), var(--brand-instagram-mid1), var(--brand-instagram-mid2), var(--brand-instagram-mid3), var(--brand-instagram-end));
    border-color: transparent;
  }

  .social-facebook:hover {
    background: var(--brand-facebook);
    border-color: transparent;
  }

  .social-tiktok:hover {
    background: linear-gradient(135deg, var(--brand-tiktok), var(--brand-tiktok-accent));
    border-color: transparent;
  }

  .social-twitter:hover {
    background: var(--brand-twitter);
    border-color: transparent;
  }

  .social-youtube:hover {
    background: var(--brand-youtube);
    border-color: transparent;
  }

  .social-linkedin:hover {
    background: var(--brand-linkedin);
    border-color: transparent;
  }
}

/* ============================================
   WHATSAPP PROMINENT BUTTON
   ============================================ */
.contact-link.whatsapp-prominent {
  background: linear-gradient(135deg, var(--whatsapp-color) 0%, var(--whatsapp-dark) 100%);
  border-color: transparent;
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  box-shadow: 0 6px 20px color-mix(in oklch, var(--whatsapp-color) 35%, transparent);
  animation: whatsapp-pulse 2s infinite;
}

@media (hover: hover) {
  .contact-link.whatsapp-prominent:hover {
    background: linear-gradient(135deg, var(--whatsapp-dark) 0%, #075E54 100%);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px color-mix(in oklch, var(--whatsapp-color) 45%, transparent);
    color: white;
    animation: none;
  }
}

.contact-link.whatsapp-prominent i {
  font-size: var(--text-2xl);
}

@keyframes whatsapp-pulse {

  0%,
  100% {
    box-shadow: 0 6px 20px color-mix(in oklch, var(--whatsapp-color) 35%, transparent);
  }

  50% {
    box-shadow: 0 6px 30px color-mix(in oklch, var(--whatsapp-color) 55%, transparent), 0 0 40px color-mix(in oklch, var(--whatsapp-color) 20%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-header::before,
  .store-header::after,
  .contact-link.whatsapp-prominent {
    animation: none;
  }
}

/* ============================================
   BUSINESS INFO ENHANCED
   ============================================ */
.business-info.business-hours {
  background: rgba(255, 255, 255, 0.2);
  font-size: var(--text-sm);
}

.business-info.business-hours i {
  color: rgba(255, 255, 255, 0.9);
}


/* ============================================
    PREMIUM STORE ENHANCEMENTS - HYBRID DESIGN
   Combines: E-commerce + Food Delivery + Digital Menu
   ============================================ */

/* ============================================
   HERO COVER PHOTO & BANNER
   ============================================ */
.store-header {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.store-cover-photo {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.store-cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
}

.store-cover-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0.3) 0%,
      rgba(0, 0, 0, 0.1) 40%,
      rgba(0, 0, 0, 0.5) 100%);
}

.store-header.has-cover .store-info {
  position: relative;
  z-index: var(--z-sidebar);
}

.store-header.has-cover::before,
.store-header.has-cover::after {
  display: none;
}

/* Store Logo - Premium Circular Style */
.store-logo {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  margin: 0 auto var(--space-4);
  display: block;
  background: white;
}

/* Store Verification Badge */
.store-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: color-mix(in oklch, var(--success-color) 90%, transparent);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-3);
  backdrop-filter: var(--overlay-blur);
}

.store-verified-badge i {
  font-size: var(--text-sm);
}

/* Store Stats Row */
.store-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.store-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  color: white;
}

.store-stat-value {
  font-size: var(--text-xl);
  font-weight: 800;
}

.store-stat-label {
  font-size: var(--text-xs);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0;
}


/* ============================================
   STORE HOURS DISPLAY
   ============================================ */
.store-hours-display {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
}

.store-hours-display i {
  font-size: var(--text-base);
}

.store-hours-display .hours-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.hours-status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

.hours-status-dot.open {
  background: var(--success-color);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.hours-status-dot.closed {
  background: var(--error-color);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* ============================================
   DELIVERY/PICKUP INFO
   ============================================ */
.delivery-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
  justify-content: center;
}

.delivery-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
  font-weight: 500;
}

.delivery-badge i {
  font-size: var(--text-base);
}

.delivery-badge.free-delivery {
  background: linear-gradient(135deg, var(--success-color), var(--success-dark));
}

/* ============================================
   SOCIAL PROOF INDICATORS
   ============================================ */
.social-proof {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: color-mix(in oklch, var(--bg-surface) 95%, transparent);
  backdrop-filter: var(--overlay-blur);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-color);
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: var(--z-above);
  animation: fadeInUp 0.3s ease-out;
}


.social-proof i {
  color: var(--primary-color);
}

.social-proof.viewing {
  color: var(--warning-dark);
}

.social-proof.viewing i {
  color: var(--warning-dark);
  animation: pulse 1.5s infinite;
}

.social-proof.sold {
  background: linear-gradient(135deg, var(--success-color), var(--success-dark));
  color: white;
}

.social-proof.sold i {
  color: white;
}

/* Store Address styling */
.store-address {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.store-address i {
  color: rgba(255, 255, 255, 0.7);
}

/* =========================================
   Full-page Error States
   ========================================= */
.error-state-fullpage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  text-align: center;
  padding: var(--space-8) var(--space-4);
  grid-column: 1 / -1;
}

.error-state-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.error-state-icon i {
  font-size: var(--text-4xl);
  color: var(--error-color, #ef4444);
}

.error-state-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-color, #1a1a2e);
  margin-bottom: var(--space-3);
}

.error-state-message {
  font-size: var(--text-lg);
  color: var(--text-secondary, #64748b);
  max-width: 440px;
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.error-state-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

.error-state-actions .error-btn {
  padding: var(--space-4) var(--space-7);
  font-size: var(--text-base);
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.error-state-actions .error-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.error-state-actions .btn-outline {
  background: transparent;
  border: 2px solid var(--border-color, #e2e8f0);
  color: var(--text-color, #1a1a2e);
}

.error-state-actions .btn-outline:hover {
  border-color: var(--primary-color, #ff3131);
  color: var(--primary-color, #ff3131);
}

.error-state-brand {
  margin-top: var(--space-10, 3rem);
  font-size: var(--text-sm);
  color: var(--text-secondary, #94a3b8);
  font-weight: 500;
  letter-spacing: 0;
}

@media (max-width: 480px) {
  .error-state-fullpage {
    min-height: 60vh;
    padding: var(--space-6) var(--space-3);
  }

  .error-state-icon {
    width: 72px;
    height: 72px;
  }

  .error-state-icon i {
    font-size: var(--text-3xl);
  }

  .error-state-title {
    font-size: var(--text-xl);
  }

  .error-state-actions {
    flex-direction: column;
    width: 100%;
  }

  .error-state-actions .error-btn,
  .error-state-actions .btn-outline {
    width: 100%;
    justify-content: center;
  }
}

[data-theme="dark"] .error-state-icon {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.08) 100%);
}

[data-theme="dark"] .error-state-actions .btn-outline {
  border-color: var(--border-color, #374151);
  color: var(--text-color, #e5e7eb);
}

[data-theme="dark"] .error-state-actions .btn-outline:hover {
  border-color: var(--primary-color, #ff3131);
  color: var(--primary-color, #ff3131);
}
