﻿/*
Theme Name:  Gurel Motor Child V2
Description: Clean child theme for auto-parts-and-car-accessories
Template:    auto-parts-and-car-accessories
Version:     1.0.0
Text Domain: gurelmotor-child-v2
*/

:root {
  --gm-red: #cc0000;
  --gm-dark: #0f172a;
  --gm-light: #f8fafc;
  --gm-font-sans: "Segoe UI", "Noto Sans", "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --wp--preset--font-family--body: var(--gm-font-sans);
  --wp--preset--font-family--heading: var(--gm-font-sans);
}

body,
button,
input,
select,
textarea,
.wp-site-blocks,
.wp-block-navigation-item__content,
.wp-block-post-title,
.wp-block-heading,
.wp-block-paragraph,
.wp-block-list,
.wc-block-components-formatted-money-amount {
  font-family: var(--gm-font-sans) !important;
}

.main-header .header-menu-box .wp-block-navigation .wp-block-navigation-item__content {
  font-weight: 700;
}

.main-header .header-menu-box .wp-block-navigation .wp-block-navigation-item__content:hover {
  color: var(--gm-red) !important;
}

.main-header .header-menu-box {
  position: relative;
  overflow: visible;
}

.main-header,
.main-header .header-bottom,
.main-header .header-btm-middle,
.main-header .header-menu-box .wp-block-group,
.main-header .header-menu-box .wp-block-column {
  overflow: visible;
}

.gmv2-mega-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.gmv2-mega-item {
  position: relative;
}

.gmv2-has-mega {
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.gmv2-mega-item > a {
  display: inline-block;
  padding: 10px 4px;
  color: #111827;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}

.gmv2-mega-item > a:hover {
  color: var(--gm-red);
}

.gmv2-mega-panel {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: min(980px, 90vw);
  max-height: 460px;
  overflow: auto;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
  padding: 14px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.16s ease, visibility 0.16s ease;
}

.gmv2-has-mega:hover > .gmv2-mega-panel,
.gmv2-has-mega:focus-within > .gmv2-mega-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.gmv2-mega-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.gmv2-brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 8px;
  text-decoration: none;
}

.gmv2-brand-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.gmv2-brand-media {
  width: 92px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gmv2-brand-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gmv2-brand-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #e5e7eb;
  color: #111827;
  font-weight: 700;
}

.gmv2-brand-name {
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  text-transform: uppercase;
}

.gmv2-mega-empty {
  margin: 0;
  color: #374151;
}

.gm-two-cat .category-box .wp-block-cover {
  min-height: 430px !important;
  border-radius: 10px;
  overflow: hidden;
}

.gm-two-cat .category-bg .wp-block-cover__image-background {
  object-fit: contain !important;
  object-position: center center !important;
  background: #f3f4f6;
}

.gm-two-cat .category-bg .wp-block-cover__inner-container {
  height: 100% !important;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
}

.gm-two-cat .category-title {
  margin: 0;
}

.gm-footer-v2 a {
  text-decoration: none;
}

.gm-footer-v2 a:hover {
  text-decoration: underline;
}

/* Keep hero slider image ratio identical on mobile and desktop. */
.banner-section .banner-right-box .right-img-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
}

.banner-section .banner-right-box .right-img-box img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  object-position: center center;
}

.banner-section .slider-nav .img-bg img {
  width: 100% !important;
  height: 100px !important;
  object-fit: cover;
  object-position: center center;
}

.gm-shop-layout .gm-sidebar-box {
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.gm-shop-sidebar .wc-block-product-categories-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gm-shop-sidebar .wc-block-product-categories-list-item {
  margin: 0;
  padding: 6px 0;
}

.gm-shop-sidebar .wc-block-product-categories-list-item a {
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
}

.gm-shop-sidebar .wc-block-product-categories-list-item a:hover {
  color: var(--gm-red);
}

.gm-cat-tree__level {
  list-style: none;
  margin: 0;
  padding-left: 14px;
}

.gm-cat-tree > .gm-cat-tree__level {
  padding-left: 0;
}

.gm-cat-tree__item {
  margin: 6px 0;
}

.gm-cat-tree__item > a {
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
}

.gm-cat-tree__item > a:hover {
  color: var(--gm-red);
}

.gm-cat-tree__count {
  color: #6b7280;
  font-size: 12px;
  margin-left: 6px;
}

@media (min-width: 1024px) {
  .gm-shop-sidebar {
    position: sticky;
    top: 20px;
    align-self: flex-start;
  }
}

@media (max-width: 900px) {
  .gm-shop-layout {
    display: block;
  }

  .gmv2-mega-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .gmv2-mega-item > a {
    padding: 8px 0;
    font-size: 13px;
  }

  .gmv2-mega-panel {
    position: static;
    transform: none;
    width: 100%;
    max-height: none;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
  }

  .gmv2-mega-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .gm-two-cat .category-box .wp-block-cover,
  .gm-two-cat .category-bg .wp-block-cover__inner-container {
    min-height: 320px !important;
  }
}

/* Force identical slider ratio on desktop/mobile and keep full image visible. */
.banner-section .slider-for .right-img-box {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
  background: #111827;
}

.banner-section .slider-for .right-img-box .wp-block-image,
.banner-section .slider-for .right-img-box figure {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.banner-section .slider-for .right-img-box img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Slider texts white */
.banner-section .bnr-sub-title,
.banner-section .bnr-title,
.banner-section .bnr-content,
.banner-section .bnr-button .wp-block-button__link {
  color: #ffffff !important;
}

/* Footer texts white */
.gm-footer-v2,
.gm-footer-v2 p,
.gm-footer-v2 li,
.gm-footer-v2 a,
.footer-section,
.footer-section p,
.footer-section li,
.footer-section a {
  color: #ffffff !important;
}
