/* Accessibility */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1rem;
  padding: 0.5rem;
  z-index: 999;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

input:focus,
button:focus,
a:focus,
summary:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

legend {
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* PRODUCT / FILTER */
.product-page-section {
  width: 100%;
  padding: 70px 0 90px;
  background: #f5f5f5;
}

.product-page-container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.product-toolbar h1 {
  font-size: 38px;
  font-weight: 700;
  color: #111;
}

.filter-toggle {
  display: none;
  border: none;
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  align-items: center;
  gap: 10px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 34px;
  align-items: start;
}

.filter-card {
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
}

.filter-card summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  color: #111;
  position: relative;
}

.filter-card summary:focus,
.filter-card summary:focus-visible {
  outline: none;
  background: #a1c2fc88;
}

.filter-card summary::-webkit-details-marker {
  display: none;
}

.filter-card summary::after {
  content: "⌄";
  font-size: 18px;
  line-height: 1;
  color: #666;
  transition: transform 0.2s ease;
}

.filter-card[open] summary::after {
  transform: rotate(180deg);
}

.filter-panel {
  padding: 0 20px 20px;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-options label {
  font-size: 15px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.filter-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #111;
  flex-shrink: 0;
}

.filter-actions-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.filter-reset-btn {
  width: 100%;
  height: 48px;
  border: none;
  background: #111;
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}

/* Product list */
.product-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 34px 28px;
}

.product-item-card {
  display: block;
  text-decoration: none;
  color: #111;
  transition: transform 0.35s ease;
  padding: 18px;
  border: #e8e8e8 solid 1px;
  border-radius: 12px;
  background: #e8e8e8;
}

.product-item-card:hover {
  transform: translateY(-6px);
}

.product-thumb {
  background: #e8e8e8;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 18px;
}

.product-thumb img {
  width: 100%;
  height: 360px;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
}

.product-item-card:hover .product-thumb img {
  transform: scale(1.05);
}

.product-item-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: left;
}

.product-item-card h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: left;
}

.product-meta {
  text-align: left;
  margin-bottom: 8px;
  color: #666;
  font-size: 15px;
}

.no-products-message {
  text-align: center;
  margin-top: 28px;
  font-size: 18px;
  color: #666;
}

/* Mobile filter overlay */
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 999;
}

.filter-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 88%;
  max-width: 400px;
  height: 100dvh;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px;
  border-bottom: 1px solid #ddd;
}

.filter-drawer-header h3 {
  font-size: 24px;
  color: #111;
}

.filter-close {
  border: none;
  background: none;
  font-size: 26px;
  cursor: pointer;
}

.filter-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mobile-filter-card summary {
  padding: 16px 18px;
  font-size: 17px;
}

.mobile-filter-card .filter-panel {
  padding: 0 18px 18px;
}

.filter-drawer-footer {
  padding: 18px;
  border-top: 1px solid #ddd;
}

.apply-filter-btn,
.reset-filter-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
}

.apply-filter-btn {
  background: #111;
  color: #fff;
}

.reset-filter-btn {
  background: #eee;
  color: #111;
  margin: 12px 0 0;
}

.filter-overlay.active {
  opacity: 1;
  visibility: visible;
}

.filter-drawer.active {
  transform: translateX(0);
}

@media (max-width: 1200px) {
  .filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-thumb img {
    height: 320px;
  }

  .product-item-card h3 {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .product-page-section {
    padding: 50px 0 70px;
  }

  .product-page-container {
    width: 92%;
  }

  .product-toolbar h1 {
    font-size: 30px;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .filter-bar {
    display: none;
  }

  .product-list-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-thumb img {
    height: 280px;
  }

  .product-item-card h3 {
    font-size: 22px;
  }

  .product-item-card h4 {
    font-size: 18px;
  }
}