/* components.css - Futuristic Mario Theme */

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--t-fast);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.btn:active { transform: scale(0.95); }

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: var(--glow-blue);
  border-color: rgba(255,255,255,0.2);
}
.btn-primary:hover { background: #1a94ff; box-shadow: 0 0 40px var(--blue-glow); }

.btn-hero {
  background: linear-gradient(135deg, var(--red), var(--blue));
  color: white;
  padding: 1rem 2.5rem;
  font-size: 1.15rem;
  border-radius: 100px;
  border: none;
  box-shadow: 0 10px 30px rgba(11, 132, 255, 0.4);
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.btn-hero::before {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: all 0.6s ease;
  z-index: -1;
  transform: skewX(-20deg);
}
.btn-hero:hover::before {
  left: 150%;
}
.btn-hero:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(229, 37, 33, 0.5);
  color: white;
}

.btn-secondary {
  background: var(--green);
  color: white;
  box-shadow: var(--glow-green);
  border-color: rgba(255,255,255,0.2);
}
.btn-secondary:hover { background: #4ec254; box-shadow: 0 0 40px var(--green-glow); }

.btn-danger {
  background: var(--red);
  color: white;
  box-shadow: var(--glow-red);
}
.btn-danger:hover { box-shadow: 0 0 40px var(--red-glow); }

.btn-accent {
  background: var(--yellow);
  color: var(--bg);
  box-shadow: var(--glow-yellow);
}
.btn-accent:hover { box-shadow: 0 0 40px var(--yellow-glow); }

.btn-outline {
  background: transparent;
  border-color: var(--border-t);
  color: var(--text-t);
}
.btn-outline:hover {
  border-color: var(--text-t);
  background: rgba(255,255,255,0.1);
}

.btn-icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--r-md);
  background: var(--surface-2t);
  border: 1px solid var(--border-t);
  color: var(--text-t);
}
.ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0;
}
.btn-icon:focus-visible,
.mobile-menu-btn:focus-visible,
.icon-button:focus-visible,
.qty-btn:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.icon-button,
.qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.icon-button:active,
.qty-btn:active { transform: scale(0.92); }
.qty-btn { width: 34px; height: 34px; background: transparent; color: inherit; font-size: 1.2rem; }
.qty-btn:hover { background: var(--surface-3); color: var(--blue); }
.btn-icon:hover {
  background: var(--surface-3);
  box-shadow: var(--shadow-card);
}

/* ========================================
   CARDS
   ======================================== */
.card {
  background: var(--surface-t);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-t);
  overflow: hidden;
  transition: all var(--t-normal);
}
.card:hover { box-shadow: var(--shadow-lg); }

.card-product {
  display: flex;
  flex-direction: column;
  background: var(--surface-2t);
}
.card-product:hover {
  transform: translateY(-8px);
  border-color: var(--blue);
  box-shadow: var(--glow-blue);
}
.product-image-container {
  aspect-ratio: 1;
  background: var(--surface-light); /* White bg for product photos */
  padding: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  gap: var(--space-3);
  cursor: pointer;
}
.card-category .icon {
  font-size: var(--text-4xl);
  transition: transform var(--transition-bounce);
}
.card-category:hover .icon {
  transform: scale(1.2);
}
.card-category:hover {
  box-shadow: var(--shadow-glow-primary);
  border-color: var(--color-primary);
}

.card-step {
  text-align: center;
  align-items: center;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
}
.card-step .icon-wrapper {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--surface-color-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
  color: var(--color-primary);
}
.card-step h3 {
  margin-bottom: var(--space-2);
}
.card-step p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.card-sede {
  padding: 0;
  overflow: hidden;
}
.card-sede .map-container {
  aspect-ratio: 16/9;
  width: 100%;
  background: var(--surface-color-2);
}
.card-sede .info {
  padding: var(--space-5);
}
.card-sede h3 {
  margin-bottom: var(--space-1);
}
.card-sede p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.card-review {
  background: var(--surface-color-2);
  border: none;
  min-width: 300px;
  flex-shrink: 0;
  margin-right: var(--space-4);
}
.card-review .header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.card-review .avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-bold);
  color: var(--color-primary);
}

/* BADGES & TAGS */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  background: var(--surface-color-2);
  color: var(--text-primary);
}
.badge-cart {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--font-bold);
  box-shadow: 0 0 0 2px var(--bg-color);
}
.badge-cart.pulse {
  animation: pulse 0.5s ease;
}

.tag, .chip {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  background: var(--surface-color-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.tag:hover, .chip:hover {
  background: var(--surface-color);
  color: var(--text-primary);
}
.tag.active, .chip.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-glow-primary);
}

/* FORMS */
.input-group {
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.input-group label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
}
.form-control, .select-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-color-2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: all var(--transition-fast);
}
.form-control:focus, .select-control:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--surface-color);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}
.select-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* TOASTS */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: var(--z-toast);
}
.toast {
  background: var(--surface-color);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 300px;
  animation: toastSlide 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.toast-success { border-left-color: var(--color-secondary); }
.toast-error { border-left-color: var(--color-danger); }

/* MODALS & OVERLAYS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--transition-bounce);
}
.modal-overlay.active .modal {
  transform: scale(1);
}

/* DRAWER */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 100%;
  max-width: 400px;
  background: var(--surface-color);
  border-left: 1px solid var(--border-color);
  z-index: var(--z-drawer);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
}
.drawer-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--border-color);
}

/* STAR RATING */
.star-rating {
  display: inline-flex;
  gap: 2px;
  color: var(--surface-color-2);
}
.star-rating .filled {
  color: var(--color-accent);
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.breadcrumb a {
  transition: color var(--transition-fast);
}
.breadcrumb a:hover {
  color: var(--color-primary);
}
.breadcrumb .separator {
  font-size: 10px;
}

/* SKELETON */
.skeleton {
  background: linear-gradient(90deg, var(--surface-color-2) 25%, var(--border-color) 50%, var(--surface-color-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: var(--radius-md);
}

/* PRICE */
.price {
  display: flex;
  flex-direction: column;
}
.price-usd {
  font-weight: var(--font-bold);
  font-size: var(--text-xl);
  color: var(--color-accent);
}
.price-bs {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* QUANTITY CONTROL */
.quantity-control {
  display: flex;
  align-items: center;
  background: var(--surface-color-2);
  border-radius: var(--radius-md);
  padding: 4px;
}
.quantity-control button {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.quantity-control button:hover {
  background: var(--surface-color);
}
.quantity-control input {
  width: 40px;
  text-align: center;
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: var(--font-medium);
}
.quantity-control input:focus {
  outline: none;
}

/* PAYMENT OPTION */
.payment-option {
  display: block;
  cursor: pointer;
}
.payment-option input {
  display: none;
}
.payment-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.payment-option input:checked + .payment-card {
  border-color: var(--color-primary);
  background: rgba(11, 132, 255, 0.05);
}

.divider {
  height: 1px;
  background: var(--border-color);
  width: 100%;
  margin: var(--space-4) 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-4);
  text-align: center;
  color: var(--text-secondary);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}
