/* ============================================================================ */
/* Vending Shops Styles - Redesigned for Better UX                              */
/* Clean, spacious, readable design                                            */
/* ============================================================================ */

/* ============================================================================ */
/* Main Container                                                               */
/* ============================================================================ */

.vending-shops-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  box-sizing: border-box;
}

/* ============================================================================ */
/* Header Section                                                               */
/* ============================================================================ */

.vending-shops-header {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem 3rem;
  margin-bottom: 2.5rem;
  backdrop-filter: blur(var(--frost-blur));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vending-shops-header h2 {
  font-size: 2.25rem;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.vending-shops-header h2 i {
  color: var(--accent);
  font-size: 2rem;
}

.vending-shops-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================================ */
/* Results Info                                                                 */
/* ============================================================================ */

.vending-shops-results-info {
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.vending-shops-results-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ============================================================================ */
/* Shops Grid                                                                   */
/* ============================================================================ */

.vending-shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 2.5rem;
}

/* ============================================================================ */
/* Vendor Shop Card                                                             */
/* ============================================================================ */

.vendor-shop-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 0;
  backdrop-filter: blur(var(--frost-blur));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.vendor-shop-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* ============================================================================ */
/* Shop Banner                                                                  */
/* ============================================================================ */

.vendor-shop-banner {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--botw-blue) 0%, var(--accent) 100%);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.vendor-shop-banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* ============================================================================ */
/* Shop Header                                                                  */
/* ============================================================================ */

.vendor-shop-header {
  padding: 2rem 2.5rem 1.5rem;
  background: var(--glass-bg);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.vendor-shop-header-left {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

.vendor-character-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--accent);
  object-fit: cover;
  background: var(--bg-secondary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  display: block;
}

.vendor-shop-header-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  min-width: 0;
  padding-top: 0.5rem;
}

.vendor-shop-header h3 {
  font-size: 1.75rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.3;
  word-break: break-word;
  letter-spacing: -0.01em;
}

.vendor-shop-header h3 i {
  color: var(--accent);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.vendor-shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.vendor-meta-item {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  white-space: nowrap;
  font-weight: 500;
  line-height: 1.4;
}

.vendor-meta-item i {
  color: var(--accent);
  font-size: 0.875rem;
  opacity: 0.9;
}

.vendor-shop-header .item-count {
  color: var(--text-primary);
  font-size: 0.95rem;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  display: inline-block;
  width: fit-content;
  font-weight: 600;
  border: none;
}

.vendor-shop-link {
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.shop-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}

.shop-link-button:hover {
  background: var(--botw-dark-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.shop-link-button i {
  font-size: 0.85rem;
}

/* ============================================================================ */
/* Vendor Items Grid                                                            */
/* ============================================================================ */

.vendor-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 2rem 2.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--glass-border);
}

/* ============================================================================ */
/* Vendor Item Card                                                             */
/* ============================================================================ */

.vendor-item-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vendor-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.vendor-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin: 0;
}

.vendor-item-header h4 {
  font-size: 1.125rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
  flex: 1;
  word-break: break-word;
  line-height: 1.4;
  min-width: 0;
  letter-spacing: -0.01em;
}

.vendor-item-header .item-slot {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 0.375rem 0.75rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vendor-item-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}

.vendor-item-details .item-stock {
  color: var(--text-secondary);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
}

.vendor-item-details .item-stock i {
  color: var(--accent);
  opacity: 0.8;
  font-size: 1rem;
  width: 18px;
  text-align: center;
}

.vendor-item-details .item-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
}

.vendor-item-details .price-item {
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.vendor-item-details .price-item i {
  color: var(--accent);
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
}

/* ============================================================================ */
/* Error State                                                                  */
/* ============================================================================ */

.error-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.error-state i {
  font-size: 3.5rem;
  color: var(--text-secondary);
  opacity: 0.5;
  margin-bottom: 1.5rem;
}

.error-state p {
  font-size: 1.25rem;
  margin: 0.75rem 0;
  line-height: 1.6;
}

.error-state-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.6;
}

.retry-button {
  margin-top: 1.5rem;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.retry-button:hover {
  background: var(--botw-dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================================ */
/* MOBILE RESPONSIVE DESIGN                                                     */
/* ============================================================================ */

@media (max-width: 1200px) {
  .vending-shops-grid {
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 2rem;
  }
}

@media (max-width: 1024px) {
  .vending-shops-container {
    padding: 2rem 1.5rem;
  }

  .vending-shops-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
  }

  .vendor-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 768px) {
  .vending-shops-container {
    padding: 1.5rem 1rem;
  }

  .vending-shops-header {
    padding: 2rem 2rem;
  }

  .vending-shops-header h2 {
    font-size: 1.75rem;
  }

  .vending-shops-header p {
    font-size: 1rem;
  }

  .vending-shops-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .vendor-shop-banner {
    height: 160px;
  }

  .vendor-character-icon {
    width: 64px;
    height: 64px;
    margin-top: -32px;
  }

  .vendor-shop-header {
    padding: 1.75rem 2rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .vendor-shop-header-left {
    width: 100%;
  }

  .vendor-shop-header h3 {
    font-size: 1.5rem;
  }

  .vendor-shop-link {
    width: 100%;
    margin-top: 0.75rem;
  }

  .shop-link-button {
    width: 100%;
    justify-content: center;
  }

  .vendor-items-grid {
    padding: 1.75rem 2rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .vending-shops-container {
    padding: 1.25rem 0.75rem;
  }

  .vending-shops-header {
    padding: 1.75rem 1.5rem;
  }

  .vending-shops-header h2 {
    font-size: 1.5rem;
  }

  .vendor-shop-banner {
    height: 140px;
  }

  .vendor-character-icon {
    width: 56px;
    height: 56px;
    margin-top: -28px;
  }

  .vendor-shop-header {
    padding: 1.5rem 1.5rem;
  }

  .vendor-shop-header h3 {
    font-size: 1.25rem;
  }

  .vendor-shop-meta {
    gap: 0.5rem;
  }

  .vendor-meta-item {
    font-size: 0.8125rem;
    padding: 0.4375rem 0.875rem;
  }

  .vendor-items-grid {
    padding: 1.5rem 1.5rem;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .vendor-item-card {
    padding: 1.25rem;
  }

  .vendor-item-header h4 {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .vending-shops-container {
    padding: 1rem 0.5rem;
  }

  .vending-shops-header {
    padding: 1.5rem 1.25rem;
  }

  .vending-shops-header h2 {
    font-size: 1.375rem;
  }

  .vendor-shop-banner {
    height: 120px;
  }

  .vendor-character-icon {
    width: 48px;
    height: 48px;
    margin-top: -24px;
  }

  .vendor-shop-header {
    padding: 1.25rem 1.25rem;
  }

  .vendor-shop-header-left {
    gap: 1rem;
  }

  .vendor-items-grid {
    padding: 1.25rem 1.25rem;
  }
}

/* ============================================================================ */
/* Touch-friendly interactions                                                  */
/* ============================================================================ */

@media (hover: none) and (pointer: coarse) {
  .vendor-shop-card,
  .vendor-item-card {
    min-height: 120px;
  }

  .vendor-shop-card:active,
  .vendor-item-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .retry-button:active {
    transform: scale(0.98);
  }

  .vendor-shop-card:hover,
  .vendor-item-card:hover {
    transform: none;
  }
}

/* ============================================================================ */
/* Landscape mobile optimizations                                               */
/* ============================================================================ */

@media (max-width: 768px) and (orientation: landscape) {
  .vending-shops-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
  }
}

/* ============================================================================ */
/* High DPI displays                                                            */
/* ============================================================================ */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .vendor-shop-card,
  .vendor-item-card {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ============================================================================ */
/* Reduced motion for accessibility                                             */
/* ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .vendor-shop-card,
  .vendor-item-card,
  .retry-button,
  .shop-link-button {
    transition: none;
  }

  .vendor-shop-card:hover,
  .vendor-item-card:hover,
  .vendor-shop-card:active,
  .vendor-item-card:active {
    transform: none;
  }
}

/* ============================================================================ */
/* Vending Notification Toast                                                    */
/* ============================================================================ */

.vending-notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--glass-bg);
  border: 2px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(var(--frost-blur));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  min-width: 320px;
  max-width: 480px;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.vending-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.vending-notification.success {
  border-color: rgba(16, 185, 129, 0.6);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.vending-notification.error {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.vending-notification-icon {
  font-size: 1.75rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.vending-notification.success .vending-notification-icon {
  color: #10b981;
}

.vending-notification.error .vending-notification-icon {
  color: #ef4444;
}

.vending-notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vending-notification-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.vending-notification-message {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.vending-notification-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.vending-notification-close:hover {
  opacity: 1;
  color: var(--text-primary);
  transform: rotate(90deg);
}

@media (max-width: 768px) {
  .vending-notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    min-width: auto;
    max-width: none;
    transform: translateY(-100px);
  }

  .vending-notification.show {
    transform: translateY(0);
  }
}
