/* =========================================
   VARIABLES GLOBALES
   ========================================= */
:root {
    --g-brand: #1abc9c; 
    --g-dark: #2d3436;
    --g-gray: #f5f6fa;
    --g-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gokie-menu-wrapper { 
    font-family: 'Inter', system-ui, sans-serif; 
    max-width: 1000px; 
    margin: 0 auto; 
    position: relative; 
    padding-bottom: 120px; 
}

/* =========================================
   NAVEGACIÓN STICKY
   ========================================= */
.gokie-cat-nav { 
    position: sticky; 
    top: 0; 
    background: #fff; 
    z-index: 90; 
    padding: 15px 0; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    white-space: nowrap; 
    -webkit-overflow-scrolling: touch; 
}

.gokie-cat-link { 
    padding: 8px 18px; 
    background: var(--g-gray); 
    border-radius: 25px; 
    text-decoration: none; 
    color: var(--g-dark); 
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: 0.2s; 
}

.gokie-cat-link:hover { 
    background: #e1e1e1; 
}

/* =========================================
   GRID DE PRODUCTOS
   ========================================= */
.gokie-cat-title { 
    font-size: 1.4rem; 
    color: var(--g-dark); 
    margin: 35px 0 20px; 
    font-weight: 800; 
}

.gokie-products-row { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px; 
}

/* TARJETA */
.gokie-product-card { 
    background: #fff; 
    border: 1px solid #f0f0f0; 
    border-radius: 16px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: 0.2s; 
    box-shadow: var(--g-shadow); 
}

.gokie-product-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); 
}

.gokie-prod-img { 
    height: 180px; 
    background-size: cover; 
    background-position: center; 
}

.gokie-prod-info { 
    padding: 16px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

.gokie-prod-title { 
    margin: 0 0 6px; 
    font-size: 1.1rem; 
    color: var(--g-dark); 
    font-weight: 700; 
}

.gokie-prod-desc { 
    font-size: 0.85rem; 
    color: #636e72; 
    margin-bottom: 15px; 
    line-height: 1.5; 
    flex-grow: 1; 
}

.gokie-prod-footer { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: 10px; 
}

.gokie-price { 
    font-weight: 800; 
    color: var(--g-dark); 
    font-size: 1.2rem; 
}

.gokie-btn-open-item { 
    background: #fff; 
    border: 1px solid var(--g-brand); 
    color: var(--g-brand); 
    padding: 8px 20px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: 700; 
    transition: all 0.2s ease; 
    font-size: 0.9rem; 
}

.gokie-btn-open-item:hover { 
    background: var(--g-brand); 
    color: #fff; 
}

.gokie-btn-open-item:disabled {
    border-color: #ccc; 
    color: #ccc; 
    background: #fff; 
    cursor: not-allowed;
}

/* =========================================
   BARRA FLOTANTE (RAPPI STYLE - CORREGIDO)
   ========================================= */
.gokie-cart-floating { 
    position: fixed; 
    bottom: 20px; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 92%; 
    max-width: 600px; 
    background: var(--g-brand); 
    color: #fff; 
    padding: 10px 15px; 
    border-radius: 100px; 
    display: none; /* JS controla esto */
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); 
    z-index: 9999; 
    cursor: pointer;
    transition: bottom 0.3s ease;
}

/* IZQUIERDA: Info */
.gokie-cart-details { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.cart-count-badge { 
    background: #fff; 
    color: var(--g-brand); 
    width: 32px; 
    height: 32px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 800; 
    font-size: 1.1rem; /* Numero un poco mas grande */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart-text { 
    display: flex; 
    flex-direction: column; 
    line-height: 1.1; 
}

.cart-label { 
    font-size: 0.7rem; 
    opacity: 0.9; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-weight: 600;
}

.cart-total { 
    font-weight: 800; 
    font-size: 1.25rem; /* Precio mas grande */
}

/* DERECHA: Botón */
.gokie-btn-view-cart { 
    background: #fff; 
    border: none; 
    color: var(--g-brand); 
    padding: 12px 28px; /* Botón mas ancho */
    border-radius: 30px; 
    font-weight: 800; 
    font-size: 1.05rem; /* Texto mas grande */
    cursor: pointer; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    white-space: nowrap;
    margin-left: auto; /* Empuja el boton a la derecha */
}

.gokie-btn-view-cart:hover {
    transform: scale(1.05);
}

/* =========================================
   MODALES
   ========================================= */
.gokie-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(3px); }
.gokie-modal-content { background: #fff; width: 90%; max-width: 450px; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.3); animation: slideIn 0.3s ease; max-height: 90vh; overflow-y: auto; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.gokie-modal-header { padding: 15px 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; background: #fafafa; }
.gokie-modal-header h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
.gokie-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #aaa; }
.gokie-modal-body { padding: 20px; }

/* CONTROLES */
.gokie-qty-wrapper { display: flex; align-items: center; justify-content: center; gap: 20px; margin: 20px 0; }
.qty-btn { width: 40px; height: 40px; border-radius: 50%; background: #f1f2f6; border: none; font-size: 1.5rem; font-weight: bold; color: var(--g-dark); cursor: pointer; display: flex; align-items: center; justify-content: center; }
#modalQty { font-size: 1.5rem; font-weight: 800; width: 40px; text-align: center; }

/* FORMULARIOS */
.gokie-form-title { margin-top: 20px; margin-bottom: 15px; font-size: 1rem; border-bottom: 2px solid var(--g-brand); display: inline-block; padding-bottom: 5px; font-weight: 700; }
.gokie-form-group { margin-bottom: 15px; }
.gokie-form-group label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 5px; color: var(--g-dark); }
.gokie-form-group input, .gokie-form-select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 0.95rem; background: #fff; }
.gokie-form-group input:focus, .gokie-form-select:focus, .gokie-note-area:focus { border-color: var(--g-brand); outline: none; }
.gokie-note-area { width: 100%; height: 80px; padding: 12px; border: 1px solid #dfe6e9; border-radius: 10px; resize: none; font-family: inherit; font-size: 0.9rem; background: #fdfdfd; }
.gokie-btn-confirm { width: 100%; background: #25D366; color: #fff; padding: 14px; border: none; border-radius: 12px; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 10px; transition: 0.2s; }

/* RESUMEN */
.gokie-cart-summary-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 0.9rem; }
.gokie-item-note { font-size: 0.75rem; color: #888; display: block; margin-top: 2px; font-style: italic; }

/* RESPONSIVO */
@media (max-width: 768px) {
    .gokie-products-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; } 
    .gokie-prod-img { height: 130px; }
    .gokie-prod-info { padding: 12px; }
    .gokie-prod-title { font-size: 1rem; }
    .gokie-btn-open-item { width: 100%; padding: 8px 0; margin-top: 5px; }
    .gokie-price { font-size: 1.1rem; }
    .gokie-modal-content { width: 95%; max-height: 85vh; }
    
    /* Barra Móvil Optimizada */
    .gokie-cart-floating { width: 95%; bottom: 15px; padding: 8px 12px; }
    .gokie-btn-view-cart { padding: 10px 20px; font-size: 1rem; }
    .cart-total { font-size: 1.2rem; }
}