/**
 * FSP Shop / Product Archive Page Styles
 * Clean grid layout without sidebars or filtering
 *
 * @package Free_Style_Products
 */

/* ============================================================
   SHOP PAGE WRAPPER
   ============================================================ */

.fsp-shop-page {
  background: linear-gradient(
    135deg,
    var(--hw-dark, #0f0f0f) 0%,
    var(--hw-dark-secondary, #1a1a1a) 50%,
    var(--hw-dark-tertiary, #2d2d2d) 100%
  );
  min-height: 100vh;
  position: relative;
  padding-top: 80px;
}

.fsp-shop-page .container {
  position: relative;
  z-index: 1;
}

/* ============================================================
   SHOP TITLE
   ============================================================ */

.fsp-shop-title {
  color: var(--hw-white, #ffffff);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================================
   HIDE RESULT COUNT, ORDERING, SIDEBAR, BREADCRUMBS
   ============================================================ */

.fsp-shop-page .woocommerce-result-count,
.fsp-shop-page .woocommerce-ordering,
.fsp-shop-page .woocommerce-breadcrumb,
.woocommerce-page:not(.single-product) #secondary,
.woocommerce-page:not(.single-product) aside.widget-area,
.woocommerce-page:not(.single-product) .sidebar {
  display: none !important;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */

.fsp-shop-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
}

.fsp-shop-page ul.products li.product {
  background-color: rgba(30, 30, 50, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--hw-radius-lg, 16px);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
}

.fsp-shop-page ul.products li.product:hover {
  border-color: rgba(44, 198, 77, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Product Images */
.fsp-shop-page ul.products li.product a img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: var(--hw-radius, 8px);
  margin-bottom: 12px;
}

/* Product Title */
.fsp-shop-page ul.products li.product .woocommerce-loop-product__title {
  color: var(--hw-white, #ffffff);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 8px 0;
}

/* Product Links */
.fsp-shop-page ul.products li.product a {
  color: var(--hw-white, #ffffff);
  text-decoration: none;
}

/* Product Price — pushed to bottom of card, always aligned across cards */
.fsp-shop-page ul.products li.product .price {
  color: var(--hw-primary, #2cc64d);
  font-size: 1rem;
  font-weight: 700;
  margin-top: auto;
  padding-top: 12px;
  margin-bottom: 0;
  display: block;
}

.fsp-shop-page ul.products li.product .price .woocommerce-Price-amount {
  color: var(--hw-primary, #2cc64d);
}

/* Hide "Select Options" / add-to-cart button on product cards */
.fsp-shop-page ul.products li.product a.button,
.fsp-shop-page ul.products li.product .button {
  display: none !important;
}

/* Login-gated price on product cards */
.fsp-shop-page ul.products li.product .fsp-login-to-price {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
}

.fsp-shop-page ul.products li.product .fsp-login-to-price a {
  color: var(--hw-primary, #2cc64d);
  text-decoration: none;
  border-bottom: 1px dashed var(--hw-primary, #2cc64d);
}

.fsp-shop-page ul.products li.product .fsp-login-to-price a:hover {
  color: var(--hw-primary-light, #4ed96a);
  border-color: var(--hw-primary-light, #4ed96a);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

.fsp-shop-page form.fsp-shop-per-page {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  margin: 0 0 10px 0;
  padding: 0;
  color: var(--hw-white, #ffffff);
}

.fsp-shop-page .fsp-shop-per-page__label,
.fsp-shop-page .fsp-shop-per-page__suffix {
  opacity: 0.75;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.fsp-shop-page form.fsp-shop-per-page select {
  appearance: none;
  -webkit-appearance: none;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--hw-white, #ffffff);
  border-radius: 8px;
  padding: 2px 20px 2px 8px;
  height: 26px;
  line-height: 1;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='rgba(255,255,255,0.75)' d='M1.2 0.7a1 1 0 0 1 1.4 0L5 3.1 7.4 0.7a1 1 0 1 1 1.4 1.4L5.7 5.2a1 1 0 0 1-1.4 0L1.2 2.1a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
  background-size: 10px 6px;
}

.fsp-shop-page form.fsp-shop-per-page select:focus {
  outline: none;
  border-color: rgba(44, 198, 77, 0.45);
  box-shadow: 0 0 0 2px rgba(44, 198, 77, 0.14);
}

.fsp-shop-page form.fsp-shop-per-page select:hover {
  border-color: rgba(44, 198, 77, 0.28);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.fsp-shop-page nav.woocommerce-pagination {
  margin-top: 26px;
}

.fsp-shop-page nav.woocommerce-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0 !important;
  margin: 0 !important;
}

.fsp-shop-page nav.woocommerce-pagination ul.page-numbers li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fsp-shop-page nav.woocommerce-pagination a.page-numbers,
.fsp-shop-page nav.woocommerce-pagination span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  color: var(--hw-white, #ffffff);
  background: rgba(30, 30, 50, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.fsp-shop-page nav.woocommerce-pagination a.page-numbers:hover {
  transform: translateY(-1px);
  border-color: rgba(44, 198, 77, 0.35);
  background: rgba(30, 30, 50, 0.75);
}

.fsp-shop-page nav.woocommerce-pagination span.page-numbers.current {
  color: #0c0c0c;
  background: var(--hw-primary, #2cc64d);
  border-color: rgba(44, 198, 77, 0.6);
}

.fsp-shop-page nav.woocommerce-pagination a.page-numbers.next,
.fsp-shop-page nav.woocommerce-pagination a.page-numbers.prev {
  padding: 0 16px;
}

@media screen and (max-width: 767px) {
  .fsp-shop-page ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .fsp-shop-page ul.products li.product {
    padding: 14px;
  }

  .fsp-shop-page ul.products li.product a img {
    height: 140px;
  }

  .fsp-shop-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.85rem;
  }

  .fsp-shop-page form.fsp-shop-per-page {
    margin-bottom: 8px;
  }
}

@media screen and (max-width: 400px) {
  .fsp-shop-page ul.products {
    grid-template-columns: 1fr;
  }
}
