@import url('./common.css');

/* Grandzero Shop - Modern Minimalist Storefront Theme */

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 72px;
  display: flex;
  align-items: center;
}

.nav-container {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  flex-shrink: 0;
}

.brand-text span {
  background: linear-gradient(135deg, #818cf8 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.4rem;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #06b6d4);
  border-radius: 2px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* User Wallet Pill in Navbar */
.wallet-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
}

.wallet-balance {
  font-weight: 700;
  color: #34d399;
}

.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #172033;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.user-btn:hover {
  border-color: var(--primary);
}

.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 220px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  padding: 0.5rem;
  display: none;
  flex-direction: column;
  z-index: 100;
}

.user-menu.active {
  display: flex;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.user-menu-item:hover {
  background: #1e293b;
  color: #ffffff;
}

/* Announcement Marquee Ticker */
.ticker-bar {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.6rem 0;
  font-size: 0.9rem;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-content {
  display: inline-block;
  padding-left: 100%;
  animation: ticker 30s linear infinite;
  color: #cbd5e1;
}

.ticker-content:hover {
  animation-play-state: paused;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem 1.5rem;
}

/* Hero Section */
.hero-slider {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  min-height: 340px;
  background: #111827;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.slider-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 3rem 4rem;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.slider-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 13, 20, 0.95) 0%, rgba(10, 13, 20, 0.75) 50%, rgba(10, 13, 20, 0.3) 100%);
}

.slider-item.active {
  opacity: 1;
  position: relative;
}

.slider-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.slider-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.slider-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff;
}

.slider-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

/* Stat bar */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
}

.stat-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.stat-icon.purple { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.stat-icon.cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.stat-icon.amber { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Category Filter & Search Bar */
.catalog-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #172033;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.category-chip:hover, .category-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.search-box {
  position: relative;
  min-width: 280px;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  background: #172033;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.65rem 1.25rem 0.65rem 2.5rem;
  color: #ffffff;
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.6);
}

.product-thumb-wrap {
  position: relative;
  width: 100%;
  padding-top: 60%;
  overflow: hidden;
  background: #151d2e;
}

.product-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-thumb {
  transform: scale(1.05);
}

.product-badge-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
}

.product-platform-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.product-price-box {
  display: flex;
  flex-direction: column;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
}

.product-original-price {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-decoration: line-through;
}

.product-stock {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.product-stock.in-stock { color: #34d399; }
.product-stock.out-of-stock { color: #fb7185; }

/* Cinema Section (เว็บหนัง) */
.cinema-banner {
  background: linear-gradient(135deg, rgba(23, 32, 51, 0.9) 0%, rgba(10, 13, 20, 0.95) 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.cinema-player-modal .modal-content {
  max-width: 860px;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #000;
}

.video-container iframe, .video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
.footer {
  background: #07090e;
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 1.5rem 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  max-width: 320px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Responsive Navigation & Breakpoints */
@media (max-width: 1280px) {
  .nav-links {
    gap: 0.65rem;
  }
  .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.25rem;
  }
}

@media (max-width: 1120px) {
  .nav-links {
    gap: 0.45rem;
  }
  .nav-link {
    font-size: 0.82rem;
    padding: 0.35rem 0.2rem;
    gap: 0.25rem;
  }
  .brand-logo {
    font-size: 1.15rem;
  }
}

@media (max-width: 960px) {
  .navbar {
    height: auto;
    padding: 0.6rem 0;
  }
  .nav-container {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding: 0.25rem 0 0.4rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.75rem;
  }
  .nav-links::-webkit-scrollbar {
    display: none;
  }
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .slider-item { padding: 2rem; }
  .slider-title { font-size: 1.8rem; }
}
