/**
 * Product cards — equal height, related grid, PDP buy row, quantity stepper
 */

/* ── Product grids (archive, related, homepage) ── */

/* Base grid — all product lists */
.stedrino-shop ul.products,
.stedrino-shop-layout__main ul.products,
.stedrino-infinite-wrap ul.products,
[data-stedrino-products] ul.products,
.stedrino-home-products,
.stedrino-home-products ul.products,
.stedrino-pdp__related ul.products {
  display: grid !important;
  gap: 1rem 0.875rem !important;
  align-items: stretch;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
}

.stedrino-shop ul.products > li.product,
.stedrino-shop-layout__main ul.products > li.product,
.stedrino-infinite-wrap ul.products > li.product,
[data-stedrino-products] ul.products > li.product,
.stedrino-home-products > li.product,
.stedrino-home-products ul.products > li.product,
.stedrino-pdp__related ul.products > li.product {
  height: 100%;
  margin: 0 !important;
  width: 100% !important;
  float: none !important;
}

/* Desktop default: 4 columns */
.stedrino-home-products,
.stedrino-home-products ul.products,
.stedrino-pdp__related ul.products,
.stedrino-has-shop-grid.stedrino-shop-cols-4 ul.products,
.stedrino-has-shop-grid .stedrino-shop-cols-4 ul.products,
body.stedrino-shop-cols-4 .stedrino-shop-layout__main ul.products,
body.stedrino-shop-cols-4 [data-stedrino-products] ul.products,
[data-stedrino-products].stedrino-shop-cols-4 ul.products {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.stedrino-has-shop-grid.stedrino-shop-cols-3 ul.products,
.stedrino-has-shop-grid .stedrino-shop-cols-3 ul.products,
body.stedrino-shop-cols-3 .stedrino-shop-layout__main ul.products,
body.stedrino-shop-cols-3 [data-stedrino-products] ul.products,
[data-stedrino-products].stedrino-shop-cols-3 ul.products {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.stedrino-has-shop-grid.stedrino-shop-cols-2 ul.products,
.stedrino-has-shop-grid .stedrino-shop-cols-2 ul.products,
body.stedrino-shop-cols-2 .stedrino-shop-layout__main ul.products,
body.stedrino-shop-cols-2 [data-stedrino-products] ul.products,
[data-stedrino-products].stedrino-shop-cols-2 ul.products {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.stedrino-product-card {
  height: 100%;
  display: flex !important;
  flex-direction: column;
  border-radius: var(--st-radius-sm);
  box-shadow: 0 2px 12px rgba(13, 57, 115, 0.06);
  border: 1px solid var(--st-border);
  background: var(--st-surface);
}

.stedrino-product-card__link--body {
  flex: 1;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.stedrino-product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.85rem 0.5rem;
}

.stedrino-product-card__title {
  flex: 1;
  min-height: 2.75em;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--st-navy);
}

.stedrino-product-card__price {
  margin-block-start: auto;
  color: var(--st-pink);
  font-weight: 700;
  font-size: 1rem;
}

.stedrino-product-card__actions {
  padding: 0 0.85rem 0.85rem;
  margin-block-start: auto;
}

.stedrino-product-card__actions .button {
  background: var(--st-navy) !important;
  color: #fff !important;
  border-radius: var(--st-radius-pill) !important;
  min-height: 42px;
  font-size: 0.8rem;
}

.stedrino-product-card__actions .button:hover {
  background: var(--st-pink) !important;
}

.stedrino-pdp__related {
  margin-block-start: 2.5rem;
  padding-block-start: 2rem;
  border-block-start: 1px solid var(--st-border);
}

.stedrino-pdp__related > h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--st-navy);
  text-align: start;
  letter-spacing: -0.02em;
}

/* PDP accordion tabs */
.stedrino-pdp__accordion {
  margin-block-start: 2.5rem;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-surface);
  overflow: hidden;
}

.stedrino-pdp__accordion .woocommerce-Tabs-panel {
  padding: 1.25rem 1.5rem;
  text-align: start;
}

.stedrino-pdp__accordion .woocommerce-product-attributes {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.stedrino-pdp__accordion .woocommerce-product-attributes th,
.stedrino-pdp__accordion .woocommerce-product-attributes td {
  padding: 0.65rem 0.85rem;
  border-block-end: 1px solid var(--st-border);
  text-align: start;
  font-size: 0.9rem;
}

.stedrino-pdp__accordion .woocommerce-product-attributes th {
  width: 38%;
  font-weight: 600;
  color: var(--st-navy);
  background: #f7f9fc;
}

.stedrino-pdp__accordion .woocommerce-product-attributes tr:last-child th,
.stedrino-pdp__accordion .woocommerce-product-attributes tr:last-child td {
  border-block-end: none;
}

/* Reviews */
.stedrino-pdp__reviews {
  margin-block-start: 2.5rem;
  padding: 1.5rem;
  border: 1px solid var(--st-border);
  border-radius: var(--st-radius-sm);
  background: var(--st-surface);
  text-align: start;
}

.stedrino-reviews__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--st-navy);
  text-align: start;
}

.stedrino-reviews__empty,
.stedrino-reviews__verified {
  color: var(--st-muted);
  font-size: 0.95rem;
  margin: 0;
  text-align: start;
}

.stedrino-reviews .commentlist {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.stedrino-reviews .commentlist .comment {
  padding: 1rem 0;
  border-block-end: 1px solid var(--st-border);
}

.stedrino-reviews__form .comment-form label {
  display: block;
  margin-block-end: 0.35rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--st-navy);
}

.stedrino-reviews__form .input-text,
.stedrino-reviews__form textarea,
.stedrino-reviews__form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--st-border);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  margin-block-end: 0.75rem;
}

/* Responsive grids — tablet 2 cols, mobile 1 col */
@media (max-width: 1024px) {
  .stedrino-home-products,
  .stedrino-home-products ul.products,
  .stedrino-pdp__related ul.products,
  .stedrino-has-shop-grid ul.products,
  .stedrino-has-shop-grid [data-stedrino-products] ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 480px) {
  .stedrino-home-products,
  .stedrino-home-products ul.products,
  .stedrino-pdp__related ul.products,
  .stedrino-has-shop-grid ul.products,
  .stedrino-has-shop-grid [data-stedrino-products] ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* PDP buy row */
.stedrino-pdp__buy form.cart,
.stedrino-pdp__buy .variations_form {
  display: block;
}

.stedrino-pdp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  margin-block-start: 0.5rem;
}

.stedrino-pdp__buy .quantity,
.stedrino-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--st-border);
  border-radius: var(--st-radius-pill);
  background: var(--st-surface);
  overflow: hidden;
  min-height: 48px;
}

.stedrino-qty-stepper__btn {
  width: 40px;
  height: 48px;
  border: none;
  background: var(--st-bg);
  color: var(--st-navy);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.stedrino-qty-stepper__btn:hover {
  background: var(--st-pink);
  color: #fff;
}

.stedrino-pdp__buy .quantity input.qty,
.stedrino-qty-stepper input.qty {
  width: 3rem;
  min-height: 48px;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--st-navy);
  background: transparent;
  -moz-appearance: textfield;
}

.stedrino-pdp__buy .quantity input.qty::-webkit-outer-spin-button,
.stedrino-pdp__buy .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.stedrino-pdp__buttons {
  display: flex;
  flex: 1 1 100%;
  gap: 0.75rem;
  min-width: min(100%, 280px);
}

.stedrino-pdp__buy .single_add_to_cart_button {
  flex: 1;
  background: var(--st-pink) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--st-radius-pill) !important;
  min-height: 48px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  box-shadow: 0 4px 14px rgba(217, 35, 135, 0.25);
}

.stedrino-pdp__buy .stedrino-btn--buy-now {
  flex: 1;
  background: var(--st-navy) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--st-radius-pill) !important;
  min-height: 48px !important;
  font-weight: 600 !important;
  margin: 0 !important;
  box-shadow: 0 4px 14px rgba(13, 57, 115, 0.2);
}

.stedrino-pdp__buy .single_add_to_cart_button:hover {
  background: var(--st-pink-dark) !important;
}

.stedrino-pdp__buy .stedrino-btn--buy-now:hover {
  background: #0a2d5c !important;
}

.stedrino-pdp__buy .single_add_to_cart_button:disabled,
.stedrino-pdp__buy .stedrino-buy-now:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* Colored ribbons */
.stedrino-pdp__ribbon-item {
  background: #eef4fb;
  color: var(--st-navy);
  border-color: #c5daf0;
  border-radius: var(--st-radius-pill);
}

.stedrino-pdp__ribbon-item--sale {
  background: var(--st-pink);
  color: #fff;
  border-color: var(--st-pink);
}

.stedrino-pdp__payments li::before {
  color: var(--st-pink);
}

/* Footer — navy branded */
.stedrino-footer {
  background: var(--st-navy);
  color: rgba(255, 255, 255, 0.9);
  border-block-start: none;
}

.stedrino-footer__heading {
  color: #fff;
}

.stedrino-footer__brand p,
.stedrino-footer__contact a,
.stedrino-footer__brand a {
  color: rgba(255, 255, 255, 0.82);
}

.stedrino-menu--footer a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.stedrino-menu--footer a:hover {
  color: #fff !important;
}

.stedrino-footer__bottom {
  border-block-start: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.stedrino-footer__bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.stedrino-footer__bottom p {
  margin: 0;
  font-size: 0.85rem;
}

.stedrino-footer__credit a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.stedrino-footer__credit a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.stedrino-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.stedrino-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.stedrino-footer__social-link:hover {
  background: var(--st-pink);
  color: #fff;
}

.stedrino-footer .custom-logo,
.stedrino-footer__logo-img {
  filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
  .stedrino-pdp__buttons {
    flex-direction: column;
  }
  .stedrino-pdp__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .stedrino-qty-stepper,
  .stedrino-pdp__buy .quantity {
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .stedrino-pdp__buttons {
    flex: 1 1 calc(100% - 180px);
  }
}
