/*
Theme Name: GAMERIC - Modern Gaming Store
Theme URI: https://gameric.pk
Author: GAMERIC Team
Author URI: https://gameric.pk
Description: Premium futuristic gaming accessories & tech e-commerce theme for WooCommerce in Pakistan. Features an almost-black obsidian UI (#050509), cyan/blue and electric green glows, native WooCommerce templates, and mobile app bottom navigation.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: gameric
Tags: e-commerce, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, theme-options
*/

/* Core Theme Variables */
:root {
  --bg-main: #050509;
  --bg-surface: #08080d;
  --bg-card: #0c0d16;
  --bg-elevated: #111222;
  --cyan-glow: #00f0ff;
  --cyan-muted: #0ea5e9;
  --green-neon: #00ff66;
  --green-emerald: #10b981;
  --purple-accent: #a855f7;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-cyan: rgba(0, 240, 255, 0.35);
  --border-green: rgba(0, 255, 102, 0.35);
}

/* Base Body Styles */
body {
  background-color: var(--bg-main) !important;
  color: #e2e8f0;
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-glow);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6, .font-tech {
  font-family: 'Orbitron', 'Outfit', sans-serif;
  letter-spacing: 0.04em;
}

/* Glassmorphic card */
.glass-card {
  background: rgba(12, 13, 22, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.12);
}

/* Glowing Buttons */
.btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  color: #050509 !important;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
  transform: translateY(-2px);
  color: #050509 !important;
}

.btn-secondary {
  background: rgba(13, 14, 24, 0.85);
  color: #00f0ff !important;
  border: 1px solid rgba(0, 240, 255, 0.35);
  font-weight: 600;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
  cursor: pointer;
}
.btn-secondary:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: #00f0ff;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.25);
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, #00ff66 0%, #059669 100%);
  color: #050509 !important;
  font-weight: 700;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.75rem;
  border-radius: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none !important;
  border: none;
  cursor: pointer;
}
.btn-accent:hover {
  box-shadow: 0 0 30px rgba(0, 255, 102, 0.6);
  transform: translateY(-2px);
}

/* Tech grid pattern */
.bg-tech-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

/* WooCommerce Overrides for Clean Dark Aesthetics */
.woocommerce-Price-amount {
  color: #00f0ff !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700 !important;
}
.woocommerce del .woocommerce-Price-amount {
  color: #64748b !important;
  font-weight: 400 !important;
  font-size: 0.85em;
}
.woocommerce ins {
  text-decoration: none;
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
  color: #00f0ff !important;
}
.woocommerce span.onsale {
  background-color: #00ff66 !important;
  color: #000000 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 800 !important;
  font-size: 0.75rem !important;
  border-radius: 4px !important;
  padding: 2px 8px !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: normal !important;
}

/* ===================================================
   CRITICAL WOOCOMMERCE PRODUCT IMAGE & GALLERY FIXES
   =================================================== */

/* 1. Prevent WooCommerce Gallery Opacity 0 bug */
.woocommerce-product-gallery,
.woocommerce div.product div.images,
.woocommerce div.product div.images .woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.woocommerce div.product div.images img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  border-radius: 0.75rem !important;
  background-color: #0c0d16 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* 2. Shop & Catalog Loop Products */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 1rem !important;
  padding: 0 !important;
  margin: 1.5rem 0 !important;
  list-style: none !important;
}
@media (min-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
  }
}
@media (min-width: 1024px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
  }
}

.woocommerce ul.products li.product {
  background: #0c0d16 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.75rem !important;
  padding: 1rem !important;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  transition: all 0.3s ease !important;
  overflow: hidden !important;
}
.woocommerce ul.products li.product:hover {
  border-color: rgba(0, 240, 255, 0.4) !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2) !important;
}

/* 3. Product Loop Images Guarantee */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  display: block !important;
  width: 100% !important;
  text-decoration: none !important;
}
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  border-radius: 0.5rem !important;
  margin: 0 0 0.75rem 0 !important;
  background-color: #141525 !important;
  opacity: 1 !important;
  visibility: visible !important;
}
@media (max-width: 640px) {
  .woocommerce ul.products li.product a img,
  .woocommerce ul.products li.product img {
    height: 140px !important;
  }
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #f1f5f9 !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  margin: 0.5rem 0 !important;
  line-height: 1.35 !important;
}

.woocommerce ul.products li.product .price {
  color: #00f0ff !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700 !important;
  margin: 0.5rem 0 1rem 0 !important;
}

.woocommerce ul.products li.product .button {
  background: rgba(0, 240, 255, 0.1) !important;
  color: #00f0ff !important;
  border: 1px solid rgba(0, 240, 255, 0.3) !important;
  border-radius: 0.5rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  font-family: 'Orbitron', sans-serif !important;
  padding: 0.6rem 1rem !important;
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  transition: all 0.2s ease !important;
}
.woocommerce ul.products li.product .button:hover {
  background: #00f0ff !important;
  color: #050509 !important;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4) !important;
}

/* 4. Single Product Page Dark Theme Layout */
.woocommerce div.product {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 2.5rem !important;
  margin-top: 1rem !important;
}
@media (min-width: 1024px) {
  .woocommerce div.product {
    grid-template-columns: 1.1fr 0.9fr !important;
  }
}

/* Force Product Gallery & Main Image Visibility */
.woocommerce div.product div.images,
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  position: relative !important;
  width: 100% !important;
}
.woocommerce div.product div.images img,
.woocommerce-product-gallery img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: 0.75rem !important;
  background-color: #0c0d16 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.woocommerce div.product div.summary {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
}
.woocommerce div.product .product_title {
  color: #ffffff !important;
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  margin-bottom: 0.75rem !important;
}
.woocommerce div.product p.price {
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: #00f0ff !important;
  font-family: 'Orbitron', sans-serif !important;
  margin-bottom: 1.5rem !important;
}
.woocommerce div.product form.cart {
  margin: 1.5rem 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
}
.woocommerce div.product form.cart .quantity input.qty {
  background: #090a12 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 0.5rem !important;
  padding: 0.5rem !important;
  font-weight: 700 !important;
}
.woocommerce div.product form.cart .single_add_to_cart_button {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%) !important;
  color: #050509 !important;
  font-family: 'Orbitron', sans-serif !important;
  font-weight: 700 !important;
  padding: 0.75rem 2rem !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.35) !important;
  border: none !important;
}
.woocommerce-tabs ul.tabs {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 0 !important;
}
.woocommerce-tabs ul.tabs li {
  background: #0c0d16 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  margin-right: 0.5rem !important;
}
.woocommerce-tabs ul.tabs li.active {
  background: #00f0ff !important;
}
.woocommerce-tabs ul.tabs li.active a {
  color: #050509 !important;
  font-weight: 700 !important;
}
.woocommerce-tabs .panel {
  background: #090a12 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0 0 0.75rem 0.75rem !important;
  padding: 1.5rem !important;
  color: #cbd5e1 !important;
}
