/* Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Move Header/Nav to Footer */
    header {
        position: fixed;
        top: auto;
        bottom: 0;
        background-color: #fff;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
        padding: 0;
        z-index: 1000;
    }

    nav {
        padding: 0.5rem 1rem;
    }

    .nav-left {
        width: 100%;
        justify-content: space-around;
        gap: 0;
    }

    .nav-item {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem;
        font-size: 0.75rem;
        align-items: center;
    }

    .nav-item i {
        font-size: 1.5rem;
    }

    .nav-item span {
        font-size: 0.7rem;
    }

    /* Hide the desktop search container on mobile */
    .nav-right {
        display: none;
    }

    /* Mobile Search Icon (display only, no functionality) */
    .mobile-search-icon {
        position: fixed;
        top: 15px;
        left: 15px;
        background: rgba(206, 205, 205, 0.9);
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        z-index: 1002;
    }

    .mobile-search-icon i {
        color: #666;
        font-size: 1.1rem;
    }

    /* Mobile Search Bar */
    .mobile-search-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 15px;
        z-index: 1001;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .mobile-search-container.active {
        transform: translateY(0);
    }

    .mobile-search-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-search-input {
        flex: 1;
        padding: 12px 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        font-size: 16px;
        background-color: #f8f9fa;
        outline: none;
    }

    .mobile-search-close {
        background: #f0f0f0;
        border: none;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #666;
    }

    /* Mobile Search Results */
    .mobile-search-results {
        position: static;
        margin-top: 10px;
        border-radius: 8px;
        max-height: 250px;
        overflow-y: auto;
    }

    .mobile-search-results .search-result-item {
        padding: 10px 12px;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-search-results .search-result-image {
        width: 35px;
        height: 35px;
    }

    .mobile-search-results .search-result-name {
        font-size: 13px;
    }

    .mobile-search-results .search-result-price {
        font-size: 12px;
    }

    /* Adjust Main Content */
    main {
        margin-top: 0; /* Remove space for search bar */
        margin-bottom: 70px; /* Space for bottom nav */
        padding: 0rem;
       
    }

    /* Main content adjustment when mobile search is active */
    main.search-active {
        margin-top: 70px;
    }

    /* Mobile Store Info Layout */
    .store-info {
        background: #fff;
        margin: 0rem;
        border-radius: 12px;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0 !important;
    }

    .store-profile {
        flex-direction: column;
        gap: 0;
        position: relative;
    }

    /* Card wrapper for mobile */
    .card {
        background: #fff;
        border-radius: 12px;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 0.5rem;
        overflow: hidden;
    }

    /* Banner First on Mobile */
    .banner-section {
        order: -1;
        margin: 0;
        border-radius: 0;
        overflow: hidden;
    }

    .banner-section img {
        width: 100%;
        height: 200px;
        object-fit: fill;
        border-radius: 0;
    }

    /* Store Details Section */
    .store-details {
        width: 100%;
        padding: 1rem;
        text-align: left;
    }

    .store-header {
        display: block;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.5rem;
        position: relative;
        z-index: 5;
        gap: 10px;
    }

    .store-header h1 {
        font-size: 20px;
        font-weight: 600;
        margin-left: 0;
        margin-left: 75px;
        
    }

    .share-button {
        background: rgba(206, 205, 205, 0.9);
        border: none;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: -295px;
        right: 15px;
        z-index: 10;
        backdrop-filter: blur(10px);
    }

    .share-button i {
        color: #666;
        font-size: 1rem;
    }

    /* Ensure proper spacing and layout */
    .store-details {
        position: relative;
        z-index: 5;
    }

    /* Make sure elements don't overlap */
    .banner-section {
        position: relative;
        z-index: 1;
    }

    /* Mobile Links Section */
    .links-section {
        width: 100%;
        margin: 0;
        padding: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
        margin-bottom: 1rem;
        gap: 8px;
    }

    .links-scroll-container {
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .links-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .link-content {
        background: #ffffff;
        border: 1px solid #3d7eb4;
        border-radius: 8px;
        min-width: 70px;
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .link-content div {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        justify-content: center;
        color: #ff5722;
        font-weight: 500;
        font-size: 0.7rem;
    }

    .link-content i {
        font-size: 1rem;
    }

    .link-content span {
        font-size: 0.6rem;
        line-height: 1;
        text-align: center;
    }

    .links-section .link-btn {
        background: #ffffff;
        border: 1px solid #007bff;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #007bff;
        cursor: pointer;
        flex-shrink: 0;
    }

    /* Mobile Contact Section */
    .contact-section {
        width: 100%;
        padding: 1rem;
        background: #fff;
        border-radius: 12px;
        margin: 0.5rem 0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .contact-us-btn {
        width: 100%;
        background: #ff5722;
        color: white;
        border: none;
        border-radius: 8px;
        padding: 0.8rem;
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        margin-bottom: 1rem;
    }

    .powered-by {
        text-align: center;
    }

    .powered-by img {
        max-width: 120px;
        height: auto;
    }

    /* Mobile Offers Section */
    .offers-section {
        margin: 0.5rem;
        padding: 0;
    }

    .offer-card {
        width: 100%;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        display: block;
        align-items: center;
        gap: 1rem;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .offer-card:hover {
        transform: translateY(-2px);
    }

    .offer-icon {
        background: #ff5722;
        color: white;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        font-weight: bold;
    }

    .offer-content h3 {
        color: #333;
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.3rem;
    }

    .offer-content p {
        color: #666;
        font-size: 0.85rem;
        margin: 0;
    }

    /* Product Section Mobile Styles */
    .products-section {
        margin-top: 0px;
        background: #fff;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        padding: 0;
        color: #333;
        font-weight: 600;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0;
    }

    .product-card {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: transform 0.2s ease;
    }

    .product-card:hover {
        transform: translateY(-2px);
    }

    .product-image {
        height: 120px;
        overflow: hidden;
    }

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .product-info {
        padding: 0.75rem;
    }

    .product-info h3 {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        color: #333;
        font-weight: 500;
    }

    .product-price {
        font-size: 1rem;
        font-weight: 600;
        color: #ff5722;
        margin-bottom: 0.5rem;
    }

    .buy-now-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
        width: 100%;
        background: #ff5722;
        color: white;
        border: none;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        cursor: pointer;
        font-weight: 500;
        transition: background-color 0.2s ease;
    }

    .buy-now-btn:hover {
        background: #e64a19;
    }

    /* View More Button Mobile Styles */
    .view-more-container {
        margin: 1rem 0 0 0;
        text-align: center;
    }

    .view-more-btn {
        background: #ff5722;
        color: white;
        border: none;
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 500;
        transition: background-color 0.2s ease;
    }

    .view-more-btn:hover {
        background: #e64a19;
    }

    /* Gallery Mobile Styles */
    .gallery-section {
        margin: 0.5rem;
        background: #fff;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .gallery-container {
        padding: 0;
    }

    .gallery-scroll {
        gap: 0.75rem;
        padding: 0 0.5rem;
    }

    .gallery-item {
        flex: 0 0 200px;
        height: 140px;
        border-radius: 8px;
        overflow: hidden;
    }

    .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .play-button {
        width: 40px;
        height: 40px;
        background: rgba(255, 0, 0, 0.8);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .play-button i {
        font-size: 1.2rem;
        color: white;
    }

    .scroll-btn {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #666;
    }

    /* Updates Section Mobile Styles */
    .updates-section {
        margin: 0.5rem;
        background: #fff;
        border-radius: 12px;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .updates-container {
        position: relative;
    }

    .updates-scroll {
        padding: 0 0.5rem;
    }

    .blog-card {
        min-width: 250px;
        max-width: 250px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        margin-right: 0.75rem;
    }

    .blog-content {
        padding: 1rem;
    }

    .blog-content h3 {
        font-size: 1rem;
        color: #333;
        font-weight: 500;
        line-height: 1.3;
    }

    .updates-container .scroll-btn {
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #ddd;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #666;
    }

    .lightbox-content {
        width: 95%;
        max-height: 80vh;
    }

    .close-lightbox {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }

    /* Contact Section Mobile Styles */
    .contact-section-form {
        padding: 1rem;
    }

    .contact-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-left,
    .contact-right {
        width: 100%;
    }

    .map-container {
        min-height: 150px;
    }

    .address-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .directions-btn {
        width: 100%;
        justify-content: center;
    }

    .contact-type-toggle {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on mobile */
    }

    .submit-btn {
        padding: 1rem;
        font-size: 1rem;
        width: 100%;
    }

    .store-details .location {
        color: #666;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        font-weight: 500;
    }

    .store-details .description {
        color: #666;
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .verification-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .verification-badges .badge {
        background: #e8f5e8;
        border-radius: 15px;
        padding: 0.3rem 0.7rem;
        font-size: 0.75rem;
        color: #4CAF50;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    .verification-badges .badge i {
        font-size: 0.8rem;
    }

    /* Mobile search icon hover effect */
    .mobile-search-icon:hover {
        background: rgba(255, 255, 255, 1);
        transform: scale(1.05);
    }

    /* Mobile Top Bar */
    .mobile-top-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        border-bottom: 1px solid #e0e0e0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 16px;
        height: 48px;
        z-index: 1003;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .mobile-home-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #333;
        text-decoration: none;
        font-size: 14px;
        font-weight: 500;
        padding: 6px 8px;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    .mobile-home-btn:hover {
        background-color: #f5f5f5;
    }

    .mobile-home-btn i {
        font-size: 12px;
    }

    .mobile-message-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        background-color: #25D366;
        color: white;
        text-decoration: none;
        font-size: 13px;
        font-weight: 500;
        padding: 8px 14px;
        border-radius: 20px;
        transition: background-color 0.2s ease;
    }

    .mobile-message-btn:hover {
        background-color: #22c55e;
    }

    .mobile-message-btn i {
        font-size: 12px;
    }

    /* Hide on desktop */
    .mobile-top-bar {
        display: flex;
    }

    /* Adjust main content to account for fixed top bar */
    main {
        margin-top: 0px;
    }
}

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    .nav-item i {
        font-size: 1.3rem;
    }

    .nav-item span {
        font-size: 0.65rem;
    }
}

/* Links Popup Mobile Styles */
@media (max-width: 768px) {
    .popup-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 85vh;
    }

    .links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .link-item {
        padding: 10px;
    }

    .close-popup {
        top: 10px;
        right: 10px;
    }
}

/* Hide mobile search elements on desktop */
.mobile-search-icon,
.mobile-search-container {
    display: none;
}

@media screen and (max-width: 768px) {
    /* Show mobile search elements only on mobile */
    .mobile-search-icon,
    .mobile-search-container {
        display: flex;
    }

    .mobile-search-container {
        display: block;
    }
    footer
    {
        display:none;
        bottom: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
        padding: 0.5rem 1rem;
        z-index: 1000;
    }
}
