/* ============================================================
   Custom styles for Auto Serwis Terminal
   Adapted from leo_beautique theme visual identity
   ============================================================ */

/* === Global: square style — no rounded corners === */
*,
*::before,
*::after {
  border-radius: 0 !important;
}

/* === Font === */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root {
  /* Brand accent - sharp crimson red matching logo */
  --as-primary: #cc2222;
  --as-primary-hover: #b51a1a;
  --as-primary-dark: #8b0000;

  /* Neutral tones */
  --as-dark: #363636;
  --as-text: #626262;
  --as-gray: #acaaa6;
  --as-light-gray: #f6f6f6;
  --as-border: #ececec;

  /* Override Bootstrap primary to match brand */
  --bs-primary: #cc2222;
  --bs-primary-rgb: 204, 34, 34;
}

/* === Typography === */
body {
  font-family: "Poppins", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--as-text);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: "Poppins", sans-serif;
  color: var(--as-dark);
  font-weight: 500;
}

a {
  color: var(--as-dark);
}

a:hover {
  color: var(--as-primary);
}

/* === Header / Logo === */
.header-top {
  padding: 15px 0;
}

.header-top .logo {
  max-height: 60px;
}

/* === Navigation === */
.header-top .main-menu {
  background: transparent;
}

.header-top .main-menu .navbar-nav > .nav-item > .nav-link {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--as-dark);
}

.header-top .main-menu .navbar-nav > .nav-item > .nav-link:hover {
  color: var(--as-primary);
}

/* === Buttons === */
.btn-primary {
  background-color: var(--as-primary);
  border-color: var(--as-primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--as-primary-hover);
  border-color: var(--as-primary-hover);
  color: #fff;
}

.btn-outline-primary {
  color: var(--as-primary);
  border-color: var(--as-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--as-primary);
  border-color: var(--as-primary);
  color: #fff !important;
}

/* Any element with primary background MUST have light text */
.bg-primary,
.text-bg-primary {
  color: #fff !important;
}

/* === Homepage Banner Section === */
.home-banner-section {
  margin-bottom: 30px;
}

.home-banner-section img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.home-category-blocks {
  margin: 30px 0;
}

.home-category-blocks .category-block {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 20px;
}

.home-category-blocks .category-block img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.home-category-blocks .category-block:hover img {
  transform: scale(1.05);
}

.home-category-blocks .category-block h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  margin: 0;
  padding: 15px;
  font-size: 1.1rem;
  text-align: center;
}

.home-category-blocks .category-block h3 a {
  color: #fff;
  text-decoration: none;
}

/* === Manufacturer/Brand Logos === */
.manufacturer-section {
  padding: 30px 0;
  background: var(--as-light-gray);
  margin: 30px 0;
}

.manufacturer-section .manufacturer-logo {
  text-align: center;
  padding: 15px;
}

.manufacturer-section .manufacturer-logo img {
  max-height: 55px;
  max-width: 125px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.manufacturer-section .manufacturer-logo img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* === Product Cards === */
.product-card, .product-miniature {
  border: 1px solid var(--as-border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  background: #fff;
}

.product-card:hover, .product-miniature:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card .product-name,
.product-miniature .product-title {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: var(--as-dark);
}

.product-card .product-price,
.product-miniature .price {
  color: var(--as-dark);
  font-weight: 600;
}

/* === Product Page === */
.page-product .product-name {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: var(--as-dark);
}

.page-product .product-price .current-price {
  color: var(--as-dark);
  font-weight: 700;
  font-size: 1.5rem;
}

/* RFQ / Quote Request Button */
.btn-quote-request {
  background-color: var(--as-dark);
  color: #fff;
  border: 2px solid var(--as-dark);
  padding: 12px 24px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn-quote-request:hover {
  background-color: #fff;
  color: var(--as-dark);
}

.btn-quote-request i {
  margin-right: 8px;
}

/* Hide add-to-cart since orders are disabled */
.product-actions .add-to-cart,
.product-add-to-cart,
.cart-preview,
.product-miniature .button-container .add-to-cart,
.product-miniature .js-add-to-cart {
  display: none !important;
}

/* === Footer === */
.footer,
#footer,
.footer__main {
  background-color: var(--as-dark);
  color: #e0e0e0;
}

.footer a,
#footer a,
.footer__main a,
.footer-block__list a,
.footer .links a,
#footer .links a {
  color: #ffffff !important;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer a:hover,
#footer a:hover,
.footer__main a:hover,
.footer-block__list a:hover {
  color: var(--as-primary) !important;
}

.footer-block__title,
.footer .footer__title,
#footer .footer__title,
.footer-block__title--toggle {
  color: #ffffff !important;
}

/* === Header / Logo === */
.header-top .logo,
.header-bottom .logo,
.header-bottom__logo .logo,
.navbar-brand .logo {
  max-height: 90px;
  width: auto;
  height: auto;
}

/* Make logo even bigger on desktop */
@media (min-width: 768px) {
  .header-bottom__logo .logo,
  .navbar-brand .logo {
    max-height: 100px;
    min-width: 300px;
  }
}

/* === Slider — constrained to container width === */
.ps-imageslider {
  max-width: 1320px;
  margin: 0 auto 0;
  padding: 0 12px;
  border-radius: 8px;
  overflow: hidden;
}

/* Remove homepage section gaps (theme default: 2.5rem) */
.page-content--home {
  gap: 0 !important;
}

/* Reduce gap between slider and custom-text section */
#custom-text {
  padding-top: 0 !important;
}

#custom-text .wrapper:first-child .container .row {
  margin-top: 0 !important;
}

.ps_imageslider .carousel,
.ps_imageslider .carousel-inner,
.ps_imageslider .carousel-item,
.homeslider-container,
.homeslider-description {
  max-height: 420px;
}

.ps_imageslider .carousel-item img,
.homeslider-container img {
  max-height: 420px;
  object-fit: cover;
  width: 100%;
  border-radius: 8px;
}

@media (max-width: 768px) {
  .ps-imageslider {
    padding: 0;
    border-radius: 0;
    margin-bottom: 10px;
  }
  .ps_imageslider .carousel,
  .ps_imageslider .carousel-item img {
    max-height: 250px;
    border-radius: 0;
  }
}

/* === Footer account block (hide since registration disabled) === */
.ps-customeraccountlinks {
  display: none !important;
}

/* === Section Titles === */
.section-title {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 3px;
  background-color: var(--as-primary);
}

/* === Category Page === */
.page-category .category-cover img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}

/* === Slider Arrows — red brand background, pushed to the slide edges === */
#ps_imageslider .carousel-control-prev {
  justify-content: flex-start;
  left: 0;
}

#ps_imageslider .carousel-control-next {
  justify-content: flex-end;
  right: 0;
}

#ps_imageslider .carousel-control-prev-icon,
#ps_imageslider .carousel-control-next-icon {
  background-color: var(--as-primary) !important;
  border-radius: 50%;
  padding: 12px;
  margin: 0 10px;
}

#ps_imageslider .carousel-control-prev-icon::before,
#ps_imageslider .carousel-control-next-icon::before {
  color: #fff !important;
  text-shadow: none;
}

#ps_imageslider .carousel-control-prev:hover .carousel-control-prev-icon,
#ps_imageslider .carousel-control-next:hover .carousel-control-next-icon {
  background-color: var(--as-primary-hover) !important;
}

#ps_imageslider .carousel-control-prev:hover .carousel-control-prev-icon::before,
#ps_imageslider .carousel-control-next:hover .carousel-control-next-icon::before {
  color: #fff !important;
}

#ps_imageslider .carousel-control-prev,
#ps_imageslider .carousel-control-next {
  opacity: 0.9;
}

#ps_imageslider .carousel-control-prev:hover,
#ps_imageslider .carousel-control-next:hover {
  opacity: 1;
}

/* === Contact Info in Header === */
.header-nav .contact-info {
  font-size: 0.85rem;
}

.header-nav .contact-info i {
  color: var(--as-primary);
  margin-right: 5px;
}

/* === Product RFQ Section === */
.product__quote-request {
  padding: 20px;
  background: var(--as-light-gray);
  border-radius: 8px;
  border: 1px solid var(--as-border);
}

.product__quote-request .btn-quote-request {
  font-size: 1rem;
  padding: 14px 28px;
}

.product__quote-info {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.product__quote-info .material-icons {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Product page spacing after gap:0 on homepage */
.product__container,
.product-container,
.js-product-container {
  margin-bottom: 35px;
}

/* === Hide Add to Cart (ordering disabled) === */
.product-add-to-cart,
.product__add-to-cart,
#add-to-cart-or-refresh .add-to-cart,
.product-actions .add-to-cart,
.add-to-cart-button,
.js-product-add-to-cart,
.product-miniature .button-container form,
.product-miniature .js-add-to-cart,
.product-miniature .add-to-cart,
.quickview .add-to-cart,
.blockcart,
#blockcart-modal,
.ps-shoppingcart,
.ps-customersignin,
#_desktop_customersignin,
#_mobile_ps_customersignin,
.ps-customeraccountlinks,
.user-info,
.header-block__signin,
.product-miniature .button-container,
.js-cart-preview {
  display: none !important;
}

/* === Product Variants === */
.product-variants-item {
  margin-bottom: 10px;
}

.product-variants-item .form-control-select {
  border: 1px solid var(--as-border);
  border-radius: 4px;
  padding: 8px 12px;
}

/* === Quantity Selector === */
.product__quantity .qty {
  border: 1px solid var(--as-border);
  border-radius: 4px;
  padding: 8px;
}

/* === Price Display === */
.product__prices {
  margin: 15px 0;
}

.product__prices .current-price {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--as-dark);
}

/* === Add to Cart Override - Show RFQ instead === */
.product__actions .add-to-cart {
  display: none !important;
}

/* === Brand list on homepage === */
.brand-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

.brand-list .brand {
  text-align: center;
  padding: 10px;
}

.brand-list .brand img {
  max-height: 55px;
  max-width: 125px;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
}

.brand-list .brand img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* === Footer specific improvements === */
.footer-container {
  background-color: var(--as-dark);
}

.footer-container .footer-main {
  padding-top: 40px;
  padding-bottom: 20px;
}

.footer-container .footer-main h3,
.footer-container .footer-main .footer__title {
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}

.footer-container .footer-main h3::after,
.footer-container .footer-main .footer__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--as-primary);
}

.footer-container .footer-main a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.9rem;
}

.footer-container .footer-main a:hover {
  color: var(--as-primary);
}

.footer-container .footer-main .contact-info {
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-container .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 12px 0;
  font-size: 0.8rem;
  color: #888;
}

/* === Contact page === */
.page-contact .contact-form {
  background: var(--as-light-gray);
  padding: 30px;
  border-radius: 8px;
}

.page-contact .contact-form .form-control {
  border: 1px solid var(--as-border);
  border-radius: 4px;
}

/* === Links widget in footer === */
.links .wrapper {
  padding: 0;
}

.links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.links ul li {
  margin-bottom: 8px;
}

.links ul li a {
  color: #bbb;
  font-size: 0.9rem;
  text-decoration: none;
}

.links ul li a:hover {
  color: var(--as-primary);
}

/* === Mobile improvements === */
@media (max-width: 768px) {
  .home-category-blocks .category-block h3 {
    font-size: 0.9rem;
    padding: 10px;
  }

  .btn-quote-request {
    width: 100%;
  }

  .product__quote-request {
    padding: 15px;
  }

  .footer-container .footer-main h3::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-container .footer-main {
    text-align: center;
  }
}

/* === Homepage Category Blocks (old ApImage style) === */
.home-category-blocks .category-block {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 20px;
}

.home-category-blocks .category-block img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
  display: block;
}

.home-category-blocks .category-block:hover img {
  transform: scale(1.05);
}

.home-category-blocks .category-block .image_description,
.home-category-blocks .category-block h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  margin: 0;
  padding: 12px 15px;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  text-align: left;
}

.home-category-blocks .category-block h3 a {
  color: #fff;
  text-decoration: none;
}

.home-category-blocks .category-block .learn {
  margin: 5px 0 0;
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.85;
}

.home-category-blocks .category-block .learn a {
  color: #fff;
  text-decoration: underline;
}

/* === Category icon links === */
.category-icon-link {
  display: block;
  text-align: center;
  padding: 15px 10px;
  color: var(--as-dark);
  text-decoration: none;
  transition: all 0.2s;
  border-radius: 8px;
}

.category-icon-link:hover {
  background: var(--as-light-gray);
  color: var(--as-primary);
}

.category-icon-link img {
  margin-bottom: 8px;
  transition: transform 0.2s;
}

.category-icon-link:hover img {
  transform: scale(1.1);
}

.category-icon-link span {
  display: block;
  font-size: 0.85rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
}

/* === Homepage section spacing === */
#content .page-home h4.section-title {
  margin-top: 30px;
  margin-bottom: 20px;
}

/* === Company description === */
.company-desc {
  background: var(--as-light-gray);
  padding: 25px;
  border-radius: 8px;
  line-height: 1.8;
  font-size: 0.95rem;
}

/* === HEADER: Menu full-width below logo+search === */
.header-bottom__row {
  flex-wrap: wrap !important;
}

.header-bottom__logo {
  flex: 0 0 auto !important;
}

.ps-mainmenu--desktop {
  flex: 1 1 100% !important;
  order: 10 !important;
  max-width: 100% !important;
  margin-top: 8px;
  border-top: 1px solid #e8e8e8;
}

/* Hide contact info from top nav */
#header .ps-contactinfo {
  display: none !important;
}

/* ============================================================
   DESKTOP MAIN MENU — polished design
   ============================================================ */
.ps-mainmenu__desktop .ps-mainmenu__tree {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
}

/* Each top-level menu item — auto-width proportional to content */
.ps-mainmenu__desktop .ps-mainmenu__tree > li {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
}

/* Wrapper: link + dropdown toggle */
.ps-mainmenu__desktop .ps-mainmenu__tree-item-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Top-level link styling */
.ps-mainmenu__desktop .ps-mainmenu__tree-link {
  display: inline-block;
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 1.1rem 1rem !important;
  color: var(--as-dark) !important;
  text-decoration: none !important;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

/* Animated underline on hover */
.ps-mainmenu__desktop .ps-mainmenu__tree-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--as-primary);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(-50%);
}

.ps-mainmenu__desktop .ps-mainmenu__tree-link:hover {
  color: var(--as-primary) !important;
}

.ps-mainmenu__desktop .ps-mainmenu__tree-link:hover::after {
  width: 70%;
}

/* Active/current item */
.ps-mainmenu__desktop .ps-mainmenu__tree > li.current .ps-mainmenu__tree-link {
  color: var(--as-primary) !important;
}

.ps-mainmenu__desktop .ps-mainmenu__tree > li.current .ps-mainmenu__tree-link::after {
  width: 70%;
  background: var(--as-primary);
}

/* Separator line between items (except last) — border on table-cell */
.ps-mainmenu__desktop .ps-mainmenu__tree > li:not(:last-child) {
  border-right: 1px solid #e0e0e0;
}

/* Dropdown toggle arrow — inline with link */
.ps-mainmenu__desktop .ps-mainmenu__tree-dropdown-toggle {
  padding: 1.1rem 0.15rem !important;
  margin-left: -0.3rem;
  color: var(--as-dark) !important;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-block;
  vertical-align: middle;
}

.ps-mainmenu__desktop .ps-mainmenu__tree-dropdown-toggle:hover {
  opacity: 1;
  color: var(--as-primary) !important;
}

.ps-mainmenu__desktop .ps-mainmenu__tree-dropdown-toggle[aria-expanded="true"] {
  opacity: 1;
  color: var(--as-primary) !important;
}

/* Dropdown submenu — clean entry */
.ps-mainmenu__desktop .submenu {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
  border-top: 2px solid var(--as-primary);
}

/* === BANNER BLOCKS: Centered text overlay with 75% opacity dark bg === */
.category-block {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}

.category-block img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.category-block:hover img {
  transform: scale(1.06);
}

.category-block .image_description,
.category-block h3,
.category-block .learn {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
}

.category-block h3 {
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff !important;
  padding: 18px 20px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  text-align: center;
}

.category-block h3 a {
  color: #fff !important;
  text-decoration: none;
}

.category-block .learn {
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  padding: 8px 20px 18px;
  text-align: center;
}

.category-block .learn a {
  display: inline-block;
  color: #fff !important;
  background: var(--as-primary);
  padding: 8px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background 0.3s;
}

.category-block .learn a:hover {
  background: var(--as-primary-hover);
}

/* Mobile adjustments for banners */
@media (max-width: 768px) {
  .category-block h3 {
    font-size: 1rem;
    padding: 12px 15px;
  }
  .category-block .learn a {
    padding: 6px 16px;
    font-size: 0.8rem;
  }
}

/* === 5-column grid for brand logos === */
.col-2-4 {
  flex: 0 0 auto;
  width: 20%;
}

@media (max-width: 768px) {
  .col-2-4 {
    width: 33.333%;
  }
}

@media (max-width: 576px) {
  .col-2-4 {
    width: 50%;
  }
}

/* Brand logo box */
.brand-logos {
  background: #fff;
}

.brand-logos img {
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s ease;
  object-fit: contain;
  height: 90px;
  width: auto;
  max-width: 100%;
}

.brand-logos img:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* ============================================================
   CATEGORY CARDS — polished visual design
   ============================================================ */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 14px 22px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  text-decoration: none !important;
  color: var(--as-dark);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Subtle top accent line — invisible by default */
.cat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--as-primary);
  border-radius: 0 0 3px 3px;
  transition: width 0.35s ease;
}

.cat-card:hover::before {
  width: 60%;
}

/* Icon container */
.cat-card__icon {
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: var(--as-light-gray);
  border-radius: 0;
  transition: all 0.35s ease;
  position: relative;
  z-index: 1;
}

.cat-card__icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  transition: transform 0.35s ease;
}

/* Hover effects */
.cat-card:hover {
  border-color: var(--as-primary);
  box-shadow: 0 8px 30px rgba(235, 128, 146, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-3px);
}

.cat-card:hover .cat-card__icon {
  background: var(--as-primary);
  box-shadow: 0 4px 15px rgba(235, 128, 146, 0.35);
}

.cat-card:hover .cat-card__icon img {
  transform: scale(1.15);
  filter: brightness(0) invert(1);
}

/* Label */
.cat-card__label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: "Poppins", sans-serif;
  color: var(--as-dark);
  line-height: 1.4;
  transition: color 0.3s;
  position: relative;
  z-index: 1;
}

.cat-card:hover .cat-card__label {
  color: var(--as-primary);
}

/* Row spacing for card groups */
.box_nt .col-xl-3,
.box_nt .col-xl-4,
.box_nt .col-lg-3,
.box_nt .col-lg-4 {
  margin-bottom: 6px;
}

/* Divider between rows (only on desktop) */
@media (min-width: 992px) {
  .box_nt .row > [class*="col-"]:nth-child(n+5) .cat-card {
    border-top: 1px dashed #e0e0e0;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .cat-card {
    padding: 20px 10px 16px;
  }
  .cat-card__icon {
    width: 64px;
    height: 64px;
  }
  .cat-card__icon img {
    width: 38px;
    height: 38px;
  }
  .cat-card__label {
    font-size: 0.82rem;
  }
}

/* === SLIDER: text visibility fix === */
/* All text inside carousel caption MUST be white */
#ps_imageslider .carousel-caption,
#ps_imageslider .carousel-caption *,
#ps_imageslider .ps-imageslider__figcaption,
#ps_imageslider .ps-imageslider__figcaption *,
.ps-imageslider .carousel-caption,
.ps-imageslider .carousel-caption *,
.ps-imageslider__figcaption,
.ps-imageslider__figcaption * {
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6) !important;
}

#ps_imageslider .carousel-caption h2,
#ps_imageslider .carousel-caption .h1,
#ps_imageslider .ps-imageslider__figcaption h2,
.carousel-caption h2.h1 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff !important;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8) !important;
}

/* Add dark gradient overlay to carousel items for readability */
.ps_imageslider .carousel-item::after,
.carousel-inner .carousel-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 100%);
  pointer-events: none;
}

/* Make carousel caption more prominent */
.carousel-caption {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  padding: 15px 25px;
  bottom: 30px;
  max-width: 80%;
  margin: 0 auto;
}

/* === NASZA SPECJALNOŚĆ section === */
.specialization-section {
  background: #fafafa;
  border-radius: 12px;
  padding: 35px 25px;
  border: 1px solid #eee;
}

.specialization-section .section-title {
  margin-bottom: 30px;
}

.specialization-logos {
  border: 1px solid #e8e8e8 !important;
}

.specialization-logos img:hover {
  filter: grayscale(0%) !important;
  opacity: 1 !important;
  transform: scale(1.08);
}

.specialization-text p {
  margin-bottom: 14px;
  text-align: justify;
}

.specialization-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 991px) {
  .specialization-section {
    padding: 20px 15px;
  }
}

/* === Header navbar text bar === */
.header-navbar-text {
  background: var(--as-dark);
  border-bottom: 2px solid var(--as-primary);
}

.header-navbar-text__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0;
  font-family: "Poppins", sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
}

.header-navbar-text__brand {
  color: #fff !important;
  text-decoration: none !important;
  letter-spacing: 0.3px;
}

.header-navbar-text__brand:hover {
  color: var(--as-primary) !important;
}

.header-navbar-text__sep {
  color: rgba(255,255,255,0.3);
  font-weight: 300;
}

.header-navbar-text__link {
  color: var(--as-primary) !important;
  text-decoration: none !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.82rem;
  transition: color 0.2s;
}

.header-navbar-text__link:hover {
  color: #fff !important;
}

@media (max-width: 768px) {
  .header-navbar-text {
    display: none !important;
  }
}

/* === Hide left sidebar on mobile category pages === */
@media (max-width: 767px) {
  body.page-category #left-column {
    display: none !important;
  }
}

/* === Category tree — active state === */
.category-tree__item-link.active {
  color: var(--as-primary) !important;
  font-weight: 600;
}

.category-tree__item-link:hover {
  color: var(--as-primary) !important;
}

/* Nested subcategories indentation */
.category-tree__list[data-depth="1"] { padding-left: 12px; }
.category-tree__list[data-depth="2"] { padding-left: 24px; }
.category-tree__list[data-depth="3"] { padding-left: 32px; }
.category-tree__list[data-depth="4"] { padding-left: 40px; }

/* === White text on primary color backgrounds === */
.bg-primary,
.btn-primary,
.badge-primary,
.text-bg-primary,
[class*="--primary-bg"] {
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  color: #fff !important;
}

/* ============================================================
   CATEGORY TREE SIDEBAR — visual polish
   ============================================================ */

/* Header with red underline */
.left-block__title {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--as-primary);
  position: relative;
}

.left-block__title-link {
  color: var(--as-dark) !important;
  text-decoration: none !important;
}

/* Category tree container */
.ps-categorytree {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 20px 16px;
}

/* Accordion button styling */
.category-tree__item-header .accordion-button {
  width: 28px;
  height: 28px;
  padding: 0;
  justify-content: center;
  border-radius: 4px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  flex-shrink: 0;
}

.category-tree__item-header .accordion-button:hover {
  background: #e8e8e8;
}

.category-tree__item-header .accordion-button:not(.collapsed) {
  background: var(--as-primary);
  border-color: var(--as-primary);
}

.category-tree__item-header .accordion-button::after {
  width: 12px !important;
  height: 12px !important;
  background-size: 12px !important;
  margin: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  position: static !important;
  flex-shrink: 0;
}

.category-tree__item-header .accordion-button:not(.collapsed)::after {
  filter: brightness(0) invert(1);
}

/* Category links */
.category-tree__item-link {
  display: block;
  padding: 7px 8px;
  font-size: 0.88rem;
  font-family: "Poppins", sans-serif;
  color: var(--as-dark);
  text-decoration: none !important;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1.3;
}

.category-tree__item-link:hover {
  background: #fef0f0;
  color: var(--as-primary) !important;
  padding-left: 12px;
}

.category-tree__item-link.active {
  color: var(--as-primary) !important;
  font-weight: 600;
  background: #fef0f0;
  border-left: 3px solid var(--as-primary);
  padding-left: 13px;
}

/* Separator lines between items */
.category-tree__list > li {
  border-bottom: 1px solid #f0f0f0;
}

.category-tree__list > li:last-child {
  border-bottom: none;
}

/* Depth levels — different left border indicators */
.category-tree__list[data-depth="0"] { }
.category-tree__list[data-depth="1"] { 
  padding-left: 8px;
  margin-left: 4px;
  border-left: 1px solid #eee;
}
.category-tree__list[data-depth="2"] { 
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid #f3f3f3;
}
.category-tree__list[data-depth="3"] { 
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px dashed #f5f5f5;
}
.category-tree__list[data-depth="4"] { 
  padding-left: 10px;
  margin-left: 4px;
}

/* Depth level — dot indicators */
.category-tree__list[data-depth="1"] > li::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #ccc;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.category-tree__list[data-depth="2"] > li::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #ddd;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.category-tree__list[data-depth="3"] > li::before,
.category-tree__list[data-depth="4"] > li::before {
  content: '—';
  color: #ddd;
  margin-right: 4px;
  font-size: 0.7rem;
}

/* Active path indicator */
.category-tree__item[data-in-path="true"] > .category-tree__item-header > .category-tree__item-link {
  color: #555;
  font-weight: 500;
}

/* Accordion body padding */
.category-tree .accordion-body {
  padding: 0;
}

/* === Footer social buttons === */
.footer-social-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #fff !important;
  text-decoration: none !important;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}

.footer-social-btn svg {
  flex-shrink: 0;
}

.footer-social-btn:hover {
  color: #fff !important;
  transform: translateX(4px);
  filter: brightness(1.1);
}

.footer-social-btn--facebook {
  background: #1877F2;
}
.footer-social-btn--facebook:hover {
  background: #166fe5;
}

.footer-social-btn--otomoto {
  background: #e31e24;
}
.footer-social-btn--otomoto:hover {
  background: #cc1b20;
}

.footer-social-btn--autoline {
  background: #1a56db;
}
.footer-social-btn--autoline:hover {
  background: #1649c0;
}

/* === Footer logo — white/inverted === */
.footer-custom img[src*="footer-logo"],
.footer-custom img[src*="logo"],
.footer-logo-invert {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* === Category tree fixes === */

/* Accordion button — perfectly centered square */
.category-tree__item-header .accordion-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-left: auto !important;
  flex-shrink: 0;
  border-radius: 4px !important;
  position: relative !important;
}

/* Item header — keep link and button on same line */
.category-tree__item-header {
  display: flex !important;
  align-items: center !important;
  flex-direction: row !important;
  width: 100%;
}

/* Item header without split — simple link */
.category-tree__item-header.nosplit:not(.split) {
  display: flex;
  align-items: center;
}

/* Fix subcategory list — remove pseudo-element line breaks */
.category-tree__list[data-depth] > li {
  display: block;
  clear: both;
}

/* Remove dot/dash pseudo-elements that break layout */
.category-tree__list[data-depth] > li::before {
  display: none !important;
}

/* Instead, use left border indentation for depth */
.category-tree__list[data-depth="1"] > li {
  padding-left: 14px;
}
.category-tree__list[data-depth="2"] > li {
  padding-left: 10px;
}
.category-tree__list[data-depth="3"] > li {
  padding-left: 10px;
}

/* Clean accordion body — no padding */
.category-tree .accordion-body {
  padding: 0 !important;
}

.category-tree .accordion-collapse {
  margin-left: 0;
}

/* Subcategory lists — inline flow, no extra line breaks */
.category-tree__list[data-depth="1"],
.category-tree__list[data-depth="2"],
.category-tree__list[data-depth="3"],
.category-tree__list[data-depth="4"] {
  margin: 0;
  padding-left: 16px;
}

/* Category tree items — clean block */
.category-tree__item {
  display: block;
  list-style: none;
}

/* Remove any gap between items */
.category-tree__list {
  margin: 0;
  padding: 0;
}

/* === Main menu dropdown — compact classic style (replaces mega-menu) === */
/* SCSS handles the core styling in _mainmenu.scss */

/* === Service Landing Page — card boxes === */
.service-hero__title {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--as-dark);
}

.service-hero__subtitle {
  font-size: 1.1rem;
  color: var(--as-text);
  max-width: 800px;
  margin: 0 auto;
}

.service-card {
  display: block;
  height: 100%;
}

.service-card__inner {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 28px 22px;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card__inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--as-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card__inner {
  border-color: var(--as-primary);
  box-shadow: 0 8px 30px rgba(204, 34, 34, 0.12);
  transform: translateY(-3px);
}

.service-card:hover .service-card__inner::before {
  transform: scaleX(1);
}

.service-card__icon {
  display: inline-block;
  font-size: 2.5rem;
  margin-bottom: 14px;
  transition: transform 0.3s ease;
}

.service-card:hover .service-card__icon {
  transform: scale(1.12);
}

.service-card__title {
  font-family: "Poppins", sans-serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--as-dark);
  margin-bottom: 10px;
}

.service-card:hover .service-card__title {
  color: var(--as-primary);
}

.service-card__desc {
  font-size: 0.88rem;
  color: var(--as-text);
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: justify;
}

.service-card__btn {
  display: inline-block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--as-primary);
  padding: 8px 18px;
  border: 2px solid var(--as-primary);
  text-align: center;
  transition: all 0.25s ease;
}

.service-card:hover .service-card__btn {
  background: var(--as-primary);
  color: #fff;
  transform: none;
}

@media (max-width: 767px) {
  .service-hero__title { font-size: 1.4rem; }
  .service-card__inner { padding: 20px 16px; }
}

/* === "O nas" page — distinct layout, no card-grid, no boxed columns === */
.onas-stats {
  display: flex;
  flex-wrap: wrap;
  border-top: 2px solid var(--as-primary);
  border-bottom: 2px solid var(--as-primary);
  padding: 1.75rem 0;
}

.onas-stats__item {
  flex: 1 1 25%;
  text-align: center;
  padding: 0 1rem;
  border-left: 1px solid #e2e2e2;
}

.onas-stats__item:first-child {
  border-left: none;
}

.onas-stats__num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--as-primary);
  line-height: 1.1;
}

.onas-stats__label {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.4rem;
}

.onas-narrative p {
  max-width: 900px;
  line-height: 1.8;
  color: #444;
}

.onas-brands {
  text-align: center;
  padding: 1.5rem 0;
  background: #f8f8f8;
}

.onas-brands__label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 0.6rem;
}

.onas-brands__row {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--as-dark);
}

.onas-brands__sep {
  color: var(--as-primary);
  margin: 0 0.75rem;
}

.onas-strength {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid #eee;
}

.onas-strength:first-of-type {
  border-top: 1px solid #eee;
}

.onas-strength__num {
  flex: 0 0 auto;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--as-primary);
  opacity: 0.55;
  min-width: 3rem;
}

.onas-strength__body h5 {
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.onas-strength__body p {
  color: #555;
  margin-bottom: 0;
}

.onas-coverage {
  background: var(--as-dark);
  margin: 0 -12px;
  padding: 2rem 12px;
}

.onas-coverage__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1140px;
  margin: 0 auto;
}

.onas-coverage__inner > div {
  flex: 1 1 260px;
}

@media (max-width: 767px) {
  .onas-stats__item {
    flex: 1 1 50%;
    margin-bottom: 1rem;
  }
  .onas-brands__row {
    font-size: 1.05rem;
  }
  .onas-brands__sep {
    margin: 0 0.4rem;
  }
}

/* === Homepage slider — hide prev/next arrows on mobile === */
@media (max-width: 767px) {
  #ps_imageslider .carousel-control-prev,
  #ps_imageslider .carousel-control-next {
    display: none !important;
  }
}

/* ============================================================
   Homepage banner cards (Sprzedaż pojazdów / Sprzedaż części /
   Naprawa - serwisowanie) — bold hover treatment on desktop
   ============================================================ */
.category-block {
  border-top: 3px solid var(--as-primary);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  will-change: transform;
}

/* color-wash overlay that fades in across the whole image on hover */
.category-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(204, 34, 34, 0.55) 0%, rgba(139, 0, 0, 0.25) 55%, rgba(0, 0, 0, 0) 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 1;
  pointer-events: none;
}

.category-block img {
  position: relative;
  z-index: 0;
}

.category-block h3,
.category-block .learn {
  z-index: 2;
}

.category-block::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: var(--as-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
  z-index: 3;
}

.category-block h3::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  background: #fff;
  margin: 10px auto 0;
  transition: width 0.4s ease 0.05s;
}

.category-block .learn a {
  position: relative;
  overflow: hidden;
  padding-right: 36px;
}

.category-block .learn a span,
.category-block .learn a::after {
  position: relative;
  z-index: 1;
}

.category-block .learn a::after {
  content: "\2192";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translate(0, -50%);
  transition: transform 0.35s ease, right 0.35s ease;
}

/* diagonal shine sweep across the "Czytaj więcej" button on hover */
.category-block .learn a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  z-index: 0;
}

@media (hover: hover) {
  .category-block:hover {
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-8px) scale(1.015);
  }

  .category-block:hover img {
    transform: scale(1.12);
    filter: saturate(1.15) contrast(1.05);
  }

  .category-block:hover::before {
    opacity: 1;
  }

  .category-block:hover::after {
    transform: scaleX(1);
  }

  .category-block:hover h3 {
    background: var(--as-primary);
  }

  .category-block:hover h3::after {
    width: 44px;
  }

  .category-block:hover .learn a::after {
    right: 10px;
    transform: translate(4px, -50%);
  }

  .category-block:hover .learn a::before {
    left: 120%;
  }
}

/* ============================================================
   Header search bar — enlarged, high-contrast "wow" treatment
   ============================================================ */
@media (min-width: 992px) {
  #_desktop_ps_searchbar {
    margin-left: 32px;
    flex: 1 1 auto;
    max-width: 32rem;
  }

  #_desktop_ps_searchbar .ps-searchbar {
    min-width: 0;
    width: 100%;
  }

  #_desktop_ps_searchbar .ps-searchbar__form {
    background: #fff;
    border: 2px solid var(--as-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
  }

  #_desktop_ps_searchbar .ps-searchbar__input {
    padding-block: 0.85rem;
    padding-inline: 1.1rem 3.75rem;
    font-size: 1rem;
    background: transparent;
    border: 0;
    width: 100%;
  }

  #_desktop_ps_searchbar .ps-searchbar__input:focus {
    box-shadow: none;
  }

  #_desktop_ps_searchbar .ps-searchbar__input::placeholder {
    color: #9a9a9a;
  }

  /* magnifier becomes a full-height solid red "submit" button on the right edge */
  #_desktop_ps_searchbar .ps-searchbar__magnifier {
    left: auto;
    right: 0;
    top: 0;
    bottom: 0;
    transform: none;
    width: 3.25rem;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--as-primary);
    color: #fff;
    font-size: 1.4rem;
    transition: background 0.25s ease;
  }

  #_desktop_ps_searchbar .ps-searchbar__clear {
    right: 3.9rem;
  }

  #_desktop_ps_searchbar .ps-searchbar__form:focus-within {
    border-color: var(--as-primary);
    box-shadow: 0 8px 22px rgba(204, 34, 34, 0.22);
  }

  #_desktop_ps_searchbar .ps-searchbar__form:focus-within .ps-searchbar__magnifier {
    background: var(--as-primary-hover);
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  #_desktop_ps_searchbar .ps-searchbar {
    min-width: 20rem;
  }
}
