/* css/styles.css - COMPLETO Y FUNCIONAL */

:root {
    --primary-green: #16a34a;
    --primary-green-dark: #15803d;
    --accent-orange: #f59e0b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    background-color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.tendi-header {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.tendi-logo { display: flex; align-items: center; gap: 8px; }
.tendi-logo img { height: 40px; width: auto; }
.tendi-logo-fallback {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 10px;
    display: none;
    align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px;
}

.tendi-greeting h1 { font-size: 15px; font-weight: 700; margin: 0; color: var(--text-primary); }
.tendi-greeting p { font-size: 13px; margin: 0; color: var(--text-secondary); }

.tendi-header-icons { display: flex; gap: 12px; }

.icon-btn {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    color: #475569;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.icon-btn:hover { background: #e2e8f0; color: var(--text-primary); text-decoration: none; }

.badge-count {
    position: absolute; top: -2px; right: -2px;
    background: var(--accent-orange); color: #fff;
    font-size: 10px; font-weight: 700;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* ===== SEARCH ===== */
.search-section { background: #fff; padding: 0 16px 16px; }
.search-box { display: flex; align-items: center; gap: 10px; }
.search-input-wrap {
    flex: 1;
    display: flex; align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 10px 14px; gap: 10px;
}
.search-input-wrap input {
    border: none; background: transparent; outline: none;
    font-size: 14px; width: 100%; color: var(--text-primary);
}
.search-input-wrap input::placeholder { color: var(--text-muted); }
.search-input-wrap i { color: var(--text-muted); font-size: 16px; }

.filter-btn {
    width: 44px; height: 44px;
    background: #f1f5f9; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #475569; border: none; cursor: pointer;
    transition: background 0.2s;
}
.filter-btn:hover { background: #e2e8f0; }

/* ===== CATEGORIES ===== */
.categories-section {
    background: #fff; padding: 0 16px 16px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.categories-section::-webkit-scrollbar { display: none; }
.categories-wrap { display: flex; gap: 10px; white-space: nowrap; }

.category-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 20px;
    background: #f8fafc; border: 1px solid var(--border-color);
    font-size: 13px; font-weight: 500; color: #334155;
    cursor: pointer; transition: all 0.2s; user-select: none;
}
.category-chip:hover { background: #f1f5f9; border-color: #cbd5e1; }
.category-chip i { font-size: 14px; }
.category-chip.active {
    background: #dcfce7; border-color: #86efac; color: #166534;
}

/* ===== MAP ===== */
.map-section {
    position: relative; height: 340px; background: #e5e7eb;
}
#google-map { width: 100%; height: 100%; }

.map-overlay-label {
    position: absolute; top: 12px; left: 50%;
    transform: translateX(-50%);
    background: #1e293b; color: #fff;
    padding: 8px 18px; border-radius: 20px;
    font-size: 12px; font-weight: 500;
    display: flex; align-items: center; gap: 6px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.map-controls {
    position: absolute; right: 12px; bottom: 12px;
    display: flex; flex-direction: column; gap: 8px; z-index: 10;
}
.map-control-btn {
    width: 44px; height: 44px;
    background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    border: none; color: #475569;
    font-size: 16px; cursor: pointer;
    transition: transform 0.2s;
}
.map-control-btn:hover { transform: scale(1.05); }

.gm-style-iw { border-radius: 12px !important; padding: 0 !important; }
.store-info-window { padding: 8px 12px; font-family: inherit; min-width: 140px; }
.store-info-window h4 { font-size: 13px; font-weight: 700; margin: 0 0 4px; color: var(--primary-green); }
.store-info-window p { font-size: 11px; margin: 0; color: var(--text-secondary); }

/* ===== PROMOTIONS ===== */
.promos-section { background: #fff; padding: 16px; }
.promos-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
}
.promos-header h2 {
    font-size: 16px; font-weight: 700; margin: 0;
    display: flex; align-items: center; gap: 6px;
    color: var(--text-primary);
}
.promos-header a {
    font-size: 13px; color: var(--primary-green);
    font-weight: 600; text-decoration: none;
}
.promos-header a:hover { text-decoration: underline; }

.promos-scroll {
    display: flex; gap: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 4px;
}
.promos-scroll::-webkit-scrollbar { display: none; }

.promo-card {
    min-width: 270px;
    background: #f8fafc; border-radius: 14px;
    overflow: hidden; display: flex;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.promo-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.promo-img {
    width: 100px; min-height: 110px;
    background: #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.promo-img img { width: 100%; height: 100%; object-fit: cover; }
.promo-info {
    padding: 14px; flex: 1;
    display: flex; flex-direction: column;
}
.promo-info h3 { font-size: 14px; font-weight: 700; margin: 0 0 4px; color: var(--primary-green); }
.promo-discount { font-size: 15px; font-weight: 700; color: var(--text-primary); margin: 0; }
.promo-desc { font-size: 12px; color: var(--text-secondary); margin: 2px 0 10px; }
.promo-tag {
    display: inline-block; align-self: flex-start;
    padding: 5px 12px; border-radius: 12px;
    background: #dcfce7; color: #166534;
    font-size: 11px; font-weight: 600;
    margin-top: auto;
}

/* ===== BOTTOM NAV (Mobile) ===== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-around;
    padding: 8px 0 12px; z-index: 1000;
}
.bottom-nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; font-size: 11px; color: var(--text-muted);
    text-decoration: none; padding: 4px 16px;
    border-radius: 8px; transition: all 0.2s; cursor: pointer;
}
.bottom-nav-item:hover { color: #475569; text-decoration: none; }
.bottom-nav-item.active { color: var(--primary-green); }
.bottom-nav-item i { font-size: 20px; }

/* ===== SIDEBAR NAV (Desktop) ===== */
.sidebar-nav {
    display: none;
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 260px; background: #fff;
    border-right: 1px solid var(--border-color);
    z-index: 1001; padding: 20px 0;
    flex-direction: column;
}
.sidebar-logo {
    padding: 0 24px 24px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}
.sidebar-logo img { height: 44px; }
.sidebar-logo-fallback {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 10px;
    display: none; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 18px;
}
.sidebar-logo-text { font-size: 18px; font-weight: 700; color: var(--accent-orange); }
.sidebar-logo-text span { color: var(--primary-green); }

.sidebar-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 24px; color: var(--text-secondary);
    text-decoration: none; font-size: 15px; font-weight: 500;
    transition: all 0.2s; margin: 2px 12px; border-radius: 10px;
}
.sidebar-item:hover { background: #f1f5f9; color: var(--text-primary); text-decoration: none; }
.sidebar-item.active { background: #dcfce7; color: #166534; }
.sidebar-item i { font-size: 20px; width: 24px; text-align: center; }

.sidebar-footer {
    margin-top: auto;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
}
.sidebar-user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px;
}
.sidebar-user-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.sidebar-user-role { font-size: 12px; color: var(--text-secondary); }

/* ===== TOP BAR (Desktop) ===== */
.desktop-topbar {
    display: none;
    background: #fff; padding: 12px 32px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.desktop-search {
    flex: 1; max-width: 500px;
    display: flex; align-items: center;
    background: #f1f5f9; border-radius: 12px;
    padding: 10px 16px; gap: 10px;
}
.desktop-search input {
    border: none; background: transparent; outline: none;
    font-size: 14px; width: 100%; color: var(--text-primary);
}
.desktop-search input::placeholder { color: var(--text-muted); }

/* ===== LAYOUT CONTAINERS ===== */
.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px;
}

.desktop-main {
    display: none;
    margin-left: 260px;
    min-height: 100vh;
    background: #f8fafc;
    padding-bottom: 32px;
}

.desktop-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* ===== DESKTOP COMPONENTS ===== */
.desktop-categories {
    display: flex; gap: 12px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.desktop-cat-card {
    flex: 1; min-width: 140px; max-width: 180px;
    background: #fff; border-radius: 14px;
    padding: 20px; text-align: center;
    border: 1px solid var(--border-color);
    cursor: pointer; transition: all 0.2s;
}
.desktop-cat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.desktop-cat-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px; font-size: 22px;
}
.desktop-cat-card h4 { font-size: 14px; font-weight: 600; margin: 0; color: var(--text-primary); }

.desktop-section-title {
    font-size: 20px; font-weight: 700; margin: 0 0 16px;
    color: var(--text-primary); display: flex;
    align-items: center; gap: 8px;
}

.desktop-map-section {
    background: #fff; border-radius: 16px;
    overflow: hidden; border: 1px solid var(--border-color);
    margin-bottom: 24px;
}
.desktop-map-header {
    padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}
.desktop-map-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.desktop-map-wrap { height: 400px; position: relative; }

.desktop-promos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.desktop-promo-card {
    background: #fff; border-radius: 14px;
    overflow: hidden; border: 1px solid var(--border-color);
    display: flex; cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.desktop-promo-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.desktop-promo-img {
    width: 110px; min-height: 120px;
    background: #e2e8f0; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; overflow: hidden;
}
.desktop-promo-img img { width: 100%; height: 100%; object-fit: cover; }
.desktop-promo-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.desktop-promo-info h3 { font-size: 15px; font-weight: 700; margin: 0 0 4px; color: var(--primary-green); }
.desktop-promo-discount { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.desktop-promo-desc { font-size: 13px; color: var(--text-secondary); margin: 4px 0 12px; }
.desktop-promo-tag {
    display: inline-block; align-self: flex-start;
    padding: 5px 12px; border-radius: 12px;
    background: #dcfce7; color: #166534;
    font-size: 12px; font-weight: 600;
    margin-top: auto;
}

.desktop-stores-list {
    background: #fff; border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 20px;
}
.desktop-store-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--border-color);
}
.desktop-store-item:last-child { border-bottom: none; }
.desktop-store-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: #f1f5f9; display: flex;
    align-items: center; justify-content: center;
    font-size: 20px; flex-shrink: 0;
}
.desktop-store-info h4 { font-size: 14px; font-weight: 600; margin: 0 0 2px; color: var(--text-primary); }
.desktop-store-info p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.desktop-store-distance {
    margin-left: auto; font-size: 12px;
    color: var(--primary-green); font-weight: 600;
    background: #dcfce7; padding: 4px 10px;
    border-radius: 10px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.promo-card, .desktop-promo-card {
    animation: fadeInUp 0.4s ease-out both;
}
.promo-card:nth-child(1), .desktop-promo-card:nth-child(1) { animation-delay: 0.1s; }
.promo-card:nth-child(2), .desktop-promo-card:nth-child(2) { animation-delay: 0.2s; }
.promo-card:nth-child(3), .desktop-promo-card:nth-child(3) { animation-delay: 0.3s; }

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet: 768px - 991px */
@media (min-width: 768px) {
    .mobile-container { max-width: 720px; }
    .map-section { height: 400px; }
    .promo-card { min-width: 300px; }
    .promo-img { width: 110px; }
}

/* Desktop: 992px+ */
@media (min-width: 992px) {
    .mobile-container { display: none; }
    .bottom-nav { display: none; }
    .sidebar-nav { display: flex; }
    .desktop-main { display: block; }
    .desktop-topbar { display: flex; }
    body { background: #f8fafc; }
}

/* Large Desktop: 1400px+ */
@media (min-width: 1400px) {
    .desktop-content { max-width: 1400px; }
    .desktop-promos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra Large: 1600px+ */
@media (min-width: 1600px) {
    .sidebar-nav { width: 280px; }
    .desktop-main { margin-left: 280px; }
    .desktop-content { padding: 32px 48px; }
}
/* css/styles.css - Estilos base de TENDI APP */

:root {
    --primary-green: #16a34a;
    --primary-green-dark: #15803d;
    --accent-orange: #f59e0b;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    background-color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ===== HEADER ===== */
.tendi-header {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.tendi-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tendi-logo img {
    height: 40px;
    width: auto;
}

.tendi-logo-fallback {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.tendi-greeting h1 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
}

.tendi-greeting p {
    font-size: 13px;
    margin: 0;
    color: var(--text-secondary);
}

.tendi-header-icons {
    display: flex;
    gap: 12px;
}

.icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    text-decoration: none;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}

.icon-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
    text-decoration: none;
}

.badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-orange);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* ===== BOTTOM NAV (Mobile) ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 4px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.bottom-nav-item:hover {
    color: #475569;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: var(--primary-green);
}

.bottom-nav-item i {
    font-size: 20px;
}

/* ===== SIDEBAR NAV (Desktop) ===== */
.sidebar-nav {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: #fff;
    border-right: 1px solid var(--border-color);
    z-index: 1001;
    padding: 20px 0;
    flex-direction: column;
}

.sidebar-logo {
    padding: 0 24px 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.sidebar-logo img {
    height: 44px;
}

.sidebar-logo-fallback {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-orange);
}

.sidebar-logo-text span {
    color: var(--primary-green);
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    margin: 2px 12px;
    border-radius: 10px;
}

.sidebar-item:hover {
    background: #f1f5f9;
    color: var(--text-primary);
    text-decoration: none;
}

.sidebar-item.active {
    background: #dcfce7;
    color: #166534;
}

.sidebar-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.sidebar-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== TOP BAR (Desktop) ===== */
.desktop-topbar {
    display: none;
    background: #fff;
    padding: 12px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.desktop-search {
    flex: 1;
    max-width: 500px;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 10px 16px;
    gap: 10px;
}

.desktop-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 100%;
    color: var(--text-primary);
}

.desktop-search input::placeholder {
    color: var(--text-muted);
}

/* ===== LAYOUT CONTAINERS ===== */
.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    position: relative;
    padding-bottom: 70px;
}

.desktop-main {
    display: none;
    margin-left: 260px;
    min-height: 100vh;
    background: #f8fafc;
    padding-bottom: 32px;
}

.desktop-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 32px;
}

/* ===== RESPONSIVE ===== */
@media (min-width: 992px) {
    .mobile-container {
        display: none;
    }
    .bottom-nav {
        display: none;
    }
    .sidebar-nav {
        display: flex;
    }
    .desktop-main {
        display: block;
    }
    .desktop-topbar {
        display: flex;
    }
    body {
        background: #f8fafc;
    }
}