:root {
  --ml-yellow: #ffe600;
  --ml-blue: #3483fa;
  --ml-blue-dark: #2968c8;
  --ml-green: #00a650;
  --ml-gray: #f5f5f5;
  --ml-text: #333;
  --ml-text-light: #666;
  --ml-border: #e6e6e6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--ml-gray); color: var(--ml-text); }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* Header */
.header { background: var(--ml-yellow); padding: 12px 0; box-shadow: 0 1px 2px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; }
.logo-img { width: 148px; height: 35px; display: block; object-fit: contain; }
.search-bar { flex: 1; display: flex; max-width: 600px; }
.search-bar input { flex: 1; padding: 12px 16px; border: none; border-radius: 4px 0 0 4px; font-size: 15px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); color: var(--ml-text); }
.search-bar input::placeholder { color: #999; }
.search-bar button { background: #fff; border: none; padding: 0 18px; border-radius: 0 4px 4px 0; cursor: pointer; color: var(--ml-text-light); font-size: 16px; }
.header-links { display: flex; gap: 20px; font-size: 14px; color: #333; }
.header-links a { color: #333; transition: color 0.2s; }
.header-links a:hover { color: var(--ml-blue); }

/* Breadcrumb */
.breadcrumb { padding: 16px 0; font-size: 13px; color: var(--ml-text-light); }
.breadcrumb a { color: var(--ml-text-light); }
.breadcrumb a:hover { color: var(--ml-blue); }
.breadcrumb strong { color: #000; }

/* Category quick nav */
.category-nav { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0 20px; }
.cat-pill { padding: 8px 18px; border-radius: 20px; background: #fff; border: 1px solid var(--ml-border); font-size: 13px; color: var(--ml-text); transition: all 0.2s; text-decoration: none; }
.cat-pill:hover, .cat-pill.active { background: var(--ml-blue); color: #fff; border-color: var(--ml-blue); }

/* Hero */
.hero-banner { background: linear-gradient(90deg, #fff 0%, #e6f0ff 100%); border-radius: 12px; padding: 40px; margin-bottom: 32px; display: flex; align-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.hero-content { max-width: 600px; }
.hero-tag { display: inline-block; background: var(--ml-blue); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 20px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-content h1 { font-size: 32px; font-weight: 600; margin-bottom: 10px; color: #000; }
.hero-content p { font-size: 16px; color: var(--ml-text-light); }

/* Product grid */
.section-title { font-size: 22px; margin: 24px 0 16px; font-weight: 600; color: #000; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 40px; }
.product-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.08); transition: transform 0.15s, box-shadow 0.2s; cursor: pointer; border: 1px solid transparent; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); border-color: var(--ml-border); }
.product-image-wrap { padding: 16px; background: #fff; display: flex; align-items: center; justify-content: center; height: 220px; }
.product-image { max-width: 100%; max-height: 100%; object-fit: contain; }
.product-info { padding: 16px; border-top: 1px solid var(--ml-border); }
.product-badge { display: inline-block; background: var(--ml-blue); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 3px; margin-bottom: 8px; text-transform: uppercase; }
.product-price { font-size: 22px; font-weight: 600; margin-bottom: 4px; color: #000; }
.product-price-old { font-size: 13px; color: var(--ml-text-light); text-decoration: line-through; }
.product-discount { color: var(--ml-green); font-size: 13px; font-weight: 600; margin-left: 6px; }
.product-title { font-size: 14px; color: var(--ml-text); margin: 8px 0; line-height: 1.4; height: 40px; overflow: hidden; }
.product-shipping { color: var(--ml-green); font-size: 13px; font-weight: 600; }
.product-sold { font-size: 12px; color: var(--ml-text-light); margin-top: 4px; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; background: #fff; padding: 32px; border-radius: 12px; margin-bottom: 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.detail-gallery { display: flex; flex-direction: column; gap: 16px; }
.detail-image { width: 100%; max-height: 420px; object-fit: contain; background: #fff; border-radius: 8px; }
.detail-thumbs { display: flex; gap: 10px; }
.detail-thumbs img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--ml-border); border-radius: 6px; padding: 4px; cursor: pointer; }
.detail-thumbs img:hover { border-color: var(--ml-blue); }
.detail-info { padding-top: 8px; }
.detail-condition { font-size: 13px; color: var(--ml-text-light); margin-bottom: 8px; }
.detail-title { font-size: 24px; font-weight: 600; margin-bottom: 12px; line-height: 1.3; }
.detail-price { font-size: 38px; font-weight: 300; margin-bottom: 8px; color: #000; }
.detail-price-old { font-size: 16px; color: var(--ml-text-light); text-decoration: line-through; }
.detail-discount { color: var(--ml-green); font-weight: 600; margin-left: 8px; }
.detail-shipping { color: var(--ml-green); font-size: 14px; margin: 14px 0; padding: 10px 0; border-top: 1px solid var(--ml-border); border-bottom: 1px solid var(--ml-border); }
.detail-stock { font-size: 14px; color: var(--ml-text-light); margin-bottom: 16px; }
.detail-benefits { margin-bottom: 20px; }
.benefit { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ml-text); margin-bottom: 8px; }
.benefit span { font-size: 16px; }
.detail-description { font-size: 15px; line-height: 1.6; color: var(--ml-text-light); margin-bottom: 24px; }
.btn-primary { display: inline-block; background: var(--ml-blue); color: #fff; border: none; padding: 16px 28px; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; text-align: center; transition: background 0.2s; }
.btn-primary:hover { background: var(--ml-blue-dark); }
.btn-secondary { display: inline-block; background: rgba(65,137,230,.12); color: var(--ml-blue); border: none; padding: 16px 28px; border-radius: 6px; font-size: 16px; font-weight: 600; cursor: pointer; width: 100%; text-align: center; margin-top: 10px; transition: background 0.2s; }
.btn-secondary:hover { background: rgba(65,137,230,.2); }

/* Checkout */
.checkout-page { display: grid; grid-template-columns: 1fr 360px; gap: 24px; max-width: 1100px; margin: 0 auto; }
.checkout-form-area { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.checkout-sidebar { }
.checkout-title { font-size: 26px; font-weight: 600; margin-bottom: 8px; color: #000; }
.checkout-panel { display: none; }
.checkout-panel.active { display: block; }
.checkout-section { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--ml-border); }
.checkout-section:last-of-type { border-bottom: none; }
.checkout-section h3 { font-size: 16px; font-weight: 600; margin-bottom: 18px; color: #000; }
.required { color: #e74c3c; }
.secure-badge { background: #e8f5e9; color: #2e7d32; padding: 10px 16px; border-radius: 6px; font-size: 13px; margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.lock-icon { font-size: 16px; }

/* Checkout steps indicator */
.checkout-steps { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.step { display: flex; align-items: center; gap: 6px; color: #999; font-weight: 500; }
.step.active { color: var(--ml-blue); font-weight: 700; }
.step.done { color: var(--ml-green); }
.step-arrow { color: #ccc; font-size: 16px; }
.step-num { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; border: 2px solid #ccc; }
.step.active .step-num { background: var(--ml-blue); border-color: var(--ml-blue); color: #fff; }
.step.done .step-num { background: var(--ml-green); border-color: var(--ml-green); color: #fff; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ml-text); }
.form-group input, .form-group select { padding: 13px 12px; border: 1px solid var(--ml-border); border-radius: 6px; font-size: 14px; transition: border-color 0.2s, box-shadow 0.2s; background: #fff; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--ml-blue); box-shadow: 0 0 0 2px rgba(52,131,250,0.15); }
.step-nav { display: flex; gap: 12px; margin-top: 24px; }
.step-nav .btn-primary { width: auto; flex: 1; }
.step-nav .btn-secondary { width: auto; padding: 16px 24px; }

/* Order summary sidebar */
.order-summary-box { background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); position: sticky; top: 100px; }
.order-summary-box h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.order-summary { background: var(--ml-gray); padding: 16px; border-radius: 6px; margin-bottom: 0; }
.order-summary h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.summary-line.envio { color: var(--ml-green); }
.summary-line.total { font-size: 20px; font-weight: 700; border-top: 1px solid var(--ml-border); padding-top: 14px; margin-top: 14px; color: #000; }
.summary-cuotas { font-size: 12px; color: var(--ml-text-light); margin-top: 10px; text-align: center; }
.shipping-banner { background: #e3f2fd; color: #1565c0; padding: 12px; border-radius: 6px; margin-top: 16px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.safe-buy { font-size: 12px; color: var(--ml-text-light); margin-top: 16px; line-height: 1.5; display: flex; gap: 6px; }
.safe-buy span { font-size: 16px; }

/* Card visual */
.card-visual { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 12px; padding: 24px; color: #fff; margin-bottom: 28px; max-width: 380px; transition: background 0.4s, transform 0.6s; perspective: 1000px; box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3); }
.card-visual.flipped { transform: rotateY(180deg); }
.card-chip { font-size: 32px; margin-bottom: 20px; }
.card-number-display { font-size: 22px; letter-spacing: 3px; font-family: monospace; margin-bottom: 20px; }
.card-bottom { display: flex; gap: 24px; }
.card-bottom small { font-size: 10px; opacity: 0.7; display: block; margin-bottom: 2px; text-transform: uppercase; }
.card-name-display { font-size: 14px; font-weight: 600; text-transform: uppercase; }
.card-exp-display { font-size: 14px; }
.card-brand { font-size: 18px; font-weight: 700; margin-top: 2px; }

/* CVV */
.cvv-input-wrap { display: flex; align-items: center; gap: 8px; }
.cvv-input-wrap input { flex: 1; }
.cvv-hint { width: 24px; height: 24px; border-radius: 50%; background: var(--ml-border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ml-text-light); cursor: help; }

/* Security seals */
.security-seals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.seal { background: #f5f5f5; padding: 10px; border-radius: 6px; text-align: center; font-size: 11px; color: var(--ml-text-light); }
.seal span { display: block; font-size: 18px; margin-bottom: 4px; }

/* Shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
.shake { animation: shake 0.5s ease; }

/* Processing steps */
.processing-steps { margin-top: 16px; text-align: left; }
.ps { padding: 10px 14px; margin-bottom: 8px; border-radius: 6px; font-size: 13px; display: flex; align-items: center; gap: 10px; color: #999; background: #f9f9f9; }
.ps.done { color: var(--ml-green); background: #e8f5e9; }
.ps.active { color: var(--ml-blue); background: #e3f2fd; font-weight: 600; }
.ps span { font-size: 16px; flex-shrink: 0; }

/* Spinner / Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: none; align-items: center; justify-content: center; z-index: 200; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; padding: 36px; border-radius: 12px; text-align: center; max-width: 440px; width: 90%; box-shadow: 0 12px 40px rgba(0,0,0,0.25); }
.modal-subtitle { font-size: 14px; color: var(--ml-text-light); margin-bottom: 10px; }
.spinner { width: 52px; height: 52px; border: 4px solid var(--ml-border); border-top-color: var(--ml-blue); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-title { font-size: 20px; font-weight: 600; margin-bottom: 10px; color: #000; }
.modal-text { font-size: 14px; color: var(--ml-text-light); line-height: 1.5; }
.modal-error { color: #e74c3c; font-size: 18px; font-weight: 600; margin-bottom: 10px; }

/* Footer */
.footer { background: #fff; padding: 40px 0; margin-top: 48px; border-top: 1px solid var(--ml-border); font-size: 13px; color: var(--ml-text-light); }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: left; }
.footer-grid strong { display: block; font-size: 14px; color: var(--ml-text); margin-bottom: 8px; }
.footer-grid p { line-height: 1.5; }

/* Bank promotions */
.bank-promotions { margin-bottom: 32px; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.promo-card { background: #fff; border-radius: 8px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.08); border: 1px solid var(--ml-border); }
.promo-logo { width: 80px; height: 50px; object-fit: contain; flex-shrink: 0; }
.promo-info { flex: 1; }
.promo-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; color: #000; }
.promo-info p { font-size: 13px; color: var(--ml-text-light); }
.promo-discount { display: inline-block; background: var(--ml-green); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; margin-bottom: 6px; }

/* Admin */
.admin-title { font-size: 16px; font-weight: 600; color: #333; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--ml-border); font-size: 14px; }
.admin-table th { font-weight: 600; background: var(--ml-gray); }
.admin-table button { background: var(--ml-blue); color: #fff; border: none; padding: 4px 8px; border-radius: 4px; cursor: pointer; margin-right: 4px; }
.admin-table button:hover { background: var(--ml-blue-dark); }

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .logo-img { width: 120px; height: 28px; }
  .search-bar { order: 3; width: 100%; max-width: 100%; margin-top: 8px; }
  .header-links { order: 2; gap: 12px; font-size: 13px; }
  .hero-banner { padding: 24px; }
  .hero-content h1 { font-size: 24px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-image-wrap { height: 160px; }
  .product-price { font-size: 18px; }
  .product-title { height: 36px; font-size: 13px; }
  .product-detail { grid-template-columns: 1fr; padding: 20px; gap: 24px; }
  .detail-price { font-size: 28px; }
  .detail-thumbs img { width: 52px; height: 52px; }
  .checkout-page { grid-template-columns: 1fr; }
  .checkout-form-area { padding: 20px; }
  .checkout-sidebar { order: -1; }
  .order-summary-box { position: static; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .card-visual { max-width: 100%; }
  .card-number-display { font-size: 18px; }
  .security-seals { grid-template-columns: repeat(2, 1fr); }
  .checkout-steps { font-size: 11px; gap: 4px; }
  .step { gap: 2px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .promo-card { flex-direction: column; text-align: center; }
  .promo-logo { width: 100px; height: 60px; }
  .admin-table { font-size: 12px; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 20px; }
  .section-title { font-size: 18px; }
  .checkout-form-area { padding: 16px; }
  .security-seals { grid-template-columns: repeat(2, 1fr); }
}