/* Costa Cars — load AFTER Nova standalone.css (via hooks/index/styles.post.tpl) */

html {
  --text: #ffffff !important;
  --muted: rgba(255, 255, 255, 0.64) !important;
  --bg: #090b0f !important;
  --accent: #ef1f2d !important;
  --card: #11141a !important;
  --line: rgba(255, 255, 255, 0.1) !important;
}

/* Category: hide Nova sidebar filters (class on same element, not child) */
.ty-cs-controller-categories.ty-cs-mode-view.side-grid,
.ty-cs-controller-categories.ty-cs-mode-view.breadcrumbs-grid,
body:has(.cc-home-catalog) .side-grid,
body:has(.cc-home-catalog) .span3.side-grid,
body:has(.cc-home-catalog) .breadcrumbs-grid {
  display: none !important;
}

body:has(.cc-home-catalog) .row-fluid > .span13,
body:has(.cc-home-catalog) .row-fluid > .main-content-grid,
.ty-cs-controller-categories.ty-cs-mode-view .main-content-grid,
.ty-cs-controller-categories.ty-cs-mode-view .main-content-grid > div {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin-left: 0 !important;
}

.ty-cs-controller-categories .ty-product-filters__top-panel,
.ty-cs-controller-categories .ty-product-filters__outer,
.ty-cs-controller-categories .ty-product-filters__wrapper,
.ty-cs-controller-categories .cm-product-filters {
  display: none !important;
}

/* Catalog grid and typography */
.cc-home-catalog__cars {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
  max-width: 100% !important;
}

.cc-home-catalog__car {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.cc-home-catalog__section-title,
.cc-home-catalog__title,
.cc-home-catalog__car-title,
.cc-home-catalog__car-title a,
.cc-home-catalog__value,
.cc-home-catalog__price strong {
  color: #fff !important;
}

.cc-home-catalog__section-kicker,
.cc-home-catalog__label,
.cc-home-catalog__catalog-count {
  color: rgba(255, 255, 255, 0.58) !important;
}

.cc-home-catalog__catalog-count strong {
  color: #fff !important;
}

/* Card buttons — must beat .cc-home-catalog a { color: inherit } */
.cc-home-catalog a.cc-home-catalog__btn:not(.cc-home-catalog__btn--white),
.cc-home-catalog a.cc-home-catalog__btn--red,
.cc-home-catalog .cc-home-catalog__btn:not(.cc-home-catalog__btn--white),
.cc-home-catalog .cc-home-catalog__btn--red {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.cc-home-catalog a.cc-home-catalog__btn.cc-home-catalog__btn--white,
.cc-home-catalog a.cc-home-catalog__btn--white,
.cc-home-catalog .cc-home-catalog__btn--white {
  background: #fff !important;
  color: #090b0f !important;
  -webkit-text-fill-color: #090b0f !important;
  border-color: #fff !important;
}

/* Header CTA — beat Nova link hover (blue text) */
.cc-header__cta:not(.cc-header__cta--ghost),
a.cc-header__cta:not(.cc-header__cta--ghost) {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  text-decoration: none !important;
}

.cc-header__cta:not(.cc-header__cta--ghost):hover,
.cc-header__cta:not(.cc-header__cta--ghost):focus-visible,
a.cc-header__cta:not(.cc-header__cta--ghost):hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(135deg, #ff2534 0%, #ff4652 100%) !important;
  box-shadow:
    0 24px 52px rgba(239, 31, 45, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
}

.cc-header__cta--ghost,
a.cc-header__cta--ghost,
.cc-header__cta--ghost:hover,
a.cc-header__cta--ghost:hover {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

/* Product page buttons — red/dark = white text, white btn = dark text */
.cc-product-dark a.cc-product-dark__btn--red,
.cc-product-dark a.cc-product-dark__btn--dark,
.cc-product-dark a.cc-product-dark__btn.cc-product-dark__btn--red {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

.cc-product-dark a.cc-product-dark__btn--white,
.cc-product-dark a.cc-product-dark__btn.cc-product-dark__btn--white {
  color: #090b0f !important;
  -webkit-text-fill-color: #090b0f !important;
}

/* CMS landing pages (BMW X5 etc.) */
.ty-mainbox-container:has(.ty-wysiwyg-content .wrap) .ty-mainbox-title {
  display: none !important;
}

.ty-wysiwyg-content {
  color: #fff !important;
}

.ty-wysiwyg-content .lead h1,
.ty-wysiwyg-content .section h2,
.ty-wysiwyg-content .cta h2,
.ty-wysiwyg-content h1,
.ty-wysiwyg-content h2,
.ty-wysiwyg-content h3,
.ty-wysiwyg-content .card__title {
  color: #fff !important;
}

.ty-wysiwyg-content .lead p,
.ty-wysiwyg-content .section p,
.ty-wysiwyg-content .card__text,
.ty-wysiwyg-content .note,
.ty-wysiwyg-content p {
  color: rgba(255, 255, 255, 0.62) !important;
}

.ty-wysiwyg-content .tag {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.84) !important;
  box-shadow: none !important;
}

.ty-wysiwyg-content .card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    #0d1016 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.82) !important;
}

.ty-wysiwyg-content .spec {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.72) !important;
}

.ty-wysiwyg-content .spec b {
  color: #fff !important;
}

.ty-wysiwyg-content .btn--primary {
  background: linear-gradient(135deg, #ef1f2d, #ff3745) !important;
  color: #fff !important;
}

.ty-wysiwyg-content .btn--ghost {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}

/* Car filter page — same grid as catalog */
.ty-cs-controller-car_filter .cc-home-catalog__cars,
body:has(#ccCarFilter) .cc-home-catalog__cars {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
}

.ty-cs-controller-car_filter a.cc-home-catalog__btn,
.ty-cs-controller-car_filter a.cc-home-catalog__btn--red,
#ccCarFilter a.cc-home-catalog__btn,
#ccCarFilter a.cc-home-catalog__btn--red {
  color: #fff !important;
}

/* Login — beat Nova span8 floats after standalone */
.ty-cs-controller-auth .row-fluid:has(.auth-information-grid) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
}

.ty-cs-controller-auth .row-fluid:has(.auth-information-grid) .span8,
.ty-cs-controller-auth .main-content-grid,
.ty-cs-controller-auth .auth-information-grid {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
}

.ty-cs-controller-auth .ty-mainbox-title {
  display: none !important;
}

/* Wishlist empty — beat Nova standalone (#F8F9F9 / #cdcdcd) */
.ty-wish-list-empty [class*="ty-column"]:not(:first-child) {
  display: none !important;
}

.ty-wish-list-empty .ty-column4:first-child,
.ty-wish-list-empty [class*="ty-column"]:first-child {
  width: 100% !important;
  float: none !important;
}

.ty-wish-list-empty .ty-product-empty,
.ty-product-empty {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: auto !important;
  min-height: 160px !important;
  margin: 0 !important;
  padding: 48px 32px !important;
  border-radius: 24px 24px 0 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-bottom: none !important;
  background: rgba(255, 255, 255, 0.05) !important;
  text-align: center;
}

.ty-wish-list-empty .ty-product-empty__text,
.ty-product-empty__text {
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
}

.ty-wish-list__buttons.buttons-container,
.buttons-container.ty-wish-list__continue {
  margin-top: 0 !important;
  border-radius: 0 0 24px 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

#cart_main {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

#cart_main .ty-no-items {
  border-radius: 24px 24px 0 0 !important;
  border-bottom: none !important;
  margin-bottom: 0 !important;
}

#cart_main .buttons-container {
  margin-top: 0 !important;
  text-align: center;
  border-radius: 0 0 24px 24px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

.ty-wish-list__buttons .ty-btn,
.ty-wish-list__buttons a.ty-btn.ty-btn__secondary.text-button,
.buttons-container.ty-wish-list__continue a.ty-btn.ty-btn__secondary.text-button,
#cart_main .buttons-container a.ty-btn.ty-btn__secondary.text-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  background: linear-gradient(135deg, #ef1f2d, #ff3745) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 16px 40px rgba(239, 31, 45, 0.28);
}

.ty-wish-list__buttons a.ty-btn.ty-btn__secondary.text-button:hover,
.buttons-container.ty-wish-list__continue a.ty-btn.ty-btn__secondary.text-button:hover,
#cart_main .buttons-container a.ty-btn.ty-btn__secondary.text-button:hover {
  background: linear-gradient(135deg, #ff2534, #ff4652) !important;
  color: #fff !important;
}

@media (max-width: 1320px) {
  .cc-home-catalog__cars {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  .cc-home-catalog__cars {
    grid-template-columns: 1fr !important;
  }
}

/* Product gallery lightbox (teleported to body) */
.cc-product-dark__lightbox-close,
.cc-product-dark__lightbox-arrow {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.cc-product-dark__lightbox-close svg,
.cc-product-dark__lightbox-arrow svg {
  stroke: #fff !important;
}
