/* Ecommerce/css/styles.css */
/* css/checkout.css */
.container {
  max-width: 600px;
  margin: 2rem auto;
  background: #fff;
  padding: 2rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

form label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 600;
}

form input,
form select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1rem;
}

.btn.primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 3px;
}

.hidden {
  display: none;
}

/* style for Stripe card element */
.card-input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}
.card-input--focus {
  border-color: #2980b9;
  box-shadow: 0 0 5px rgba(41, 128, 185, 0.5);
}

/* Reset & base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; padding: 1rem; }

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
}

#points-container {
  margin-top: .5rem;
  width: 100%;
  max-width: 400px;
}

#points-counter {
  font-weight: bold;
}

.progress-container {
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  height: 10px;
  margin-top: .5rem;
}

.progress-bar {
  background: #4caf50;
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
}

/* Grid & cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  position: relative;
}

.card img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem;
}

.card h3 {
  margin: .5rem 0;
}

.price {
  margin: .75rem 0;
}

.final-price { font-size: 1.2rem; font-weight: bold; }
.discount   { color: #d32f2f; margin-left: .5rem; }

/* Gamification badge */
.badge {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: gold;
  color: #333;
  padding: .5rem 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  animation: pop 0.6s ease-out;
}

@keyframes pop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}

.action-btn {
  background: #1976d2;
  color: #fff;
  border: none;
  padding: .5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.action-btn:hover {
  background: #115293;
}

.resizer {
  position: absolute;
  background: transparent;
  z-index: 5;
}

.resizer.top {
  height: 6px; width: 100%;
  top: -3px; left: 0;
  cursor: n-resize;
}

.resizer.bottom {
  height: 6px; width: 100%;
  bottom: -3px; left: 0;
  cursor: s-resize;
}

.resizer.left {
  width: 6px; height: 100%;
  left: -3px; top: 0;
  cursor: w-resize;
}

.resizer.right {
  width: 6px; height: 100%;
  right: -3px; top: 0;
  cursor: e-resize;
}
