/* -------------------------------------
 * Base Layout & Container
 * --------------------------------- */
.tax-products__wrapper {
  padding-top: var(--spacing-5);
  padding-bottom: var(--spacing-5);
  width: 100%;
}

/* -------------------------------------
 * Header Section
 * --------------------------------- */
.tax-products__header {
  margin-bottom: var(--spacing-6);
}

.tax-products__title {
  color: var(--color-primary);
  margin-top: var(--spacing-4);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

.tax-products__count {
  margin: var(--spacing-3) 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

/* -------------------------------------
 * Main Layout Grid
 * --------------------------------- */
.tax-products__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--spacing-6);
  position: relative;
}

/* -------------------------------------
 * Filter Sidebar
 * --------------------------------- */
.tax-filter {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-4);
}

.tax-filter__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--spacing-3);
  border-bottom: 1px solid var(--color-gray-700);
  font-weight: 500;
}

.tax-filter__title {
  font-size: var(--text-base);
  color: var(--color-text);
  font-weight: var(--font-medium);
}

.tax-filter__reset {
  color: var(--color-primary);
  font-size: var(--text-sm);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.tax-filter__reset:hover {
  color: var(--color-primary-dark);
}

.tax-filter__groups {
  margin-bottom: var(--spacing-4);
}

.tax-filter__group {
  border-bottom: 1px solid var(--color-gray-500);
}

.tax-filter__group:last-child {
  border-bottom: none;
}

.tax-filter__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-3) 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  font-size: var(--text-base);
  transition: color var(--transition);
}

.tax-filter__toggle:hover {
  color: var(--color-primary);
}

.tax-filter__toggle-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}

.tax-filter__toggle[aria-expanded="true"] .tax-filter__toggle-icon {
  transform: rotate(45deg);
}

.tax-filter__content {
  padding: var(--spacing-3) 0;
}

.tax-filter__content[hidden] {
  display: none;
}

.tax-filter__submit {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-2);
  background: var(--color-primary);
  color: var(--color-surface);
  border: none;
  border-radius: var(--radius-base);
  padding: var(--spacing-3) var(--spacing-4);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: background-color var(--transition);
}

.tax-filter__submit:hover {
  background: var(--color-primary-dark);
}

.tax-filter__submit svg {
  stroke: currentColor;
}

/* -------------------------------------
 * Product Grid
 * --------------------------------- */
.tax-products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-6);
}

/* -------------------------------------
 * Product Card
 * --------------------------------- */
.tax-product-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-gray-200);
  transition: 200ms;
  padding: var(--spacing-3);
}

.tax-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bshadow-primary);
}

/* Product Card Media */
.tax-product-card__media {
  background: var(--color-surface);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.tax-product-card__image {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 200px;
}

/* Product Card Content */
.tax-product-card__content {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tax-product-card__header {
  padding: 0 0 var(--spacing-4);
}

.tax-product-card__title {
  color: var(--color-primary);
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 0;
}

/* Product Card Specs */
.tax-product-card__specs {
  background: var(--color-primary);
  color: var(--color-surface);
  padding: var(--spacing-2) var(--spacing-4);
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-4);
  border-radius: 7px;
  gap: var(--spacing-4);
}

.tax-product-card__spec {
  display: flex;
  flex-direction: column;
  text-align: left;
  flex: 1;
  position: relative;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.tax-product-card__spec:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -15%;
  top: 0;
  width: 1px;
  height: 100%;
  background: white;
  transform: rotate(15deg);
}

.tax-product-card__spec-label {
  font-size: var(--text-xs);
  color: var(--color-text-inverse);
  margin-bottom: var(--spacing-1);
  font-weight: 700;
}

.tax-product-card__spec-value {
  font-size: var(--text-sm);
  color: var(--color-surface);
  font-weight: var(--font-medium);
}

.tax-product-card__description {
  color: var(--color-text);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  padding: 0;
  margin-bottom: var(--spacing-4);
}

/* Product Card Footer */
.tax-product-card__footer {
  padding: 0 0 var(--spacing-2);
  margin-top: auto;
}

.tax-product-card__button {
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-2);
  padding: 0;
  background: none;
  border: 2px solid var(--color-primary);
  text-decoration: none;
  padding: var(--spacing-3) var(--spacing-4);
}

.tax-product-card__button:hover {
  color: var(--color-text-inverse);
  background: var(--color-primary);
}

.tax-product-card__button .btn__icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* -------------------------------------
 * Responsive Styles
 * --------------------------------- */

/* Desktop (≤1280px) */
@media (max-width: 1280px) {
  .tax-products__layout {
    grid-template-columns: 250px 1fr;
    gap: var(--spacing-4);
  }

  .tax-product-card__specs {
    display: block;
  }

  .tax-product-card__spec {
    align-items: flex-start;
    text-align: left;
    margin-bottom: var(--spacing-2);
    padding-bottom: var(--spacing-2);
    border-bottom: 1px solid var(--color-gray-300);
  }
  .tax-product-card__spec:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .tax-product-card__spec::after{
    display:none;
  }
}
@media (min-width: 1024px) {
  .tax-filter {
    padding-left: 0;
  }
}

/* Tablet Landscape (≤1024px) */
@media (max-width: 1024px) {
  .tax-products__layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-6);
  }

  .tax-products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Mobile Sidebar */
  .tax-products__sidebar {
    position: relative;
    width: 100%;
    transform: none;
    box-shadow: none;
    background: transparent;
  }

  .tax-products__sidebar.is-active {
    transform: translateX(0);
  }

  /* Mobile Filter Toggle */
  .tax-products__filter-toggle {
    display: flex;
    position: fixed;
    bottom: var(--spacing-4);
    right: var(--spacing-4);
    background: var(--color-primary);
    color: var(--color-surface);
    border-radius: var(--radius-full);
    width: 56px;
    height: 56px;
    justify-content: center;
    align-items: center;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    z-index: 999;
  }

  /* Filter Overlay */
  .tax-products__overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .tax-products__overlay.is-active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Tablet Portrait (≤768px) */
@media (max-width: 768px) {
  .tax-products__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-4);
  }

  .tax-product-card {
    padding: 0;
    margin-bottom: var(--spacing-4);
  }

  .tax-product-card__title {
    font-size: var(--text-base);
  }

  .tax-product-card__spec:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
  .tax-product-card__media {
    padding: var(--spacing-4);
  }

  .tax-product-card__description {
    font-size: var(--text-xs);
  }

  .tax-filter {
    border-radius: 0;
    padding: var(--spacing-3);
  }

  .tax-products__title {
    font-size: var(--text-lg);
  }
}


@media(min-width:481px) and (max-width:768px){
  .tax-product-card__specs {
    display: flex;
  }
  .tax-product-card__spec{
    border-bottom:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    justify-content:center;
  }
  .tax-product-card__spec::after{
    display:block
  }
}
