/* ==========================================================================
   1. SETUP & VARIÁVEIS (ROSA CINTILANTE PREMIUM)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Lato:wght@300;400;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  /* Cores */
  --primary: #E91E63;       /* Rosa Principal */
  --primary-dark: #C2185B;  /* Rosa Escuro (Hover) */
  --primary-light: #FCE4EC; /* Rosa Muito Claro (Fundos) */
  
  --text-main: #2C2C2C;     /* Preto Suave */
  --text-muted: #666666;    /* Cinzento */
  --bg-body: #FFFFFF;
  --bg-surface: #FAFAFA;    /* Cinza muito claro para contraste */
  
  /* Fontes */
  --font-script: 'Great Vibes', cursive;    /* Assinaturas */
  --font-title: 'Playfair Display', serif;  /* Títulos */
  --font-body: 'Lato', sans-serif;          /* Texto */
  
  /* UI */
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,0.05);
  --shadow-hover: 0 15px 40px rgba(233, 30, 99, 0.15);
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-title);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Botões Premium */
.cta-button {
  display: inline-block;
  background-color: var(--primary);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none; cursor: pointer;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

/* Animações */
.hidden { opacity: 0; transform: translateY(20px); transition: all 0.6s ease; }
.show { opacity: 1; transform: translateY(0); }


/* ==========================================================================
   3. CABEÇALHO (CLEAN)
   ========================================================================== */
header {
  background: #fff;
  padding: 0.8rem 0;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.03);
}

nav {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}

.logo img { height: 55px; width: auto; }

.desktop-nav { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.desktop-nav li a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-main);
  position: relative;
}

/* Linha de hover elegante */
.desktop-nav li a::after {
  content: ''; position: absolute; width: 0; height: 2px;
  bottom: -5px; left: 0; background: var(--primary); transition: 0.3s;
}
.desktop-nav li a:hover::after, .desktop-nav li a.active::after { width: 100%; }
.desktop-nav li a.active { color: var(--primary); }

/* Ícone Carrinho */
.cart-link { position: relative; }
.cart-link span { font-size: 1.4rem; }
#cart-count {
  position: absolute; top: -8px; right: -8px;
  background: var(--primary); color: #fff;
  font-size: 0.7rem; font-weight: 800;
  width: 20px; height: 20px; border-radius: 50%;
  display: none; justify-content: center; align-items: center;
}


/* ==========================================================================
   4. HERO & SECÇÕES
   ========================================================================== */
.hero {
  height: 80vh;
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.pexels.com/photos/1028704/pexels-photo-1028704.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1');
  background-size: cover; background-position: center;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; color: #fff; margin-bottom: 5rem;
}

.hero h1 {
  font-family: var(--font-script);
  font-size: 6rem; color: #fff; margin-bottom: 0;
  text-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.hero p { font-size: 1.4rem; font-weight: 300; margin-bottom: 2.5rem; letter-spacing: 0.5px; }

/* Títulos de Secção */
.page-header { text-align: center; padding: 4rem 0 2rem; }
.page-header h1 { font-size: 3.5rem; color: var(--primary); font-family: var(--font-script); }
.destaques { text-align: center; padding: 3rem 0; }
.destaques h2 span { font-family: var(--font-script); font-size: 3.5rem; color: var(--primary); margin-left: 0.5rem; }


/* ==========================================================================
   5. CARTÕES DE PRODUTO (MINIMALISTAS)
   ========================================================================== */
.menu-grid, .grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3rem; padding-bottom: 5rem;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  border: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.4s ease;
  display: flex; flex-direction: column;
}

.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

.card-img {
  height: 280px; width: 100%;
  overflow: hidden; position: relative; background: var(--bg-surface);
}
.product-card-image {
  width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease;
}
.card:hover .product-card-image { transform: scale(1.08); }

.card-content {
  padding: 2rem; display: flex; flex-direction: column; flex-grow: 1; text-align: center;
}
.card-content h3 { font-size: 1.4rem; margin-bottom: 0.5rem; font-family: var(--font-title); }
.card-content p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1.5rem; flex-grow: 1; }
.card-content .price { font-size: 1.5rem; font-weight: 700; color: var(--primary); margin-bottom: 1.5rem; font-family: var(--font-body); }

.add-to-cart-btn, .card .cta-button {
  width: 100%; margin-top: auto;
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary); box-shadow: none; padding: 0.8rem;
}
.add-to-cart-btn:hover, .card .cta-button:hover {
  background: var(--primary); color: #fff; transform: none;
}


/* ==========================================================================
   6. CONTACTOS (DESIGN MAGAZINE)
   ========================================================================== */
.contact-page { display: grid; grid-template-columns: 1fr 1.5fr; gap: 4rem; padding: 4rem 0; }

.contact-info {
  background: var(--primary); color: #fff;
  padding: 3rem; border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  position: relative; overflow: hidden;
}
/* Círculo decorativo */
.contact-info::after {
  content: ''; position: absolute; bottom: -50px; right: -50px;
  width: 200px; height: 200px; background: rgba(255,255,255,0.1); border-radius: 50%;
}

.contact-info h2 { font-family: var(--font-script); color: #fff; font-size: 3.5rem; margin-bottom: 2rem; }
.contact-info ul li { display: flex; align-items: center; margin-bottom: 1.5rem; font-size: 1.1rem; }
.contact-info span { 
  width: 40px; height: 40px; background: rgba(255,255,255,0.2); 
  border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 1rem; 
}

.contact-form {
  background: #fff; padding: 3rem; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid #eee;
}

/* Inputs */
input, textarea, select {
  width: 100%; padding: 1rem;
  border: 1px solid #ddd; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem;
  background-color: #fcfcfc; transition: 0.3s; margin-bottom: 1rem;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}


/* ==========================================================================
   7. CARRINHO & CHECKOUT (CLEAN)
   ========================================================================== */
.checkout-page h2 { font-family: var(--font-title); font-size: 2.5rem; color: var(--text-main); text-align: center; margin-bottom: 3rem; }
.checkout-page .container { display: grid; grid-template-columns: 1.5fr 1fr; gap: 4rem; align-items: start; }

.checkout-form { background: #fff; padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eee; }

/* Tabela */
.cart-table { width: 100%; border-collapse: separate; border-spacing: 0 1rem; }
.cart-table th { text-align: left; padding: 0 1rem; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.cart-table td { background: #fff; padding: 1.5rem; vertical-align: middle; border-top: 1px solid #eee; border-bottom: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.cart-table tr td:first-child { border-left: 1px solid #eee; border-radius: 12px 0 0 12px; }
.cart-table tr td:last-child { border-right: 1px solid #eee; border-radius: 0 12px 12px 0; text-align: center; }

.cart-item-image { width: 70px; height: 70px; border-radius: 8px; object-fit: cover; }
.remove-btn-icon {
  width: 35px; height: 35px; border-radius: 50%; border: none; cursor: pointer;
  color: var(--primary); background: var(--primary-light); display: flex; align-items: center; justify-content: center; margin: 0 auto; transition: 0.3s;
}
.remove-btn-icon:hover { background: var(--primary); color: #fff; }
.remove-btn-icon svg { width: 18px; height: 18px; }

.cart-total { text-align: right; margin-top: 2rem; padding-top: 2rem; border-top: 2px dashed #eee; }
.cart-total span { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-left: 1rem; font-family: var(--font-title); }


/* ==========================================================================
   8. ADMIN (DASHBOARD)
   ========================================================================== */
.login-page { height: 90vh; display: flex; align-items: center; justify-content: center; background: var(--bg-surface); }
.login-container { background: #fff; padding: 4rem 3rem; border-radius: 24px; box-shadow: var(--shadow-hover); width: 100%; max-width: 450px; text-align: center; }

.admin-tabs { display: inline-flex; background: #fff; padding: 0.5rem; border-radius: 50px; box-shadow: var(--shadow); margin-bottom: 3rem; flex-wrap: wrap; justify-content: center; gap: 5px; }
.admin-tabs button { padding: 0.8rem 1.5rem; background: transparent; border: none; border-radius: 50px; color: var(--text-muted); font-weight: 600; cursor: pointer; transition: 0.3s; }
.admin-tabs button.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(233, 30, 99, 0.3); }
.admin-panel { display: none; } .admin-panel.active { display: block; }

/* Cartões Admin */
.product-admin-item, .order-card {
  background: #fff; border: 1px solid #eee; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); transition: 0.3s;
}
.order-card { display: block; }
.order-header { display: flex; justify-content: space-between; border-bottom: 1px solid #eee; padding-bottom: 1rem; margin-bottom: 1rem; }
.order-status { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; padding: 0.4rem 1rem; border-radius: 50px; background: var(--bg-surface); color: var(--text-muted); }
.order-card-actions { display: flex; gap: 0.8rem; margin-top: 1.5rem; }
.order-card-actions button { font-size: 0.85rem; padding: 0.6rem 1.2rem; border-radius: 8px; border: none; color: #fff; cursor: pointer; font-weight: 600; }
.confirm { background: #28a745; } .danger { background: #dc3545; } .delivered { background: #007bff; } .edit { background: #007bff; }

/* Formulário Admin */
.add-product-form { background: #fff; padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eee; max-width: 600px; }
.image-upload-container { border: 2px dashed #ddd; border-radius: 12px; padding: 2rem; text-align: center; background: #fcfcfc; cursor: pointer; position: relative; }
.image-upload-container:hover { border-color: var(--primary); background: var(--primary-light); }
.image-upload-container input[type="file"] { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.form-group-inline { display: flex; gap: 1.5rem; } .form-group-inline .form-group { flex: 1; }
.radio-group-fancy { display: flex; gap: 1rem; margin-top: 0.5rem; }
.radio-group-fancy label { flex: 1; text-align: center; padding: 1rem; background: #fff; border: 2px solid #eee; border-radius: 12px; cursor: pointer; font-weight: 600; color: #888; }
.radio-group-fancy input[type="radio"] { display: none; }
.radio-group-fancy input:checked + label { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }


/* ==========================================================================
   9. MODALS & TOASTS
   ========================================================================== */
#modal-overlay, #custom-modal-overlay, #confirm-modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); z-index: 2000;
  display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: 0.3s;
}
.active { opacity: 1 !important; visibility: visible !important; }

.modal-content, .confirm-modal-content, .custom-modal-content {
  background: #fff; padding: 0; border-radius: 24px; width: 90%; max-width: 550px;
  transform: scale(0.9) translateY(20px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-hover); overflow: hidden;
}
.active .modal-content, .active .custom-modal-content, .active .confirm-modal-content { transform: scale(1) translateY(0); }

.modal-header { background: var(--primary-light); padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: center; }
#modal-title, #custom-modal-title { font-family: var(--font-title); font-size: 1.8rem; color: var(--primary); margin: 0; }
#modal-close-btn, #custom-modal-close-btn { background: rgba(255,255,255,0.5); width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer; color: var(--primary); }
#modal-body, #custom-modal-body { padding: 2rem; max-height: 60vh; overflow-y: auto; }
.custom-modal-footer { padding: 1.5rem 2rem; background: var(--bg-surface); border-top: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }

/* Toasts */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 3000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: #fff; padding: 1rem 1.5rem; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-left: 5px solid #aaa; font-weight: 600; opacity: 0; transform: translateX(100%); transition: 0.5s; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-left-color: #28a745; } .toast.error { border-left-color: #dc3545; } .toast.info { border-left-color: #007bff; }


/* ==========================================================================
   10. RODAPÉ
   ========================================================================== */
footer { margin-top: 6rem; padding: 4rem 0; background: #fff; text-align: center; border-top: 1px solid #eee; }
footer p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }
footer .admin-link a { font-size: 0.8rem; color: #ddd; }
footer .admin-link a:hover { color: var(--primary); }


/* ==========================================================================
   11. RESPONSIVIDADE (TELEMÓVEL)
   ========================================================================== */
#mobile-menu-btn { display: none; background: none; border: none; padding: 10px; z-index: 1002; cursor: pointer; }
#mobile-menu { display: none; }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  #mobile-menu-btn { display: block; }
  #mobile-menu-btn span { display: block; width: 28px; height: 2px; background: var(--text-main); margin: 7px 0; transition: 0.4s; border-radius: 2px; }
  #mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); background: var(--primary); }
  #mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
  #mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); background: var(--primary); }

  /* Menu Mobile Premium */
  #mobile-menu.active {
    display: flex; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(135deg, #fff0f5 0%, #ffffff 100%); z-index: 1001;
    flex-direction: column; justify-content: center; align-items: center;
  }
  .mobile-nav-list { text-align: center; padding: 0; list-style: none; }
  .mobile-nav-list li { margin: 2rem 0; }
  .mobile-nav-list a { font-family: var(--font-title); font-size: 2.2rem; color: var(--text-main); text-transform: uppercase; letter-spacing: 2px; font-weight: 400; }
  .mobile-menu-footer { position: absolute; bottom: 40px; text-align: center; color: var(--primary); font-family: var(--font-script); font-size: 1.8rem; }

  /* Ajustes */
  .hero h1 { font-size: 4rem; }
  .contact-page, .checkout-page .container { grid-template-columns: 1fr; gap: 2rem; }
  .grid-3, .menu-grid { grid-template-columns: 1fr; }
  
  /* Carrinho Móvel em Cards */
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { background: #fff; border-radius: 20px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); border: 1px solid var(--primary-light); position: relative; }
  .cart-table td { padding: 0.5rem 0; border: none; display: flex; justify-content: space-between; align-items: center; }
  .cart-table td:first-child { justify-content: center; margin-bottom: 1rem; }
  .cart-item-image { width: 90px; height: 90px; border-radius: 16px; }
  .cart-table td:nth-child(2) { font-family: var(--font-title); font-size: 1.3rem; color: var(--primary); justify-content: center; font-weight: 700; }
  .cart-table td:nth-child(3)::before { content: "Preço:"; color: #999; font-size: 0.9rem; }
  .cart-table td:nth-child(4)::before { content: "Qtd:"; color: #999; font-size: 0.9rem; }
  .cart-table td:nth-child(5) { margin-top: 1rem; border-top: 1px dashed #eee; padding-top: 1rem; font-size: 1.3rem; font-weight: 700; color: var(--text-main); }
  .cart-table td:nth-child(5)::before { content: "Total:"; font-weight: 400; font-size: 1rem; }
  .cart-table td:last-child { position: absolute; top: 15px; right: 15px; width: auto; }
  
  .checkout-form { position: static; margin-top: 2rem; }
}