/* Variables & Reset */
:root {
    --primary: #FF651C;
    /* GastroCalle Corporate Orange */
    --primary-hover: #E65A19;

    --secondary: #2D3436;
    /* Dark Charcoal */
    --accent: #FFC107;
    /* Amber/Gold */
    --bg-body: #F9FAFB;
    --bg-card: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --font-main: 'Outfit', sans-serif;
    --font-display: 'Playfair Display', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* Global responsive image rule */
img,
video,
iframe,
embed,
object {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    transition: transform 0.1s ease;
}

button:active {
    transform: scale(0.97);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.btn-login {
    background-color: var(--secondary);
    color: white !important;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
    transition: var(--transition);
}

.btn-login:hover {
    background-color: black;
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    background-image: url('assets/hero.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw + 1rem, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.text-gradient {
    background: linear-gradient(45deg, #FF9800, #FF651C);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Fallback for text shadow on gradient text not working well */
    text-shadow: none;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Search Box */
.search-box {
    background: white;
    padding: 0.75rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    flex: 1;
    gap: 0.75rem;
}

.search-input-group i {
    color: var(--primary);
    font-size: 1.1rem;
}

.search-input-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1rem;
    color: var(--text-main);
    font-family: var(--font-main);
    background: transparent;
}

.search-box:focus-within {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(255, 87, 34, 0.1);
    transform: translateY(-2px);
    transition: var(--transition);
}

.search-divider {
    width: 1px;
    height: 2rem;
    background-color: var(--border-color);
}

.location-group {
    flex: 0.6;
}

.btn-search {
    background: var(--primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-search:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.3);
}

.hero-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    padding: 0 1rem;
}

.tag {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    color: white;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tag:hover {
    background: white;
    color: var(--primary);
}

/* Main Content */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--secondary);
}

/* Featured Categories */
.featured-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 992px) {
    .featured-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .featured-categories {
        grid-template-columns: 1fr;
    }
}

.category-card {
    position: relative;
    height: 200px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 1.5rem 1rem 1rem;
    color: white;
}

.category-overlay h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    font-family: var(--font-display);
}

.category-overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
}



/* Listings Grid */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.listing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(255, 87, 34, 0.3);
}

.card-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.listing-card:hover .card-image {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-like {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-like:hover {
    color: #E91E63;
    transform: scale(1.1);
}

.card-content {
    padding: 1.25rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.card-price {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.1rem;
}

.card-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.rating i {
    color: var(--accent);
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.seller-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ddd;
    object-fit: contain;
}

.load-more-container {
    text-align: center;
    margin-bottom: 4rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    padding: 0.8rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Map Section */
.map-section {
    padding: 4rem 0;
    background-color: var(--bg-body);
}

.map-section .section-header {
    justify-content: center;
    margin-bottom: 2rem;
}

.map-section .section-header h2 {
    text-align: center;
}

#map {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background-color: #e0e0e0;
}

@media (max-width: 768px) {
    #map {
        height: 350px;
    }
}

@media (max-width: 480px) {
    #map {
        height: 280px;
    }
}

/* Features */
.features-section {
    background-color: white;
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.features-section .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: #FFF3E0;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background-color: var(--secondary);
    color: white;
    padding: 4rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col a {
    display: block;
    margin-bottom: 0.75rem;
    color: #9CA3AF;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    font-size: 1.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    text-align: center;
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 1.5rem;
        padding: 1rem;
    }

    .search-divider {
        display: none;
    }

    .search-input-group {
        width: 100%;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .search-input-group:last-of-type {
        border-bottom: none;
    }

    .btn-search {
        width: 100%;
        margin-top: 1rem;
    }

    .nav-links {
        display: none;
    }

    /* Mobile-specific feature adjustments */

    /* Footer */
    .footer {
        background-color: var(--secondary);
        color: white;
        padding: 4rem 0 0;
    }

    .footer-content {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
        margin-bottom: 3rem;
    }

    .footer-col h3 {
        font-family: var(--font-display);
        font-size: 1.75rem;
        margin-bottom: 1rem;
        color: var(--primary);
    }

    .footer-col h4 {
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
    }

    .footer-col a {
        display: block;
        margin-bottom: 0.75rem;
        color: #9CA3AF;
        transition: var(--transition);
    }

    .footer-col a:hover {
        color: white;
    }

    .social-links {
        display: flex;
        gap: 1rem;
    }

    .social-links a {
        font-size: 1.25rem;
    }

    .footer-bottom {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 2rem 0;
        text-align: center;
        color: #9CA3AF;
        font-size: 0.9rem;
    }

    /* Responsive */
    @media (max-width: 992px) {
        .hero-title {
            font-size: 3rem;
        }

        .section-header h2 {
            font-size: 1.75rem;
        }
    }

    @media (max-width: 768px) {
        .hero-title {
            font-size: 2.25rem;
            /* Smaller for mobile */
        }

        .hero-subtitle {
            font-size: 1.1rem;
        }

        .search-box {
            flex-direction: column;
            border-radius: 1.5rem;
            padding: 1rem;
        }

        .search-divider {
            display: none;
        }

        .search-input-group {
            width: 100%;
            padding: 0.75rem 0;
            border-bottom: 1px solid var(--border-color);
        }

        .search-input-group:last-of-type {
            border-bottom: none;
        }

        .btn-search {
            width: 100%;
            margin-top: 1rem;
        }

        /* Mobile Menu */
        .mobile-menu-btn {
            display: block;
            z-index: 1001;
        }

        .nav-links {
            position: fixed;
            top: 0;
            right: -100%;
            height: 100vh;
            height: 100dvh;
            /* Dynamic viewport height for mobile browsers */
            width: 80%;
            max-width: 300px;
            background: white;
            flex-direction: column;
            justify-content: flex-start;
            align-items: stretch;
            transition: var(--transition);
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            z-index: 1000;
            display: flex;
            /* ===== SCROLL FIX ===== */
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            /* Smooth scroll on iOS */
            /* ===== REDUCED PADDING ===== */
            padding: 4rem 1rem 2rem 1rem;
        }

        .nav-links.active {
            right: 0;
        }

        .nav-links a {
            font-size: 1rem;
            /* Reduced from 1.25rem */
            margin: 0.35rem 0;
            /* Reduced from 0.75rem */
            width: 100%;
            text-align: center;
            padding: 0.6rem 0.75rem;
            /* Reduced padding */
            border-radius: 0.5rem;
            transition: background-color 0.2s ease;
        }

        .nav-links a:hover,
        .nav-links a:active {
            background-color: rgba(255, 87, 34, 0.08);
        }

        /* ===== OPTIMIZED ACTION BUTTONS FOR MOBILE ===== */
        .nav-links .btn-nav-action {
            font-size: 0.85rem;
            /* Smaller font */
            padding: 0.5rem 0.9rem;
            /* Reduced padding */
            margin: 0.25rem 0.5rem;
            /* Tighter margins */
            border-radius: 1.5rem;
            /* Slightly less rounded */
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
        }

        .nav-links .btn-nav-action i {
            font-size: 0.9rem;
        }

        /* Footer Stacking */
        .footer-content {
            grid-template-columns: 1fr;
            /* Stack columns */
            gap: 2rem;
            text-align: center;
        }

        .social-links {
            justify-content: center;
        }

        /* Adjust Spacing */
        .features-section,
        .footer {
            padding-top: 3rem;
            padding-bottom: 3rem;
        }

        .category-card {
            height: 160px;
            /* Smaller cards */
        }
    }

    @media (max-width: 480px) {
        .listings-grid {
            grid-template-columns: 1fr;
            /* Single column for very small screens */
        }

        .hero {
            height: auto;
            min-height: 420px;
            padding-top: 5rem;
            padding-bottom: 2rem;
        }

        .hero-title {
            font-size: 1.8rem;
        }

        .hero-subtitle {
            font-size: 0.95rem;
            padding: 0 0.5rem;
            margin-bottom: 1.5rem;
        }

        /* ===== COMPACT SEARCH BOX FOR MOBILE ===== */
        .search-box {
            padding: 0.5rem;
            border-radius: 1rem;
            margin: 0 0.5rem 1.5rem;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
            /* Glassmorphism effect */
            background: rgba(255, 255, 255, 0.70);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        .search-input-group {
            padding: 0.5rem 0;
        }

        .search-input-group input {
            font-size: 0.85rem;
        }

        .search-input-group input::placeholder {
            font-size: 0.8rem;
        }

        .btn-search {
            padding: 0.6rem 1.5rem;
            font-size: 0.9rem;
            margin-top: 0.5rem;
        }

        .hero-tags {
            gap: 0.4rem;
            font-size: 0.8rem;
        }

        .hero-tags .tag {
            padding: 0.35rem 0.75rem;
            font-size: 0.75rem;
        }

        .hero-tags>span {
            width: 100%;
            text-align: center;
            margin-bottom: 0.25rem;
        }

        /* ===== EXTRA COMPACT MENU FOR SMALL PHONES ===== */
        .nav-links {
            padding: 3.5rem 0.75rem 1.5rem 0.75rem;
        }

        .nav-links a {
            font-size: 0.95rem;
            margin: 0.25rem 0;
            padding: 0.5rem 0.6rem;
        }

        .nav-links .btn-nav-action {
            font-size: 0.8rem;
            padding: 0.4rem 0.75rem;
            margin: 0.2rem 0.4rem;
        }
    }

    .seller-form-container {
        max-width: 600px;
        margin: 0 auto;
        background: var(--bg-body);
        padding: 2rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        display: block;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--secondary);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 0.8rem;
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        font-family: var(--font-main);
        font-size: 1rem;
        transition: var(--transition);
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
    }

    .file-upload {
        border: 2px dashed var(--border-color);
        padding: 2rem;
        text-align: center;
        border-radius: 0.5rem;
        cursor: pointer;
        transition: var(--transition);
        background: white;
    }

    .file-upload:hover {
        border-color: var(--primary);
        background: #FFF3E0;
    }

    .file-upload i {
        font-size: 2rem;
        color: var(--text-muted);
        margin-bottom: 0.5rem;
    }

    .btn-submit {
        width: 100%;
        background: var(--primary);
        color: white;
        padding: 1rem;
        border-radius: 0.5rem;
        font-weight: 700;
        font-size: 1.1rem;
        transition: var(--transition);
    }

    .btn-submit:hover {
        background: var(--primary-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }
}

/* Auth Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-main);
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* Seller Dashboard Styles */
.dashboard-header {
    margin-top: 8rem;
    text-align: left;
}

.dashboard-header h2 {
    color: var(--primary);
}

.dashboard-main {
    margin-top: 2rem;
    padding-bottom: 4rem;
}

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.dashboard-card h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-size: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.dashboard-form {
    max-width: 600px;
    margin-top: 1.5rem;
}

.gps-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.gps-input-group input {
    background: var(--bg-body);
}

.action-buttons {
    margin-top: 1.5rem;
}

.btn-delete {
    background: #E53935;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: center;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-delete:hover {
    background: #C62828;
}

/* Modal Enhancements */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    display: block;
    width: 95%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    transition: var(--transition);
}

/* Estilos compactos para formularios en modales */
.modal-content .form-group {
    margin-bottom: 0.75rem;
}

.modal-content .form-group label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.modal-content .form-group input,
.modal-content .form-group select {
    padding: 0.6rem;
    font-size: 0.95rem;
}

.modal-content h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

/* Preview de imagen más compacto en modales */
#dash-image-preview img,
.modal-content img {
    max-height: 100px !important;
    width: auto;
    object-fit: contain;
}

/* Botón publicar siempre visible */
.modal-content .btn-submit {
    margin-top: 0.5rem;
    padding: 0.8rem;
    font-size: 1rem;
    position: sticky;
    bottom: 0;
    background: var(--primary);
}

.modal.active .modal-content {
    transform: translateY(0);
}

/* Media query para móviles */
@media (max-width: 768px) {
    .modal-content {
        padding: 1rem;
        max-height: 75vh;
        width: 98%;
    }

    .modal-content h2 {
        font-size: 1.1rem;
    }

    .modal-content .form-group {
        margin-bottom: 0.5rem;
    }

    #dash-image-preview img {
        max-height: 80px !important;
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.btn-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(230, 81, 0, 0.2);
}

/* Corporate Colored Navigation Buttons */
.btn-nav-action {
    background-color: var(--primary);
    color: white !important;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.btn-nav-action:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 87, 34, 0.4);
}

.btn-nav-action i {
    font-size: 1rem;
}

/* Specific button styles if needed */
.btn-nav-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary) !important;
}

.btn-nav-outline:hover {
    background-color: var(--primary);
    color: white !important;
}

/* Map Section */
.map-section {
    padding: 4rem 0;
    background: var(--bg-body);
}

.map-section .section-header {
    margin-bottom: 2rem;
}

.map-section .section-header h2 {
    text-align: center;
    margin-bottom: 0;
}

#map {
    width: 100%;
    height: 450px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    background: #e0e0e0;
}

/* ===========================================
   BUYER DASHBOARD - Mi Cuenta Panel Styles
   =========================================== */

/* Navigation Grid (Milanuncios style) */
.panel-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .panel-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .panel-nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

.panel-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-main);
    transition: var(--transition);
    border: 2px solid transparent;
}

.panel-nav-item:hover {
    background: #FFF3E0;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.panel-nav-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.panel-nav-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.panel-nav-item span {
    font-weight: 500;
    font-size: 0.9rem;
}

/* Badge for unread messages */
.nav-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.panel-nav-item.active .nav-badge {
    background: white;
    color: var(--primary);
}

/* Dashboard Panel Sections */
.dashboard-panel-section {
    display: none;
}

.dashboard-panel-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Messages List */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.message-item:hover {
    background: #FFF3E0;
    border-color: var(--primary);
}

.message-item.unread {
    background: #fff8e1;
    border-left: 3px solid var(--primary);
}

.message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.message-sender {
    font-weight: 600;
    color: var(--text-main);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.message-preview {
    font-size: 0.9rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-item.unread .message-preview {
    color: var(--text-main);
    font-weight: 500;
}

/* Favorite Card (reuses listing-card but smaller) */
.favorite-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.favorite-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.favorite-card .card-content {
    padding: 1rem;
}

.favorite-card .seller-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.favorite-card .shop-name {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Loading text */
.loading-text {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* ============================================
   GASTROCALLE PANEL REDESIGN - APP-FIRST DESIGN
   ============================================ */

/* Dashboard Layout - Sidebar + Content */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
    margin-top: 80px;
}

@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        padding-bottom: 80px;
        /* Space for mobile nav */
    }
}

/* Dashboard Sidebar */
.dashboard-sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

@media (max-width: 992px) {
    .dashboard-sidebar {
        display: none;
    }
}

/* Sidebar Navigation */
.sidebar-nav {
    margin-top: 1.5rem;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.sidebar-nav .nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.sidebar-nav .nav-item:hover {
    background-color: #FFF3E0;
    color: var(--primary);
}

.sidebar-nav .nav-item:hover i {
    color: var(--primary);
}

.sidebar-nav .nav-item.active {
    background: linear-gradient(135deg, #FF651C, #FF9800);
    color: white;
}

.sidebar-nav .nav-item.active i {
    color: white;
}

/* Identity Header (Selfie + Name) */
.identity-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #FF651C, #FF9800);
    border-radius: var(--radius-lg);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
}

.identity-header.seller {
    background: linear-gradient(135deg, #FF651C, #E64A19);
}

.identity-header.supplier {
    background: linear-gradient(135deg, #2E7D32, #43A047);
}

.selfie-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.selfie-avatar.empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.identity-info {
    flex: 1;
    min-width: 0;
}

.identity-info h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.identity-info .shop-title {
    font-size: 0.9rem;
    opacity: 0.9;
}

.role-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile Bottom Navigation */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

@media (max-width: 992px) {
    .mobile-nav-bar {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

.mobile-nav-item.active {
    color: var(--primary);
}

.mobile-nav-item .nav-badge {
    position: absolute;
    top: 0;
    right: 0.5rem;
    background: #E91E63;
    color: white;
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
    border-radius: 1rem;
    min-width: 16px;
    text-align: center;
}

/* Dashboard Content Area */
.dashboard-content {
    padding: 2rem;
    background: var(--bg-body);
}

@media (max-width: 768px) {
    .dashboard-content {
        padding: 1rem;
    }
}

/* Dashboard Section Cards */
.dashboard-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.dashboard-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dashboard-section h3 i {
    color: var(--primary);
}

/* Instagram-Style Product Grid */
.product-grid-instagram {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

@media (max-width: 768px) {
    .product-grid-instagram {
        gap: 2px;
    }
}

.product-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #f5f5f5;
}

.product-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-grid-item:hover img {
    transform: scale(1.05);
}

.product-grid-item .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.75rem;
    color: white;
}

.product-grid-item:hover .overlay {
    opacity: 1;
}

.product-grid-item .overlay .title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.product-grid-item .overlay .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

/* Add Product Button (Grid) */
.product-grid-add {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF3E0, #FFECB3);
    border: 2px dashed var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary);
}

.product-grid-add:hover {
    background: linear-gradient(135deg, #FFE0B2, #FFD54F);
    transform: scale(1.02);
}

.product-grid-add i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-grid-add span {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Section Tabs (Messages: Clientes/Proveedores) */
.section-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
    gap: 0;
}

.section-tab {
    flex: 1;
    padding: 0.875rem 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: none;
    background: transparent;
}

.section-tab:hover {
    color: var(--text-main);
}

.section-tab.active {
    color: var(--primary);
}

.section-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.section-tab .tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E91E63;
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    margin-left: 0.5rem;
    min-width: 20px;
}

/* Fans / Clients List */
.fans-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.fan-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition);
}

.fan-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fan-card .fan-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #FF651C, #FF9800);
}

.fan-card .fan-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.fan-card .fan-since {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Supplier Card */
.supplier-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: var(--transition);
    border: 1px solid transparent;
}

.supplier-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.supplier-card .supplier-logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #2E7D32;
    flex-shrink: 0;
}

.supplier-card .supplier-info {
    flex: 1;
    min-width: 0;
}

.supplier-card .supplier-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.supplier-card .supplier-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.supplier-card .btn-contact {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: #2E7D32;
    color: white;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.supplier-card .btn-contact:hover {
    background: #1B5E20;
}

/* Selfie Upload Prompt */
.selfie-upload-prompt {
    background: linear-gradient(135deg, #FFF3E0, #FFECB3);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.selfie-upload-prompt i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.selfie-upload-prompt h4 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.selfie-upload-prompt p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.selfie-upload-prompt .btn-upload-selfie {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    transition: var(--transition);
}

.selfie-upload-prompt .btn-upload-selfie:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.3);
}

/* Danger Zone (Darse de Baja) - Subtle Design */
.danger-zone {
    border: 1px solid #e0e0e0;
    background: #fafafa;
    margin-top: 2rem;
}

.danger-zone h3 {
    color: #666;
    font-size: 0.95rem;
    cursor: pointer;
}

.danger-zone h3 i {
    color: #999;
}

.danger-zone:hover {
    border-color: #dc3545;
    background: #fff5f5;
}

.danger-zone:hover h3,
.danger-zone:hover h3 i {
    color: #dc3545;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #c82333;
}

/* GPS Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background-color: #4CAF50;
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 1px #4CAF50;
}

/* GPS Toggle disabled state */
.toggle-switch input:not(:checked)+.toggle-slider {
    background-color: #ff9800;
}

/* Action buttons in product grid */
.action-btn {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn.btn-primary {
    background: #1976D2;
    color: white;
}

.action-btn.btn-warning {
    background: #FF9800;
    color: white;
}

.action-btn.btn-success {
    background: #4CAF50;
    color: white;
}

.action-btn.btn-danger {
    background: #dc3545;
    color: white;
    padding: 6px 10px;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* Mobile Identity Header (Compact) */
.mobile-identity-header {
    display: none;
    padding: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 992px) {
    .mobile-identity-header {
        display: block;
    }

    .mobile-identity-header .identity-header {
        margin: 0;
    }
}

/* Section Hide/Show for Tab Navigation */
.panel-section {
    display: none;
}

.panel-section.active {
    display: block;
}

/* Stats Cards Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Message Preview Card */
.message-preview-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-body);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.message-preview-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-sm);
}

.message-preview-card.unread {
    background: #FFF3E0;
    border-color: #FFE0B2;
}

.message-preview-card .sender-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.message-preview-card .message-info {
    flex: 1;
    min-width: 0;
}

.message-preview-card .sender-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message-preview-card .message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.message-preview-card .message-excerpt {
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-preview-card .product-context {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 87, 34, 0.1);
    border-radius: 6px;
}

.message-preview-card .product-context img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
}

.message-preview-card .product-context span {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

/* ===========================================
   BUYER DASHBOARD - Panel Section Styles
   =========================================== */

/* Panel sections show/hide */
.panel-section {
    display: none;
}

.panel-section.active {
    display: block;
}

/* Messages section for buyer dashboard - controlled height */
#section-mensajes {
    max-height: calc(100vh - 200px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#section-mensajes.active {
    display: flex;
}

#section-mensajes h3 {
    flex-shrink: 0;
    margin-bottom: 0.75rem;
}

#section-mensajes>p {
    flex-shrink: 0;
}

#section-mensajes .messages-list,
#messages-container {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 350px);
    padding-right: 0.5rem;
}

/* Mobile adjustments for messages panel */
@media (max-width: 768px) {
    #section-mensajes {
        max-height: calc(100vh - 180px);
    }

    #section-mensajes .messages-list,
    #messages-container {
        max-height: calc(100vh - 300px);
    }
}

@media (max-width: 480px) {
    #section-mensajes {
        max-height: calc(100vh - 160px);
    }

    #section-mensajes .messages-list,
    #messages-container {
        max-height: calc(100vh - 280px);
    }
}

/* ============================================
   LIVE MODE TOGGLE - Master "Go Live" Switch
   ============================================ */
.live-mode-container {
    padding: 1rem;
    margin: 0.5rem 0.75rem 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.live-mode-toggle {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* The switch container */
.live-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.live-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.live-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #bdbdbd, #9e9e9e);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 30px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.live-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Active state - Green */
.live-switch input:checked+.live-slider {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.live-switch input:checked+.live-slider:before {
    transform: translateX(26px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Pulse animation when active */
.live-switch input:checked+.live-slider:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Live mode info text */
.live-mode-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.live-mode-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #333;
}

.live-mode-status {
    font-size: 0.8rem;
    font-weight: 500;
    color: #9e9e9e;
    transition: color 0.3s ease;
}

.live-mode-status.active {
    color: #4CAF50;
    font-weight: 600;
}

.live-mode-status.inactive {
    color: #9e9e9e;
}

.live-mode-hint {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #888;
    text-align: center;
    transition: all 0.3s ease;
}

.live-mode-hint.active {
    color: #4CAF50;
}

/* Loading state */
.live-mode-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.live-mode-container.loading .live-slider:before {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Gestionar Cuenta link (subtle at bottom of sidebar) */
.nav-item-subtle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.nav-item-subtle:hover {
    color: #555;
    background: rgba(0, 0, 0, 0.04);
}

.nav-item-subtle i {
    font-size: 0.9rem;
}

/* Location status box in profile form */
.location-status-box {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    border: 1px dashed #ddd;
}

.location-status-box p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.location-status-box i {
    color: #2196F3;
    margin-right: 6px;
}

.location-status-box.active {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border-color: #a5d6a7;
}

.location-status-box.active p,
.location-status-box.active i {
    color: #388E3C;
}

.location-coords {
    display: inline-block;
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: #555;
    background: rgba(0, 0, 0, 0.05);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Account modal styling */
#account-modal .account-actions {
    margin-top: 1.5rem;
}

#account-modal .account-action-item {
    margin-bottom: 0;
}

#account-modal .account-action-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

#account-modal .account-action-item p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

#account-modal .account-action-item.danger {
    padding: 1rem;
    background: #fff5f5;
    border-radius: 10px;
    border: 1px solid #ffcdd2;
}

/* Mobile responsive for live mode */
@media (max-width: 992px) {
    .live-mode-container {
        margin: 0.5rem;
        padding: 0.75rem;
    }
}

/* Schedule inputs (opening/closing hours) */
.schedule-inputs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.schedule-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.75rem;
    border-radius: 10px;
}

.schedule-row>i {
    color: var(--primary);
    font-size: 1rem;
}

.schedule-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.schedule-field label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-field input[type="time"] {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
    font-family: var(--font-main);
    color: var(--text-main);
    background: white;
    width: 100px;
    transition: var(--transition);
}

.schedule-field input[type="time"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.schedule-separator {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.schedule-help {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

/* GPS Precision Indicator */
.gps-precision-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.gps-precision-badge.high {
    background: #e8f5e9;
    color: #2e7d32;
}

.gps-precision-badge.medium {
    background: #fff3e0;
    color: #ef6c00;
}

.gps-precision-badge.low {
    background: #ffebee;
    color: #c62828;
}

/* Profile Photo Upload Section */
.profile-photo-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fff5f2, #fff9f7);
    border: 2px dashed var(--primary);
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.profile-photo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    background: #f0f0f0;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.profile-photo-wrapper:hover {
    transform: scale(1.05);
}

.profile-photo-wrapper:hover .profile-photo-overlay {
    opacity: 1;
}

.profile-photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FF651C, #FF9800);
    color: white;
    font-size: 2rem;
}

.profile-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-photo-info {
    flex: 1;
}

.profile-photo-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.profile-photo-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.btn-upload-selfie-small {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-upload-selfie-small:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

@media (max-width: 480px) {
    .profile-photo-section {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .profile-photo-wrapper {
        width: 80px;
        height: 80px;
    }
}

/* ============================================
   3-WAY LOCATION SELECTOR SYSTEM
   ============================================ */

/* Location Method Tabs */
.location-method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.location-tab {
    flex: 1;
    min-width: 100px;
    padding: 0.6rem 0.75rem;
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.location-tab i {
    font-size: 0.9rem;
}

.location-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #FFF3E0;
}

.location-tab.active {
    background: linear-gradient(135deg, #FF651C, #FF9800);
    color: white;
    border-color: transparent;
}

.location-tab.active i {
    color: white;
}

/* Location Panels */
.location-panel {
    background: var(--bg-body);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.5rem;
}

/* GPS Detect Button */
.btn-detect-gps {
    background: linear-gradient(135deg, #1976D2, #42A5F5);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-detect-gps:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.btn-detect-gps:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Address Autocomplete Input */
.address-autocomplete-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition);
}

.address-autocomplete-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

/* Selected Location Display */
.selected-location-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #E8F5E9;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: #2E7D32;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .location-method-tabs {
        flex-direction: column;
    }

    .location-tab {
        min-width: auto;
    }
}

/* ============================================
   SCHEDULE INPUTS - Vertical Layout
   ============================================ */

.schedule-inputs {
    margin-top: 1rem;
}

.schedule-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
}

.schedule-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedule-field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.schedule-field input[type="time"] {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-main);
    width: 100%;
    transition: var(--transition);
}

.schedule-field input[type="time"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.1);
}

.schedule-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}