/* ==========================================
   DD SHOP - REUSABLE COMPONENTS & MICRO-INTERACTIONS
   ========================================== */

/* 1. BUTTON SYSTEM WITH LIQUID WATER FILL HOVER EFFECT */
.btn,
.btn-liquid,
.search-btn,
.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--dd-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: color 0.36s ease, border-color 0.36s ease, box-shadow 0.36s ease, transform 0.36s ease;
  text-decoration: none;
  line-height: 1.2;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn::before,
.btn-liquid::before,
.search-btn::before,
.clear-filters-btn::before {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -2px;
  width: calc(100% + 42px);
  z-index: -1;
  border-radius: 6px 999px 999px 6px;
  transform: translateX(-106%);
  background: var(--btn-liquid-hover-bg, #1e6b27);
  transition: transform 0.72s cubic-bezier(0.42, 0, 0.16, 1);
}

.btn:is(:hover, :focus, :focus-visible, :active),
.btn-liquid:is(:hover, :focus, :focus-visible, :active),
.search-btn:is(:hover, :focus, :focus-visible, :active),
.clear-filters-btn:is(:hover, :focus, :focus-visible, :active) {
  background-color: transparent !important;
  border-color: var(--btn-liquid-hover-bg, #1e6b27) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:is(:hover, :focus, :focus-visible, :active) i,
.btn:is(:hover, :focus, :focus-visible, :active) .bi,
.btn-liquid:is(:hover, :focus, :focus-visible, :active) i,
.btn-liquid:is(:hover, :focus, :focus-visible, :active) .bi,
.search-btn:is(:hover, :focus, :focus-visible, :active) i,
.clear-filters-btn:is(:hover, :focus, :focus-visible, :active) i {
  color: #ffffff !important;
}

.btn:is(:hover, :focus, :focus-visible, :active)::before,
.btn-liquid:is(:hover, :focus, :focus-visible, :active)::before,
.search-btn:is(:hover, :focus, :focus-visible, :active)::before,
.clear-filters-btn:is(:hover, :focus, :focus-visible, :active)::before {
  transform: translateX(0);
}

.btn-primary {
  background: var(--dd-green-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
  --btn-liquid-hover-bg: #1b5e20;
}

.btn-secondary {
  background: var(--dd-blue);
  color: #ffffff;
  --btn-liquid-hover-bg: #0f2447;
}

.btn-outline-green {
  background: #ffffff;
  color: var(--dd-green);
  border-color: var(--dd-green);
  --btn-liquid-hover-bg: #2e7d32;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--dd-radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: var(--dd-radius-md);
}

.btn-block {
  width: 100%;
}

/* 2. BADGE SYSTEM */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--dd-radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-discount {
  background: var(--dd-brand-red);
  color: #ffffff;
}

.badge-rx {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-stock-in {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-stock-low {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fef3c7;
}

/* 3. PRODUCT CARD (Tata 1mg / Netmeds / Apple Store Quality) */
.product-card {
  background: #ffffff;
  border: 1px solid var(--dd-border);
  border-radius: var(--dd-radius-md);
  padding: 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--dd-transition-smooth);
  box-shadow: var(--dd-shadow-sm);
}

.product-card:hover {
  border-color: var(--dd-green-light);
  box-shadow: var(--dd-shadow-card-hover);
  transform: translateY(-4px);
}

.card-top-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 10;
}

.wishlist-btn {
  background: #ffffff;
  border: 1px solid var(--dd-border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dd-text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: var(--dd-transition-fast);
  box-shadow: var(--dd-shadow-sm);
}
.wishlist-btn:hover, .wishlist-btn.active {
  color: var(--dd-brand-red);
  border-color: var(--dd-brand-red);
  background: var(--dd-red-subtle);
}

.product-img-wrapper {
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.product-img-wrapper img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.08);
}

.quick-view-overlay {
  position: absolute;
  bottom: -40px;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 6px;
  text-align: center;
  transition: var(--dd-transition-fast);
  opacity: 0;
}
.product-card:hover .quick-view-overlay {
  bottom: 0;
  opacity: 1;
}

.product-brand {
  font-size: 11px;
  font-weight: 600;
  color: var(--dd-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--dd-text-dark);
  margin: 4px 0 6px 0;
  line-height: 1.3;
  height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}
.stars-group {
  color: var(--dd-amber);
  font-size: 12px;
}
.rating-count {
  font-size: 11px;
  color: var(--dd-text-muted);
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.offer-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--dd-green-dark);
}
.mrp-price {
  font-size: 13px;
  color: var(--dd-text-light);
  text-decoration: line-through;
}
.savings-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--dd-green);
}

/* 4. QUANTITY SELECTOR */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--dd-border);
  border-radius: var(--dd-radius-md);
  background: var(--dd-bg-subtle);
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--dd-text-dark);
  cursor: pointer;
  transition: var(--dd-transition-fast);
}
.qty-btn:hover {
  background: var(--dd-green-subtle);
  color: var(--dd-green);
}

.qty-val {
  width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
}

/* 5. BREADCRUMBS */
.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dd-text-muted);
  margin-bottom: 20px;
}
.shop-breadcrumb a:hover {
  color: var(--dd-green);
  text-decoration: underline;
}
.shop-breadcrumb i {
  font-size: 10px;
}

/* 6. TOAST NOTIFICATIONS SYSTEM */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-toast {
  background: var(--dd-blue-dark);
  color: #ffffff;
  padding: 14px 20px;
  border-radius: var(--dd-radius-md);
  box-shadow: var(--dd-shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  min-width: 300px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid var(--dd-green-light);
}

.shop-toast i {
  font-size: 18px;
  color: var(--dd-green-light);
}

/* 7. MODALS */
.shop-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 36, 71, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.shop-modal-backdrop.active {
  display: flex;
}

.shop-modal-box {
  background: #ffffff;
  border-radius: var(--dd-radius-lg);
  box-shadow: var(--dd-shadow-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: zoomIn 0.25s ease-out;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--dd-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dd-text-dark);
}
.modal-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--dd-text-muted);
  cursor: pointer;
}
.modal-body {
  padding: 24px;
}

/* 8. SKELETON LOADER ANIMATION */
.skeleton-box {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--dd-radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
