/*
 Theme Name:   Selles TCG Shop
 Theme URI:    https://bestcollect.pl
 Description:  Custom TCG shop theme for Best Collect
 Author:       Best Collect
 Author URI:   https://bestcollect.pl
 Template:     astra
 Version:      1.0.1
 Text Domain:  selles-tcg
*/

/* ============================================
   CUSTOM FONTS
   ============================================ */

@font-face {
    font-family: 'PocketMonk';
    src: url('PocketMonk-15ze.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PokemonGB';
    src: url('PokemonGb-RAeo.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AnimeAce';
    src: url('AnimeAce-neP.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'AnimeAce';
    src: url('AnimeAceBold-1Jg.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   GLOBAL PAGE LAYOUT - Fix margins for ALL pages
   ============================================ */

/* Main containers - consistent width and centering */
#primary,
.site-main,
article {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* Page header container */
.entry-header {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* Page title */
.entry-title {
    text-align: left;
    margin: 40px 0 30px 0;
}

/* Content area - inherit padding from parent */
.entry-content {
    max-width: none !important;
    padding: 0 !important;
}

/* WooCommerce non-shop pages: fix nested padding stacking.
   Global rules add 40px to #primary, .site-main, article, .entry-header.
   On WC account/cart/checkout, remove inner padding so only #primary provides it. */
.woocommerce-account .site-main,
.woocommerce-cart .site-main,
.woocommerce-checkout .site-main,
.woocommerce-account article,
.woocommerce-cart article,
.woocommerce-checkout article,
.woocommerce-account .entry-header,
.woocommerce-cart .entry-header,
.woocommerce-checkout .entry-header {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #primary,
    .site-main,
    article,
    .entry-header {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .woocommerce-account .site-main,
    .woocommerce-cart .site-main,
    .woocommerce-checkout .site-main,
    .woocommerce-account article,
    .woocommerce-cart article,
    .woocommerce-checkout article,
    .woocommerce-account .entry-header,
    .woocommerce-cart .entry-header,
    .woocommerce-checkout .entry-header {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

/* ============================================
   TCG SHOP - Custom Styles
   Tematyczne style dla sklepu z kartami
   ============================================ */

:root {
  /* Kolory główne - ciemny motyw "kolekcjonerski" */
  --tcg-primary: #1a1a2e;      /* Głęboki granat */
  --tcg-secondary: #16213e;    /* Ciemny niebieski */
  --tcg-accent: #e94560;       /* Czerwony akcent */
  --tcg-gold: #ffd700;         /* Złoty - dla HOT/premium */
  --tcg-silver: #c0c0c0;       /* Srebrny */

  /* Kolory tekstu */
  --tcg-text-light: #ffffff;
  --tcg-text-muted: #a0a0a0;
  --tcg-text-dark: #1a1a2e;

  /* Gradienty */
  --tcg-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --tcg-gradient-accent: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  --tcg-gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);

  /* Shadows */
  --tcg-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --tcg-shadow-card: 0 8px 30px rgba(0, 0, 0, 0.4);

  /* Border radius */
  --tcg-radius: 8px;
  --tcg-radius-lg: 16px;
}

/* ============================================
   TYPOGRAPHY - Czcionki tematyczne
   ============================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--tcg-primary);
  color: var(--tcg-text-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Rajdhani", "Bebas Neue", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   HEADER
   ============================================ */

.ast-primary-header-bar {
  background: var(--tcg-gradient-dark) !important;
  border-bottom: 2px solid var(--tcg-accent);
}

.ast-header-search .search-field {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--tcg-radius);
  color: var(--tcg-text-light);
}

.ast-header-search .search-field:focus {
  border-color: var(--tcg-accent);
  box-shadow: 0 0 10px rgba(233, 69, 96, 0.3);
}

/* Menu gier */
.main-navigation .menu-item > a {
  color: var(--tcg-text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.main-navigation .menu-item > a:hover {
  color: var(--tcg-accent);
}

/* Submenu */
.main-navigation .sub-menu {
  background: var(--tcg-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--tcg-radius);
  box-shadow: var(--tcg-shadow);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.woocommerce ul.products li.product {
  background: var(--tcg-secondary);
  border-radius: var(--tcg-radius-lg);
  padding: 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.05);
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-5px);
  box-shadow: var(--tcg-shadow-card);
  border-color: var(--tcg-accent);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--tcg-text-light);
  font-size: 14px;
  font-weight: 600;
}

.woocommerce ul.products li.product .price {
  color: var(--tcg-gold) !important;
  font-weight: 700;
  font-size: 18px;
}

/* Product image wrapper */
.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  border-radius: var(--tcg-radius);
  transition: transform 0.3s ease;
}

.woocommerce ul.products li.product:hover img {
  transform: scale(1.05);
}

/* Add to cart button */
.woocommerce ul.products li.product .button {
  background: var(--tcg-gradient-accent);
  border: none;
  border-radius: var(--tcg-radius);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.woocommerce ul.products li.product .button:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
}

/* ============================================
   BADGES - HOT, NEW, PRESALE
   ============================================ */

.tcg-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
}

.tcg-badge-hot {
  background: var(--tcg-gradient-gold);
  color: var(--tcg-text-dark);
}

.tcg-badge-new {
  background: var(--tcg-gradient-accent);
  color: white;
}

.tcg-badge-presale {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: white;
}

/* ============================================
   SECTIONS
   ============================================ */

.tcg-section {
  padding: 60px 0;
}

.tcg-section-title {
  font-size: 32px;
  margin-bottom: 30px;
  position: relative;
  display: inline-block;
}

.tcg-section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--tcg-gradient-accent);
  border-radius: 2px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--tcg-primary);
  border-top: 2px solid var(--tcg-accent);
  padding: 40px 0;
}

.footer-widget-area {
  color: var(--tcg-text-muted);
}

.footer-widget-area a {
  color: var(--tcg-text-light);
  transition: color 0.3s ease;
}

.footer-widget-area a:hover {
  color: var(--tcg-accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .tcg-section-title {
    font-size: 24px;
  }

  .woocommerce ul.products li.product {
    padding: 10px;
  }
}

/* ============================================
   TCG PRODUCT GRID (Custom Shortcodes)
   ============================================ */

.tcg-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.tcg-product-card {
  background: var(--tcg-secondary);
  border-radius: var(--tcg-radius-lg);
  padding: 15px;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}

.tcg-product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--tcg-shadow-card);
  border-color: var(--tcg-accent);
}

.tcg-product-card a {
  text-decoration: none;
  color: inherit;
}

.tcg-product-image {
  position: relative;
  border-radius: var(--tcg-radius);
  overflow: hidden;
  margin-bottom: 12px;
  aspect-ratio: 3/4;
  background: rgba(0,0,0,0.2);
}

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

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

.tcg-product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tcg-text-light);
  margin: 0 0 8px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.tcg-product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--tcg-gold);
  margin-bottom: 12px;
}

.tcg-product-price del {
  color: var(--tcg-text-muted);
  font-size: 14px;
}

.tcg-add-to-cart {
  width: 100%;
  background: var(--tcg-gradient-accent);
  border: none;
  border-radius: var(--tcg-radius);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 12px;
}

.tcg-add-to-cart:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 20px rgba(233, 69, 96, 0.5);
}

/* ============================================
   HOMEPAGE SECTIONS
   ============================================ */

.tcg-hero {
  background: var(--tcg-gradient-dark);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tcg-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width=60 height=60 viewBox=0 0 60 60 xmlns=http://www.w3.org/2000/svg%3E%3Cg fill=none fill-rule=evenodd%3E%3Cg fill=%23ffffff fill-opacity=0.02%3E%3Cpath d=M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.tcg-hero-content {
  position: relative;
  z-index: 1;
}

.tcg-hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
  background: var(--tcg-gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tcg-hero p {
  font-size: 18px;
  color: var(--tcg-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Section Headers */
.tcg-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tcg-section-header h2 {
  font-size: 28px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tcg-section-header h2::before {
  content: "";
  width: 4px;
  height: 28px;
  background: var(--tcg-gradient-accent);
  border-radius: 2px;
}

.tcg-view-all {
  color: var(--tcg-accent);
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.tcg-view-all:hover {
  color: var(--tcg-gold);
}

/* Presale Section - special styling */
.tcg-section-presale {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(162, 155, 254, 0.1));
  border-radius: var(--tcg-radius-lg);
  padding: 30px;
  margin: 30px 0;
}

.tcg-section-presale .tcg-section-header h2::before {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

/* Hot Section - gold accent */
.tcg-section-hot .tcg-section-header h2::before {
  background: var(--tcg-gradient-gold);
}

/* ============================================
   GAME CATEGORY ICONS/BADGES
   ============================================ */

.tcg-game-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.tcg-game-pokemon { background: #ffcb05; color: #1d2c5e; }
.tcg-game-mtg { background: #8b4513; color: white; }
.tcg-game-yugioh { background: #4a0080; color: white; }
.tcg-game-onepiece { background: #e74c3c; color: white; }
.tcg-game-lorcana { background: #1e90ff; color: white; }

/* ============================================
   COUNTDOWN TIMER (for timed deals)
   ============================================ */

.tcg-countdown {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.tcg-countdown-item {
  background: var(--tcg-secondary);
  border-radius: var(--tcg-radius);
  padding: 15px 20px;
  text-align: center;
  min-width: 70px;
}

.tcg-countdown-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--tcg-gold);
  line-height: 1;
}

.tcg-countdown-label {
  font-size: 11px;
  color: var(--tcg-text-muted);
  text-transform: uppercase;
  margin-top: 5px;
}

/* ============================================
   CAROUSEL/SLIDER
   ============================================ */

.tcg-carousel {
  position: relative;
  overflow: hidden;
}

.tcg-carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease;
}

.tcg-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--tcg-accent);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.tcg-carousel-nav:hover {
  background: var(--tcg-gold);
  color: var(--tcg-text-dark);
}

.tcg-carousel-prev { left: 10px; }
.tcg-carousel-next { right: 10px; }

/* ============================================
   NO PRODUCTS MESSAGE
   ============================================ */

.tcg-no-products {
  text-align: center;
  padding: 40px;
  color: var(--tcg-text-muted);
  background: var(--tcg-secondary);
  border-radius: var(--tcg-radius-lg);
}

/* ============================================
   HOMEPAGE ADDITIONAL STYLES
   ============================================ */

/* Hero improvements */
.tcg-hero-subtitle {
  font-size: 20px;
  color: var(--tcg-text-light);
  margin-bottom: 10px;
}

.tcg-hero-games {
  font-size: 14px;
  color: var(--tcg-text-muted);
  margin-bottom: 30px;
}

.tcg-hero-btn {
  display: inline-block;
  background: var(--tcg-gradient-accent);
  color: white;
  padding: 15px 40px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.tcg-hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4);
  color: white;
}

/* Section styling */
.tcg-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
}

.tcg-section-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.tcg-section-header p {
  color: var(--tcg-text-muted);
  margin: 0;
  font-size: 14px;
}

.tcg-section-footer {
  text-align: center;
  margin-top: 30px;
}

.tcg-btn-outline {
  display: inline-block;
  border: 2px solid var(--tcg-accent);
  color: var(--tcg-accent);
  padding: 12px 30px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
  transition: all 0.3s ease;
}

.tcg-btn-outline:hover {
  background: var(--tcg-accent);
  color: white;
}

/* Badge inline */
.tcg-badge-inline {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  vertical-align: middle;
}

.tcg-badge-inline.tcg-badge-presale {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: white;
}

.tcg-badge-inline.tcg-badge-hot {
  background: var(--tcg-gradient-gold);
  color: var(--tcg-text-dark);
}

.tcg-badge-inline.tcg-badge-new {
  background: var(--tcg-gradient-accent);
  color: white;
}

/* Games Grid */
.tcg-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.tcg-game-card {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  border-radius: var(--tcg-radius-lg);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.tcg-game-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--tcg-shadow-card);
}

.tcg-game-name {
  font-family: "Rajdhani", sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
}

/* Game specific colors */
.tcg-game-card.tcg-game-pokemon {
  background: linear-gradient(135deg, #ffcb05, #ffdf6c);
  border-color: #ffcb05;
}
.tcg-game-card.tcg-game-pokemon .tcg-game-name {
  color: #1d2c5e;
  text-shadow: none;
}

.tcg-game-card.tcg-game-mtg {
  background: linear-gradient(135deg, #8b4513, #a0522d);
  border-color: #8b4513;
}

.tcg-game-card.tcg-game-yugioh {
  background: linear-gradient(135deg, #4a0080, #7b1fa2);
  border-color: #4a0080;
}

.tcg-game-card.tcg-game-onepiece {
  background: linear-gradient(135deg, #e74c3c, #ff6b6b);
  border-color: #e74c3c;
}

.tcg-game-card.tcg-game-lorcana {
  background: linear-gradient(135deg, #1e90ff, #60a5fa);
  border-color: #1e90ff;
}

.tcg-game-card.tcg-game-more {
  background: var(--tcg-secondary);
  border-color: rgba(255,255,255,0.2);
}
.tcg-game-card.tcg-game-more:hover {
  border-color: var(--tcg-accent);
}

/* Features Grid */
.tcg-section-features {
  background: var(--tcg-secondary);
  border-radius: var(--tcg-radius-lg);
  margin: 40px auto;
  max-width: 1200px;
}

.tcg-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.tcg-feature {
  text-align: center;
  padding: 20px;
}

.tcg-feature-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 15px;
}

.tcg-feature h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--tcg-text-light);
}

.tcg-feature p {
  font-size: 13px;
  color: var(--tcg-text-muted);
  margin: 0;
}

/* Page template - full width for homepage */
.page-template-default .ast-container,
.page-id-52 .ast-container {
  max-width: 100%;
  padding: 0;
}

.page-id-52 #content > .ast-container {
  padding-left: 0;
  padding-right: 0;
}

.page-id-52 article.page {
  padding: 0;
  margin: 0;
}

.page-id-52 .entry-content {
  margin: 0;
}

/* Remove default page header on homepage */
.page-id-52 .ast-archive-description,
.page-id-52 .entry-header {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .tcg-hero h1 {
    font-size: 32px;
  }

  .tcg-hero-subtitle {
    font-size: 16px;
  }

  .tcg-section-header h2 {
    font-size: 22px;
  }

  .tcg-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tcg-game-card {
    height: 80px;
  }

  .tcg-game-name {
    font-size: 14px;
  }

  .tcg-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .tcg-feature {
    padding: 15px 10px;
  }
}

@media (max-width: 480px) {
  .tcg-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tcg-product-card {
    padding: 10px;
  }

  .tcg-product-title {
    font-size: 12px;
    min-height: 30px;
  }

  .tcg-product-price {
    font-size: 16px;
  }
}
