/* ============================================================================
   STORE - Modern E-Commerce Design
   ============================================================================ */

:root {
  --store-bg: #0a0a0a;
  --store-surface: #121212;
  --store-elevated: #1a1a1a;
  --store-text: #e5e5e5;
  --store-text-muted: #a0a0a0;
  --store-accent: #ff7f00;
  --store-accent-hover: #ff9933;
  --store-border: rgba(255, 255, 255, 0.08);
  --store-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --store-radius: 12px;
}

.store-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px 100px;
  background: var(--store-bg);
  min-height: 100vh;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */
.store-hero {
  text-align: center;
  padding: 80px 40px;
  background: linear-gradient(135deg, rgba(255, 127, 0, 0.08) 0%, rgba(255, 127, 0, 0.02) 100%);
  border: 1px solid var(--store-border);
  border-radius: 24px;
  margin-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.store-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 127, 0, 0.1) 0%, transparent 70%);
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

.store-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--store-text);
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #ffffff 0%, #e5e5e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.store-hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--store-text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-actions .btn {
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-actions .btn.primary {
  background: var(--store-accent);
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(255, 127, 0, 0.3);
}

.hero-actions .btn.primary:hover {
  background: var(--store-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 127, 0, 0.4);
}

.hero-actions .btn.ghost {
  background: transparent;
  color: var(--store-text);
  border: 1px solid var(--store-border);
}

.hero-actions .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--store-accent);
  color: var(--store-accent);
}

/* ============================================================================
   FILTERS BAR
   ============================================================================ */
.filters-bar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 60px;
  background: var(--store-surface);
  padding: 24px;
  border-radius: var(--store-radius);
  border: 1px solid var(--store-border);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--store-border);
  background: var(--store-elevated);
  color: var(--store-text);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.chip:hover {
  background: rgba(255, 127, 0, 0.1);
  border-color: var(--store-accent);
  color: var(--store-accent);
}

.chip.active {
  background: var(--store-accent);
  color: #fff;
  border-color: var(--store-accent);
  box-shadow: 0 2px 8px rgba(255, 127, 0, 0.3);
}

.filters-bar .search {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.filters-bar .search input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--store-radius);
  border: 1px solid var(--store-border);
  background: var(--store-elevated);
  color: var(--store-text);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.filters-bar .search input:focus {
  outline: none;
  border-color: var(--store-accent);
  box-shadow: 0 0 0 3px rgba(255, 127, 0, 0.1);
}

.filters-bar .search input::placeholder {
  color: var(--store-text-muted);
}

.filters-bar .search button {
  padding: 14px 28px;
  background: var(--store-accent);
  color: #fff;
  border: none;
  border-radius: var(--store-radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filters-bar .search button:hover {
  background: var(--store-accent-hover);
  transform: translateY(-1px);
}

/* ============================================================================
   CATEGORY SECTIONS
   ============================================================================ */
.store-section {
  margin-top: 40px;
}

.category-block {
  margin-bottom: 80px;
  scroll-margin-top: 100px;
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--store-text);
  margin: 0 0 32px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--store-border);
  position: relative;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--store-accent);
}

.store-list {
  display: grid;
  gap: 20px;
}

/* ============================================================================
   PRODUCT CARDS
   ============================================================================ */
.product-row {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  padding: 24px;
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.product-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--store-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-row:hover {
  border-color: rgba(255, 127, 0, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.product-row:hover::before {
  opacity: 1;
}

.row-main {
  display: flex;
  gap: 24px;
  align-items: center;
}

.row-thumb {
  flex-shrink: 0;
}

.row-thumb img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--store-elevated);
  padding: 8px;
  transition: transform 0.3s ease;
}

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

.row-info {
  flex: 1;
  min-width: 0;
}

.row-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--store-text);
  margin: 0 0 8px;
}

.row-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--store-accent);
  margin: 8px 0;
}

.badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 6px;
  background: rgba(255, 127, 0, 0.15);
  color: var(--store-accent);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.row-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.row-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.row-actions .btn.small {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.row-actions .btn.primary {
  background: var(--store-accent);
  color: #fff;
}

.row-actions .btn.primary:hover {
  background: var(--store-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 127, 0, 0.3);
}

.row-actions .btn.secondary {
  background: var(--store-elevated);
  color: var(--store-text);
  border: 1px solid var(--store-border);
}

.row-actions .btn.secondary:hover {
  background: var(--store-surface);
  border-color: var(--store-accent);
  color: var(--store-accent);
}

.row-details {
  grid-column: 1 / -1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--store-border);
  color: var(--store-text-muted);
  line-height: 1.6;
}

.row-desc {
  margin: 0;
  font-size: 0.95rem;
}

/* ============================================================================
   MODALS
   ============================================================================ */
.product-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.product-modal.hidden {
  display: none;
}

.modal-content {
  background: var(--store-surface);
  border: 1px solid var(--store-border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}

.modal-content.wide {
  max-width: 1000px;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--store-text);
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 40px 32px 32px;
}

.modal-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 12px;
  margin: 0 auto 24px;
  display: block;
  background: var(--store-elevated);
}

.modal-body h3 {
  font-size: 2rem;
  color: var(--store-text);
  margin: 0 0 16px;
}

.modal-body p {
  color: var(--store-text-muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.modal-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--store-accent);
  margin: 24px 0;
}

#modal-add-cart {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  background: var(--store-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#modal-add-cart:hover {
  background: var(--store-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.4);
}

/* ============================================================================
   PC CONFIGURATOR
   ============================================================================ */
.pc-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--store-text);
  margin: 24px 0;
  padding: 20px;
  background: var(--store-elevated);
  border-radius: 12px;
  text-align: center;
}

.pc-total span {
  color: var(--store-accent);
}

#pcAddCart {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
  background: var(--store-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

#pcAddCart:hover {
  background: var(--store-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 127, 0, 0.4);
}

/* ============================================================================
   EMPTY STATE
   ============================================================================ */
#storeEmpty {
  text-align: center;
  padding: 80px 20px;
  color: var(--store-text-muted);
  font-size: 1.1rem;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
  .store-page {
    padding: 20px 16px 80px;
  }

  .store-hero {
    padding: 40px 24px;
    margin-bottom: 40px;
  }

  .store-hero h1 {
    font-size: 2rem;
  }

  .product-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }

  .row-main {
    flex-direction: column;
    text-align: center;
  }

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

  .row-actions .btn {
    width: 100%;
  }

  .filters-bar {
    padding: 16px;
  }

  .chip-row {
    gap: 8px;
  }

  .chip {
    font-size: 0.85rem;
    padding: 8px 16px;
  }

  .category-title {
    font-size: 1.5rem;
  }

  .modal-body {
    padding: 32px 24px 24px;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .filters-bar .search {
    flex-direction: column;
  }

  .filters-bar .search button {
    width: 100%;
  }
}
