/* =========================================================
   Rulers TCG - Pro theme polish
   Colocar completo en:
   /themes/theme_optima/assets/css/rulers2.css
   ========================================================= */

:root {
  --rtcg-ink: #0d1118;
  --rtcg-ink-2: #141a24;
  --rtcg-card: #ffffff;
  --rtcg-soft: #f6f8fc;
  --rtcg-text: #111827;
  --rtcg-muted: #6b7280;
  --rtcg-line: #e3e8f0;
  --rtcg-cyan: #26d7ff;
  --rtcg-pink: #ff4fa3;
  --rtcg-gold: #ffd166;
  --rtcg-green: #0f766e;
}

body::before {
  content: none !important;
  display: none !important;
}

html,
body {
  background:
    radial-gradient(circle at 8% 16%, rgba(38, 215, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(255, 79, 163, 0.16), transparent 34rem),
    linear-gradient(180deg, #f9fbff 0%, #ffffff 44%, #f5f7fb 100%) !important;
  color: var(--rtcg-text) !important;
  letter-spacing: 0 !important;
}

/* Header superior */
#header,
#header .header-top,
#header .header-nav,
#header .nav,
.header-top,
.header-nav,
.nav,
.top-nav,
.popup-over,
.leo-megamenu,
.leo-top-menu,
.ApMegamenu {
  background: var(--rtcg-ink) !important;
  border: 0 !important;
  color: #ffffff !important;
}

#header {
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.28) !important;
}

#header::after {
  content: "";
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--rtcg-cyan), var(--rtcg-pink), var(--rtcg-gold)) !important;
}

#header a,
#header span,
.header-top a,
.header-nav a,
.top-nav a,
.leo-megamenu a,
.leo-top-menu a,
.ApMegamenu a {
  color: #ffffff !important;
  font-weight: 800 !important;
}

#header a:hover,
.header-top a:hover,
.header-nav a:hover,
.top-nav a:hover,
.leo-megamenu a:hover,
.leo-top-menu a:hover,
.ApMegamenu a:hover {
  color: var(--rtcg-cyan) !important;
}

/* Hero/banner actual: lo vuelve premium sin romper la imagen existente */
.header-container,
.header-bottom,
.ApSlideShow,
.slideshow,
.bannercontainer,
.iviewSlider,
.homeslider-container {
  background-color: var(--rtcg-ink) !important;
  position: relative !important;
}

.header-container::after,
.header-bottom::after,
.ApSlideShow::after,
.slideshow::after,
.bannercontainer::after,
.iviewSlider::after,
.homeslider-container::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(13, 17, 24, 0.76), rgba(13, 17, 24, 0.18) 48%, rgba(13, 17, 24, 0.72)),
    radial-gradient(circle at 20% 18%, rgba(38, 215, 255, 0.25), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(255, 79, 163, 0.22), transparent 30rem) !important;
}

.header-container > *,
.header-bottom > *,
.ApSlideShow > *,
.slideshow > *,
.bannercontainer > *,
.iviewSlider > *,
.homeslider-container > * {
  position: relative;
  z-index: 2;
}

/* Logo y menu */
#_desktop_logo img,
.logo,
#header .logo img {
  max-height: 72px !important;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.35)) !important;
}

#header .menu,
#header .leo-megamenu,
#header .top-menu {
  font-size: 16px !important;
}

/* Buscador protagonista */
#search_widget,
.search-widget,
.search-box,
.leo-search-widget,
.ApSearch,
.block-search {
  max-width: 980px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#search_widget form,
.search-widget form,
.search-box form,
.leo-search-widget form,
.ApSearch form,
.block-search form {
  display: flex !important;
  align-items: stretch !important;
  border: 2px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(38, 215, 255, 0.55) inset !important;
  overflow: hidden !important;
}

#search_widget input,
.search-widget input,
.search-box input,
.leo-search-widget input,
.ApSearch input,
.block-search input,
input[type="search"] {
  min-height: 58px !important;
  border: 0 !important;
  background: #ffffff !important;
  color: #111827 !important;
  font-size: 17px !important;
  padding-left: 20px !important;
  box-shadow: none !important;
}

#search_widget button,
.search-widget button,
.search-box button,
.leo-search-widget button,
.ApSearch button,
.block-search button {
  min-width: 58px !important;
  min-height: 58px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--rtcg-cyan) !important;
  color: #061018 !important;
  font-weight: 900 !important;
  box-shadow: none !important;
}

/* Contenido general */
#wrapper,
main,
.main-content,
.page-home,
#index {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), #ffffff 42%, #f6f8fc 100%) !important;
}

.container,
.ApRow,
.ApColumn,
.page-content {
  letter-spacing: 0 !important;
}

/* Titulos tipo tienda premium */
h1,
h2,
h3,
.h1,
.h2,
.h3,
.title_block,
.page-heading,
.products-section-title,
.featured-products h2,
.ApColumn h4,
.ApBlock h4,
.elementor-heading-title {
  color: var(--rtcg-text) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.title_block,
.products-section-title,
.featured-products h2,
.ApColumn h4,
.ApBlock h4,
.elementor-heading-title {
  text-align: center !important;
}

.title_block::after,
.products-section-title::after,
.featured-products h2::after,
.ApColumn h4::after,
.ApBlock h4::after,
.elementor-heading-title::after {
  content: "";
  display: block;
  width: 112px;
  height: 5px;
  margin: 14px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rtcg-cyan), var(--rtcg-pink)) !important;
}

/* Categorias populares */
.category-item,
.cate_content,
.cat-content,
.ApCategoryImage,
.ApImage,
.subcategories-list li,
#subcategories ul li {
  overflow: hidden !important;
  border-radius: 8px !important;
  background: var(--rtcg-card) !important;
  border: 1px solid var(--rtcg-line) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.11) !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease !important;
}

.category-item:hover,
.cate_content:hover,
.cat-content:hover,
.ApCategoryImage:hover,
.ApImage:hover,
.subcategories-list li:hover,
#subcategories ul li:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(38, 215, 255, 0.9) !important;
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.18) !important;
}

.category-item img,
.cate_content img,
.cat-content img,
.ApCategoryImage img,
.ApImage img,
#subcategories img {
  width: 100% !important;
  border-radius: 8px 8px 0 0 !important;
}

.category-item h3,
.category-item h4,
.cate_content h3,
.cate_content h4,
.cat-content h3,
.cat-content h4,
.ApCategoryImage h3,
.ApCategoryImage h4,
.ApImage h3,
.ApImage h4 {
  color: var(--rtcg-text) !important;
  font-weight: 900 !important;
}

/* Productos */
.product-miniature,
.thumbnail-container,
.ajax_block_product,
.product-container,
.product-description {
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  border: 1px solid var(--rtcg-line) !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.09) !important;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease !important;
}

.product-miniature:hover,
.thumbnail-container:hover,
.ajax_block_product:hover,
.product-container:hover {
  transform: translateY(-4px) !important;
  border-color: rgba(38, 215, 255, 0.9) !important;
  box-shadow: 0 28px 76px rgba(15, 23, 42, 0.17) !important;
}

.product-miniature img,
.thumbnail-container img,
.ajax_block_product img,
.product-container img {
  border-radius: 8px 8px 0 0 !important;
}

.product-title a,
.product-name,
.h3.product-title,
.name a,
.product-miniature .product-title a {
  color: #151a23 !important;
  font-weight: 900 !important;
}

.product-title a:hover,
.name a:hover {
  color: #0486a3 !important;
}

.product-price,
.price,
.current-price,
.regular-price {
  color: var(--rtcg-green) !important;
  font-weight: 900 !important;
}

/* Botones */
.btn,
.btn-primary,
button[type="submit"],
.add-to-cart,
.ajax_add_to_cart_button,
.cart-button {
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--rtcg-cyan) !important;
  color: #061018 !important;
  font-weight: 900 !important;
  box-shadow: 0 14px 30px rgba(38, 215, 255, 0.24) !important;
}

.btn:hover,
.btn-primary:hover,
button[type="submit"]:hover,
.add-to-cart:hover,
.ajax_add_to_cart_button:hover,
.cart-button:hover {
  background: #7ee8ff !important;
  color: #061018 !important;
}

/* Mensaje de productos vacios */
.alert,
.warning,
.products .alert,
.ApProductCarousel p,
.ApProductCarousel .alert {
  border-radius: 8px !important;
  border: 1px solid #dbeafe !important;
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-weight: 700 !important;
}

/* Footer y cookies */
#footer,
.footer-container,
.footer-top,
.footer-center,
.footer-bottom {
  background: var(--rtcg-ink) !important;
  color: #cbd5e1 !important;
}

#footer a,
.footer-container a {
  color: #ffffff !important;
}

#footer a:hover,
.footer-container a:hover {
  color: var(--rtcg-cyan) !important;
}

.cookies,
.cookie,
.cookie-banner,
#cookie_notice,
#cookieslaw,
#cookieNotice,
.ets_cookie_banber_block {
  background: rgba(13, 17, 24, 0.94) !important;
  color: #ffffff !important;
}

.cookies button,
.cookie button,
.cookie-banner button,
#cookie_notice button,
#cookieslaw button,
#cookieNotice button,
.ets_cookie_banber_block button {
  background: var(--rtcg-cyan) !important;
  color: #061018 !important;
  border-radius: 8px !important;
  font-weight: 900 !important;
}

@media (max-width: 767px) {
  #header .header-top,
  #header .header-nav,
  .header-top,
  .header-nav {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #search_widget,
  .search-widget,
  .search-box,
  .leo-search-widget,
  .ApSearch {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  #search_widget input,
  .search-widget input,
  .search-box input,
  input[type="search"] {
    min-height: 50px !important;
    font-size: 15px !important;
  }

  #search_widget button,
  .search-widget button,
  .search-box button {
    min-height: 50px !important;
  }

  .title_block,
  .products-section-title,
  .featured-products h2,
  .ApColumn h4,
  .ApBlock h4 {
    font-size: 30px !important;
  }
}
