/* WooCommerce-specific overrides for NTPet */

.woocommerce .quantity .qty {
  width: 52px;
  padding: 10px 4px;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.ntpet-qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  overflow: hidden;
  background: var(--nt-cream);
  height: 48px;
  box-shadow: var(--nt-shadow-card);
}

.ntpet-qty__btn {
  width: 44px;
  border: 0;
  background: var(--nt-primary-soft);
  color: var(--nt-primary-dark);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ntpet-qty__btn:hover {
  background: var(--nt-primary);
  color: #fff;
}

.ntpet-qty__btn.ntpet-qty__minus {
  background: rgba(239, 108, 74, 0.12);
  color: var(--nt-coral-dark);
}

.ntpet-qty__btn.ntpet-qty__minus:hover {
  background: var(--nt-coral);
  color: #fff;
}

.ntpet-qty__btn.ntpet-qty__plus {
  background: var(--nt-primary-soft);
  color: var(--nt-primary-dark);
}

.ntpet-qty__btn.ntpet-qty__plus:hover {
  background: var(--nt-primary);
  color: #fff;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 36px;
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
  padding: 28px;
  margin-bottom: 32px;
  align-items: start;
  box-shadow: var(--nt-shadow-card);
  border-right: 6px solid var(--nt-primary-light);
}

.woocommerce div.product .woocommerce-product-gallery {
  margin: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

/* Hide magnifier / lightbox trigger */
.woocommerce-product-gallery__trigger,
.woocommerce div.product .woocommerce-product-gallery .zoomImg {
  display: none !important;
}

.woocommerce div.product div.images img {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
}

.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image {
  width: 100%;
}

.woocommerce-product-gallery__image a {
  pointer-events: none;
  cursor: default;
}

.woocommerce div.product .summary {
  margin: 0;
  float: none !important;
  width: 100% !important;
}

.woocommerce div.product .product_title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.5;
}

.woocommerce div.product p.price {
  font-size: 24px;
  font-weight: 800;
  color: var(--nt-primary-dark);
  margin: 12px 0;
}

.woocommerce div.product .stock {
  color: var(--nt-success);
  font-weight: 600;
}

.woocommerce div.product .out-of-stock {
  color: var(--nt-danger);
}

.woocommerce div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.woocommerce div.product form.cart .single_add_to_cart_button {
  position: relative;
  overflow: hidden;
  background: var(--nt-cta) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: var(--nt-radius-pill) !important;
  padding: 14px 28px !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  min-height: 48px;
  box-shadow: var(--nt-shadow-cta-glow) !important;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:hover {
  background: var(--nt-cta-hover) !important;
  color: #fff !important;
}

.woocommerce div.product form.cart .single_add_to_cart_button:active {
  transform: scale(0.95);
}

.woocommerce div.product .variations {
  width: 100%;
  margin-bottom: 12px;
}

.woocommerce div.product .variations td,
.woocommerce div.product .variations th {
  padding: 8px 0;
  border: 0;
  vertical-align: middle;
}

.woocommerce div.product .variations select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-sm);
  background: var(--nt-cream);
}

.ntpet-product-meta-actions {
  display: flex;
  gap: 8px;
  margin: 12px 0 20px;
}

.woocommerce-tabs {
  grid-column: 1 / -1;
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
  padding: 8px 20px 24px;
  margin-top: 8px;
  box-shadow: var(--nt-shadow-card);
  border-right: 5px solid var(--nt-primary-light);
}

.woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--nt-border);
  margin: 0 0 20px !important;
  padding: 0 !important;
  list-style: none;
}

.woocommerce-tabs ul.tabs li {
  border: 0 !important;
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.woocommerce-tabs ul.tabs li a {
  display: block;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  color: var(--nt-text-muted) !important;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.woocommerce-tabs ul.tabs li a:hover {
  color: var(--nt-primary-dark) !important;
}

.woocommerce-tabs ul.tabs li.active a {
  color: var(--nt-primary-dark) !important;
  border-bottom-color: var(--nt-cta);
}

.woocommerce-tabs ul.tabs li::before,
.woocommerce-tabs ul.tabs li::after,
.woocommerce-tabs ul.tabs::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
}

.woocommerce-Tabs-panel {
  padding: 4px 4px 8px !important;
}

.woocommerce-Tabs-panel > h2:first-child {
  display: none;
}

/* ——— Product reviews ——— */
.ntpet-reviews {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ntpet-reviews__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--nt-border);
}

.ntpet-reviews__title {
  margin: 0 0 6px !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--nt-primary-dark);
}

.ntpet-reviews__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--nt-text-muted);
}

.ntpet-reviews__summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 140px;
  padding: 14px 18px;
  background: linear-gradient(145deg, var(--nt-primary-soft), #fff);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
}

.ntpet-reviews__avg {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: var(--nt-primary-dark);
  letter-spacing: -0.02em;
}

.ntpet-reviews__summary-stars .ntpet-stars {
  font-size: 15px;
}

.ntpet-reviews__summary-stars .ntpet-stars__count {
  display: none;
}

.ntpet-reviews__summary-meta {
  font-size: 11px;
  color: var(--nt-text-muted);
  font-weight: 600;
}

.ntpet-reviews__list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ntpet-reviews__list > li {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.ntpet-review__card {
  display: grid !important;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 16px !important;
  background: var(--nt-bg) !important;
  border: 1px solid var(--nt-border) !important;
  border-radius: var(--nt-radius) !important;
  margin: 0 !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.ntpet-review__card:hover {
  border-color: var(--nt-primary-light) !important;
  box-shadow: var(--nt-shadow-card);
}

.ntpet-review__avatar img,
.ntpet-review__avatar .avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover;
  display: block;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--nt-primary-soft);
}

.ntpet-review__body {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.ntpet-review__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 8px;
}

.ntpet-review .star-rating {
  float: none !important;
  margin: 0 !important;
  color: var(--nt-star) !important;
  font-size: 13px;
}

.ntpet-review .woocommerce-review__author {
  font-weight: 800;
  font-size: 14px;
  color: var(--nt-text);
}

.ntpet-review .woocommerce-review__dash {
  display: none;
}

.ntpet-review .woocommerce-review__published-date {
  font-size: 12px;
  color: var(--nt-text-muted);
  font-weight: 500;
}

.ntpet-review .woocommerce-review__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--nt-primary-dark);
  background: var(--nt-primary-soft);
  padding: 3px 10px;
  border-radius: var(--nt-radius-pill);
}

.ntpet-review__content {
  font-size: 14px;
  line-height: 1.85;
  color: var(--nt-text);
}

.ntpet-review__content p {
  margin: 0 0 0.6em;
}

.ntpet-review__content p:last-child {
  margin-bottom: 0;
}

.ntpet-reviews__empty {
  text-align: center;
  padding: 36px 20px;
  background: var(--nt-bg);
  border: 1px dashed var(--nt-border);
  border-radius: var(--nt-radius);
  color: var(--nt-text-muted);
}

.ntpet-reviews__empty-icon {
  display: block;
  font-size: 28px;
  color: var(--nt-star);
  margin-bottom: 8px;
  opacity: 0.7;
}

.ntpet-reviews__empty p {
  margin: 0;
  font-size: 14px;
}

.ntpet-reviews__form-wrap {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(232, 246, 245, 0.7) 0%, transparent 42%),
    var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
}

.ntpet-reviews__form-title,
.ntpet-reviews__form .comment-reply-title {
  margin: 0 0 16px !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: var(--nt-primary-dark);
}

.ntpet-reviews__form .comment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
}

.ntpet-reviews__form .comment-form-comment,
.ntpet-reviews__form .comment-form-rating,
.ntpet-reviews__form .ntpet-reviews__rating-field,
.ntpet-reviews__form .form-submit,
.ntpet-reviews__form .comment-notes,
.ntpet-reviews__form .must-log-in {
  grid-column: 1 / -1;
}

.ntpet-reviews__field {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ntpet-reviews__field label,
.ntpet-reviews__rating-field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--nt-text);
}

.ntpet-reviews__field input,
.ntpet-reviews__field textarea,
.ntpet-reviews__rating-field select {
  width: 100%;
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius);
  background: var(--nt-cream);
  padding: 12px 14px;
  font: inherit;
  color: var(--nt-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ntpet-reviews__field textarea {
  min-height: 130px;
  resize: vertical;
}

.ntpet-reviews__field input:focus,
.ntpet-reviews__field textarea:focus,
.ntpet-reviews__rating-field select:focus {
  border-color: var(--nt-cta);
  box-shadow: var(--nt-shadow-focus);
  background: #fff;
}

.ntpet-reviews__rating-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ntpet-reviews__rating-field .stars,
.comment-form-rating .stars {
  display: flex !important;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  font-size: 0 !important;
}

.ntpet-reviews__rating-field .stars span,
.comment-form-rating .stars span {
  display: flex !important;
  flex-direction: row-reverse;
  gap: 4px;
  float: none !important;
}

.ntpet-reviews__rating-field .stars a,
.comment-form-rating .stars a {
  width: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  border-radius: 50%;
  background: var(--nt-cream) !important;
  border: 1px solid var(--nt-border);
  color: transparent !important;
  position: relative;
  text-indent: 0 !important;
  overflow: hidden;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ntpet-reviews__rating-field .stars a::before,
.comment-form-rating .stars a::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c9c2b0;
  font-size: 16px;
  opacity: 1 !important;
  -webkit-font-smoothing: antialiased;
}

.ntpet-reviews__rating-field .stars a:hover,
.ntpet-reviews__rating-field .stars a:hover ~ a,
.ntpet-reviews__rating-field .stars.selected a.active,
.ntpet-reviews__rating-field .stars.selected a.active ~ a,
.comment-form-rating .stars a:hover,
.comment-form-rating .stars a:hover ~ a,
.comment-form-rating .stars.selected a.active,
.comment-form-rating .stars.selected a.active ~ a {
  background: #fff8e0 !important;
  border-color: var(--nt-accent-dark);
  transform: scale(1.05);
}

.ntpet-reviews__rating-field .stars a:hover::before,
.ntpet-reviews__rating-field .stars a:hover ~ a::before,
.ntpet-reviews__rating-field .stars.selected a.active::before,
.ntpet-reviews__rating-field .stars.selected a.active ~ a::before,
.comment-form-rating .stars a:hover::before,
.comment-form-rating .stars a:hover ~ a::before,
.comment-form-rating .stars.selected a.active::before,
.comment-form-rating .stars.selected a.active ~ a::before {
  color: var(--nt-star);
}

.ntpet-reviews__form .form-submit {
  margin: 8px 0 0 !important;
}

.ntpet-reviews__form .form-submit .ntpet-btn,
.ntpet-reviews__form .form-submit .submit {
  min-height: 48px;
  padding: 12px 28px !important;
  border-radius: var(--nt-radius-pill) !important;
  background: var(--nt-cta) !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 800 !important;
  box-shadow: var(--nt-shadow-cta-glow);
  cursor: pointer;
}

.ntpet-reviews__form .form-submit .ntpet-btn:hover,
.ntpet-reviews__form .form-submit .submit:hover {
  background: var(--nt-cta-hover) !important;
}

.ntpet-reviews__login-hint,
.ntpet-reviews__verify {
  padding: 14px 16px;
  background: var(--nt-primary-soft);
  border-radius: var(--nt-radius);
  color: var(--nt-primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.ntpet-reviews__login-hint a {
  color: var(--nt-cta-dark);
  text-decoration: underline;
}

.ntpet-reviews__pagination {
  margin-top: 16px;
}

.woocommerce div.product .woocommerce-product-rating {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.woocommerce div.product .woocommerce-product-rating .star-rating {
  color: var(--nt-star);
  margin: 0 !important;
  float: none !important;
}

.woocommerce div.product .woocommerce-review-link {
  font-size: 12px;
  color: var(--nt-text-muted);
  font-weight: 600;
}

.woocommerce div.product .woocommerce-review-link:hover {
  color: var(--nt-primary);
}

@media (max-width: 640px) {
  .ntpet-reviews__header {
    flex-direction: column;
    align-items: stretch;
  }

  .ntpet-review__card {
    grid-template-columns: 40px 1fr;
    padding: 14px 12px !important;
  }

  .ntpet-review__avatar img,
  .ntpet-review__avatar .avatar {
    width: 36px !important;
    height: 36px !important;
  }

  .ntpet-reviews__form-wrap {
    padding: 18px 14px;
  }

  .ntpet-reviews__form .comment-form {
    grid-template-columns: 1fr;
  }
}

.related.products,
.upsells.products {
  grid-column: 1 / -1;
  margin-top: 24px;
}

.related.products > h2,
.upsells.products > h2 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* Cart */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
  padding: 24px;
  box-shadow: var(--nt-shadow-card);
}

.woocommerce table.shop_table {
  border: 1px solid var(--nt-border) !important;
  border-radius: 10px;
  overflow: hidden;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: var(--nt-border) !important;
  padding: 14px !important;
}

.woocommerce a.remove {
  color: var(--nt-danger) !important;
}

.woocommerce .cart .button,
.woocommerce .cart input.button,
.woocommerce button.button,
.woocommerce a.button,
.woocommerce #respond input#submit {
  background: var(--nt-cream) !important;
  color: var(--nt-text) !important;
  border: 1px solid var(--nt-border) !important;
  border-radius: var(--nt-radius-pill) !important;
  font-weight: 700 !important;
  min-height: 44px;
  padding: 10px 20px !important;
}

.woocommerce .cart .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
  background: var(--nt-primary-soft) !important;
  border-color: var(--nt-primary) !important;
  color: var(--nt-primary-dark) !important;
  box-shadow: var(--nt-shadow-teal-glow) !important;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #place_order,
.woocommerce .checkout-button {
  background: var(--nt-cta) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: var(--nt-shadow-cta-glow) !important;
  font-weight: 800 !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce #place_order:hover,
.woocommerce .checkout-button:hover {
  background: var(--nt-cta-hover) !important;
  color: #fff !important;
}

/* کارت محصول / افزودن به سبد — اولویت روی .button عمومی ووکامرس */
.woocommerce a.button.ntpet-btn--primary,
.woocommerce button.button.ntpet-btn--primary,
.woocommerce a.add_to_cart_button,
.woocommerce a.ajax_add_to_cart {
  background: var(--nt-cta) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: var(--nt-shadow-cta-glow) !important;
}

.woocommerce a.button.ntpet-btn--primary:hover,
.woocommerce button.button.ntpet-btn--primary:hover,
.woocommerce a.add_to_cart_button:hover,
.woocommerce a.ajax_add_to_cart:hover {
  background: var(--nt-cta-hover) !important;
  color: #fff !important;
}

.cart-collaterals .cart_totals {
  background: var(--nt-bg);
  border-radius: 10px;
  padding: 16px;
}

.woocommerce-checkout .form-row input.input-text,
.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .form-row select,
.woocommerce-account input.input-text,
.woocommerce-account select {
  border: 1px solid var(--nt-border);
  border-radius: 6px;
  padding: 10px 12px;
  width: 100%;
  background: #fff;
}

.woocommerce-checkout .form-row label,
.woocommerce-account label {
  font-weight: 600;
  margin-bottom: 4px;
}

.woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.woocommerce-MyAccount-navigation a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--nt-bg);
  font-weight: 600;
}

.woocommerce-MyAccount-navigation .is-active a,
.woocommerce-MyAccount-navigation a:hover {
  background: var(--nt-primary-soft);
  color: var(--nt-primary-dark);
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
  border-top-color: var(--nt-primary) !important;
  border-radius: 8px;
}

.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  gap: 6px;
  border: 0;
  justify-content: center;
  margin-top: 24px;
}

.woocommerce nav.woocommerce-pagination ul li {
  border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  border: 1px solid var(--nt-border);
  border-radius: 8px;
  background: var(--nt-surface);
  padding: 0 10px;
}

.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--nt-primary);
  color: #fff;
  border-color: var(--nt-primary);
}

.woocommerce-product-gallery__image img {
  border-radius: 12px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 100%;
}

.woocommerce div.product div.images {
  margin-bottom: 0;
  width: 100%;
}

.related.products {
  display: none !important;
}

@media (min-width: 901px) {
  .woocommerce div.product .woocommerce-product-gallery__image img {
    min-height: 420px;
  }
}

.woocommerce div.product div.images .flex-control-thumbs li {
  width: 22%;
  margin: 0 0 0 4%;
}

.woocommerce div.product div.images .flex-control-thumbs li img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 8px;
}

.woocommerce-cart .product-thumbnail img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  width: 72px;
  height: auto;
  border-radius: 6px;
}

/* ===== Checkout & cart polish ===== */

.woocommerce-checkout .woocommerce,
.woocommerce-cart .woocommerce {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}

.ntpet-checkout__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.ntpet-checkout-card {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: 16px;
  padding: 22px 22px 8px;
  margin-bottom: 16px;
  box-shadow: var(--nt-shadow);
}

.ntpet-checkout-card--sticky {
  position: sticky;
  top: calc(var(--nt-header-h) + 24px);
  padding-bottom: 22px;
  margin-bottom: 0;
}

.ntpet-checkout-card__title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.ntpet-checkout-card__hint {
  margin: 0 0 18px;
  color: var(--nt-text-muted);
  font-size: 13px;
}

.ntpet-checkout .form-row {
  margin-bottom: 14px !important;
  padding: 0 !important;
}

.ntpet-checkout .form-row label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  display: block;
}

.ntpet-checkout .form-row .required {
  color: var(--nt-coral);
  text-decoration: none;
}

.ntpet-checkout .form-row input.input-text,
.ntpet-checkout .form-row textarea,
.ntpet-checkout .form-row select {
  border: 1px solid var(--nt-border) !important;
  border-radius: var(--nt-radius) !important;
  padding: 12px 14px !important;
  min-height: 48px;
  background: var(--nt-cream) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ntpet-checkout .form-row input.input-text:focus,
.ntpet-checkout .form-row textarea:focus,
.ntpet-checkout .form-row select:focus {
  border-color: var(--nt-primary) !important;
  background: #fff !important;
  box-shadow: var(--nt-shadow-focus);
  outline: none;
}

.ntpet-checkout .form-row-first,
.ntpet-checkout .form-row-last {
  width: 48.5%;
}

.ntpet-hidden-country {
  display: none !important;
}

.ntpet-shipping-heading {
  font-size: 14px !important;
  font-weight: 800 !important;
  padding-bottom: 4px !important;
  border: 0 !important;
}

.ntpet-shipping-methods-cell {
  border: 0 !important;
  padding: 0 !important;
}

.ntpet-shipping-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ntpet-shipping-card {
  border: 1.5px solid var(--nt-border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  overflow: hidden;
}

.ntpet-shipping-card:hover {
  border-color: #99f6e4;
}

.ntpet-shipping-card.is-selected {
  border-color: var(--nt-primary);
  background: var(--nt-primary-soft);
  box-shadow: 0 0 0 1px var(--nt-primary);
}

.ntpet-shipping-card label {
  display: grid;
  grid-template-columns: 22px 28px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 12px 14px;
  cursor: pointer;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
}

.ntpet-shipping-card__radio {
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ntpet-shipping-card__radio input {
  accent-color: var(--nt-primary);
  width: 18px;
  height: 18px;
  margin: 0 !important;
}

.ntpet-shipping-card__icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.ntpet-shipping-card__icon img.emoji,
.ntpet-shipping-card__icon img {
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  display: block;
}

.ntpet-shipping-card__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ntpet-shipping-card__title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.ntpet-shipping-card__title .amount {
  display: inline;
  white-space: nowrap;
}

.ntpet-shipping-card__note {
  font-size: 11px;
  color: var(--nt-text-muted);
  line-height: 1.4;
}

.woocommerce-shipping-destination {
  margin: 10px 0 0 !important;
  font-size: 12px;
  color: var(--nt-text-muted);
}

.woocommerce-checkout-review-order-table {
  margin-bottom: 16px !important;
}

.woocommerce-checkout #payment {
  background: transparent !important;
  border-radius: 12px;
  padding: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods {
  border: 1px solid var(--nt-border);
  border-radius: 12px;
  padding: 12px !important;
  background: #fff;
}

.woocommerce-checkout #payment .place-order {
  margin: 16px 0 0 !important;
  padding: 0 !important;
}

.woocommerce-checkout #place_order {
  width: 100%;
  min-height: 52px !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  box-shadow: var(--nt-shadow-cta-glow) !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  width: 100%;
  text-align: center;
  min-height: 52px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 15px !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  box-shadow: var(--nt-shadow-cta-glow) !important;
}

.cart-collaterals .cart_totals {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--nt-shadow);
}

.cart-collaterals .cart_totals h2 {
  font-size: 18px;
  font-weight: 800;
  margin-top: 0;
}

@media (max-width: 900px) {
  .ntpet-checkout__grid {
    grid-template-columns: 1fr;
  }

  .ntpet-checkout-card--sticky {
    position: static;
  }

  .ntpet-checkout .form-row-first,
  .ntpet-checkout .form-row-last {
    width: 100%;
  }
}


@media (max-width: 800px) {
  .woocommerce div.product {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 20px;
  }

  .woocommerce-account .woocommerce {
    padding: 16px;
  }

  .woocommerce-MyAccount-navigation ul {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Shop / archive product grid — force 3:2 cards */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after {
  display: none !important;
  content: none !important;
}

.woocommerce ul.products,
.woocommerce-page ul.products,
.ntpet-shop-content ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
}

.woocommerce ul.products li.product .ntpet-product-card__media,
.ntpet-shop-page .ntpet-product-card__media,
.ntpet-shop-content .ntpet-product-card__media {
  aspect-ratio: 3 / 2 !important;
  width: 100%;
  overflow: hidden;
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img,
.ntpet-shop-content .ntpet-product-card__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  margin: 0 !important;
}

@media (max-width: 1100px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .ntpet-shop-content ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .ntpet-shop-content ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ===== Cart page layout ===== */
.ntpet-main--cart {
  padding-block: 28px 64px;
}

.ntpet-cart-page {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.ntpet-page-head--cart {
  margin-bottom: 22px;
}

.ntpet-page-head--cart .ntpet-page-title {
  margin-bottom: 6px;
}

.ntpet-page-head__sub {
  margin: 0;
  color: var(--nt-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.ntpet-cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
}

.ntpet-cart-panel {
  background: var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
  padding: 18px 18px 10px;
  box-shadow: var(--nt-shadow-card);
}

.ntpet-cart-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--nt-border);
}

.ntpet-cart-panel__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--nt-primary-dark);
}

.ntpet-cart-panel__count {
  font-size: 12px;
  font-weight: 700;
  color: var(--nt-primary-dark);
  background: var(--nt-primary-soft);
  padding: 4px 12px;
  border-radius: var(--nt-radius-pill);
}

.woocommerce-cart .ntpet-cart-table {
  border: 0 !important;
  margin: 0 !important;
  background: transparent;
}

.woocommerce-cart .ntpet-cart-table thead th {
  background: transparent !important;
  font-size: 12px;
  font-weight: 700;
  color: var(--nt-text-muted);
  text-transform: none;
  padding: 8px 10px !important;
  border-bottom: 1px solid var(--nt-border) !important;
}

.woocommerce-cart .ntpet-cart-row td {
  vertical-align: middle !important;
  padding: 16px 10px !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--nt-border) !important;
  background: transparent !important;
}

.woocommerce-cart .ntpet-cart-row:last-of-type td {
  border-bottom: 0 !important;
}

.woocommerce-cart .product-name a {
  font-weight: 800;
  color: var(--nt-text);
  text-decoration: none;
}

.woocommerce-cart .product-name a:hover {
  color: var(--nt-primary);
}

.woocommerce-cart .product-thumbnail img {
  width: 88px !important;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--nt-border);
  background: var(--nt-cream);
}

.woocommerce-cart .ntpet-cart-remove {
  display: grid !important;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fef0ee !important;
  color: var(--nt-danger) !important;
  font-size: 18px;
  line-height: 1;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease;
}

.woocommerce-cart .ntpet-cart-remove:hover {
  transform: scale(1.08);
  background: #fcdad4 !important;
}

.woocommerce-cart .product-quantity .quantity,
.woocommerce-cart .product-quantity .ntpet-qty {
  margin: 0 auto;
}

.woocommerce-cart .product-subtotal {
  font-weight: 800;
  color: var(--nt-primary-dark);
  white-space: nowrap;
}

.ntpet-cart-actions-row td {
  border: 0 !important;
  padding: 16px 0 8px !important;
}

.ntpet-cart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ntpet-cart-coupon {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex: 1;
  min-width: 220px;
}

.ntpet-cart-coupon .input-text {
  flex: 1;
  min-width: 140px;
  min-height: 44px;
  border: 1px solid var(--nt-border) !important;
  border-radius: var(--nt-radius-pill) !important;
  background: var(--nt-cream) !important;
  padding: 10px 16px !important;
}

.ntpet-cart-aside .cart_totals {
  position: static;
  background:
    linear-gradient(180deg, rgba(232, 246, 245, 0.65) 0%, transparent 36%),
    var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
  padding: 22px 22px 20px;
  box-shadow: var(--nt-shadow-card);
  overflow: visible;
}

.ntpet-cart-aside .cart_totals h2 {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 800;
  color: var(--nt-primary-dark);
  text-align: right;
}

/* Keep totals as a real table — Woo responsive stacking breaks RTL labels */
.ntpet-cart-aside table.shop_table,
.ntpet-cart-aside table.shop_table_responsive {
  border: 0 !important;
  margin: 0 0 8px !important;
  width: 100% !important;
  table-layout: auto !important;
}

.ntpet-cart-aside table.shop_table_responsive tr,
.woocommerce-cart .cart_totals table.shop_table_responsive tr {
  display: table-row !important;
}

.ntpet-cart-aside table.shop_table_responsive th,
.ntpet-cart-aside table.shop_table_responsive td,
.woocommerce-cart .cart_totals table.shop_table_responsive th,
.woocommerce-cart .cart_totals table.shop_table_responsive td {
  display: table-cell !important;
  float: none !important;
  width: auto !important;
  text-align: inherit !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--nt-border) !important;
  padding: 12px 0 !important;
  vertical-align: middle !important;
}

.ntpet-cart-aside table.shop_table_responsive td::before,
.woocommerce-cart .cart_totals table.shop_table_responsive td::before,
.woocommerce-cart .cart_totals table.shop_table_responsive td[data-title]::before {
  content: none !important;
  display: none !important;
}

.ntpet-cart-aside .cart-subtotal th,
.ntpet-cart-aside .order-total th,
.ntpet-cart-aside .woocommerce-shipping-totals th {
  text-align: right !important;
  font-weight: 700;
  white-space: nowrap;
  padding-left: 16px !important;
}

.ntpet-cart-aside .cart-subtotal td,
.ntpet-cart-aside .order-total td {
  text-align: left !important;
  font-weight: 800;
  white-space: nowrap;
  direction: rtl;
}

.ntpet-cart-aside .ntpet-shipping-row th {
  border-bottom: 0 !important;
  padding-bottom: 8px !important;
}

.ntpet-cart-aside .ntpet-shipping-methods-cell {
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--nt-border) !important;
}

.ntpet-cart-aside .ntpet-shipping-heading {
  padding: 14px 0 8px !important;
  font-size: 14px !important;
}

.ntpet-cart-aside .ntpet-shipping-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 640px) {
  .ntpet-cart-aside .ntpet-shipping-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .ntpet-cart-aside .ntpet-shipping-card label {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 6px;
    padding: 12px 10px;
    min-height: 96px;
  }

  .ntpet-cart-aside .ntpet-shipping-card__body {
    align-items: center;
  }

  .ntpet-cart-aside .ntpet-shipping-card__title {
    font-size: 12px;
    line-height: 1.4;
  }
}

.ntpet-cart-aside .woocommerce-shipping-calculator,
.ntpet-cart-aside .shipping-calculator-button,
.ntpet-cart-aside .woocommerce-shipping-destination {
  display: none !important;
}

.ntpet-cart-aside .order-total th,
.ntpet-cart-aside .order-total td {
  font-size: 16px;
  font-weight: 800;
  color: var(--nt-primary-dark);
  border-top: 1px solid var(--nt-border) !important;
  border-bottom: 0 !important;
  padding-top: 16px !important;
}

.ntpet-cart-aside .wc-proceed-to-checkout {
  margin-top: 8px;
}

.ntpet-cart-empty {
  text-align: center;
  max-width: 420px;
  margin: 24px auto 8px;
  padding: 48px 28px;
  background:
    linear-gradient(180deg, rgba(232, 246, 245, 0.7) 0%, transparent 45%),
    var(--nt-surface);
  border: 1px solid var(--nt-border);
  border-radius: var(--nt-radius-lg);
  box-shadow: var(--nt-shadow-card);
}

.ntpet-cart-empty__icon {
  font-size: 42px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.85;
}

.ntpet-cart-empty__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  color: var(--nt-primary-dark);
}

.ntpet-cart-empty__text {
  margin: 0 0 22px;
  color: var(--nt-text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.ntpet-cart-empty__actions {
  margin: 0;
}

.ntpet-cart-empty__actions .button,
.ntpet-cart-empty__actions .ntpet-btn {
  min-height: 48px;
  padding: 12px 28px !important;
  border-radius: var(--nt-radius-pill) !important;
  background: var(--nt-cta) !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 800 !important;
  box-shadow: var(--nt-shadow-cta-glow);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

.woocommerce-cart .cart-empty,
.woocommerce-cart .wc-empty-cart-message {
  display: none !important;
}

@media (max-width: 700px) {
  .woocommerce-cart .ntpet-cart-table thead {
    display: none;
  }

  .woocommerce-cart .ntpet-cart-row {
    display: grid !important;
    grid-template-columns: 72px 1fr auto;
    grid-template-areas:
      "thumb name remove"
      "thumb price price"
      "qty qty subtotal";
    gap: 6px 12px;
    padding: 14px 4px 16px;
    border-bottom: 1px solid var(--nt-border);
  }

  .woocommerce-cart .ntpet-cart-row td {
    border: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  .woocommerce-cart .ntpet-cart-row .product-thumbnail { grid-area: thumb; }
  .woocommerce-cart .ntpet-cart-row .product-name { grid-area: name; }
  .woocommerce-cart .ntpet-cart-row .product-remove { grid-area: remove; justify-self: end; }
  .woocommerce-cart .ntpet-cart-row .product-price { grid-area: price; font-size: 13px; color: var(--nt-text-muted); }
  .woocommerce-cart .ntpet-cart-row .product-quantity { grid-area: qty; }
  .woocommerce-cart .ntpet-cart-row .product-subtotal { grid-area: subtotal; justify-self: end; align-self: end; }

  .woocommerce-cart .product-thumbnail img {
    width: 72px !important;
  }

  .woocommerce-cart .ntpet-cart-row .product-name::before,
  .woocommerce-cart .ntpet-cart-row .product-price::before,
  .woocommerce-cart .ntpet-cart-row .product-quantity::before,
  .woocommerce-cart .ntpet-cart-row .product-subtotal::before {
    display: none !important;
  }

  .ntpet-cart-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ntpet-cart-actions-row {
    display: block !important;
    grid-column: 1 / -1;
  }
}
