.nmd-cart-picks {
  --nmd-blue: var(--wd-primary-color, #062a78);
  --nmd-dark: #17253c;
  --nmd-muted: #64748b;
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 22px;
  padding: 24px 22px 18px;
  overflow: hidden;
  border: 1px solid #dce6f4;
  border-radius: 16px;
  background: linear-gradient(145deg, #f5f8ff 0%, #fff 48%, #fff 100%);
  box-shadow: 0 10px 30px rgba(6, 42, 120, .06);
  color: var(--nmd-dark);
  font-family: iranyekanwebregular_FaNum, Arial, Helvetica, sans-serif;
}

/* Elementor's cart columns are grid items. A horizontal product track can
   otherwise make their automatic minimum width equal to all cards combined. */
body.woocommerce-cart .elementor-widget-wd_cart_table .e-cart__column-start {
  min-width: 0;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .e-cart__column-start .woocommerce-cart-form {
  min-width: 0;
  max-width: 100%;
}

.nmd-cart-picks::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--nmd-blue) 55%, #062a78);
  content: "";
}

.nmd-cart-picks__head,
.nmd-cart-picks__heading-wrap,
.nmd-cart-picks__controls,
.nmd-cart-picks__bottom {
  display: flex;
  align-items: center;
}

.nmd-cart-picks__head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.nmd-cart-picks__heading-wrap {
  min-width: 0;
  gap: 12px;
}

.nmd-cart-picks__spark {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border-radius: 12px;
  background: #eaf1fc;
  color: #0b4fb2;
  font-size: 22px;
}

.nmd-cart-picks__eyebrow {
  margin: 0 0 3px;
  color: #0b4fb2;
  font-size: 12px;
  font-weight: 700;
}

.nmd-cart-picks h2 {
  margin: 0;
  color: var(--nmd-dark);
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 800;
  line-height: 1.55;
}

.nmd-cart-picks__controls {
  flex: 0 0 auto;
  gap: 6px;
}

.nmd-cart-picks__arrow {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #d8e5f7;
  border-radius: 10px;
  background: #fff;
  color: #0b4fb2;
  box-shadow: none;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}

.nmd-cart-picks__arrow:hover {
  transform: translateY(-2px);
  background: var(--nmd-blue);
  color: #fff;
}

.nmd-cart-picks__track {
  display: flex;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 2px 1px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nmd-cart-picks__track::-webkit-scrollbar { display: none; }

.nmd-cart-picks__card {
  display: flex;
  flex: 0 0 clamp(168px, 29%, 205px);
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  border: 1px solid #e5ebf4;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(6, 42, 120, .04);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}

.nmd-cart-picks__card:hover {
  transform: translateY(-3px);
  border-color: #b8cdea;
  box-shadow: 0 8px 20px rgba(6, 42, 120, .1);
}

.nmd-cart-picks__image {
  display: flex;
  flex: 0 0 135px;
  align-items: center;
  justify-content: center;
  height: 135px;
  padding: 8px;
  overflow: hidden;
  background: #fff;
}

.nmd-cart-picks__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.nmd-cart-picks__details {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 11px 11px;
}

.nmd-cart-picks__badge {
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #eaf1fc;
  color: #0b4fb2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

.nmd-cart-picks__name {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--nmd-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.75;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.nmd-cart-picks__name:hover { color: #0b4fb2; }

.nmd-cart-picks__bottom {
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.nmd-cart-picks__price {
  min-width: 0;
  color: #0b4fb2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.65;
}

.nmd-cart-picks__price del {
  display: block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 400;
}

.nmd-cart-picks__price ins { text-decoration: none; }

.nmd-cart-picks__add {
  display: grid;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--nmd-blue);
  color: #fff;
  box-shadow: 0 4px 10px rgba(6, 42, 120, .18);
  font-family: inherit;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.nmd-cart-picks__add:hover {
  transform: scale(1.07);
  background: #0a4aab;
}

.nmd-cart-picks__add:disabled {
  opacity: .65;
  cursor: wait;
}

.nmd-cart-picks__hint {
  margin: 4px 0 0;
  color: var(--nmd-muted);
  font-size: 10px;
  text-align: center;
}

.nmd-cart-picks__arrow:focus-visible,
.nmd-cart-picks__add:focus-visible,
.nmd-cart-picks__track:focus-visible,
.nmd-cart-picks__name:focus-visible {
  outline: 2px solid #0b4fb2;
  outline-offset: 2px;
}

/* Elementor's cart widget applies high-specificity heading and button rules. */
body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks {
  font-family: iranyekanwebregular_FaNum, Arial, Helvetica, sans-serif;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks__eyebrow,
body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks__name {
  font-family: iranyekanwebregular_FaNum, Arial, Helvetica, sans-serif;
  font-weight: 400;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks__image {
  display: flex;
  flex: 0 0 135px;
  height: 135px;
  overflow: hidden;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks h2 {
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.55;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks button.nmd-cart-picks__arrow {
  padding: 0;
  border: 1px solid #d8e5f7;
  background: #fff;
  color: #0b4fb2;
  font-size: 20px;
  line-height: 1;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks button.nmd-cart-picks__arrow:hover {
  background: var(--nmd-blue);
  color: #fff;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks button.nmd-cart-picks__add {
  padding: 0;
  border: 0;
  background: var(--nmd-blue);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks button.nmd-cart-picks__add:hover {
  background: #0a4aab;
}

@media (max-width: 767px) {
  .nmd-cart-picks {
    margin-top: 16px;
    padding: 18px 12px 13px;
    border-radius: 12px;
  }

  .nmd-cart-picks__head { align-items: flex-start; }
  .nmd-cart-picks__heading-wrap { gap: 9px; }
  .nmd-cart-picks__spark { flex-basis: 32px; width: 32px; height: 32px; font-size: 19px; }
  .nmd-cart-picks h2 { font-size: 14px; }
  .nmd-cart-picks__eyebrow { font-size: 10px; }
  .nmd-cart-picks__controls { gap: 4px; }
  .nmd-cart-picks__arrow { flex-basis: 29px; width: 29px; min-width: 29px; height: 29px; border-radius: 8px; font-size: 17px; }
  body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks button.nmd-cart-picks__arrow { font-size: 17px; }
  .nmd-cart-picks__card { flex-basis: clamp(158px, 57vw, 190px); }
  .nmd-cart-picks__image { flex-basis: 125px; height: 125px; }
  body.woocommerce-cart .elementor-widget-wd_cart_table .nmd-cart-picks__image { flex-basis: 125px; height: 125px; }
}

@media (prefers-reduced-motion: reduce) {
  .nmd-cart-picks__track { scroll-behavior: auto; }
  .nmd-cart-picks__card,
  .nmd-cart-picks__arrow,
  .nmd-cart-picks__add { transition: none; }
}
