/* ========================================
   CUSTOM CSS - Moved from PHP files
   ======================================== */

/* Navbar & Navigation */
.navbar.navbar-sticky {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  position: relative;
}

.navbar {
  position: relative;
}

.site-logo:hover {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.mobile-menu-toggle,
.mobile-menu-toggle i {
  color: #ffffff !important;
}

.main-navigation .menu > li > a,
.main-navigation > li > a {
  color: #ffffff;
  font-size: 18px;
}

.main-navigation .menu > li > a:hover,
.main-navigation .sub-menu > li > a:hover,
.main-navigation .menu > li.active > a,
.main-navigation .sub-menu > li.active > a {
  color: #000000;
}

.main-navigation .menu > li:hover > a,
.main-navigation .menu > li.menu-item-has-children:hover > a,
.main-navigation .menu > li.active > a {
  color: #000000 !important;
  opacity: 1 !important;
}

.main-navigation .menu .sub-menu a {
  font-size: 18px !important;
  line-height: 1.2 !important;
}

/* Center main navigation in navbar */
.navbar.navbar-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

/* Push content below fixed navbar */
body {
  padding-top: 70px;
}

/* Hide main navigation on mobile by default */
@media screen and (max-width: 1070px) {
  body {
    padding-top: 60px;
  }

  .main-navigation {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 60px;
    height: auto;
    max-height: 70vh;
    transform: none;
    background: #fff;
    z-index: 1000;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border-radius: 0 0 8px 8px;
    overflow-y: auto;
  }

  .main-navigation.open {
    display: block;
  }

  .main-navigation .menu {
    flex-direction: column;
    align-items: flex-start;
  }

  .main-navigation .menu > li {
    margin: 5px 0;
    width: 100%;
  }

  .main-navigation .menu > li > a {
    color: #333;
    padding: 10px 0;
    display: block;
  }
}

.main-navigation .menu {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-navigation .menu > li {
  float: none;
  display: inline-block;
  margin: 0 10px;
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
  .navbar {
    padding-left: 15px;
    padding-right: 90px;
  }

  .navbar .toolbar {
    z-index: 40;
  }

  .navbar .toolbar.col-xs-2 {
    width: auto;
    float: right;
    text-align: right;
    padding-right: 5px;
  }

  .navbar .toolbar .mobile-menu-toggle {
    pointer-events: auto;
    padding: 0;
    margin-right: -5px;
  }

  .navbar .toolbar .mobile-menu-toggle i {
    font-size: 28px;
  }

  .navbar .site-logo.visible-mobile.col-xs-5 {
    display: flex;
    align-items: center;
    float: left;
    width: 25%;
    height: 72px;
    margin-right: 1;
    padding: 0;
  }

  .main-navigation.open .menu .sub-menu a {
    font-size: 16px !important;
    line-height: 1.2 !important;
  }
}

/* Mobile menu styles when open */
@media screen and (max-width: 1070px) {
  .main-navigation .menu {
    display: block;
  }

  .main-navigation .menu > li {
    margin: 0;
    display: block;
  }

  .navbar.navbar-sticky .main-navigation.open .menu > li > a,
  .navbar.navbar-sticky .main-navigation.open .menu > li > a strong,
  .navbar.navbar-sticky .main-navigation.open .menu .sub-menu a {
    color: #000000 !important;
    opacity: 1 !important;
  }

  .navbar.navbar-sticky .main-navigation.open .sub-menu {
    background-color: #ffffff !important;
  }

  .navbar.navbar-sticky .main-navigation.open .nav-search-item .nav-search-btn {
    color: #000000 !important;
  }
}

/* Search in Nav */
.nav-search-item {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  list-style: none;
}

.nav-search-item .nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  opacity: 0.9;
  transition: opacity 180ms ease;
  height: 100%;
}

.nav-search-item .nav-search-btn:hover { opacity: 1; }
.nav-search-item .nav-search-btn i { font-size: 22px; }

/* Search Overlay */
.nav-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  z-index: 2147483640;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.nav-search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-search-box {
  width: min(600px, 90vw);
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 40px;
  padding: 8px 8px 8px 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.nav-search-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 18px;
  background: transparent;
  color: #222;
}

.nav-search-box input::placeholder { color: #aaa; }

.nav-search-submit {
  border: none;
  border-radius: 32px;
  color: #fff;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 180ms ease;
}

.nav-search-submit:hover { opacity: 0.88; }

.nav-search-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  opacity: 0.8;
}

.nav-search-close:hover { opacity: 1; }

/* Fixed Search Bar Below Nav */
.search-bar-fixed {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 12px 20px;
  position: fixed;
  top: 0px;
  left: 0;
  right: 0;
  z-index: 999;
}

.search-bar-fixed-inner {
  max-width: 800px;
  margin: 0 auto;
}

.search-bar-fixed .nav-search-form {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.search-bar-fixed .nav-search-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 16px;
  font-size: 15px;
  color: #333;
  background: transparent;
}

.search-bar-fixed .nav-search-form button {
  border: none;
  color: #ffffff;
  padding: 12px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.search-bar-fixed .nav-search-form button:hover {
  opacity: 0.9;
}

/* Push content below fixed search bar */
.search-bar-fixed + .page-wrapper,
.search-bar-fixed ~ .page-wrapper {
  padding-top: 60px;
}

/* Mobile: adjust search bar */
@media screen and (max-width: 768px) {
  .search-bar-fixed {
    padding: 8px 12px;
    top: 0px;
  }
  .search-bar-fixed-inner {
    max-width: 100%;
  }
  .search-bar-fixed .nav-search-form input {
    padding: 10px 12px;
    font-size: 14px;
  }
  .search-bar-fixed .nav-search-form button {
    padding: 10px 16px;
  }
  .search-bar-fixed + .page-wrapper,
  .search-bar-fixed ~ .page-wrapper {
    padding-top: 55px;
  }
}

/* ========================================
   Font Styles - Rajdhani
   ======================================== */
body, h1, h2, h3, h4, h5, h6, p, a, span, li, button, input, textarea, label, strong, b {
  font-family: 'Rajdhani', sans-serif !important;
}

h1, h2, h3, h4, h5, h6, strong, b, .bold, .strong {
  font-weight: 700 !important;
}

.main-navigation .menu > li > a strong,
.main-navigation .menu > li > a,
.shop-item-title a {
  font-weight: 600 !important;
}

/* ========================================
   Menu HR Styles
   ======================================== */
.sub-menu hr {
  margin: 8px 0;
  border: 0;
  border-top: 1px solid #c7c7c7;
}

/* ========================================
   Navbar Shadow
   ======================================== */
.navbar.navbar-sticky {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}

/* ========================================
   Product Page Styles
   ======================================== */
.product-gallery-custom {
  padding-top: 190px;
}

.product-thumbs-custom {
  padding-bottom: 20px;
}

.product-section-custom {
  margin-top: 20px;
}

.product-info-custom {
  padding-top: 24px;
}

.product-title-custom {
  font-weight: bold;
  color: white !important;
  text-transform: uppercase;
}

.product-category-custom {
  padding-bottom: 10px;
}

.product-category-label {
  color: white !important;
  text-transform: uppercase;
  font-weight: bold;
}

.product-category-link {
  color: white !important;
}

/* Force 30px on all product description content */
.tab-content .tab-pane .product-description,
.tab-content .tab-pane .product-description *,
.tab-content .tab-pane .product-description p,
.tab-content .tab-pane .product-description strong,
.tab-content .tab-pane .product-description b,
.tab-content .tab-pane .product-description span,
.tab-content .tab-pane .product-description div,
.tab-content .tab-pane .product-description li,
.tab-content .tab-pane .product-description td,
.tab-content .tab-pane .product-description th,
#description .product-description,
#description .product-description *,
#description .product-description p,
#description .product-description strong,
#description .product-description b,
#description .product-description span,
#description .product-description div,
#description .product-description li,
#description .product-description td,
#description .product-description th {
  font-size: 20px !important;
  line-height: 1.6 !important;
}

.tab-description {
  font-size: 16px !important;
}

/* All text in description - normal and bold */
#description strong,
#description b,
#description span,
#description p,
.tab-content strong,
.tab-content b,
.tab-content span,
.tab-content p,
.product-description strong,
.product-description b,
.product-description span,
.product-description p {
  font-size: 25px !important;
}

/* Mobile: reduce font size */
@media screen and (max-width: 768px) {
  #description strong,
  #description b,
  #description span,
  #description p,
  .tab-content strong,
  .tab-content b,
  .tab-content span,
  .tab-content p,
  .product-description strong,
  .product-description b,
  .product-description span,
  .product-description p {
    font-size: 19px !important;
  }
}

/* ========================================
   Logo Styles
   ======================================== */
.site-logo img {
  width: auto;
}

.site-logo.visible-desktop img[src*="clionuevo"] {
  max-width: 130px;
  margin-top: -7px;
}

.site-logo.visible-desktop img[src*="gamemax"] {
  max-width: 190px;
  margin-top: -6px;
}

.site-logo.visible-mobile img[src*="clionuevo"] {
  max-width: 80px;
}

.site-logo.visible-mobile img[src*="gamemax"] {
  max-width: 140px;
}

/* ========================================
   Search Results Styles
   ======================================== */
.search-results {
  padding: 0 0 40px;
}

.search-results .row {
  margin-left: -8px;
  margin-right: -8px;
  display: flex;
  flex-wrap: wrap;
}

.search-results .col-lg-3,
.search-results .col-md-4,
.search-results .col-sm-6 {
  padding-left: 8px;
  padding-right: 8px;
}

/* Mobile: center search results */
@media screen and (max-width: 768px) {
  .search-results .row {
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
  }

  .search-results .col-sm-6 {
    padding-left: 15px;
    padding-right: 15px;
    float: none;
    margin: 0 auto;
  }

  /* Categories page product grid centering */
  .col-lg-12 .row .col-sm-6 {
    padding-left: 15px;
    padding-right: 15px;
    float: none;
    margin: 0 auto;
  }

  .col-lg-12 > .row {
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
  }
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.shop-item {
  padding: 5px;
  margin-bottom: 10px;
}

.shop-item .shop-thumbnail {
  padding: 8px;
  background: #fafafa;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.35s ease;
}

.shop-item:hover .shop-thumbnail {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.shop-item .shop-thumbnail img {
  border-radius: 6px;
  opacity: 1;
  transform: scale(1);
  filter: none;
  transition: transform 0.45s ease, filter 0.45s ease, opacity 0.35s ease;
  display: block;
  margin: 0 auto;
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #ffffff;
}

.shop-item:hover .shop-thumbnail img,
.shop-item:focus-within .shop-thumbnail img {
  opacity: 1;
  transform: scale(1.04);
  filter: contrast(1.08) saturate(0.86) brightness(0.92);
}

.loading-indicator {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 14px;
}

.loading-indicator i {
  color: #a21013;
}

.loading-indicator.hidden {
  display: none;
}

.end-message {
  text-align: center;
  padding: 30px;
  color: #888;
  font-size: 13px;
}

.end-message.hidden {
  display: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ========================================
   Product Page Styles (from product.php)
   ======================================== */
.widget.widget-categories.clio-sidebar-menu {
  background-color: var(--sidebar-color, #a21013);
  padding: 16px 24px 16px 72px;
  box-shadow: 10px 0 18px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  overflow: visible;
}

@media screen and (min-width: 769px) {
  .widget.widget-categories.clio-sidebar-menu::before {
    content: "";
    position: absolute;
    top: 0;
    right: 100%;
    bottom: 0;
    width: 100vw;
    background-color: var(--sidebar-color, #a21013);
  }
}

@media screen and (min-width: 992px) {
  .widget.widget-categories.clio-sidebar-menu {
    position: fixed !important;
    top: 320px;
    left: 0;
    width: 320px;
    max-height: none;
    overflow: visible;
    z-index: 2147483000;
  }

  .widget.widget-categories.clio-sidebar-menu::before {
    display: none;
  }

  .fw-section.bg-gray,
  .container.padding-top-2x {
    position: relative;
    z-index: 1;
  }

  .sidebar-column {
    width: 0;
    padding: 0;
  }

  .product-main-column {
    width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .product-main-column .product-gallery.container-fluid {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
  }
}

.widget.widget-categories.clio-sidebar-menu .widget-title,
.widget.widget-categories.clio-sidebar-menu .widget-title strong,
.widget.widget-categories.clio-sidebar-menu ul li a {
  color: #ffffff;
}

.widget.widget-categories.clio-sidebar-menu ul li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.widget.widget-categories.clio-sidebar-menu ul li a {
  display: block;
  padding: 4px 0;
}

.widget.widget-categories.clio-sidebar-menu ul li:last-child {
  border-bottom: 0;
}

.widget.widget-categories.clio-sidebar-menu ul li a:hover,
.widget.widget-categories.clio-sidebar-menu ul li.active a {
  color: #ffffff;
  opacity: 0.85;
}

.sidebar-toggle {
  display: none !important;
}

.product-info.bg-gray {
  background-color: var(--sidebar-color, #a21013) !important;
  max-width: 1040px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* Ensure product info is visible */
.product-info-custom {
  display: block;
  visibility: visible;
}

.product-gallery.container-fluid {
  padding-top: 120px;
}

.product-gallery-preview {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.product-gallery-preview > li {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 420ms ease, transform 700ms ease;
  will-change: opacity, transform;
  pointer-events: none;
}

.product-gallery-preview > li.current {
  position: relative;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  padding-bottom: 34px;
}

.product-gallery-preview > li img {
  width: 100%;
  height: auto;
  box-shadow: 0 26px 36px -24px rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  transition: transform 520ms ease, box-shadow 520ms ease, filter 520ms ease;
  cursor: zoom-in;
}

.product-gallery-preview > li.current:hover img {
  transform: scale(1.015);
  box-shadow: 0 32px 46px -28px rgba(0, 0, 0, 0.26);
  filter: contrast(1.02) saturate(1.02);
}

.product-gallery-preview .gallery-zoom-btn {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.product-gallery-preview:hover .gallery-zoom-btn {
  opacity: 1;
  transform: translateY(0);
}

.product-gallery-preview .gallery-zoom-btn i {
  color: #111111;
  font-size: 22px;
}

.product-gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483646;
  padding: 24px;
}

.product-gallery-lightbox.open {
  display: flex;
}

.product-gallery-lightbox img {
  max-width: min(1200px, 96vw);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  cursor: zoom-in;
  transition: transform 220ms ease;
}

.product-gallery-lightbox img.zoomed {
  cursor: zoom-out;
}

.product-gallery-lightbox .lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-gallery-lightbox .lightbox-close i {
  color: #111111;
  font-size: 22px;
}

.product-gallery-thumblist {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  overflow-x: scroll;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.30) rgba(0,0,0,0.08);
}

.product-gallery-thumblist::-webkit-scrollbar {
  height: 5px;
}

.product-gallery-thumblist::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.08);
  border-radius: 4px;
}

.product-gallery-thumblist::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.30);
  border-radius: 4px;
  min-width: 24px;
}

.product-gallery-thumblist > li {
  scroll-snap-align: center;
  list-style: none;
  flex: 0 0 auto;
  opacity: 0.85;
  transition: opacity 220ms ease, transform 220ms ease;
}

.product-gallery-thumblist > li.active {
  opacity: 1;
  transform: translateY(-2px);
}

@media screen and (min-width: 992px) {
  .product-gallery-thumblist > li:hover {
    opacity: 0.98;
    transform: translateY(-3px) scale(1.04);
  }

  .product-gallery-thumblist > li:hover img {
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  }
}

.product-gallery-thumblist img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
  border-radius: 6px;
}

.product-gallery .product-gallery-preview > li > img {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

@media screen and (max-width: 991px) {
  .product-main-column {
    float: none !important;
    width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  .product-main-column .product-gallery.container-fluid {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .product-gallery-thumblist {
    padding-left: 0;
    padding-right: 0;
  }

  .sidebar.open {
    z-index: 12050;
  }

  .widget.widget-categories.clio-sidebar-menu {
    background-color: #ffffff;
    padding: 16px 15px;
    box-shadow: none;
  }

  .widget.widget-categories.clio-sidebar-menu::before {
    display: none;
  }

  .widget.widget-categories.clio-sidebar-menu .widget-title,
  .widget.widget-categories.clio-sidebar-menu .widget-title strong,
  .widget.widget-categories.clio-sidebar-menu ul li a {
    color: #606060;
  }

  .widget.widget-categories.clio-sidebar-menu ul li {
    border-bottom: 1px solid #e5e5e5;
  }

  .widget.widget-categories.clio-sidebar-menu ul li a:hover,
  .widget.widget-categories.clio-sidebar-menu ul li.active a {
    color: var(--sidebar-color, #a21013);
    opacity: 1;
  }

  .sidebar-toggle {
    background-color: var(--sidebar-color, #a21013);
    color: #ffffff;
    z-index: 12060;
  }

  .sidebar-toggle:hover {
    color: #ffffff;
    opacity: 0.92;
  }

  .sidebar-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    z-index: 12070;
  }

  .sidebar-close i {
    display: block;
    line-height: 30px;
  }
}
