/* ==========================================================================
   Al Qamar Threads — Shop / Catalog (Stitch design)
   ========================================================================== */

.aqt-shop-page {
  background: var(--aqt-bg, #f8f6f2);
  color: var(--aqt-text, #3f3a35);
}

.aqt-shop-page .aqt-main {
  padding: 0;
  max-width: none;
}

.aqt-shop {
  width: 100%;
}

.aqt-shop__container {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding: 1.25rem 1.5rem 4rem;
}

.aqt-shop-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 12px;
  font-weight: 400;
  color: #6b7280;
}

.aqt-shop-breadcrumbs a:hover {
  text-decoration: underline;
}

.aqt-shop-breadcrumbs__current {
  color: #374151;
}

.aqt-shop__title {
  margin: 0 0 1.5rem;
  font-size: 1.875rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #111827;
}

/* --------------------------------------------------------------------------
   Toolbar: result count + ordering
   -------------------------------------------------------------------------- */
.aqt-shop-page .woocommerce-notices-wrapper {
  margin-bottom: 1rem;
}

.aqt-shop-page .woocommerce-before-shop-loop,
.aqt-shop-page ul.products + .woocommerce-pagination,
.aqt-shop-page .woocommerce-result-count,
.aqt-shop-page .woocommerce-ordering {
  /* structured via flex wrapper below */
}

.aqt-shop-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1.5rem;
  font-size: 14px;
  color: #4b5563;
}

@media (min-width: 640px) {
  .aqt-shop-toolbar {
    flex-direction: row;
    align-items: baseline;
  }
}

.aqt-shop-page .aqt-shop-toolbar .woocommerce-result-count,
.aqt-shop-page .aqt-shop-toolbar .woocommerce-ordering {
  float: none !important;
  margin: 0 !important;
  display: block;
}

.aqt-shop-toolbar__count {
  font-size: 12px;
  color: #4b5563;
}

.aqt-shop-toolbar__order select,
.aqt-shop-page .woocommerce-ordering select {
  font-size: 12px;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0;
  background: #fff;
  padding: 0.375rem 2rem 0.375rem 0.75rem;
  min-height: auto;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  cursor: pointer;
}

.aqt-shop-page .woocommerce-ordering select:focus {
  outline: none;
  border-color: #9ca3af;
  box-shadow: none;
}

/* --------------------------------------------------------------------------
   Product grid
   -------------------------------------------------------------------------- */
.aqt-shop-page ul.products,
.aqt-shop-page ul.aqt-shop-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 2.5rem 1.5rem;
  margin: 0 0 3rem !important;
  padding: 0 !important;
  list-style: none;
  clear: both;
}

@media (min-width: 640px) {
  .aqt-shop-page ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .aqt-shop-page ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .aqt-shop-page ul.products {
    grid-template-columns: repeat(4, 1fr);
  }
}

.aqt-shop-page ul.products::before,
.aqt-shop-page ul.products::after {
  display: none !important;
  content: none !important;
}

.aqt-shop-page ul.products li.product,
.aqt-shop-card {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  padding: 0 !important;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: transparent;
  border: none;
  box-shadow: none;
}

.aqt-shop-card__sale {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  background: #798634;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.aqt-shop-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 0.75rem;
  overflow: hidden;
  background: #00d084;
  position: relative;
}

.aqt-shop-card__media--placeholder {
  background: #fbfbfb;
  border: 1px solid #f3f4f6;
}

.aqt-shop-card__media img,
.aqt-shop-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
}

.aqt-shop-card__media--placeholder img {
  object-fit: contain;
  padding: 15%;
  opacity: 0.55;
}

.aqt-shop-card__title {
  margin: 0 0 0.25rem;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #1f2937;
}

.aqt-shop-card__title a {
  color: inherit;
}

.aqt-shop-card__title a:hover {
  color: #000;
}

.aqt-shop-card__price,
.aqt-shop-page ul.products li.product .price {
  display: block;
  margin: 0 0 0.75rem;
  font-size: 12px !important;
  font-weight: 600;
  color: #111827 !important;
}

.aqt-shop-card__price del {
  color: #9ca3af;
  margin-right: 0.375rem;
  font-weight: 400;
  text-decoration: line-through;
}

.aqt-shop-card__price ins {
  text-decoration: none;
  font-weight: 600;
  color: #111827;
  background: none;
}

.aqt-shop-page .aqt-shop-card__btn,
.aqt-shop-page a.button.aqt-shop-card__btn,
.aqt-shop-page button.button.aqt-shop-card__btn,
.aqt-shop-page .woocommerce ul.products li.product .button {
  display: inline-block;
  background: #ebe9eb !important;
  color: #515151 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 7px 15px !important;
  border: none !important;
  border-radius: 2px !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  box-shadow: none !important;
  transition: background 0.15s ease-in-out, color 0.15s ease-in-out;
}

.aqt-shop-page .aqt-shop-card__btn:hover,
.aqt-shop-page a.button.aqt-shop-card__btn:hover,
.aqt-shop-page .woocommerce ul.products li.product .button:hover {
  background: #dad8da !important;
  color: #2c2d33 !important;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */
.aqt-shop-page .woocommerce-pagination {
  margin: 3rem 0 !important;
  text-align: center;
  clear: both;
}

.aqt-shop-page .woocommerce-pagination ul {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  list-style: none;
}

.aqt-shop-page .woocommerce-pagination ul li {
  margin: 0 !important;
  border: none !important;
  float: none !important;
}

.aqt-shop-page .woocommerce-pagination ul li a,
.aqt-shop-page .woocommerce-pagination ul li span {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  padding: 0 !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  color: #4b5563 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.aqt-shop-page .woocommerce-pagination ul li span.current {
  border-color: #d1d5db !important;
  color: #111827 !important;
  font-weight: 500 !important;
}

.aqt-shop-page .woocommerce-pagination ul li a:hover {
  background: #f9fafb !important;
}

/* --------------------------------------------------------------------------
   Widgets strip
   -------------------------------------------------------------------------- */
.aqt-shop-widgets {
  margin-top: 2rem;
  padding-top: 1.5rem;
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 14px;
  color: #1f2937;
}

.aqt-shop-widget h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.aqt-shop-widget ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 12px;
  color: #374151;
}

.aqt-shop-widget ul a:hover {
  text-decoration: underline;
}

.aqt-shop-widget__search {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.aqt-shop-widget__search input[type="search"] {
  width: 11rem;
  border: 1px solid #d1d5db;
  border-radius: 0;
  padding: 0.25rem 0.625rem;
  font-size: 12px;
  color: #374151;
  background: #fff;
  box-shadow: none;
}

.aqt-shop-widget__search input[type="search"]:focus {
  outline: none;
  border-color: #6b7280;
}

.aqt-shop-widget__search button {
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  padding: 0.25rem 0.75rem;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}

.aqt-shop-widget__search button:hover {
  background: #e5e7eb;
}

/* Hide default WC sale flash if any leftover */
.aqt-shop-page .onsale:not(.aqt-shop-card__sale) {
  display: none;
}
