/* ============================================================
   SWAWLAMBAN — Premium Green-Themed Product Card
   ============================================================ */

/* ── Card Shell ── */
.pc {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #eae6df;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
  height: 100%;
  font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(122, 74, 46, 0.03);
}

.pc:hover {
  box-shadow: 0 8px 24px rgba(122, 74, 46, 0.1);
  transform: translateY(-3px);
  border-color: #c49a6c;
}

/* ── Image area ── */
.pc-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.pc-img-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.pc-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pc:hover .pc-img-wrap img {
  transform: scale(1.06);
}

/* Placeholder img */
.pc-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf7f2;
  color: #c49a6c;
  font-size: 2rem;
  border-radius: 8px;
}

/* ── Badges ── */
.pc-badges-row {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 4;
}

.pc-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gau-brown);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.1px;
  text-transform: uppercase;
}

.pc .pc-badge-nat {
  background: #e1fbde !important; /* Light green background */
  color: #11421e !important;      /* Dark green text */
  border: none;
}

.pc .pc-badge-rx {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: none;
}

.pc .pc-badge-oos {
  background: #6b7280 !important;
  color: #ffffff !important;
  border: none;
}

/* ── Wishlist Button ── */
.pc-wish-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #eae6df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  color: #c87a53;
  transition: all 0.2s ease;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.pc-wish-btn:hover {
  background: #fff8f8;
  color: #e53935;
  border-color: #ffcdd2;
  transform: scale(1.08);
}

.pc-wish-btn.active {
  background: #fff8f8;
  color: #e53935;
  border-color: #ffcdd2;
}

/* ── Share Button (Desktop inline next to name) ── */
.pc-name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.pc-share-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #eae6df;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  color: #c87a53;
  transition: all 0.2s ease;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  flex-shrink: 0;
  margin-top: 2px;
  margin-left: auto;
}

.pc-share-btn:hover {
  background: #fffcf8;
  color: #a4623f;
  border-color: #c49a6c;
  transform: scale(1.08);
}

/* ── Card Body ── */
.pc-body {
  padding: 8px 10px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
}

/* Bilingual Name Container */
.pc-name-container {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pc-name-container:hover {
  text-decoration: none;
}

.pc-name-eng {
  font-size: 0.86rem;
  font-weight: 700;
  color: #111111;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc-name-hin {
  font-size: 0.78rem;
  font-weight: 500;
  color: #7a756e;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Weight / Size */
.pc-weight {
  font-size: 0.7rem;
  color: #8c857b;
  font-weight: 600;
}

/* Stars Rating */
.pc-stars-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
}

.pc-stars {
  color: #e6b325;
  display: inline-flex;
  gap: 1px;
}

.pc-rev-count {
  color: #8c857b;
  font-weight: 500;
}

/* Pricing Row */
.pc-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  flex-wrap: wrap;
  gap: 4px;
}

.pc-price-left {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pc-price {
  font-size: 1rem;
  font-weight: 800;
  color: #1b4324;
}

.pc-mrp {
  font-size: 0.76rem;
  color: #8c857b;
  text-decoration: line-through;
  font-weight: 500;
}

.pc-discount-badge {
  background: #fff7ed;
  color: #c05621;
  border: 1px solid #fed7aa;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

/* Buttons and SKU Control Container */
.pc-btns-container {
  margin-top: auto;
  padding-top: 4px;
  width: 100%;
  display: flex;
  gap: 6px; /* Side by side layout for Add to Cart + Buy Now */
  align-items: center;
}

/* Show the Buy Now form */
.pc-btns-container form {
  display: block !important;
  flex: 1;
  margin: 0;
}

/* General button formatting */
.pc-btns-container .pc-btn-cart,
.pc-btns-container .pc-btn-buy {
  width: 100%;
  padding: 8px 6px;
  border: none;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s, transform 0.15s;
}

/* Add to Cart Button (warm earthy brown) */
.pc-btns-container .pc-btn-cart {
  background: #7a4a2e;
  color: #ffffff;
  flex: 1.2; /* Slightly wider than Buy Now */
}

.pc-btns-container .pc-btn-cart:hover {
  background: #5d3820;
}

.pc-btns-container .pc-btn-cart:active {
  transform: scale(0.97);
}

/* Buy Now Button (forest green) */
.pc-btns-container .pc-btn-buy {
  background: #11421e;
  color: #ffffff;
}

.pc-btns-container .pc-btn-buy:hover {
  background: #092611;
}

.pc-btns-container .pc-btn-buy:active {
  transform: scale(0.97);
}

/* Quantity Control Row (takes full width if active) */
.pc-qty-ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0fdf4;
  border: 1px solid #11421e;
  border-radius: 6px;
  overflow: hidden;
  height: 32px;
  width: 100%;
}

.pc-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: #11421e;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.pc-qty-btn:hover {
  background: #dcfce7;
}

.pc-qty-val {
  flex: 1;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #11421e;
}

/* Out of Stock Button */
.pc-oos-btn {
  width: 100%;
  padding: 8px;
  background: #f3f4f6;
  color: #9ca3af;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Responsive adjust */
@media (max-width: 768px) {
  .pc-body {
    padding: 8px;
  }
  .pc-name-eng {
    font-size: 0.82rem;
  }
  .pc-name-hin {
    font-size: 0.75rem;
  }
  .pc-price {
    font-size: 0.95rem;
  }
  .pc-mrp {
    font-size: 0.72rem;
  }
  .pc-wish-btn {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
  .pc-btns-container {
    flex-direction: column;
    gap: 4px;
  }
  .pc-btns-container .pc-btn-cart,
  .pc-btns-container .pc-btn-buy {
    padding: 6px 8px;
    font-size: 0.72rem;
  }
}

/* ── Mobile View: Horizontal Flipkart-style strip list layout ── */
@media (max-width: 575px) {
  .pc {
    flex-direction: row !important;
    align-items: stretch;
    padding: 8px;
    height: auto;
    gap: 4px;
  }
  
  .pc-img-wrap {
    width: 110px !important;
    height: 110px !important;
    aspect-ratio: 1 / 1 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    flex-shrink: 0 !important;
    padding: 6px !important;
  }

  .pc-img-wrap img {
    padding: 0 !important;
  }

  .pc-badges-row {
    top: 4px !important;
    left: 4px !important;
  }

  .pc-badge {
    font-size: 0.58rem !important;
    padding: 2px 5px !important;
  }

  .pc-wish-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
    position: absolute !important;
    top: 8px !important;
    bottom: auto !important;
    right: 8px !important;
    opacity: 1 !important;
  }

  .pc-share-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
    position: absolute !important;
    top: 40px !important;
    bottom: auto !important;
    right: 8px !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    opacity: 1 !important;
  }

  .pc-body {
    padding: 2px 4px 2px 8px !important;
    gap: 2px !important;
    justify-content: space-between;
    min-width: 0;
  }

  .pc-name-container {
    gap: 0px !important;
  }

  .pc-name-eng {
    font-size: 0.84rem !important;
    -webkit-line-clamp: 2 !important; /* Allow name to wrap to 2 lines on mobile */
    line-height: 1.2 !important;
  }

  .pc-name-hin {
    font-size: 0.74rem !important;
    line-height: 1.2 !important;
  }

  .pc-weight {
    font-size: 0.68rem !important;
    margin-top: 0 !important;
  }

  .pc-stars-row {
    font-size: 0.65rem !important;
    gap: 3px !important;
  }

  .pc-price-row {
    margin-top: 0 !important;
    gap: 4px !important;
  }

  .pc-price {
    font-size: 0.95rem !important;
  }

  .pc-mrp {
    font-size: 0.72rem !important;
  }

  .pc-discount-badge {
    font-size: 0.6rem !important;
    padding: 1px 3px !important;
  }

  .pc-btns-container {
    flex-direction: row !important; /* Keep buttons side-by-side in horizontal strip view */
    gap: 6px !important;
    margin-top: 4px !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }

  .pc-btns-container .pc-btn-cart,
  .pc-btns-container .pc-btn-buy,
  .pc-qty-ctrl,
  .pc-oos-btn {
    padding: 6px 4px !important;
    font-size: 0.7rem !important;
    height: 28px !important;
  }
  
  .pc-qty-btn {
    width: 28px !important;
    height: 28px !important;
  }
}
