/* Custom Styles for Mini Market Catalog */

/* General */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

/* Prevent horizontal overflow */
.container {
    max-width: 100%;
}

/* Header */
header nav a:hover {
    text-decoration: underline !important;
}

/* Categories */
#categories-list .card {
    cursor: pointer;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#categories-list .card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

#categories-list .card:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Active category card highlight */
#categories-list .card.border-primary {
    border-width: 2px !important;
}

/* Products */
.product-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* WhatsApp Floating Button */
#whatsapp-button-container .whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 44px;
    min-height: 44px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#whatsapp-button-container .whatsapp-float:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
}

/* Map */
#map-container {
    min-width: 300px;
    min-height: 200px;
}

#map-container iframe {
    width: 100%;
    min-width: 300px;
    min-height: 200px;
    border: 0;
}

#map-container .map-error {
    min-width: 300px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    color: #6c757d;
    font-style: italic;
}

/* Contact Form */
#contact-form .form-control {
    min-height: 44px;
}

#contact-form button[type="submit"] {
    min-width: 44px;
    min-height: 44px;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    padding: 1rem;
    text-align: center;
    border: 1px solid #f5c6cb;
    border-radius: 0.375rem;
    background-color: #f8d7da;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    /* Ensure minimum touch target size on mobile */
    .btn,
    a.nav-link,
    .card,
    .whatsapp-btn {
        min-height: 44px;
        min-width: 44px;
    }

    header nav a {
        padding: 10px;
        display: inline-block;
        min-width: 44px;
        min-height: 44px;
    }

    /* Product WhatsApp buttons on mobile */
    .product-card .btn-sm {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
