*,*::before,*::after {
  box-sizing: border-box;
}

/* --- background (No Scrolling) --- */
html {
  overflow: hidden;
}

body {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  
  /* Center the phone */
  display: flex;
  justify-content: center;
  align-items: center;
  
  min-height: 100vh;
  margin: 0;

  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ---  phone frame --- */
.mobile-container {
  position: relative;
  
  width: 390px; 
  height: 844px; 
  max-height: 98vh; 
  
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);

  background-color: #000;
  border-radius: 40px;
  border: 10px solid #222;

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* notch */
.mobile-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 28px;
  background-color: #000;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.mobile-container::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background-color: #333;
  border-radius: 100px;
  z-index: 10;
}

.content-area {
  flex-grow: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  /* Phone screen */
  background-color: #212121;
  border-radius: 32px; 
  margin: 10px 14px; 

  /* Slightly more breathing room all around */
  padding-top: 3rem;      /* extra room around notch/headers */
  padding-bottom: 2rem;   /* more space above home indicator */
  padding-left: 1.75rem;
  padding-right: 1.75rem;
}

.header-bg {
  background-color: #047857;
}

.btn-style {
  display: block;
  width: 100%;
  background-color: #4b5563;
  color: #ffffff;
  font-weight: 500;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  border-radius: 0.5rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease-in-out;
}

.btn-style:hover {
  background-color: #374151;
}

/* Cart Icon Styles */
.cart-icon-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
} 

.cart-icon-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: #047857;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.cart-icon-button:hover {
  background-color: #059669;
  transform: scale(1.05);
}

.cart-icon-button:active {
  transform: scale(0.95);
}

.cart-icon-svg {
  width: 24px;
  height: 24px;
  color: white;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #dc2626;
  color: white;
  font-size: 11px;
  font-weight: bold;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cart-total-display {
  position: absolute;
  bottom: -24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: #10b981;
  font-size: 11px;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

/* Product Card Improvements */
.product-card {
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  padding-bottom: 4px; /* subtle buffer at bottom */
}

.product-card:hover {
  border-color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.2);
}

.product-image-container {
  width: 100%;
  height: 180px;
  background-color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-info {
  padding: 18px 16px 14px 16px;
}

.product-name {
  color: white;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.product-description {
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.product-price-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.product-price {
  color: #10b981;
  font-size: 24px;
  font-weight: bold;
}

.product-price-original {
  color: #6b7280;
  font-size: 14px;
  text-decoration: line-through;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.product-meta-item {
  background-color: #374151;
  color: #9ca3af;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
}

.add-to-cart-button {
  width: 100%;
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  color: white;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.3);
  margin-top: 4px;
}

.add-to-cart-button:hover {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.4);
}

.add-to-cart-button:active {
  transform: translateY(0);
}

.add-to-cart-button.added {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.quantity-button {
  width: 36px;
  height: 36px;
  background-color: #374151;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.quantity-button:hover {
  background-color: #047857;
}

.quantity-button:active {
  transform: scale(0.9);
}

.quantity-display {
  color: white;
  font-size: 20px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}
/* Phone scrolll bar */

.mobile-container,
.content-area {
  scrollbar-width: thin;               /* Firefox */
  scrollbar-color: rgba(75, 85, 99, 0.7) transparent;
}

.mobile-container::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
  width: 6px;    
}

.mobile-container::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
  background: transparent;              
}

.mobile-container::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
  background-color: rgba(107, 114, 128, 0.6);  /* Tailwind gray-500 muted */
  border-radius: 10px;
}

.mobile-container::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
  background-color: rgba(107, 114, 128, 0.8);  /* darker on hover */
}
