/* 
  Gabs Vanilla - CSS TOTAL E CONSOLIDADO
  Foco: Estética Premium + Funcionalidade Completa
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --primary: #f43f5e;
  --primary-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  --primary-light: #fff1f2;
  --secondary: #6366f1;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 20px;
}

/* ─── RESET & UTILS ─── */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background: var(--bg); color: var(--text); line-height: 1.5; overflow-x: hidden; }
button { border: none; background: none; cursor: pointer; transition: all 0.2s; }
input { outline: none; border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem; width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.grid { display: grid; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* ─── HEADER & NAV ─── */
.header { 
  background: rgba(255, 255, 255, 0.8); 
  backdrop-filter: blur(12px); 
  padding: 1rem 0; 
  position: sticky; top: 0; z-index: 1000; 
  border-bottom: 1px solid var(--border);
}
.logo-wrapper { display: flex; align-items: center; gap: 0.5rem; }
.logo-text { font-weight: 800; font-size: 1.5rem; color: var(--primary); letter-spacing: -1px; }

.cart-trigger { 
  background: var(--primary-gradient); 
  color: white; padding: 0.6rem 1.25rem; 
  border-radius: 14px; display: flex; align-items: center; gap: 0.75rem; 
  box-shadow: 0 10px 15px -3px rgba(244, 63, 94, 0.3);
}
.cart-count { background: white; color: var(--primary); width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }

/* ─── CATALOG ─── */
.search-wrapper { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 0.5rem; margin-bottom: 1.5rem; display: flex; }
.search-wrapper input { border: none; padding: 0.5rem 1rem; flex: 1; font-size: 1rem; }
.search-btn { background: var(--primary); color: white; width: 45px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }

.categories-chips { display: flex; gap: 0.75rem; overflow-x: auto; padding: 0.5rem 0 1rem; scrollbar-width: none; }
.chip { white-space: nowrap; padding: 0.6rem 1.25rem; background: white; border: 1px solid var(--border); border-radius: 100px; font-weight: 600; color: var(--text-muted); }
.chip.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(244, 63, 94, 0.2); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.card { background: white; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; transition: transform 0.3s; }
.card:hover { transform: translateY(-8px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.card-img-wrapper { height: 200px; background: #f1f5f9; position: relative; }
.product-img { width: 100%; height: 100%; object-fit: cover; }
.product-card { background: white; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; }
.product-card:hover { transform: translateY(-6px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }
.product-image-wrapper { height: 180px; overflow: hidden; background: #f1f5f9; position: relative; }
.product-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge-highlight { position: absolute; top: 10px; left: 10px; background: var(--primary); color: white; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.product-info { padding: 1rem; }
.product-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.product-price { font-size: 1.1rem; font-weight: 900; color: var(--primary); margin-bottom: 10px; }
.card { background: white; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; }
.card-img-wrapper { height: 200px; background: #f1f5f9; position: relative; }
.product-img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }
.add-btn { background: var(--primary); color: white; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.cart-item-name { font-weight: 600; font-size: 0.9rem; }
.cart-item-price { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cart-item-qty button { width: 28px; height: 28px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); font-weight: 700; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.category-chip { white-space: nowrap; padding: 0.6rem 1.25rem; background: white; border: 1px solid var(--border); border-radius: 100px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.2s; }
.category-chip.active { background: var(--primary); color: white; border-color: var(--primary); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1e293b; color: white; padding: 12px 24px; border-radius: 100px; font-weight: 600; font-size: 0.9rem; z-index: 9999; opacity: 0; transition: all 0.3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.product-detail-img { width: 100%; height: 260px; object-fit: cover; border-radius: 20px 20px 0 0; }
.product-detail-body { padding: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.95rem; }


/* ─── MODALS ─── */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.modal.active { display: flex; }
.modal-content { background: white; width: 100%; max-width: 480px; border-radius: 28px; padding: 2rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes modalScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.close-modal { font-size: 1.5rem; color: var(--text-muted); }

/* ─── CHECKOUT & STATUS ─── */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.delivery-card { border: 2px solid var(--border); padding: 1rem; border-radius: 16px; text-align: center; cursor: pointer; transition: all 0.2s; font-weight: 700; }
.delivery-card.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.payment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.payment-btn { padding: 0.75rem; border-radius: 12px; border: 1px solid var(--border); background: white; font-weight: 600; cursor: pointer; }
.payment-btn.active { background: var(--text); color: white; border-color: var(--text); }
.summary-row.total { font-size: 1.5rem; font-weight: 900; color: var(--primary); border-top: 2px dashed var(--border); padding-top: 1rem; margin-top: 1rem; }

.status-steps { display: flex; justify-content: space-between; margin: 3rem 0; position: relative; }
.status-steps::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: var(--border); z-index: 1; transform: translateY(-50%); }
.step { background: white; border: 2px solid var(--border); padding: 0.5rem 1rem; border-radius: 100px; font-size: 0.75rem; font-weight: 800; z-index: 2; position: relative; }
.step.active { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 15px rgba(244,63,94,0.2); }

/* ─── LUCKY WHEEL ─── */
.wheel-container { position: relative; width: 280px; height: 280px; margin: 2rem auto; }
.wheel { width: 100%; height: 100%; border-radius: 50%; border: 6px solid white; box-shadow: 0 0 0 4px var(--primary); background: conic-gradient(#f43f5e 0deg 45deg, #6366f1 45deg 90deg, #10b981 90deg 135deg, #f59e0b 135deg 180deg, #ec4899 180deg 225deg, #8b5cf6 225deg 270deg, #3b82f6 270deg 315deg, #fb7185 315deg 360deg); transition: transform 4s cubic-bezier(0.15, 0, 0.15, 1); }
.spin-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 65px; height: 65px; background: white; border: 4px solid var(--primary); border-radius: 50%; font-weight: 800; color: var(--primary); font-size: 0.75rem; z-index: 20; }

/* ─── ANIMATIONS & SKELETON ─── */
.skeleton-card { height: 350px; background: linear-gradient(90deg, #f1f5f9 25%, #f8fafc 50%, #f1f5f9 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade { animation: fadeIn 0.4s ease-out forwards; }
