/*
 Theme Name:   Spektar Shoptimizer Child
 Theme URI:    https://github.com/bojans91/spektar
 Description:  Child theme for Shoptimizer — Spektar-specific templates and CSS.
 Author:       Spektar
 Template:     shoptimizer
 Version:      1.0.31
 Requires PHP: 7.3
 Text Domain:  spektar-shoptimizer-child
*/

/*
 * Add overrides below, or split into separate files and enqueue them from functions.php.
 */

/* ---------- GENERAL ---------- */

:root {
  --body-background: #fbfbfb;
  --text-color-primary: #2c2d33;
  --text-color-secondary: #ffffff;
  --accent-color: #ff0007;
  --accent-hover: #e60008;
}

html body {
  background-color: var(--body-background);
}

/* ---------- HEADER ---------- */

body .main-header.col-full {
  padding-top: 20px;
  padding-bottom: 20px;
}

.header-widget-region .widget.widget-text {
  padding-top: 8px;
  padding-bottom: 8px;
}

.top-bar #menu-top-meni {
  margin-bottom: 0;
}

@media (max-width: 1280px) {
  .col-full.topbar-wrapper,
  body .main-header.col-full,
  .shoptimizer-primary-navigation {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 1060px) {
  .main-navigation ul.menu > li.menu-item-has-children > a::after {
    display: none;
  }
}

@media (max-width: 992px) {
  body .main-header.col-full {
    padding-top: 0;
  }

  .menu-toggle .bar-text {
    display: none;
  }

  body.wp-custom-logo .site-header .custom-logo-link img {
    height: 28px;
  }

  body .header-widget-region {
    background-color: #222;
  }
}

/* ---------- FOOTER ---------- */

body .below-content .widget svg {
  position: unset;
  top: unset;
  left: unset;
  stroke: var(--accent-color);
  width: 40px;
  height: 40px;
}

body .below-content .widget .textwidget.custom-html-widget {
  display: flex;
  align-items: center;
}

body .below-content .widget .textwidget.custom-html-widget p {
  padding-left: 0;
}

body .below-content .widget .textwidget.custom-html-widget div {
  padding-left: 20px;
}

body .below-content .widget svg {
  stroke: var(--accent-color);
}

/* ---------- HOMEPAGE ---------- */

.home .n2-section-smartslider .n2-bullet {
  border: none !important;
  background-color: var(--text-color-secondary) !important;
}

@media (max-width: 768px) {
  .home .n2-section-smartslider .n2-ss-slider-4.n2-ow {
    height: 400px !important;
  }
}

.home .home-category-banners .elementor-widget-image {
  position: relative;
}

.home .home-category-banners .elementor-widget-image .widget-image-caption {
  position: absolute;
  top: 22px;
  left: 32px;
  display: flex;
  flex-direction: column;
  align-items: baseline;
  gap: 4px;
}

.home
  .home-category-banners
  .elementor-widget-image
  .widget-image-caption
  strong {
  color: #fff;
  font-size: 24px;
  font-weight: 600;
}

.home
  .home-category-banners
  .elementor-widget-image
  .widget-image-caption
  span {
  color: #fff;
  font-size: 16px;
  max-width: 200px;
  text-align: left;
}

.home
  .home-category-banners
  .home-category-banner-1
  .elementor-widget-image
  .widget-image-caption
  span {
  max-width: 130px;
}

.home
  .home-category-banners
  .home-category-banner-3
  .elementor-widget-image
  .widget-image-caption
  span {
  max-width: 180px;
}

.home .home-category-banners .elementor-widget-image .widget-image-caption a {
  margin-top: 10px;
  padding: 8px 20px;
  background-color: var(--accent-color);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
}

.home
  .home-category-banners
  .elementor-widget-image
  .widget-image-caption
  a:hover {
  background-color: var(--accent-hover);
}

.home-sale .product__categories {
  display: none;
}

.home .n2-section-smartslider .n2-bullet.n2-active {
  background: var(--accent-color) !important;
}

.home .home-middle-banner {
  position: relative;
}

.home .home-middle-banner figure {
  min-height: 320px;
}

.home .home-middle-banner figure img {
  min-height: 320px;
  object-fit: cover;
  object-position: 20%;
}

.home .home-middle-banner figcaption {
  position: absolute;
  top: 0;
  left: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  height: 100%;
}

@media (max-width: 768px) {
  .home .home-middle-banner figcaption {
    left: 32px;
    text-align: left;
    max-width: 80%;
  }
}

.home .home-middle-banner strong {
  text-align: left;
  max-width: 300px;
  color: var(--text-color-secondary);
  font-size: 32px;
  line-height: 40px;
}

.home .home-middle-banner span {
  color: var(--text-color-secondary);
}

.home .home-middle-banner a {
  margin-top: 6px;
  padding: 6px 24px;
  background-color: var(--text-color-secondary);
  color: var(--text-color-primary);
  font-weight: 600;
  border-radius: 8px;
}

.home .home-middle-banner a:hover {
  background-color: var(--body-background);
}

@media (max-width: 1024px) {
  .home-category-banners .elementor-widget-image img {
    width: 100%;
  }
}

/* ---------- WOOCOMMERCE: HORIZONTAL PRODUCT CARDS ---------- */

.woocommerce.spektar-horizontal-product-cards {
  max-width: 100%;
  --spektar-plp-card-gap: 1rem;
}

.woocommerce.spektar-horizontal-product-cards ul.products {
  justify-content: center;
  align-items: stretch;
}

.woocommerce.spektar-horizontal-product-cards ul.products li.product {
  align-self: stretch !important;
  height: 100%;
}

/* Desktop: one row (wrap) so .columns-N widths from the theme apply. Do not set ul layout on mobile — Shoptimizer uses CSS grid ≤992px. */
@media (min-width: 993px) {
  .woocommerce.spektar-horizontal-product-cards ul.products {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    width: calc(100% + 30px);
    max-width: none;
    margin-left: -15px;
    margin-bottom: 0;
    column-gap: var(--spektar-plp-card-gap);
    row-gap: var(--spektar-plp-card-gap);
  }

  .woocommerce.spektar-horizontal-product-cards ul.products li.product {
    box-sizing: border-box;
    min-width: 0;
    align-self: stretch !important;
    height: auto;
    /* Width: percentage + theme gutters breaks once gap is used — use calc from column count. */
  }

  .woocommerce.columns-1.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .woocommerce.columns-2.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 1 * var(--spektar-plp-card-gap)) / 2) !important;
    flex: 0 0 calc((100% - 1 * var(--spektar-plp-card-gap)) / 2);
    max-width: calc((100% - 1 * var(--spektar-plp-card-gap)) / 2);
  }

  .woocommerce.columns-3.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 2 * var(--spektar-plp-card-gap)) / 3) !important;
    flex: 0 0 calc((100% - 2 * var(--spektar-plp-card-gap)) / 3);
    max-width: calc((100% - 2 * var(--spektar-plp-card-gap)) / 3);
  }

  .woocommerce.columns-4.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 3 * var(--spektar-plp-card-gap)) / 4) !important;
    flex: 0 0 calc((100% - 3 * var(--spektar-plp-card-gap)) / 4);
    max-width: calc((100% - 3 * var(--spektar-plp-card-gap)) / 4);
  }

  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 5 * var(--spektar-plp-card-gap)) / 6) !important;
    flex: 0 0 calc((100% - 5 * var(--spektar-plp-card-gap)) / 6);
    max-width: calc((100% - 5 * var(--spektar-plp-card-gap)) / 6);
  }
}

/* columns="5" shortcode: step down before full 5-column row. */
@media (min-width: 993px) and (max-width: 1100px) {
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 2 * var(--spektar-plp-card-gap)) / 3) !important;
    flex: 0 0 calc((100% - 2 * var(--spektar-plp-card-gap)) / 3);
    max-width: calc((100% - 2 * var(--spektar-plp-card-gap)) / 3);
  }
}

@media (min-width: 1101px) and (max-width: 1400px) {
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 3 * var(--spektar-plp-card-gap)) / 4) !important;
    flex: 0 0 calc((100% - 3 * var(--spektar-plp-card-gap)) / 4);
    max-width: calc((100% - 3 * var(--spektar-plp-card-gap)) / 4);
  }
}

@media (min-width: 1401px) {
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: calc((100% - 4 * var(--spektar-plp-card-gap)) / 5) !important;
    flex: 0 0 calc((100% - 4 * var(--spektar-plp-card-gap)) / 5);
    max-width: calc((100% - 4 * var(--spektar-plp-card-gap)) / 5);
  }
}

/* columns="5" at 3–4 cols: use default card proportions, not 5-col compact styles. */
@media (min-width: 993px) and (max-width: 1400px) {
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product {
    padding: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-image__wrapper {
    flex: 0 0 42%;
    max-width: 42%;
    padding: 0.5rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-image__wrapper
    img {
    max-height: 105px;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-card__header {
    min-height: 120px;
    padding: 0.35rem 3.25rem 0.75rem 0.75rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-card__header
    .product__categories {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-loop-product__title
    a {
    font-size: inherit;
    line-height: inherit;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    overflow: visible;
  }
}

.woocommerce.spektar-horizontal-product-cards ul.products li.product {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  box-sizing: border-box;
  padding: 0.75rem;
  padding-bottom: 0.75rem;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 992px) {
  .woocommerce.spektar-horizontal-product-cards ul.products li.product {
    width: 100% !important;
    float: none !important;
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .woocommerce.spektar-horizontal-product-cards ul.products {
    display: grid;
    grid-template-columns: repeat(1, minmax(10px, 1fr));
    align-items: stretch;
    column-gap: var(--spektar-plp-card-gap);
    row-gap: var(--spektar-plp-card-gap);
    width: 100%;
    margin-left: 0;
  }
}

@media (min-width: 701px) and (max-width: 992px) {
  .woocommerce.spektar-horizontal-product-cards ul.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(10px, 1fr));
    align-items: stretch;
    column-gap: var(--spektar-plp-card-gap);
    row-gap: var(--spektar-plp-card-gap);
    width: 100%;
    margin-left: 0;
  }
}

/* Tighter card when many columns (narrow cells). */
@media (min-width: 993px) {
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product {
    padding: 0.45rem 0.4rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-image__wrapper,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    .woocommerce-image__wrapper {
    flex: 0 0 36%;
    max-width: 36%;
    padding: 0.25rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-image__wrapper
    img,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    .woocommerce-image__wrapper
    img {
    max-height: 88px;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-card__header,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    .woocommerce-card__header {
    min-height: 0;
    padding: 0.2rem 2.35rem 0.45rem 0.3rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-card__header
    .product__categories,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    .woocommerce-card__header
    .product__categories {
    font-size: 0.62rem;
    margin-bottom: 0.25rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    .price
    del,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    .price
    del {
    font-size: 0.65rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    .price
    ins,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    .price
    ins {
    font-size: 0.8rem;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    .woocommerce-loop-product__title
    a,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    .woocommerce-loop-product__title
    a {
    font-size: clamp(0.62rem, 0.5rem + 0.35vw, 0.75rem);
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    .onsale,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    .onsale {
    font-size: 9px;
    padding: 2px 5px;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.add_to_cart_button,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_simple,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_variable,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_grouped,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_external,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.add_to_cart_button,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_simple,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_variable,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_grouped,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_external {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    max-width: 36px;
    right: 6px;
    bottom: 6px;
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.add_to_cart_button:hover,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_simple:hover,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_variable:hover,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_grouped:hover,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_external:hover,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.add_to_cart_button:hover,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_simple:hover,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_variable:hover,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_grouped:hover,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_external:hover {
    background-color: var(--accent-color);
  }

  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.add_to_cart_button::before,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_simple::before,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_variable::before,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_grouped::before,
  .woocommerce.columns-5.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_external::before,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.add_to_cart_button::before,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_simple::before,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_variable::before,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_grouped::before,
  .woocommerce.columns-6.spektar-horizontal-product-cards
    ul.products
    li.product
    a.button.product_type_external::before {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 993px) {
  .woocommerce.spektar-horizontal-product-cards
    ul.products
    li.product:not(.product-category) {
    margin-bottom: 0;
  }

  /* Always show CTA on desktop (Shoptimizer defaults to opacity:0 until hover). */
  .woocommerce.spektar-horizontal-product-cards ul.products li.product .button,
  .woocommerce.spektar-horizontal-product-cards
    ul.products
    li.product
    .added_to_cart {
    opacity: 1 !important;
  }

  .woocommerce.spektar-horizontal-product-cards
    ul.products
    li.product:not(.product-category):before {
    display: none;
  }
}

.woocommerce.spektar-horizontal-product-cards .woocommerce-image__wrapper {
  position: relative;
  flex: 0 0 42%;
  max-width: 42%;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  overflow: hidden;
  border-radius: 8px;
}

.woocommerce.spektar-horizontal-product-cards .woocommerce-image__wrapper img {
  max-height: 105px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  transform: scale(1);
  transform-origin: center center;
}

/* Slight zoom in on hover (cancel Shoptimizer’s wrapper shrink / flip transforms). */
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product:hover
  .woocommerce-image__wrapper,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product:focus-within
  .woocommerce-image__wrapper {
  transform: none;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product:not(.product-category):hover
  .woocommerce-image__wrapper
  img,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product:not(.product-category):focus-within
  .woocommerce-image__wrapper
  img {
  transform: scale(1.06);
}

.woocommerce.spektar-horizontal-product-cards .woocommerce-card__header {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.35rem 3.25rem 0.75rem 0.75rem;
  min-height: 120px;
  align-self: stretch;
}

/* Title first, then category (matches reference layout). */
.woocommerce.spektar-horizontal-product-cards
  .woocommerce-card__header
  .woocommerce-loop-product__title {
  order: 1;
  padding-top: 0;
  padding-bottom: 0.2rem;
}

.woocommerce.spektar-horizontal-product-cards
  .woocommerce-card__header
  .product__categories {
  order: 2;
  margin-top: 0;
  margin-bottom: 0.5rem;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: #444;
}

.woocommerce.spektar-horizontal-product-cards
  .woocommerce-card__header
  .star-rating,
.woocommerce.spektar-horizontal-product-cards
  .woocommerce-card__header
  .shoptimizer_ratingContainer {
  order: 3;
}

.woocommerce.spektar-horizontal-product-cards .woocommerce-card__header .price {
  order: 4;
  margin-bottom: 0;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  .price
  del {
  display: block;
  color: #9a9da3;
  font-size: 0.85rem;
  margin-right: 0;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  .price
  ins {
  display: block;
  margin-top: 0.15rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-color);
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  .price:not(:has(ins)) {
  font-weight: 700;
}

/* Sale badge: pill → corner badge */
.woocommerce.spektar-horizontal-product-cards ul.products li.product .onsale {
  top: 6px;
  left: 6px;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  .product-label.type-bubble {
  top: 2px;
  left: 2px;
  background: var(--accent-color);
  border-radius: 6px;
}

/* Icon-only add to cart: square, bottom-right of full card */
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.add_to_cart_button,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_simple,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_variable,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_grouped,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_external {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  max-width: 44px;
  padding: 0 !important;
  line-height: 0 !important;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #d8d8de !important;
  background: #fff !important;
  color: #111 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  /* Hide label text (incl. i18n multi-word strings) so it cannot wrap in a 44px box */
  font-size: 0 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-indent: 0;
  gap: 0;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.add_to_cart_button:hover,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_simple:hover,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_variable:hover,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_grouped:hover,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_external:hover {
  background: var(--accent-hover) !important;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.add_to_cart_button.added {
  background: var(--accent-hover) !important;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  .added_to_cart.wc-forward {
  display: none;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button
  .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  word-wrap: normal !important;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button
  > *:not(.screen-reader-text) {
  display: none !important;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.add_to_cart_button::before,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_simple::before,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_variable::before,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_grouped::before,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.product_type_external::before {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 6h14l-1 7H7L6 6zm0 0L5 3H2'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 6h14l-1 7H7L6 6zm0 0L5 3H2'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.loading::before {
  opacity: 0;
}

/* Ajax loader uses :after; keep icon color so mask does not vanish on .loading */
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.ajax_add_to_cart.loading {
  color: #111 !important;
  background-color: var(--accent-color) !important;
}

.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.ajax_add_to_cart:hover,
.woocommerce.spektar-horizontal-product-cards
  ul.products
  li.product
  a.button.ajax_add_to_cart.added {
  color: var(--text-color-secondary) !important;
}

/* ---------- PDP ---------- */

.single-product .product-details-wrapper {
  max-width: 1274px;
}

.single-product .woocommerce-tabs.wc-tabs-wrapper {
  max-width: 1190px;
}

.single-product .related-wrapper {
  max-width: 100%;
  margin: auto;
  padding-bottom: 20px;
}

.single-product .related-wrapper .product_meta {
  left: unset;
  right: unset;
  margin-left: unset;
  margin-right: unset;
}

.single-product .product p.price ins,
.single-product .product p.price:not(:has(ins)),
.single-product .woocommerce-variation-price .price ins,
.single-product .woocommerce-variation-price .price:not(:has(ins)),
.single-product .product p.price ins .amount,
.single-product .product p.price:not(:has(ins)) .amount,
.single-product .woocommerce-variation-price .price ins .amount,
.single-product .woocommerce-variation-price .price:not(:has(ins)) .amount {
  font-size: 24px;
  font-weight: bold;
  line-height: 28px;
}

.single-product .product p.stock {
  font-size: 16px;
}

.product form.cart .quantity:has(input[type=hidden]) .quantity-button.quantity-down:before,
.product form.cart .quantity:has(input[type=hidden]) .quantity-button.quantity-up:before {
  content: none;
}

.single-product .woocommerce-Tabs-panel--description table td {
  padding-left: 8px;
}

/* Related products: same horizontal cards as homepage sale section */
.single-product
  section.related.products.spektar-horizontal-product-cards
  .product__categories {
  display: none;
}

/* Shoptimizer mobile carousel → stacked horizontal cards on PDP related */
@media (max-width: 992px) {
  .single-product
    section.related.products.spektar-horizontal-product-cards
    ul.products {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    overflow-x: visible;
    width: calc(100% + 30px);
    max-width: none;
    margin-left: -15px;
    padding-right: 0;
    padding-left: 0;
    scroll-snap-type: none;
    column-gap: var(--spektar-plp-card-gap, 1rem);
    row-gap: var(--spektar-plp-card-gap, 1rem);
  }

  .single-product
    section.related.products.spektar-horizontal-product-cards
    ul.products
    li.product {
    min-width: 0;
    max-width: none;
    align-self: stretch !important;
    height: 100%;
    scroll-snap-align: unset;
    padding: 0.75rem;
  }

  .single-product
    section.related.products.spektar-horizontal-product-cards
    ul.products
    li.product
    .woocommerce-card__header {
    box-shadow: none;
  }
}

/* PDP related: 2×2 grid between tablet and wide desktop */
@media (min-width: 768px) and (max-width: 1400px) {
  .single-product
    section.related.products.spektar-horizontal-product-cards
    ul.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    overflow-x: visible;
    scroll-snap-type: none;
    width: calc(100% + 30px);
    max-width: none;
    margin-left: -15px;
    column-gap: var(--spektar-plp-card-gap, 1rem);
    row-gap: var(--spektar-plp-card-gap, 1rem);
  }

  .single-product
    section.related.products.spektar-horizontal-product-cards
    ul.products
    li.product {
    width: 100% !important;
    flex: none !important;
    max-width: none !important;
    min-width: 0;
    align-self: stretch !important;
    height: 100%;
  }
}

/* ---------- PLP CARDS (category archives + product search) ---------- */
/*
 * Same chrome as homepage .spektar-horizontal-product-cards, but image on top.
 * Shoptimizer uses .site-main > .columns-N > ul.products (no .woocommerce wrapper).
 * Body class: .spektar-plp-cards (see spektar_is_product_plp_view() in functions.php).
 */

body.spektar-plp-cards .site-main {
  --spektar-plp-card-gap: 1rem;
  --spektar-plp-image-min-height: 270px;
}

body.spektar-plp-cards .site-main ul.products li.product .product__categories {
  display: none;
}

@media (min-width: 993px) {
  body.spektar-plp-cards .site-main ul.products {
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    float: none;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    column-gap: var(--spektar-plp-card-gap);
    row-gap: var(--spektar-plp-card-gap);
  }

  body.spektar-plp-cards .site-main ul.products li.product {
    width: calc((100% - 3 * var(--spektar-plp-card-gap)) / 4) !important;
    flex: 0 0 calc((100% - 3 * var(--spektar-plp-card-gap)) / 4) !important;
    max-width: calc((100% - 3 * var(--spektar-plp-card-gap)) / 4) !important;
    align-self: stretch !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.spektar-plp-cards
    .site-main
    ul.products
    li.product:not(.product-category) {
    padding-bottom: 0.75rem !important;
  }

  body.spektar-plp-cards
    .site-main
    .woocommerce-card__header
    .woocommerce-loop-product__title
    a {
    font-size: clamp(0.72rem, 0.62rem + 0.25vw, 0.85rem);
    -webkit-line-clamp: 2;
  }

  body.spektar-plp-cards .site-main ul.products li.product .price ins,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    .price:not(:has(ins)) {
    font-size: 1rem;
  }

  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.add_to_cart_button,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_simple,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_variable,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_grouped,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_external {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    max-width: 40px;
    right: 8px;
    bottom: 8px;
  }

  body.spektar-plp-cards .site-main ul.products li.product .button,
  body.spektar-plp-cards .site-main ul.products li.product .added_to_cart {
    opacity: 1 !important;
  }

  body.spektar-plp-cards
    .site-main
    ul.products
    li.product:not(.product-category):before {
    display: none;
  }
}

/* Category/search PLP (.columns-4): fewer columns on medium desktops. */
@media (min-width: 993px) and (max-width: 1200px) {
  body.spektar-plp-cards .site-main ul.products li.product {
    width: calc((100% - 1 * var(--spektar-plp-card-gap)) / 2) !important;
    flex: 0 0 calc((100% - 1 * var(--spektar-plp-card-gap)) / 2) !important;
    max-width: calc((100% - 1 * var(--spektar-plp-card-gap)) / 2) !important;
  }
}

@media (min-width: 1201px) and (max-width: 1400px) {
  body.spektar-plp-cards .site-main ul.products li.product {
    width: calc((100% - 2 * var(--spektar-plp-card-gap)) / 3) !important;
    flex: 0 0 calc((100% - 2 * var(--spektar-plp-card-gap)) / 3) !important;
    max-width: calc((100% - 2 * var(--spektar-plp-card-gap)) / 3) !important;
  }
}

body.spektar-plp-cards .site-main ul.products li.product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  box-sizing: border-box;
  padding: 0.75rem !important;
  margin: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  > .woocommerce-LoopProduct-link {
  display: block;
  flex: 0 0 auto;
}

body.spektar-plp-cards .site-main .woocommerce-image__wrapper {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  min-height: var(--spektar-plp-image-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  overflow: hidden;
  border-radius: 8px;
}

body.spektar-plp-cards .site-main .woocommerce-image__wrapper img {
  width: auto;
  max-width: 100%;
  max-height: calc(var(--spektar-plp-image-min-height) - 1.5rem);
  height: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
  transform: scale(1);
  transform-origin: center center;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product:hover
  .woocommerce-image__wrapper,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product:focus-within
  .woocommerce-image__wrapper {
  transform: none;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product:not(.product-category):hover
  .woocommerce-image__wrapper
  img,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product:not(.product-category):focus-within
  .woocommerce-image__wrapper
  img {
  transform: scale(1.06);
}

body.spektar-plp-cards .site-main .woocommerce-card__header {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.35rem 3.25rem 0.75rem 0.75rem;
  min-height: 0;
  clear: none;
}

body.spektar-plp-cards
  .site-main
  .woocommerce-card__header
  .woocommerce-loop-product__title {
  order: 1;
  padding-top: 0;
  padding-bottom: 0.35rem;
}

body.spektar-plp-cards
  .site-main
  .woocommerce-card__header
  .woocommerce-loop-product__title
  a {
  color: #555;
  font-weight: 400;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.spektar-plp-cards .site-main .woocommerce-card__header .star-rating,
body.spektar-plp-cards
  .site-main
  .woocommerce-card__header
  .shoptimizer_ratingContainer {
  order: 2;
}

body.spektar-plp-cards .site-main .woocommerce-card__header .price {
  order: 3;
  margin-top: auto;
  margin-bottom: 0;
}

body.spektar-plp-cards .site-main ul.products li.product .price del {
  display: block;
  color: #9a9da3;
  font-size: 0.85rem;
  margin-right: 0;
}

body.spektar-plp-cards .site-main ul.products li.product .price ins,
body.spektar-plp-cards .site-main ul.products li.product .price:not(:has(ins)) {
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.25;
}

body.spektar-plp-cards .site-main ul.products li.product .price ins {
  display: block;
  margin-top: 0.15rem;
  text-decoration: none;
  color: var(--accent-color);
}

body.spektar-plp-cards .site-main ul.products li.product .price:not(:has(ins)) {
  color: #111;
}

body.spektar-plp-cards .site-main ul.products li.product .onsale {
  top: 6px;
  left: 6px;
  background: var(--accent-color);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  .product-label.type-bubble {
  top: 2px;
  left: 2px;
  background: var(--accent-color);
  border-radius: 6px;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.add_to_cart_button,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_simple,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_variable,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_grouped,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_external {
  position: absolute;
  z-index: 2;
  right: 10px;
  bottom: 10px;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px;
  max-width: 44px;
  margin-top: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #d8d8de !important;
  background: #fff !important;
  color: #111 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  font-size: 0 !important;
  letter-spacing: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-indent: 0;
  gap: 0;
  opacity: 1 !important;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.add_to_cart_button:hover,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_simple:hover,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_variable:hover,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_grouped:hover,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_external:hover {
  background: var(--accent-hover) !important;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.add_to_cart_button.added {
  background: var(--accent-hover) !important;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  .added_to_cart.wc-forward {
  display: none;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button
  .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  word-wrap: normal !important;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button
  > *:not(.screen-reader-text) {
  display: none !important;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.add_to_cart_button::before,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_simple::before,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_variable::before,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_grouped::before,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.product_type_external::before {
  content: '';
  display: block;
  width: 22px;
  height: 22px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 6h14l-1 7H7L6 6zm0 0L5 3H2'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E")
    center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 6h14l-1 7H7L6 6zm0 0L5 3H2'/%3E%3Ccircle cx='9' cy='20' r='1'/%3E%3Ccircle cx='18' cy='20' r='1'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.loading::before {
  opacity: 0;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.ajax_add_to_cart.loading {
  color: #111 !important;
  background-color: var(--accent-color) !important;
}

body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.ajax_add_to_cart:hover,
body.spektar-plp-cards
  .site-main
  ul.products
  li.product
  a.button.ajax_add_to_cart.added {
  color: var(--text-color-secondary) !important;
}

@media (max-width: 992px) {
  body.spektar-plp-cards .site-main {
    --spektar-plp-image-min-height: 210px;
  }

  body.spektar-plp-cards .site-main ul.products {
    align-items: stretch;
    row-gap: var(--spektar-plp-card-gap);
    column-gap: var(--spektar-plp-card-gap);
  }

  body.spektar-plp-cards .site-main ul.products li.product {
    height: 100%;
    align-self: stretch;
  }

  body.spektar-plp-cards .site-main .woocommerce-card__header {
    padding: 0.5rem 3.25rem 0.75rem 0.5rem;
    box-shadow: none;
  }

  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.add_to_cart_button,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_simple,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_variable,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_grouped,
  body.spektar-plp-cards
    .site-main
    ul.products
    li.product
    a.button.product_type_external {
    right: 12px;
    bottom: 12px;
  }
}

@media (max-width: 450px) {
  body.spektar-plp-cards .site-main ul.products {
    display: grid;
    grid-template-columns: repeat(1, minmax(10px, 1fr));
    width: 100%;
    margin-left: 0;
  }

  body.spektar-plp-cards .site-main ul.products li.product {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  body.spektar-plp-cards .site-main .woocommerce-image__wrapper img {
    max-height: 100%;
    height: 220px;
  }
}

/* ---------- PRODUCT CATEGORY ARCHIVE ---------- */

.tax-product_cat header.woocommerce-products-header {
  display: none;
}

/* ---------- SHOP SIDEBAR: COLLAPSIBLE FILTERS ---------- */

.widget_product_categories {
  padding-right: 0;
}

.widget_product_categories
  > ul.product-categories
  > li.cat-item
  > a.spektar-cat-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 1.75rem);
}

.widget_product_categories .spektar-cat-icon {
  width: 1.25rem;
  height: 1.25rem;
  object-fit: contain;
  flex-shrink: 0;
  color: #4a5568;
}

.widget_product_categories .spektar-cat-name {
  min-width: 0;
}

.widget_product_categories ul li.cat-parent,
.spektar-attribute-filter,
#secondary .widget_layered_nav,
.widget_layered_nav.spektar-collapsible-widget {
  position: relative;
  padding-right: 0;
}

.widget_product_categories ul li.cat-parent > .children,
.spektar-attribute-filter .woocommerce-widget-layered-nav-list,
.spektar-attribute-filter > ul,
#secondary
  .widget_layered_nav:not(.spektar-widget-expanded)
  .woocommerce-widget-layered-nav-list,
#secondary .widget_layered_nav:not(.spektar-widget-expanded) > ul,
.widget_layered_nav.spektar-collapsible-widget
  .woocommerce-widget-layered-nav-list,
.widget_layered_nav.spektar-collapsible-widget > ul {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  margin-bottom: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.3s ease,
    margin-top 0.3s ease,
    margin-bottom 0.3s ease;
}

.widget_product_categories ul li.cat-parent.spektar-cat-expanded > .children,
.spektar-attribute-filter.spektar-widget-expanded
  .woocommerce-widget-layered-nav-list,
.spektar-attribute-filter.spektar-widget-expanded > ul,
#secondary
  .widget_layered_nav.spektar-widget-expanded
  .woocommerce-widget-layered-nav-list,
#secondary .widget_layered_nav.spektar-widget-expanded > ul,
.widget_layered_nav.spektar-collapsible-widget.spektar-widget-expanded
  .woocommerce-widget-layered-nav-list,
.widget_layered_nav.spektar-collapsible-widget.spektar-widget-expanded > ul {
  max-height: 1200px;
  opacity: 1;
  margin-top: 0.7em;
  margin-bottom: 0.7em;
}

.widget_product_categories .spektar-sidebar-toggle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4a5568;
  line-height: 1;
  transition: color 0.2s ease;
}

.spektar-attribute-filter > .spektar-sidebar-toggle-header,
#secondary .widget_layered_nav > .spektar-sidebar-toggle-header,
.widget_layered_nav.spektar-collapsible-widget
  > .spektar-sidebar-toggle-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  line-height: inherit;
}

.spektar-sidebar-toggle-header .widget-title,
.spektar-sidebar-toggle-header .widgettitle {
  flex: 1;
  margin: 0;
  pointer-events: none;
}

.spektar-sidebar-toggle-header .spektar-sidebar-toggle-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  color: #4a5568;
  transition: color 0.2s ease;
}

.widget_product_categories .spektar-sidebar-toggle::before,
.spektar-sidebar-toggle-header .spektar-sidebar-toggle-icon::before {
  content: '';
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  transition:
    transform 0.3s ease,
    margin-top 0.3s ease;
}

.widget_product_categories
  ul
  li.cat-parent.spektar-cat-expanded
  > .spektar-sidebar-toggle::before,
.spektar-attribute-filter.spektar-widget-expanded
  > .spektar-sidebar-toggle-header
  .spektar-sidebar-toggle-icon::before,
#secondary
  .widget_layered_nav.spektar-widget-expanded
  > .spektar-sidebar-toggle-header
  .spektar-sidebar-toggle-icon::before,
.widget_layered_nav.spektar-collapsible-widget.spektar-widget-expanded
  > .spektar-sidebar-toggle-header
  .spektar-sidebar-toggle-icon::before {
  transform: rotate(-135deg);
  margin-top: 0.15rem;
}

.widget_product_categories .spektar-sidebar-toggle:hover,
.widget_product_categories .spektar-sidebar-toggle:focus-visible,
.spektar-sidebar-toggle-header:hover .spektar-sidebar-toggle-icon,
.spektar-sidebar-toggle-header:focus-visible .spektar-sidebar-toggle-icon {
  color: var(--accent-color, #ff0007);
  outline: none;
}

.spektar-sidebar-toggle-header:focus-visible {
  outline: none;
}

/* Attribute filters: checkbox-style options (checkbox on link = fully clickable) */
.spektar-attribute-filter ul.woocommerce-widget-layered-nav-list li,
.spektar-attribute-filter ul li,
#secondary .widget_layered_nav ul.woocommerce-widget-layered-nav-list li,
#secondary .widget_layered_nav ul li {
  position: relative;
  padding-left: 0;
  margin-bottom: 4px;
}

.spektar-attribute-filter ul.woocommerce-widget-layered-nav-list li::before,
.spektar-attribute-filter ul li::before,
#secondary
  .widget_layered_nav
  ul.woocommerce-widget-layered-nav-list
  li::before,
#secondary .widget_layered_nav ul li::before {
  content: none !important;
  display: none !important;
}

.spektar-attribute-filter ul li a,
#secondary .widget_layered_nav ul li a {
  position: relative;
  display: block;
  padding: 0.2rem 2rem 0.2rem 1.75rem;
  text-decoration: none;
}

.spektar-attribute-filter ul li a::before,
#secondary .widget_layered_nav ul li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid #c5c7cc;
  background: #fff;
  box-shadow: none;
  transform: translateY(-50%);
  pointer-events: none;
}

.spektar-attribute-filter ul li a::after,
#secondary .widget_layered_nav ul li a::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 50%;
  width: 4px;
  height: 8px;
  margin-top: -1px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translateY(-50%) rotate(45deg) scale(0);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.spektar-attribute-filter
  ul.woocommerce-widget-layered-nav-list
  li.chosen
  a::before,
.spektar-attribute-filter ul li.chosen a::before,
.spektar-attribute-filter
  ul.woocommerce-widget-layered-nav-list
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::before,
.spektar-attribute-filter
  ul
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::before,
#secondary
  .widget_layered_nav
  ul.woocommerce-widget-layered-nav-list
  li.chosen
  a::before,
#secondary .widget_layered_nav ul li.chosen a::before,
#secondary
  .widget_layered_nav
  ul.woocommerce-widget-layered-nav-list
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::before,
#secondary
  .widget_layered_nav
  ul
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::before {
  background: var(--accent-color, #ff0007);
  border-color: var(--accent-color, #ff0007);
}

.spektar-attribute-filter
  ul.woocommerce-widget-layered-nav-list
  li.chosen
  a::after,
.spektar-attribute-filter ul li.chosen a::after,
.spektar-attribute-filter
  ul.woocommerce-widget-layered-nav-list
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::after,
.spektar-attribute-filter
  ul
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::after,
#secondary
  .widget_layered_nav
  ul.woocommerce-widget-layered-nav-list
  li.chosen
  a::after,
#secondary .widget_layered_nav ul li.chosen a::after,
#secondary
  .widget_layered_nav
  ul.woocommerce-widget-layered-nav-list
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::after,
#secondary
  .widget_layered_nav
  ul
  li.woocommerce-widget-layered-nav-list__item--chosen
  a::after {
  transform: translateY(-50%) rotate(45deg) scale(1);
}

.spektar-attribute-filter ul li .count,
#secondary .widget_layered_nav ul li .count {
  position: absolute;
  top: 0.2rem;
  right: 5px;
  pointer-events: none;
}

.left-woocommerce-sidebar #secondary {
  padding-top: 24px;
  padding-bottom: 24px;
  padding-left: 16px;
  padding-right: 16px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.widget_price_filter .ui-slider .ui-slider-handle:last-child {
  margin-left: -20px;
}

#secondary .widget {
  padding-bottom: 12px;
  margin-bottom: 12px;
}

#secondary .widget#woocommerce_product_categories-4 .widget-title {
  font-size: 16px;
  margin-bottom: 16px;
}

#secondary .widget li {
  margin-bottom: 10px;
}

.left-woocommerce-sidebar #secondary {
  margin-top: 119px;
  background-color: #fff;
}

.search-results.left-woocommerce-sidebar #secondary {
  margin-top: 46px;
}

@media (min-width: 1401px) {
  .left-woocommerce-sidebar #secondary {
    width: 20%;
  }
}

@media (min-width: 993px) and (max-width: 1400px) {
  .left-woocommerce-sidebar #secondary {
    width: 25%;
  }

  .woocommerce.woocommerce-page .content-area {
    width: 73%;
  }

  .woocommerce.woocommerce-page.pdp-full .content-area {
    width: 100%;
  }
}

@media (max-width: 992px) {
  .left-woocommerce-sidebar #secondary {
    bottom: 0;
    margin-top: 0;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .widget_product_categories ul li.cat-parent > .children,
  .spektar-attribute-filter .woocommerce-widget-layered-nav-list,
  .spektar-attribute-filter > ul,
  .widget_layered_nav.spektar-collapsible-widget
    .woocommerce-widget-layered-nav-list,
  .widget_layered_nav.spektar-collapsible-widget > ul,
  .widget_product_categories .spektar-sidebar-toggle::before,
  .spektar-sidebar-toggle-header .spektar-sidebar-toggle-icon::before,
  .spektar-attribute-filter ul li a::after,
  #secondary .widget_layered_nav ul li a::after {
    transition: none;
  }
}

.page-template-default #secondary {
  display: none;
}

/* ---------- CONTACT PAGE ---------- */

.spektar-contact-page .entry-header {
  display: none;
}

.spektar-contact-page .archive-header {
  display: none;
}

.spektar-contact-page #primary {
  width: 100%;
}

.spektar-contact-page .site-content {
  padding-bottom: 0;
  overflow-x: visible;
}

.spektar-contact-page .site-content .col-full,
.spektar-contact-page #primary,
.spektar-contact-page .content-area {
  overflow-x: visible;
}

.contact-map-container {
  position: relative;
  width: 100vw;
  max-width: 100vw !important;
  min-height: 700px;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Break out of the theme container when Elementor stretch is not handling width. */
.contact-map-container:not(.elementor-section-stretched) {
  left: 50%;
  margin-left: -50vw;
}

.contact-map-container > .elementor-container,
.contact-map-container .elementor-column,
.contact-map-container .elementor-widget-wrap,
.contact-map-container .elementor-widget-google_maps,
.contact-map-container .elementor-custom-embed {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.contact-map-container iframe,
.contact-map-container img {
  width: 100% !important;
  display: block;
  object-position: center;
  object-fit: cover;
  height: 600px;
  border: 0;
}

.spektar-contact-hero {
  position: relative;
}

.spektar-contact-card {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin-top: -680px;
  padding: 1.5rem 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.spektar-contact-card__title {
  margin-bottom: 30px;
  font-size: clamp(1.5rem, 1.25rem + 0.5vw, 1.875rem);
  font-weight: 700;
  color: var(--text-color-primary);
  text-align: left;
}

.spektar-contact-card__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

@media (min-width: 993px) {
  .spektar-contact-card__grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr) minmax(0, 0.85fr);
  }

  .spektar-contact-card__col {
    padding: 0 1rem;
  }

  .spektar-contact-card__col:first-child {
    padding-left: 0;
  }

  .spektar-contact-card__col:last-child {
    padding-right: 0;
  }

  .spektar-contact-card__col:not(:last-child) {
    border-right: 1px solid rgba(237, 238, 238, 1);
  }
}

.spektar-contact-card__col-title {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  margin: 0 0 0.875rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color-primary);
}

/* Elementor Text Editor strips inline SVG — icons via CSS masks */
.spektar-contact-card__icon {
  display: none;
}

.spektar-contact-card__col-title::before {
  content: "";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background-color: var(--accent-color);
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.spektar-contact-card__col:nth-child(1) .spektar-contact-card__col-title::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 21s7-4.35 7-10a7 7 0 1 0-14 0c0 5.65 7 10 7 10z'/%3E%3Ccircle cx='12' cy='11' r='2.5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M12 21s7-4.35 7-10a7 7 0 1 0-14 0c0 5.65 7 10 7 10z'/%3E%3Ccircle cx='12' cy='11' r='2.5'/%3E%3C/svg%3E");
}

.spektar-contact-card__col:nth-child(2) .spektar-contact-card__col-title::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 6h16v12H4z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 7l8 6 8-6'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 6h16v12H4z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M4 7l8 6 8-6'/%3E%3C/svg%3E");
}

.spektar-contact-card__col:nth-child(3) .spektar-contact-card__col-title::before {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a2 2 0 0 1-2 2A16 16 0 0 1 3 6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E");
}

.spektar-contact-card__text {
  text-align: center;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color-primary);
}

.spektar-contact-card__text a {
  color: var(--text-color-primary);
  text-decoration: none;
}

.spektar-contact-card__text a:hover {
  color: var(--accent-color);
}

.spektar-contact-card__form {
  margin-top: 20px;
}

.spektar-contact-card__form p {
  margin-bottom: 10px;
}

.spektar-contact-card__form p input {
  margin-bottom: 0;
}

.spektar-contact-card__form .wpcf7 {
  margin-top: 0.25rem;
}

.spektar-contact-card__form .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  margin-bottom: 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  font-size: 0.9375rem;
}

.spektar-contact-card__form .wpcf7-submit {
  display: inline-block;
  width: 100%;
  margin-top: 10px;
  padding: 0.75rem 1.75rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent-color);
  color: var(--text-color-secondary);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.spektar-contact-card__form .wpcf7-submit:hover {
  background: var(--accent-hover);
}

@media (max-width: 992px) {
  .contact-map-container {
    min-height: 420px;
  }

  .spektar-contact-card {
    margin-top: -120px;
    padding: 2rem 1.25rem;
  }

  .spektar-contact-card__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .spektar-contact-card__col {
    padding: 0;
    border-right: none;
  }

  .spektar-contact-card__col:not(:last-child) {
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px dashed rgba(237, 238, 238, 1);
  }

  .spektar-contact-card__title {
    text-align: center;
  }

  .contact-map-container img {
    object-position: 75%;
  }
}

@media (max-width: 768px) {
  .contact-map-container img {
    object-position: 72%;
  }
}

@media (max-width: 600px) {
  .spektar-contact-card {
    margin-top: -190px;
  }

  .contact-map-container img {
    object-position: 67%;
  }
}

@media (max-width: 425px) {
  .contact-map-container img {
    object-position: 66%;
  }
}
