/* ============================================
   PENGOPI FC SHOP — Styles
   Online Affiliate Shop
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Design Tokens (shared) ---------- */
:root {
  --color-primary: #0A1628;
  --color-primary-light: #0F1F36;
  --color-secondary: #1A3A5C;
  --color-accent: #E4A11B;
  --color-accent-light: #F5C842;
  --color-accent-dark: #C4880F;
  --color-success: #22C55E;
  --color-danger: #EF4444;
  --color-white: #FFFFFF;
  --color-text-primary: #F1F5F9;
  --color-text-secondary: #94A3B8;
  --color-text-muted: #64748B;
  --color-surface: #111C2E;
  --color-surface-elevated: #162033;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-glass: rgba(10, 22, 40, 0.75);

  --gradient-gold: linear-gradient(135deg, #E4A11B, #F5C842, #E4A11B);
  --gradient-card: linear-gradient(145deg, rgba(26,58,92,0.3) 0%, rgba(10,22,40,0.6) 100%);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 50%;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.35);
  --shadow-gold: 0 4px 30px rgba(228,161,27,0.3);

  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-light); }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--color-white); }
::selection { background: var(--color-accent); color: var(--color-primary); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-primary); }
::-webkit-scrollbar-thumb { background: var(--color-secondary); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Shop Header ---------- */
.shop-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.shop-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.shop-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.shop-brand-text {
  display: flex;
  flex-direction: column;
}

.shop-brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--color-white);
  line-height: 1.1;
}

.shop-brand-sub {
  font-size: 0.7rem;
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Search Bar */
.shop-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.shop-search input {
  width: 100%;
  padding: 10px 16px 10px 44px;
  background: rgba(10,22,40,0.6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.shop-search input:focus {
  border-color: var(--color-accent);
}

.shop-search input::placeholder {
  color: var(--color-text-muted);
}

.shop-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.shop-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.shop-nav-link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.shop-nav-link:hover {
  color: var(--color-white);
  background: rgba(255,255,255,0.05);
}

.shop-nav-link.home-link {
  color: var(--color-accent);
}

.shop-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.shop-mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-white);
  margin: 5px 0;
  border-radius: 2px;
  transition: all var(--transition-base);
}

/* ---------- Shop Hero Banner ---------- */
.shop-hero {
  margin-top: 68px;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
  min-height: 320px;
  display: flex;
  align-items: center;
}

.shop-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.shop-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
}

.shop-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,22,40,0.9) 0%, rgba(26,58,92,0.6) 100%);
}

.shop-hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.shop-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 16px;
  background: rgba(228,161,27,0.15);
  border: 1px solid rgba(228,161,27,0.3);
  border-radius: var(--radius-2xl);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.shop-hero h1 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 0.75rem;
}

.shop-hero h1 .gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shop-hero p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* ---------- Category Tabs ---------- */
.shop-categories {
  padding: 2rem 0 1rem;
  position: sticky;
  top: 68px;
  background: var(--color-primary);
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
}

.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  padding: 10px 24px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.category-tab:hover {
  border-color: rgba(228,161,27,0.3);
  color: var(--color-white);
}

.category-tab.active {
  background: var(--gradient-gold);
  border-color: transparent;
  color: var(--color-primary);
}

/* ---------- Products Grid ---------- */
.shop-products {
  padding: 2rem 0 4rem;
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.products-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.products-count {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Product Card */
.product-card {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(228,161,27,0.3);
  box-shadow: 0 12px 40px rgba(228,161,27,0.12);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: rgba(10,22,40,0.5);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-badge {
  padding: 4px 12px;
  border-radius: var(--radius-2xl);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-badge.official {
  background: var(--gradient-gold);
  color: var(--color-primary);
}

.product-badge.new {
  background: var(--color-success);
  color: var(--color-white);
}

.product-badge.sale {
  background: var(--color-danger);
  color: var(--color-white);
}

.product-quick-view {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 8px 16px;
  background: var(--color-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition-base);
}

.product-card:hover .product-quick-view {
  opacity: 1;
  transform: translateY(0);
}

.product-quick-view:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}

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

.product-category-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.product-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-accent);
}

.product-price .original {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 0.5rem;
}

.product-store-icons {
  display: flex;
  gap: 0.25rem;
}

.store-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--color-white);
}

.store-icon.shopee { background: #EE4D2D; }
.store-icon.tokopedia { background: #42B549; }

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.product-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  text-decoration: none;
}

.product-btn.shopee-btn {
  background: #EE4D2D;
  color: white;
}

.product-btn.shopee-btn:hover {
  background: #d4391f;
  transform: translateY(-2px);
  color: white;
}

.product-btn.tokped-btn {
  background: #42B549;
  color: white;
}

.product-btn.tokped-btn:hover {
  background: #339c3a;
  transform: translateY(-2px);
  color: white;
}

/* ---------- Quick View Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  max-width: 700px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-image {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-details {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.modal-name {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.modal-desc {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.modal-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(228,161,27,0.3);
}

/* ---------- Affiliate Disclaimer ---------- */
.shop-disclaimer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.shop-disclaimer p {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Shop Footer ---------- */
.shop-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 1.5rem;
}

.shop-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.shop-footer-brand p {
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  max-width: 280px;
}

.shop-footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1rem;
}

.shop-footer-col a {
  display: block;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  padding: 4px 0;
}

.shop-footer-col a:hover {
  color: var(--color-accent);
}

.shop-footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* ---------- No Results ---------- */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  display: none;
}

.no-results.visible {
  display: block;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--color-text-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-search { display: none; }

  .shop-nav {
    display: none;
  }

  .shop-mobile-toggle {
    display: block;
  }

  .shop-nav.active {
    display: flex;
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
    z-index: 999;
  }

  .shop-hero h1 { font-size: 1.75rem; }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .modal-content {
    grid-template-columns: 1fr;
    max-height: 90vh;
  }

  .modal-image {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 300px;
  }

  .shop-footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-tabs {
    padding: 0 0 8px 0;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-actions {
    flex-direction: column;
  }

  .shop-hero {
    padding: 2.5rem 0;
    min-height: auto;
  }

  .shop-hero h1 { font-size: 1.5rem; }
}

/* ---------- Animation ---------- */
.product-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.4s; }
