/*
Theme Name:   Astra Child
Theme URI:    https://wpastra.com/
Description:  Child theme for the Astra WordPress theme
Author:       Your Name
Author URI:   https://yourwebsite.com
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child
Tags:         custom-background, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, translation-ready, blog, e-commerce
*/

/*
 * Custom styles go below this line
 * These styles will override the parent Astra theme
 */

/* Product category navigation */
.product-subcategory-list__title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.product-subcategory-list__items,
.product-subcategory-list__children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.product-subcategory-list__children {
  padding-left: 1.25rem;
  margin-top: 0.35rem;
}

.product-subcategory-list__item {
  margin: 0 0 0.45rem;
}

.product-subcategory-list__label {
  color: inherit;
  text-decoration: underline;
}

.product-subcategory-list__label.is-current,
.product-subcategory-list__item.is-current > .product-subcategory-list__label {
  font-weight: 700;
  text-decoration: none;
}

.product-subcategory-list__count {
  text-decoration: none;
  font-weight: 400;
}

/* Breadcrumb home icon */
.woocommerce-breadcrumb__home,
.ast-breadcrumb-home-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  line-height: 1;
  color: #4a4a4a;
}

.breadcrumb-home-icon,
.breadcrumb-separator-icon {
  display: block;
  width: 24px;
  height: 24px;
}

/* Breadcrumb separator (chevron) */
.breadcrumb-separator {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  color: #4a4a4a;
  line-height: 1;
}

/* Astra breadcrumbs use CSS ::after separators — replace with chevron icon */
.ast-breadcrumbs-wrapper .trail-items .trail-item:not(.trail-end)::after,
.ast-breadcrumbs-wrapper .breadcrumb-item:not(:last-child)::after {
  content: "" !important;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 0.25em;
  vertical-align: middle;
  background-color: #4a4a4a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M9.293 5.293a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414-1.414L14.585 12 9.293 6.707a1 1 0 0 1-.083-1.32z' clip-rule='evenodd'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M9.293 5.293a1 1 0 0 1 1.414 0l6 6a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414-1.414L14.585 12 9.293 6.707a1 1 0 0 1-.083-1.32z' clip-rule='evenodd'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

/* ------------------------------------------------------------------ */
/* MediaMarkt-style WooCommerce prices                                */
/* ------------------------------------------------------------------ */

.nr-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  line-height: 1.2;
}

.nr-price__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.nr-price__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.125rem;
  border-radius: 3rem;
  background: #e30613;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: calc(1.6);
}

.nr-price__uvp {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  color: #4a4a4a;
  font-size: 0.875rem;
  line-height: calc(1.33333);
  font-weight: 400;
}

.nr-price__uvp .nr-price__amount {
  font-weight: 400;
}

@media (min-width: 32em) {
  .nr-price__badge {
    font-size: 0.75rem;
    padding: 0 0.25rem;
    line-height: calc(1.33333);
  }
}

.nr-price__uvp-label {
  font-weight: 400;
}

.nr-price__amount--strike {
  text-decoration: line-through;
}

button.nr-price__info {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
  margin: 0;
  border: 0;
  background: transparent;
  color: #4a4a4a;
  cursor: help;
  line-height: 0;
  border: none;
}

button.nr-price__info:hover {
  border: none;
  background: none;
}

.nr-price__info-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.nr-price__info-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: max-content;
  max-width: 240px;
  padding: 0.5rem 0.65rem;
  border-radius: 0.35rem;
  background: #1a1a1a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
}

.nr-price__info:hover .nr-price__info-tooltip,
.nr-price__info:focus .nr-price__info-tooltip,
.nr-price__info:focus-visible .nr-price__info-tooltip {
  opacity: 1;
  visibility: visible;
}

.nr-price__current {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.nr-price__amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.nr-price__amount--regular {
  color: #1a1a1a;
  font-size: 1.25rem;
}

.nr-price__amount--sale {
  color: #df0000;
  font-size: 1.25rem;
}

.nr-price__sr-only {
  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;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Soften default Woo del/ins leftovers if any theme CSS remains */
.price .nr-price del,
.price .nr-price ins {
  text-decoration: none;
  background: transparent;
}

/* Loop / card prices a bit tighter */
ul.products .nr-price__amount--regular,
ul.products .nr-price__amount--sale,
.woocommerce ul.products .nr-price__amount--regular,
.woocommerce ul.products .nr-price__amount--sale {
  font-size: 1.25rem;
}

/* ------------------------------------------------------------------ */
/* Product delivery status                                            */
/* ------------------------------------------------------------------ */

.nr-delivery {
  display: block;
}

.nr-delivery__status {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.nr-delivery__dot {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.375rem;
  border-radius: 50%;
  background: #358631;
}

.nr-delivery__content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.nr-delivery__title {
  color: #358631;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: calc(1.25 / 0.75);
}

.nr-delivery__date {
  color: #4a4a4a;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: calc(1.25 / 0.75);
}

/* Catalog sorting (MMS-style: label + value inside one bordered field) */
.woocommerce .woocommerce-ordering.nr-sort {
  display: block;
  width: 100%;
  max-width: 20rem;
  margin: 0;
}

.nr-sort__control {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  min-height: 3.5rem;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid #8c8c8c;
  border-radius: 0.375rem;
  background: #fff;
  box-sizing: border-box;
}

.nr-sort__control:hover {
  border-color: #4a4a4a;
}

.nr-sort__label {
  display: block;
  margin: 0;
  padding: 0;
  color: #6a6a6a;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25;
  pointer-events: none;
}

.nr-sort__select {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

.woocommerce-ordering select.orderby.nr-sort__select:focus,
.woocommerce-ordering select.orderby.nr-sort__select:focus-visible {
  outline: none;
  box-shadow: none;
  border: none;
}

.nr-sort__icon {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.woocommerce-js div.product form.cart .variations {
  border-bottom: none;
}

/* pa_farbe — variation image swatches (48px thumbnails) */
.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"] {
  --wvs-single-product-item-width: 48px;
  --wvs-single-product-item-height: 48px;
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image {
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: hidden;
  border-radius: var(--swatch-radius);
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image
  .variable-item-contents {
  border-radius: var(--swatch-radius);
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image
  .variable-item-contents {
  width: 100%;
  height: 100%;
  padding: 0;
  line-height: 0;
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item-span-farbe-image {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: inherit;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  background: none !important;
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .nr-farbe-swatch-thumb {
  display: block;
  width: 48px !important;
  height: 48px !important;
  max-width: none;
  object-fit: contain;
  object-position: center;
  border-radius: inherit;
  padding: 3px;
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image.selected,
.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image:hover {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px var(--ast-global-color-0, #e85d04);
}

.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image.selected
  .variable-item-contents,
.single-product
  .color-variable-items-wrapper[data-attribute_name="attribute_pa_farbe"]
  .variable-item.nr-farbe-has-image:hover
  .variable-item-contents {
  box-shadow: none;
}

/* Single add to cart — SVG icon + label alignment */
div.product form.cart .button.single_add_to_cart_button,
div.product form.cart .button.add_to_cart_button,
.elementor-widget-wc-add-to-cart .elementor-button,
a.add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.single_add_to_cart_button .nr-atc-icon,
.elementor-button-icon .nr-atc-icon,
a.add_to_cart_button .nr-atc-icon {
  flex-shrink: 0;
  width: 1.5em;
  height: 1.5em;
  fill: currentColor;
}

.elementor-button-icon .nr-atc-icon {
  display: block;
}

/* Single product — stock urgency (after add to cart) */
.single-product div.product form.cart .nr-stock-urgency {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  width: 100%;
  flex: 0 0 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 600;
  color: #9a3412;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(154, 52, 18, 0.08);
  animation: nr-stock-urgency-in 0.45s ease-out;
}

.single-product div.product form.cart .nr-stock-urgency__icon {
  flex-shrink: 0;
  display: flex;
  margin-top: 0.1rem;
  color: #ea580c;
  animation: nr-stock-urgency-pulse 2s ease-in-out infinite;
}

.single-product div.product form.cart .nr-stock-urgency__icon svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

.single-product div.product form.cart .nr-stock-urgency__text {
  flex: 1;
}

@keyframes nr-stock-urgency-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nr-stock-urgency-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@media (max-width: 544px) {
  .single-product div.product form.cart .nr-stock-urgency {
    font-size: 0.8125rem;
    padding: 0.625rem 0.875rem;
  }
}

/* Product Description Rows Styles */
.product-description-rows {
  width: 100%;
  max-width: 1290px;
  margin: 0 auto;
}

.product-description-rows .desc-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
}

.product-description-rows .desc-row .desc-text,
.product-description-rows .desc-row .desc-image {
  flex: 1;
  width: 50%;
}

/* Image position right (default) */
.product-description-rows .desc-row.position-right {
  flex-direction: row;
}

/* Image styling */
.product-description-rows .desc-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Text styling */
.product-description-rows .desc-text {
  font-size: 16px;
  line-height: 1.6;
}

.product-description-rows .desc-text h1,
.product-description-rows .desc-text h2,
.product-description-rows .desc-text h3,
.product-description-rows .desc-text h4 {
  margin-top: 0;
  margin-bottom: 15px;
}

.product-description-rows .desc-text p {
  margin-bottom: 15px;
}

.product-description-rows .desc-text ul,
.product-description-rows .desc-text ol {
  margin-bottom: 15px;
  padding-left: 20px;
}

/* Mobile Responsive - Stack on mobile */
@media (max-width: 768px) {
  .product-description-rows .desc-row {
    flex-direction: column !important;
    gap: 20px;
  }

  .product-description-rows .desc-row .desc-text,
  .product-description-rows .desc-row .desc-image {
    width: 100%;
  }

  /* Image always on top on mobile */
  .product-description-rows .desc-row.position-left,
  .product-description-rows .desc-row.position-right {
    flex-direction: column;
    padding: 15px;
  }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
  .product-description-rows .desc-text {
    font-size: 15px;
  }
}

.product-description-rows .desc-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  align-items: center;
  padding: 30px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product_tech_spec {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background-color: #ffffff;
  border: none;
}

.product_tech_spec thead tr {
  background-color: #f5f5f5;
}

.product_tech_spec thead th {
  text-align: left;
  padding: 20px 16px;
  font-size: 18px;
  font-weight: 600;
  color: #000;
  border: 0;
  border-bottom: 1px solid #e0e0e0;
}

.product_tech_spec thead th:first-child {
  border-top-left-radius: 8px;
}

.product_tech_spec thead th:last-child {
  border-top-right-radius: 8px;
}

.product_tech_spec tbody tr {
  background-color: #ffffff;
  border: 0;
  border-bottom: 1px solid #e0e0e0;
  transition: background-color 0.2s ease;
}

.product_tech_spec tbody tr:hover {
  background-color: #f8f8f8;
}

.product_tech_spec tbody td {
  padding: 16px;
  font-size: 14px;
  color: #333;
  border: 0;
  border-bottom: 1px solid #e0e0e0;
}

.product_tech_spec tbody td:first-child {
  font-weight: 400;
  color: #000;
  width: 40%;
}

.product_tech_spec tbody td:last-child {
  color: #333;
  width: 60%;
}
