/*
 * Product Cards (desktop) + badges (all devices)
 */

.product-labels {
  display: none !important;
}

/* Badge group: same everywhere (product cards, single product, live search, mini-cart) */
.gstore-badge-group {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  z-index: 20;
}

/* Inline badge group (e.g. mini-cart) */
.mini-cart-item-details .gstore-badge-group {
  position: static;
  margin-top: 4px;
}

/* Glassmorphic badges: semi-transparent, blur, same everywhere */
.gstore-badge {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.gstore-badge.condition {
  background: rgba(47, 111, 237, 0.35);
  color: #ffffff;
  border: 1px solid rgba(47, 111, 237, 0.5);
  z-index: 2;
}

.gstore-badge.sale {
  background: rgba(224, 72, 72, 0.25);
  color: #b82e2e;
  border: 1px solid rgba(224, 72, 72, 0.45);
  z-index: 1;
}

.gstore-badge.custom-online_only {
  background: rgba(6, 182, 212, 0.22);
  color: #0e7490;
  border: 1px solid rgba(6, 182, 212, 0.45);
  z-index: 1;
}

.pc-card .gstore-online-only-badge {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  background: #cffafe;
  color: #0e7490;
  border: 1px solid rgba(14, 116, 144, 0.22);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  z-index: 21;
  pointer-events: none;
}

/* Smaller badges on shop page product cards only */
.pc-card .gstore-badge-group {
  top: 6px;
  left: 6px;
  gap: 3px;
}

.pc-card .gstore-badge {
  padding: 3px 8px;
  font-size: 9px;
}

.pc-card .gstore-badge-group.has-valentine {
  top: 6px;
}

.pc-card .gstore-valentine-ribbon {
  position: absolute;
  top: clamp(77px, 74%, 120px);
  left: -34px;
  transform: rotate(35deg);
  background: linear-gradient(135deg, #ff3b6b, #ff6fa5);
  color: #fff;
  padding: 3px 56px;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.3px;
  box-shadow: 0 10px 20px rgba(255, 0, 80, 0.25);
  z-index: 6;
  pointer-events: none;
}




.pc-card .gstore-badge-rose {
  position: absolute;
  right: 8px;
  top: 8px;
  font-size: 16px;
  z-index: 6;
  pointer-events: none;
}

/* Shared card text/link and price semantics across breakpoints */
.pc-card-link,
.pc-card-link:link,
.pc-card-link:visited,
.pc-card-link:hover,
.pc-card-link:focus,
.pc-card a,
.pc-card a:link,
.pc-card a:visited,
.pc-card a:hover,
.pc-card a:focus {
  text-decoration: none !important;
  color: inherit;
}

.pc-card .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
  min-height: calc(1.15em * 2);
  max-height: calc(1.15em * 2);
}

.pc-card .price-box .price {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 3px;
  white-space: nowrap;
  line-height: 1.1;
  overflow-x: hidden;
  overflow-y: visible;
}

.pc-card .price-box .price .woocommerce-Price-amount,
.pc-card .price-box .price bdi {
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
}

.pc-card .price-box .price del,
.pc-card .price-box .price ins,
.pc-card .price-box .price ins * {
  text-decoration: none !important;
}

.pc-card .price-box .price del {
  opacity: 0.65;
  color: #8a909a;
  font-size: .78em;
  font-weight: 500;
  text-decoration: line-through !important;
  text-decoration-thickness: 1px;
  text-decoration-color: #8a909a;
  flex-shrink: 0;
}

.pc-card .price-box .price del *,
.pc-card .price-box .price del .woocommerce-Price-amount,
.pc-card .price-box .price del bdi {
  text-decoration: line-through !important;
  text-decoration-thickness: 1px;
  text-decoration-color: #8a909a;
}

.pc-card .price-box .price ins {
  margin: 0;
  padding: 0;
  background: transparent;
  font-weight: 700;
  color: #111827;
  text-decoration: none !important;
  min-width: 0;
}

.pc-card .price-box .price del~ins {
  color: #d93d3d;
}

@media (max-width: 768px) {
  .gstore-badge-group {
    top: 6px;
    left: 6px;
  }

  .gstore-badge {
    padding: 3px 8px;
    font-size: 9px;
  }
}

@media (min-width: 769px) {
  .product-cards-active .wd-product {
    overflow: visible;
  }

  .product-cards-active .pc-card+.product-wrapper,
  .product-cards-active .pc-card~.product-wrapper {
    display: none !important;
  }

  .pc-card {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 6px;
    overflow: visible;
  }

  .pc-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
  }

  .pc-card a,
  .pc-card a:link,
  .pc-card a:visited,
  .pc-card a:hover,
  .pc-card a:focus {
    text-decoration: none !important;
    color: inherit;
  }

  .pc-card .product-card {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
  }

  .pc-card .product-image {
    width: 100%;
    aspect-ratio: 1 / 0.9;
    background: linear-gradient(135deg, #c0c0c0, #b0b0b0);
    border-radius: 6px;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
  }

  .pc-card .product-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.15;
    max-height: calc(1.15em * 2);
    min-height: calc(1.15em * 2);
    padding: 1px 6px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #000000;
  }

  .pc-card .floating-controls {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    padding: 0;
    position: relative;
    z-index: 10;
  }

  .pc-card .price-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .pc-card .price-box .price {
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    text-decoration: none;
  }

  .pc-card .price-box .price del,
  .pc-card .price-box .price del *,
  .pc-card .price-box .price ins,
  .pc-card .price-box .price ins * {
    text-decoration: none !important;
  }

  .pc-card .price-box .price del {
    opacity: 0.65;
    font-size: 10px;
    font-weight: 500;
    color: #7b8591;
    text-decoration: line-through !important;
    text-decoration-color: #7b8591;
    text-decoration-thickness: 1px;
  }

  .pc-card .price-box .price ins {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
  }

  .pc-card .cart-button {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.78);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Reset button styles */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    font-family: inherit;
    pointer-events: auto;
  }

  .pc-card .cart-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .pc-card .cart-button:active {
    transform: scale(0.95);
  }

  .pc-card .cart-icon {
    position: relative;
    top: 3px;
    font-size: 16px;
    position: relative;
    transition: opacity 0.2s ease;
  }

  .pc-card .cart-icon img {
    width: 20px;
    height: 20px;
    display: block;
  }

  .pc-card .plus-badge {
    position: absolute;
    top: 4px;
    right: 9px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    color: #007aff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .pc-card .cart-loader {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    display: none;
    z-index: 2;
    animation: pc-spin 1s linear infinite;
  }

  @keyframes pc-spin {
    to {
      transform: rotate(360deg);
    }
  }

  .pc-card .cart-button.loading .cart-icon {
    opacity: 0;
  }

  .pc-card .cart-button.loading .cart-loader {
    display: block;
  }

  .pc-card .cart-button.success {
    box-shadow: 0 0 0 2px #2ecc71 inset;
    animation: pc-success-pulse 0.4s ease;
  }

  @keyframes pc-success-pulse {

    0%,
    100% {
      transform: scale(1);
    }

    50% {
      transform: scale(1.1);
    }
  }

  .pc-card .pc-buy-button {
    height: 36px;
    background: var(--accent-primary, #3A6FF8);
    color: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 0 12px;
    border: 1px solid var(--accent-primary, #3A6FF8);
    /* Reset button styles for consistency */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    font-family: inherit;
  }

  .pc-card .pc-buy-button:hover {
    background: var(--accent-hover, #2d5ad4);
    border-color: var(--accent-hover, #2d5ad4);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    /* Ensure text is white on hover */
  }

  .pc-card .pc-buy-button:active {
    transform: scale(0.95);
  }

  .pc-card .pc-buy-button span {
    color: inherit;
  }

  .pc-card .pc-buy-button:hover span {
    color: #ffffff;
    /* Ensure inner spans are white on hover */
  }
}

.product-image.pc-image-transparent {
  /* Keep simulated BG on the full thumbnail container. */
  background-color: var(--pc-image-bg, #f7f5f6);
  background-image: none !important;
  background-origin: border-box;
  background-clip: border-box;
  padding: 0 !important;
  box-sizing: border-box;
}

.product-image.pc-image-transparent .pc-image-media {
  /* Virtual-canvas system handles final AVIF framing in avif.css. */
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
  border-radius: inherit;
}

/* ========================================
   Toast Notifications (Product Cards)
   ======================================== */

.gstore-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--glass-bg, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.3));
  border-radius: 14px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  z-index: 10000;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  min-width: 300px;
  max-width: 450px;
}

[data-theme="dark"] .gstore-toast {
  background: var(--glass-bg-dark, rgba(30, 30, 30, 0.95));
  border-color: var(--glass-border-dark, rgba(255, 255, 255, 0.1));
}

.gstore-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.gstore-toast .material-symbols-outlined {
  font-size: 24px;
  flex-shrink: 0;
}

.gstore-toast .toast-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary, #1a1a1a);
  flex: 1;
}

[data-theme="dark"] .gstore-toast .toast-message {
  color: var(--text-primary-dark, #ffffff);
}

/* Toast Types */
.gstore-toast-success {
  border-left: 4px solid #10b981;
}

.gstore-toast-success .material-symbols-outlined {
  color: #10b981;
}

.gstore-toast-error {
  border-left: 4px solid #ef4444;
}

.gstore-toast-error .material-symbols-outlined {
  color: #ef4444;
}

.gstore-toast-warning {
  border-left: 4px solid #f59e0b;
}

.gstore-toast-warning .material-symbols-outlined {
  color: #f59e0b;
}

.gstore-toast-info {
  border-left: 4px solid #3b82f6;
}

.gstore-toast-info .material-symbols-outlined {
  color: #3b82f6;
}

/* Mobile Toast */
@media screen and (max-width: 768px) {
  .gstore-toast {
    bottom: 16px;
    right: 16px;
    left: 16px;
    min-width: auto;
    max-width: none;
  }
}

/* ========================================
   Mobile UI Product Cards (App Match)
   ======================================== */
@media (max-width: 767px) {
  .pc-card {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
  }

  .pc-card .product-card,
  .product-cards-active .pc-card .product-card {
    background: #fff;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
  }

  .pc-card .product-image,
  .product-cards-active .pc-card .product-image {
    border-radius: 6px;
    margin-bottom: 10px;
    width: 100%;
    aspect-ratio: 1 / 0.9;
    min-height: 120px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    transform: none;
  }

  .pc-card .product-title {
    font-size: 11px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.15;
    min-height: calc(1.15em * 2);
    max-height: calc(1.15em * 2);
  }

  .pc-card .floating-controls {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    position: relative;
    z-index: 10;
  }

  .pc-card .price-box,
  .product-cards-active .pc-card .price-box {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    padding: 4px 6px;
    height: auto;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .pc-card .price-box .price {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.1;
    gap: 2px;
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    top: 1px;
  }

  .pc-card .price-box .price del {
    font-size: 9px;
  }

  .pc-card .price-box .price ins {
    font-size: 11px;
  }

  .pc-card .cart-button,
  .pc-card .pc-buy-button,
  .product-cards-active .pc-card .pc-buy-button,
  .product-cards-active .pc-card .pc-cart-button {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    text-decoration: none;
  }

  .pc-card .pc-buy-button {
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .pc-card .pc-buy-button span {
    line-height: 1;
  }

  .pc-card .gstore-valentine-ribbon {
    top: clamp(62px, 82%, 120px);
    left: -24px;
    padding: 2px 34px;
    font-size: 8px;
  }

  .pc-card .gstore-badge-rose {
    right: 4px;
    top: 4px;
    font-size: 12px;
  }

  .product-cards-active .pc-card:hover .product-image {
    transform: none;
  }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .pc-card {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .pc-card .product-card,
  .product-cards-active .pc-card .product-card {
    background: #fff;
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
  }

  .pc-card .product-image,
  .product-cards-active .pc-card .product-image {
    border-radius: 6px;
    margin-bottom: 10px;
    width: 100%;
    aspect-ratio: 1 / 0.9;
    min-height: 132px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    transform: none;
  }

  .pc-card .product-title {
    font-size: 12px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.15;
    min-height: calc(1.15em * 2);
    max-height: calc(1.15em * 2);
  }

  .pc-card .floating-controls {
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    position: relative;
    z-index: 10;
  }

  .pc-card .price-box,
  .product-cards-active .pc-card .price-box {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    padding: 4px 6px;
    height: auto;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  .pc-card .price-box .price {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    color: #1d1d1f;
    line-height: 1.1;
    gap: 2px;
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    top: 1px;
  }

  .pc-card .price-box .price del {
    font-size: 9px;
  }

  .pc-card .price-box .price ins {
    font-size: 11px;
  }

  .pc-card .cart-button,
  .pc-card .pc-buy-button,
  .product-cards-active .pc-card .pc-buy-button,
  .product-cards-active .pc-card .pc-cart-button {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    text-decoration: none;
  }

  .pc-card .pc-buy-button {
    flex-direction: column;
    gap: 2px;
    font-weight: 700;
    text-transform: uppercase;
  }

  .pc-card .pc-buy-button span {
    line-height: 1;
  }

  .pc-card .gstore-valentine-ribbon {
    top: clamp(68px, 68%, 108px);
    left: -28px;
    padding: 2px 42px;
    font-size: 9px;
  }

  .pc-card .gstore-badge-rose {
    right: 6px;
    top: 6px;
    font-size: 13px;
  }

  .product-cards-active .pc-card:hover .product-image {
    transform: none;
  }
}

/* Pre-order badge + card state */
.pc-card .gstore-badge.custom.custom-pre_order {
  background: #eef5ff;
  color: #2f6fed;
  border: 1px solid rgba(47, 111, 237, 0.28);
}

.pc-card.pc-card--pre-order .product-card,
.product-cards-active .pc-card.pc-card--pre-order .product-card {
  border-color: rgba(47, 111, 237, 0.9);
  box-shadow: 0 6px 18px rgba(47, 111, 237, 0.16);
}

.pc-card.pc-card--pre-order .price-box,
.pc-card.pc-card--pre-order .pc-buy-button,
.pc-card.pc-card--pre-order .pc-cart-button,
.product-cards-active .pc-card.pc-card--pre-order .price-box,
.product-cards-active .pc-card.pc-card--pre-order .pc-buy-button,
.product-cards-active .pc-card.pc-card--pre-order .pc-cart-button {
  border-color: rgba(47, 111, 237, 0.9);
  box-shadow: 0 6px 18px rgba(47, 111, 237, 0.16);
}

.pc-card.pc-card--pre-order .pc-buy-button,
.product-cards-active .pc-card.pc-card--pre-order .pc-buy-button {
  background: rgba(255, 255, 255, 0.92);
  color: #2f6fed;
}

.pc-card.pc-card--pre-order .pc-buy-button:hover,
.product-cards-active .pc-card.pc-card--pre-order .pc-buy-button:hover {
  background: #eef5ff;
  border-color: #2f6fed;
  color: #2f6fed;
}

.pc-card.pc-card--pre-order .pc-buy-button:hover span,
.product-cards-active .pc-card.pc-card--pre-order .pc-buy-button:hover span {
  color: #2f6fed;
}
