.mobile-hidden {
  display: none;
  @media screen and (min-width: 991px) {
    display: block;
  }
}

.desktop-hidden {
  display: block;
  @media screen and (min-width: 991px) {
    display: none;
  }
}

/* ---------- Product Card V2 Section ---------- */

.pcard-v2-section {
  margin-bottom: var(--gap-xxl);
}

.pcard-v2-section .pdp-section-title {
  margin-bottom: var(--gap-md);
}

.pcard-v2-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ---------- Product Card V2 ---------- */

.pcard-v2 {
  display: flex;
  gap: var(--space-md);
  align-items: stretch;
  padding: 20px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-xl);

  @media screen and (max-width: 992px) {
    flex-direction: column;
  }
}

.pcard-v2__image-wrap {
  flex-shrink: 0;
  width: 320px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 24px;
  align-self: stretch;
  text-decoration: none;

  @media screen and (max-width: 768px) {
    width: 100%;
    min-width: 110px;
    max-width: 110px;
    padding: var(--gap-xs);
    aspect-ratio: 1 / 1;
  }
}

.pcard-v2__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  margin: auto !important;
}

.pcard-v2__body {
  flex: 1 1 0;
  display: flex;
  gap: var(--space-md);
  min-width: 0;
  text-align: left;

  @media screen and (max-width: 768px) {
    flex-direction: column;
  }
}

.pcard-v2__info {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  min-width: 0;
}

.pcard-v2__info-group {
  display: flex;
  flex-direction: row;
  gap: var(--gap-xs);
}

.pcard-v2__title {
  font-size: var(--text-h2);
  font-weight: 600 !important;
  line-height: var(--text-h2-lh);
  color: var(--color-text-alt);
  text-decoration: none;
  margin: 0;
  transition: color 0.2s;

  @media screen and (max-width: 768px) {
    font-size: var(--text-h3);
    line-height: var(--text-h3-lh);
  }
}

.pcard-v2__title:hover {
  color: var(--color-accent);
}

.pcard-v2__desc {
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: var(--text-body-sm-lh);
  color: var(--color-text-alt);

  @media screen and (max-width: 768px) {
    font-size: var(--text-label);
    line-height: var(--text-label-lh);
  }
}

.pcard-v2__desc-list {
  list-style: none;

  margin: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pcard-v2 .pcard-v2__body .pcard-v2__desc-list {
  padding: 0 !important;
}

.pcard-v2__desc-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: var(--text-body-sm-lh);
  color: var(--color-text-alt);
  margin: 0;
  position: relative;
  padding-left: 16px;
}

.pcard-v2__desc-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 5px;
  background: var(--color-error);

  @media screen and (max-width: 768px) {
    top: 6px;
  }
}

.pcard-v2__desc-list::marker {
  color: var(--color-error);
}

.pcard-v2__desc-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

@media screen and (max-width: 768px) {
  .pcard-v2__desc-list li {
    font-size: var(--text-label);
    line-height: var(--text-label-lh);
  }
}

/* ── Actions column ── */

.pcard-v2__actions {
  flex-shrink: 0;
  width: 196px;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-end;
  align-self: stretch;

  @media screen and (max-width: 768px) {
    width: 100%;
    align-items: stretch;
    gap: var(--gap-sm);
  }
}

.pcard-v2__price {
  display: flex;
  gap: var(--gap-sm);
  align-items: baseline;
  justify-content: flex-end;
  text-align: center;
  white-space: nowrap;
  width: 100%;

  text-decoration: none;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: var(--text-display-lh);
  color: var(--color-text);

  @media screen and (max-width: 768px) {
    justify-content: flex-start;
  }
}

.pcard-v2__price del {
  font-size: var(--text-h3);
  font-weight: 500;
  line-height: var(--text-h3-lh);
  color: var(--color-icon-gray);
  text-decoration: line-through;
}

.pcard-v2__price ins {
  text-decoration: none;
  font-size: var(--text-display);
  font-weight: 600;
  line-height: var(--text-display-lh);
  color: var(--color-text);
}

.pcard-v2__price .woocommerce-Price-amount {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}

/* ── Dropdowns ── */

.pcard-v2__options {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  width: 100%;
}

.pcard-v2__dropdown {
  position: relative;
  width: 100%;
}

.pcard-v2__select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  padding: 8px 36px 8px 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: var(--text-body-sm-lh);
  color: var(--color-text);
  cursor: pointer;
}

.pcard-v2__select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.pcard-v2__dropdown-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ── Quantity ── */

.pcard-v2__quantity {
  display: flex;
  gap: var(--gap-sm);
  align-items: center;
  height: 36px;
  width: 100%;
  justify-content: flex-end;
  margin-top: auto;
}

.pcard-v2__quantity--mobile {
  display: none;
}

.pcard-v2__quantity--mobile .pcard-v2__qty-label {
  display: none;
}

@media screen and (max-width: 768px) {
  .pcard-v2__quantity {
    justify-content: flex-start;
  }
  .pcard-v2__quantity--desktop {
    display: none;
  }
  .pcard-v2__quantity--mobile {
    display: flex;
    width: auto;
    margin: 0 !important;
  }
}

.pcard-v2:has(.pcard-v2__options) .pcard-v2__quantity {
  margin-top: 0;
  margin-bottom: auto;
}

.pcard-v2__qty-label {
  font-size: var(--text-body-sm);
  font-weight: 500;
  line-height: var(--text-body-sm-lh);
  color: var(--color-text);
}

.pcard-v2__qty-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pcard-v2__qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}

.pcard-v2__qty-btn:hover {
  background: var(--color-bg-secondary);
}

.pcard-v2__qty-value {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: var(--text-body-lh);
  color: var(--color-text);
}

/* ── Button ── */

.pcard-v2__btn-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  width: 100%;
  gap: var(--gap-sm);

  @media screen and (max-width: 768px) {
    justify-content: stretch;
    align-items: center;
    margin-top: var(--gap-sm) !important;
  }
}

.pcard-v2:has(.pcard-v2__quantity) .pcard-v2__btn-wrap {
  margin-top: 0;
}

.pcard-v2__btn-wrap .added_to_cart {
  display: none !important;
}

.pcard-v2__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  padding: 0 var(--space-md);
  background: var(--color-white);
  border: 1px solid var(--color-error);
  border-radius: var(--radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-size: var(--text-body);
  font-weight: 700;
  line-height: var(--text-btn-lh);
  color: var(--color-error);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s,
    color 0.2s;

  @media screen and (max-width: 768px) {
    width: 100%;
  }
}

.pcard-v2__btn:focus {
  color: var(--color-error);
}

.pcard-v2__btn:hover:not(:disabled) {
  background: var(--color-error);
  color: var(--color-white);
  font-weight: 700;
}

.pcard-v2__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Vertical layout modifier ── */

.pcard-v2--vertical {
  flex-direction: column;
}

.pcard-v2--vertical .pcard-v2__image-wrap {
  width: 100%;
  padding: var(--space-md);
  aspect-ratio: 1 / 1;
}

.pcard-v2--vertical .pcard-v2__body {
  flex-direction: column;
}

.pcard-v2--vertical .pcard-v2__actions {
  width: 100%;
  align-items: stretch;
}

.pcard-v2--vertical .pcard-v2__price {
  justify-content: flex-start;
}

.pcard-v2--vertical .pcard-v2__quantity {
  justify-content: flex-start;
}

.pcard-v2--vertical .pcard-v2__btn-wrap {
  justify-content: stretch;
}

.pcard-v2--vertical .pcard-v2__btn {
  width: 100%;
}

/* ── PLP (parent category shop template): admin preview ── */

.products--pcard-v2 {
  display: flex;
  flex-direction: column;
  gap: var(--space-md, 16px);
  padding: 0;
}

.products--pcard-v2::before,
.products--pcard-v2::after {
  display: none;
}

.products--pcard-v2 li.pcard-v2-plp {
  width: 100% !important;
  max-width: none;
  float: none;
  margin: 0 !important;
  list-style: none;
}

.products--pcard-v2 li.pcard-v2-plp .pcard-v2 {
  max-width: 100%;
  width: 100%;
}

.products--pcard-v2 .pcard-v2__price .price {
  width: fit-content !important;
  margin-right: 0 !important;
}

.products--pcard-v2 li.product:hover {
  box-shadow: none !important;
}
