/* ============================================
   COMPONENTS
   ============================================ */

/* Container */
.cafe-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px 16px;
}

/* Cards */
.cafe-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cafe-card-hover {
  cursor: pointer;
}

.cafe-card-hover:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.cafe-card-hover:active {
  transform: scale(0.98);
}

.cafe-card-image {
  height: 160px;
  background: linear-gradient(135deg, var(--latte) 0%, #bcaaa4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.cafe-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cafe-card-hover:hover .cafe-card-image img {
  transform: scale(1.05);
}

.cafe-card-body {
  padding: var(--card-padding);
}

/* Badges */
.cafe-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  border-radius: var(--radius-badge);
  font-size: 11px;
  font-weight: 600;
  color: var(--coffee);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.cafe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-button);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cafe-btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  width: 100%;
}

.cafe-btn-primary:hover {
  background: var(--dark-roast);
  box-shadow: var(--shadow-md);
}

.cafe-btn-primary:active {
  transform: scale(0.98);
}

.cafe-btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-text);
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 20px;
  flex-shrink: 0;
}

.cafe-btn-secondary:hover {
  background: #c5b5ad;
}

.cafe-btn-secondary:active {
  transform: scale(0.9);
}

/* Inputs */
.cafe-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-input);
  border: 2px solid var(--border-color);
  background: var(--cream);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color 0.2s ease;
  resize: none;
}

.cafe-input:focus {
  outline: none;
  border-color: var(--coffee);
}

.cafe-input::placeholder {
  color: var(--mocha);
}

/* Toast */
.cafe-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark-roast);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-button);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.cafe-toast-success {
  background: var(--success);
}

.cafe-toast-error {
  background: var(--error);
}

/* Modal Backdrop */
.cafe-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.cafe-modal-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.cafe-modal {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  margin: 16px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cafe-modal-backdrop.active .cafe-modal {
  transform: scale(1);
}

/* Headers */
.cafe-header {
  text-align: center;
  margin-bottom: 24px;
}

.cafe-header-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.cafe-header h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.cafe-header p {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 6px 0 0;
}

/* Price */
.cafe-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-price);
  flex-shrink: 0;
}

.cafe-price-large {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-price);
}

/* Quantity Display */
.cafe-quantity {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  min-width: 40px;
  text-align: center;
}

/* Labels */
.cafe-label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Divider */
.cafe-divider {
  border: none;
  border-top: 2px solid var(--border-color);
  margin: 16px 0;
}

/* Success State */
.cafe-success {
  text-align: center;
  padding: 40px 20px;
}

.cafe-success-icon {
  font-size: 72px;
  margin-bottom: 16px;
}

.cafe-success h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.cafe-success > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 24px;
}

.cafe-success-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* Back Button */
.cafe-back {
  display: inline-flex;
  align-items: center;
  color: var(--coffee);
  font-size: 14px;
  margin-bottom: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
}

.cafe-back:hover {
  color: var(--dark-roast);
}

/* Utility */
.hidden {
  display: none !important;
}
