/* Enhanced Product Card Styles - Better Information Display */

/* Enhanced Card Layout Options */
/* Reduced whiteness & blur (cleanup) */
.enhanced-card {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 24px;
  padding: 24px;
  width: 380px; /* base width */
  min-height: 500px; /* desktop baseline */
  height: auto; /* allow expansion for longer content */
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden; /* prevent card from pushing container with absolutely large content */
  cursor: pointer;
  box-shadow:
    0 6px 22px rgba(0,0,0,0.35),
    0 2px 10px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.enhanced-card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow:
    0 16px 46px rgba(0,0,0,0.5),
    0 6px 20px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.22);
}

/* Enhanced Image Container */
 .enhanced-image-container {
  width: 100%;
  height: 200px; /* keep consistent image presence */
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  background: rgba(255,255,255,0.08);
}

.enhanced-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.enhanced-card:hover .enhanced-image-container img {
  transform: scale(1.1);
}

/* Product Badge */
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(255,107,107,0.4);
}

/* Enhanced Content Area */
.enhanced-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto; /* allow content to take remaining space */
  min-height: 0; /* flexbox overflow safety */
}

/* Enhanced Title */
.enhanced-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #feffff;
  line-height: 1.3;
  margin: 0 0 4px 0;
  /* Allow full title to wrap; removed clamp for mobile visibility */
  word-break: break-word;
}

/* Product Specs List */
 .product-specs {
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.85rem;
  color: #fdfefe;
}

.spec-label {
  font-weight: 600;
  color: #b8cce9;
}

.spec-value {
  font-weight: 500;
  color: #d0def2;
}

/* Enhanced Rating Display */
 .enhanced-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(4px) saturate(120%);
 }

.rating-stars {
  display: flex;
  gap: 2px;
}

.rating-stars .material-icons {
  font-size: 18px;
  color: #fbbf24;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.rating-info {
  display: flex;
  flex-direction: column;
  margin-left: auto;
}

.rating-score {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

.rating-count {
  font-size: 0.75rem;
  color: #919fb1;
}

/* Enhanced Price Display */
.enhanced-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(16,185,129,0.1) 100%);
  border-radius: 12px;
  margin: 8px 0;
}

.price-current {
  font-size: 1.5rem;
  font-weight: 800;
  color: #059669;
}

.price-original {
  font-size: 1rem;
  color: #64748b;
  text-decoration: line-through;
}

.price-discount {
  background: #ef4444;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Enhanced Action Button */
.enhanced-action-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  margin-top: auto;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

.enhanced-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}

.enhanced-action-btn .material-icons {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.enhanced-action-btn:hover .material-icons {
  transform: translateX(4px);
}

/* Collapsible specs pattern (Option B) */
.product-specs-collapsible { position: relative; overflow: hidden; transition: max-height .35s ease; }
.product-specs-collapsible.collapsed { max-height: 140px; }
@media (max-width: 640px) { .product-specs-collapsible.collapsed { max-height: 110px; } }
.product-specs-collapsible::after { content:''; position:absolute; left:0; right:0; bottom:0; height:48px; pointer-events:none; background:linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 60%, rgba(255,255,255,0.95) 100%); opacity:1; transition:opacity .3s ease; }
.product-specs-collapsible.expanded { max-height: 2000px; }
.product-specs-collapsible.expanded::after { opacity:0; }

.specs-toggle-btn { margin-top:4px; align-self:center; background:linear-gradient(135deg,#3b82f6 0%, #1d4ed8 100%); color:#fff; border:none; border-radius:24px; font-size:.7rem; font-weight:600; letter-spacing:.05em; text-transform:uppercase; padding:6px 14px; cursor:pointer; display:inline-flex; align-items:center; gap:4px; box-shadow:0 4px 14px rgba(59,130,246,.35); transition:background .3s, transform .25s; }
.specs-toggle-btn:hover { background:linear-gradient(135deg,#1d4ed8 0%, #1e40af 100%); transform:translateY(-2px); }
.specs-toggle-btn:active { transform:translateY(0); }

/* Mobile sizing adjustments (without inner scrollbars) */
@media (max-width: 640px) {
  .enhanced-card { width: 310px; min-height: 430px; }
  .enhanced-image-container { height: 160px; }
  .enhanced-title { font-size: 1.15rem; }
}
@media (max-width: 430px) {
  .enhanced-card { width: 280px; min-height: 400px; padding: 20px; }
  .enhanced-image-container { height: 150px; }
}
@media (max-width: 360px) {
  .enhanced-card { width: 260px; min-height: 380px; padding: 18px; }
  .enhanced-image-container { height: 140px; }
}

/* Compact Card Variant (Alternative Layout) */
 .compact-enhanced-card {
  display: flex;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px) saturate(120%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 20px;
  width: 450px; /* Wider for horizontal layout */
  height: 280px;
  flex-shrink: 0;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 6px 22px rgba(0,0,0,0.35),
    0 2px 10px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.compact-enhanced-card:hover {
  transform: translateY(-8px) scale(1.02);
}

 .compact-image-section {
  width: 180px;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-right: 20px;
  background: rgba(255,255,255,0.08);
}

.compact-content-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.compact-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.info-item {
  background: rgba(255,255,255,0.2);
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
}

.info-label {
  font-size: 0.7rem;
  color: #64748b;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 700;
}

/* Minimal Card Variant (Clean & Simple) */
.minimal-enhanced-card {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: 16px;
  padding: 20px;
  width: 300px;
  height: 420px;
  flex-shrink: 0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.minimal-enhanced-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  border-color: rgba(59,130,246,0.3);
}

.minimal-image {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f8fafc;
}

.minimal-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100% - 176px);
}

.minimal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  margin: 0;
}

.minimal-description {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.4;
  flex-grow: 1;
}

.minimal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(226,232,240,0.5);
}

.minimal-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: #059669;
}

.minimal-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: #64748b;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .enhanced-card,
  .compact-enhanced-card,
  .minimal-enhanced-card {
    width: 280px;
  min-height: 520px; /* more vertical room for specs & price */
    height: auto;
  }
  
  .compact-enhanced-card {
    flex-direction: column;
    height: 400px;
  }
  
  .compact-image-section {
    width: 100%;
    height: 140px;
    margin-right: 0;
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .enhanced-card {
    width: 260px;
  min-height: 540px; /* ensure space for long specs + button */
    height: auto;
    padding: 20px;
  }
  
  .enhanced-image-container {
    height: 160px;
    margin-bottom: 16px;
  }
  
  .enhanced-content {
    gap: 10px;
  }
  

/* Ultra narrow devices */
@media (max-width: 380px) {
  .enhanced-card { width: 240px; min-height: 560px; }
}
  .product-specs {
    padding: 10px;
  }
  
  .spec-item {
    font-size: 0.8rem;
  }
  
  .enhanced-title {
    font-size: 1.2rem;
  }
}
