/*
Theme Name: Wedyan Recster Child
Theme URI: https://wedyan.huwaida-app.com/
Description: Recster child theme with a custom WooCommerce product-card design for Wedyan Al-Iraq.
Author: Wedyan Al-Iraq
Template: recster
Version: 1.0.0
Text Domain: wedyan-recster-child
*/

:root {
  --wedyan-navy: #0a2744;
  --wedyan-navy-dark: #061b31;
  --wedyan-red: #cf2418;
  --wedyan-red-dark: #af1c13;
  --wedyan-text: #132c43;
  --wedyan-muted: #708295;
  --wedyan-line: #dce4eb;
  --wedyan-soft: #f5f8fa;
}

/* Card column and carousel height */
.woocommerce ul.products li.product,
.woocommerce .pxl-product-grid .pxl-grid-item,
.woocommerce .pxl-product-carousel .pxl-swiper-slide {
  display: flex;
  min-width: 0;
}

.woocommerce .wedyan-product-card {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--wedyan-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(10, 39, 68, 0.07);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.woocommerce .wedyan-product-card::before {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 2;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--wedyan-red) 0 32%, var(--wedyan-navy) 32% 100%);
}

.woocommerce .wedyan-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(10, 39, 68, 0.28);
  box-shadow: 0 18px 42px rgba(10, 39, 68, 0.14);
}

.woocommerce .wedyan-product-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0;
  background: #fff;
}

.woocommerce .wedyan-product-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  transition: transform 0.35s ease;
}

.woocommerce .wedyan-product-card:hover .wedyan-product-card__image img {
  transform: scale(1.035);
}

.woocommerce .wedyan-product-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 24px;
  border-block-start: 1px solid #edf1f4;
  text-align: start;
}

.woocommerce .wedyan-product-card__category {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 10px;
  color: var(--wedyan-red);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.025em;
}

.woocommerce .wedyan-product-card__title {
  min-height: 2.8em;
  margin: 0 0 12px;
  color: var(--wedyan-navy);
  font-size: clamp(18px, 1.25vw, 21px);
  font-weight: 700;
  line-height: 1.4;
  text-transform: none;
}

.woocommerce .wedyan-product-card__title a {
  color: inherit;
  text-decoration: none;
}

.woocommerce .wedyan-product-card__title a:hover {
  color: var(--wedyan-red);
}

.woocommerce .wedyan-product-card__description {
  display: -webkit-box;
  min-height: 4.8em;
  margin: 0 0 18px;
  overflow: hidden;
  color: var(--wedyan-muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.woocommerce .wedyan-product-card__brands {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: auto 0 18px;
}

.woocommerce .wedyan-product-card__brand {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #d7e0e7;
  border-radius: 999px;
  background: var(--wedyan-soft);
  color: var(--wedyan-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.woocommerce .wedyan-product-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--wedyan-navy);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.woocommerce .wedyan-product-card__button:hover,
.woocommerce .wedyan-product-card__button:focus {
  background: var(--wedyan-red);
  color: #fff;
}

.woocommerce .wedyan-product-card__arrow {
  font-size: 18px;
  line-height: 1;
}

/* Disable parent card pieces that can sit outside the replacement card. */
.woocommerce li.product > .onsale,
.woocommerce .pxl-grid-item.product > .onsale {
  display: none !important;
}

/* Full RTL behavior, including direction-sensitive arrows. */
[dir="rtl"] .woocommerce .wedyan-product-card,
.rtl .woocommerce .wedyan-product-card {
  direction: rtl;
}

[dir="rtl"] .woocommerce .wedyan-product-card__body,
.rtl .woocommerce .wedyan-product-card__body {
  text-align: right;
}

[dir="rtl"] .woocommerce .wedyan-product-card::before,
.rtl .woocommerce .wedyan-product-card::before {
  background: linear-gradient(270deg, var(--wedyan-red) 0 32%, var(--wedyan-navy) 32% 100%);
}

[dir="rtl"] .woocommerce .wedyan-product-card__arrow,
.rtl .woocommerce .wedyan-product-card__arrow {
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  .woocommerce .wedyan-product-card__body {
    padding: 20px;
  }

  .woocommerce .wedyan-product-card__title,
  .woocommerce .wedyan-product-card__description {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .woocommerce .wedyan-product-card,
  .woocommerce .wedyan-product-card__image img,
  .woocommerce .wedyan-product-card__button {
    transition: none;
  }
}
