PDF PEDIDOS

This commit is contained in:
2026-06-09 10:05:00 -05:00
parent b19deda02c
commit d0581d36d1
9 changed files with 896 additions and 6 deletions
+391
View File
@@ -887,3 +887,394 @@ section {
font-size: 2rem;
}
}
/* ════════════════════════════════
CARRITO DE COMPRAS
════════════════════════════════ */
/* Botón flotante del carrito */
.cart-fab {
position: fixed;
bottom: 28px;
right: 28px;
z-index: 900;
width: 60px;
height: 60px;
border-radius: 50%;
border: none;
background: linear-gradient(135deg, #8b5cf6, #a78bfa);
color: #fff;
font-size: 1.5rem;
cursor: pointer;
box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.2s, box-shadow 0.2s;
}
.cart-fab:hover {
transform: scale(1.08);
box-shadow: 0 6px 28px rgba(139, 92, 246, 0.55);
}
.cart-fab:active {
transform: scale(0.95);
}
.cart-fab-badge {
position: absolute;
top: -4px;
right: -4px;
min-width: 22px;
height: 22px;
padding: 0 6px;
border-radius: 11px;
background: #ef4444;
color: #fff;
font-size: 0.7rem;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Plus Jakarta Sans', sans-serif;
box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}
/* Modal genérico (compartido con carrito y pedido) */
.modal {
display: none;
position: fixed;
inset: 0;
z-index: 1000;
align-items: center;
justify-content: center;
}
.modal.open {
display: flex;
}
.modal-backdrop {
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(4px);
}
.modal-content {
position: relative;
background: #fff;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
max-width: 520px;
width: 90vw;
max-height: 85vh;
display: flex;
flex-direction: column;
animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
from { opacity: 0; transform: translateY(20px) scale(0.97); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px 24px 0;
}
.modal-header h2 {
font-family: 'DM Serif Display', serif;
font-size: 1.4rem;
color: #1a1a2e;
margin: 0;
}
.modal-close {
background: none;
border: none;
font-size: 1.3rem;
color: #8b8ba7;
cursor: pointer;
padding: 4px 8px;
border-radius: 6px;
transition: background 0.15s;
}
.modal-close:hover {
background: #f3f0ff;
color: #1a1a2e;
}
.modal-body {
padding: 20px 24px;
overflow-y: auto;
flex: 1;
}
.modal-footer {
padding: 16px 24px 20px;
border-top: 1px solid #e8e6f0;
display: flex;
flex-direction: column;
gap: 12px;
}
/* Carrito — lista de items */
.cart-items {
display: flex;
flex-direction: column;
gap: 10px;
}
.cart-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
background: #f8f7fc;
border-radius: 10px;
}
.cart-item-info {
flex: 1;
min-width: 0;
}
.cart-item-name {
font-size: 0.85rem;
font-weight: 600;
color: #1a1a2e;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.cart-item-ref {
font-size: 0.72rem;
color: #8b8ba7;
}
.cart-item-controls {
display: flex;
align-items: center;
gap: 6px;
}
.cart-item-qty-btn {
width: 28px;
height: 28px;
border: 1px solid #d4d0e0;
border-radius: 6px;
background: #fff;
color: #1a1a2e;
font-size: 1rem;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.15s;
}
.cart-item-qty-btn:hover {
background: #f3f0ff;
}
.cart-item-qty {
font-size: 0.9rem;
font-weight: 600;
color: #1a1a2e;
min-width: 24px;
text-align: center;
}
.cart-item-subtotal {
font-size: 0.85rem;
font-weight: 700;
color: #8b5cf6;
min-width: 70px;
text-align: right;
}
.cart-item-remove {
background: none;
border: none;
color: #ef4444;
cursor: pointer;
font-size: 1rem;
padding: 4px;
border-radius: 4px;
transition: background 0.15s;
}
.cart-item-remove:hover {
background: #fef2f2;
}
.cart-empty {
text-align: center;
color: #8b8ba7;
padding: 32px 0;
font-size: 0.95rem;
}
.cart-total {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 1.05rem;
color: #1a1a2e;
}
.cart-total strong {
font-size: 1.3rem;
color: #8b5cf6;
}
.cart-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
}
/* Formulario de pedido */
.order-modal-content {
max-width: 440px;
}
.form-group {
margin-bottom: 14px;
}
.form-group label {
display: block;
font-size: 0.82rem;
font-weight: 600;
color: #4a4a68;
margin-bottom: 4px;
}
.form-group input {
width: 100%;
padding: 10px 14px;
border: 1.5px solid #d4d0e0;
border-radius: 10px;
font-size: 0.9rem;
font-family: 'Plus Jakarta Sans', sans-serif;
color: #1a1a2e;
background: #fafaff;
transition: border-color 0.2s, box-shadow 0.2s;
box-sizing: border-box;
}
.form-group input:focus {
outline: none;
border-color: #8b5cf6;
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.form-error {
color: #ef4444;
font-size: 0.82rem;
display: none;
margin-bottom: 8px;
}
.form-error.show {
display: block;
}
/* Botón "Agregar" en tarjetas de producto */
.producto-card-add {
display: flex;
align-items: center;
gap: 6px;
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #e8e6f0;
}
.producto-card-add-qty {
width: 48px;
padding: 6px 8px;
border: 1.5px solid #d4d0e0;
border-radius: 8px;
font-size: 0.82rem;
font-weight: 600;
text-align: center;
font-family: 'Plus Jakarta Sans', sans-serif;
color: #1a1a2e;
background: #fff;
transition: border-color 0.2s;
box-sizing: border-box;
}
.producto-card-add-qty:focus {
outline: none;
border-color: #8b5cf6;
}
.producto-card-add-btn {
flex: 1;
padding: 7px 12px;
border: none;
border-radius: 8px;
background: linear-gradient(135deg, #8b5cf6, #a78bfa);
color: #fff;
font-size: 0.78rem;
font-weight: 600;
font-family: 'Plus Jakarta Sans', sans-serif;
cursor: pointer;
transition: opacity 0.2s, transform 0.15s;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
}
.producto-card-add-btn:hover {
opacity: 0.9;
transform: translateY(-1px);
}
.producto-card-add-btn:active {
transform: scale(0.97);
}
/* Spinner en botones */
.btn-spinner {
margin-left: 6px;
}
/* Responsive carrito */
@media (max-width: 480px) {
.cart-fab {
width: 52px;
height: 52px;
bottom: 20px;
right: 20px;
font-size: 1.3rem;
}
.modal-content {
width: 95vw;
border-radius: 12px;
}
.cart-item {
flex-wrap: wrap;
}
.cart-actions {
flex-direction: column;
}
.cart-actions .btn {
width: 100%;
justify-content: center;
}
}