/* =========================================
   SHOP STAR GLOW — SHOP PAGE
========================================= */

.ssg-shop-page,
.ssg-shop-page *,
.ssg-shop-page *::before,
.ssg-shop-page *::after {
  box-sizing: border-box;
}

.ssg-shop-page {
  width: 100%;
  min-height: 60vh;
  margin: 0;
  padding: 30px 0 64px;
  background: #fff;
  color: #171717;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.ssg-shop-page .ssg-shop-container {
  width: 92%;
  max-width: 1500px;
  margin: 0 auto;
}

/* Breadcrumb */

.ssg-shop-breadcrumb {
  margin: 0 0 22px;
  color: #777;
  font-size: 10px;
  font-weight: 500;
}

.ssg-shop-breadcrumb a {
  color: #777;
  font-weight: 500;
  text-decoration: none;
}

/* Heading */

.ssg-shop-header {
  margin: 0 0 26px;
}

.ssg-shop-title {
  margin: 0;
  color: #111;
  font-family: "Montserrat", sans-serif;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.6px;
}

.ssg-shop-description {
  max-width: 520px;
  margin-top: 7px;
  color: #555;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
}

/* Toolbar */

.ssg-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.ssg-shop-result-count {
  color: #555;
  font-size: 11px;
  font-weight: 500;
}

.ssg-shop-ordering select {
  width: auto;
  max-width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 7px 28px 7px 10px;
  border: 1px solid #e6e6e6;
  border-radius: 0;
  background: #fff;
  color: #171717;
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 500;
  box-shadow: none;
}

/* =========================================
   PRODUCT GRID
========================================= */

.ssg-shop-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 38px 22px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

.ssg-shop-page ul.products::before,
.ssg-shop-page ul.products::after {
  display: none !important;
  content: none !important;
}

.ssg-shop-page ul.products li.product {
  float: none !important;
  clear: none !important;
  width: auto !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff;
}

/* =========================================
   REUSABLE PRODUCT CARD
========================================= */

.ssg-product-card,
.ssg-product-card * {
  box-sizing: border-box;
}

.ssg-product-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  box-shadow: none;
  font-family: "Montserrat", sans-serif;
}

/* Portrait image frame
   Same dimensions for every product.
   White background is NOT applied here.
*/

.ssg-product-card__image {
  position: relative;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 5;
  padding: 10px;
  border: 1px solid #e9e9e9;
  border-radius: 10px;
  background: transparent;
  text-decoration: none;
}

/* Image fills the padded portrait frame */

.ssg-product-card__photo {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  object-position: center;
  border: 0;
  background: transparent;
  transition: transform 0.3s ease;
}

.ssg-product-card__image:hover .ssg-product-card__photo {
  transform: scale(1.025);
}

/* Sale badge */

.ssg-product-card__badge {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  background: #fff;
  color: #111;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* =========================================
   PRODUCT DETAILS
========================================= */

.ssg-product-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 13px 0 0;
}

/* Small, confident product name */

.ssg-product-card__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #171717;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ssg-product-card__title a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.ssg-product-card__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Minimal pricing */

.ssg-product-card__price {
  margin-top: 4px;
  color: #171717;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
}

.ssg-product-card__price del {
  margin-right: 5px;
  color: #777;
  font-size: 10px;
  font-weight: 500;
}

.ssg-product-card__price ins {
  color: #171717;
  font-weight: 600;
  text-decoration: none;
}

/* =========================================
   ADD TO CART
========================================= */

.ssg-product-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 22px;
}

/* Compact black pill button */

.ssg-product-card__actions .button,
.ssg-product-card__actions a.button,
.ssg-product-card__actions .add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 9px 15px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.ssg-product-card__actions .button:hover,
.ssg-product-card__actions .button:focus-visible {
  border-color: #333;
  background: #333;
  color: #fff;
}

/* WooCommerce loading / added states */

.ssg-product-card__actions .button.loading {
  opacity: 0.65;
  cursor: wait;
}

.ssg-product-card__actions .added_to_cart {
  display: inline-block;
  margin: 0;
  color: #171717;
  font-size: 10px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Remove unwanted card decoration */

.ssg-product-card::before,
.ssg-product-card::after {
  display: none !important;
  content: none !important;
}

/* =========================================
   PAGINATION FALLBACK
========================================= */

.ssg-shop-page .woocommerce-pagination {
  margin-top: 42px;
}

.ssg-shop-page .woocommerce-pagination ul {
  display: flex;
  justify-content: center;
  gap: 7px;
  border: 0;
}

.ssg-shop-page .woocommerce-pagination ul li {
  border: 0;
}

.ssg-shop-page .woocommerce-pagination a,
.ssg-shop-page .woocommerce-pagination span {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding: 6px;
  border: 1px solid #e8e8e8;
  background: #fff;
  color: #171717;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}

.ssg-shop-page .woocommerce-pagination span.current {
  border-color: #111;
  background: #111;
  color: #fff;
}

/* =========================================
   INFINITE SCROLL STATUS
========================================= */

.ssg-shop-page .ssg-infinite-status {
  min-height: 24px;
  margin: 36px 0 0;
  color: #555;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) {
  .ssg-shop-page .ssg-shop-container {
    width: 94%;
  }

  .ssg-shop-page ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 17px;
  }

  .ssg-product-card__image {
    padding: 9px;
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {
  .ssg-shop-page {
    padding: 22px 0 44px;
  }

  .ssg-shop-page .ssg-shop-container {
    width: 92%;
  }

  .ssg-shop-breadcrumb {
    margin-bottom: 17px;
  }

  .ssg-shop-header {
    margin-bottom: 20px;
  }

  .ssg-shop-title {
    font-size: 23px;
    letter-spacing: -0.5px;
  }

  .ssg-shop-description {
    font-size: 11px;
  }

  .ssg-shop-toolbar {
    gap: 8px;
    margin-bottom: 18px;
  }

  .ssg-shop-result-count {
    font-size: 10px;
  }

  .ssg-shop-ordering select {
    max-width: 155px;
    min-height: 35px;
    padding: 7px 23px 7px 8px;
    font-size: 10px;
  }

  .ssg-shop-page ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 29px 12px;
  }

  .ssg-product-card__image {
    padding: 7px;
  }

  .ssg-product-card__badge {
    top: 7px;
    left: 7px;
    padding: 5px 6px;
    font-size: 8px;
  }

  .ssg-product-card__content {
    padding-top: 10px;
  }

  .ssg-product-card__title {
    font-size: 10px;
    line-height: 1.55;
  }

  .ssg-product-card__price {
    margin-top: 3px;
    font-size: 10px;
  }

  .ssg-product-card__price del {
    font-size: 9px;
  }

  .ssg-product-card__actions {
    margin-top: 19px;
  }

  .ssg-product-card__actions .button,
  .ssg-product-card__actions a.button,
  .ssg-product-card__actions .add_to_cart_button {
    min-height: 32px;
    padding: 8px 11px;
    font-size: 9px;
  }

  .ssg-shop-page .ssg-infinite-status {
    margin-top: 28px;
    font-size: 10px;
  }
}

/* =========================================
   ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {
  .ssg-product-card__photo,
  .ssg-product-card__actions .button {
    transition: none;
  }
}
