/* Mobile-specific fixes for the Govind Ayurveda website */

/* Fix navbar and dropdown display on mobile */
@media (max-width: 991.98px) {
    /* Improve spacing in navbar toggle */
    .navbar-toggler {
        margin-right: 0.5rem;
        padding: 0.25rem 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        background-color: rgba(255, 255, 255, 0.1);
        position: relative;
        z-index: 1051;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
        outline: none;
    }
    
    .navbar-toggler:not(.collapsed) {
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
    
    /* Ensure navbar collapse works properly */
    .navbar-collapse {
        background-color: rgba(25, 135, 84, 0.95);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 0.375rem;
    }
    
    /* Override any conflicting display styles for navbar collapse */
    .navbar-collapse:not(.show) {
        display: none !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-collapse.collapsing {
        display: block !important;
    }
    
    /* Fix dropdown menu behavior on mobile */
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: rgba(25, 135, 84, 0.1);
        padding-left: 1.5rem;
        margin-top: 0.5rem;
        width: 100%;
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
    }
    
    /* Show dropdown menu when parent is active/expanded */
    .navbar-nav .nav-item.dropdown.show > .dropdown-menu {
        display: block;
    }
    
    /* Add visual indication for active dropdown */
    .nav-item.dropdown.show {
        background-color: rgba(25, 135, 84, 0.05);
    }
    
    /* Improve nav link styling on mobile */
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 0.25rem;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 0.375rem;
    }
    
    /* Improve dropdown item styling */
    .dropdown-item {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.9);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: white;
    }

    /* Improve active highlight on mobile */
    .dropdown-item.active {
        background-color: var(--bs-success) !important;
        color: white !important;
    }
    
    /* Give some spacing between menu items */
    .nav-item:not(:last-child) {
        border-bottom: 1px solid rgba(25, 135, 84, 0.1);
    }
}

/* Ensure buttons are easily tappable on mobile */
@media (max-width: 767.98px) {
    .btn {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Mobile polish for featured product cards */
@media (max-width: 575.98px) {
    .product-card {
        border-radius: 12px;
        box-shadow: 0 2px 12px 0 rgba(60, 72, 88, 0.10);
        margin-bottom: 1.2rem;
        padding: 0;
    }
    .product-card .product-img {
        height: 180px !important;
        min-height: 140px;
        max-height: 200px;
        border-radius: 12px 12px 0 0;
        object-fit: cover;
        margin-bottom: 0.5rem;
    }
    .product-card .card-body {
        padding: 0.7rem 0.6rem 0.5rem 0.6rem !important;
    }
    .product-card .card-title {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }
    .product-card .price {
        font-size: 1rem;
        padding: 0.18em 0.6em;
        margin-bottom: 0.5em;
    }
    .product-card .btn-success,
    .product-card .btn-link {
        display: block;
        width: 100%;
        margin-bottom: 0.4rem;
        font-size: 1rem;
        padding: 0.6em 0;
    }
    .product-card .btn-link {
        text-align: center;
        font-size: 0.97rem;
    }
    .product-card .card-footer {
        padding: 0.5rem 0.6rem 0.7rem 0.6rem;
    }
}
