/* Mobile rounded top */
@media (max-width: 991.98px) {
    .mobile-rounded-top {
        border-top-left-radius: 1rem !important;
        border-top-right-radius: 1rem !important;
    }
    .mobile-rounded-bottom {
        border-bottom-left-radius: 1rem !important;
        border-bottom-right-radius: 1rem !important;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .get-in-touch-section h4 {
        font-size: 2.5rem !important;
    }

    .footer-section h3 {
        font-size: 1.75rem !important;
    }

    .social-icons a {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.25rem !important;
    }
}

@media (max-width: 576px) {
    .get-in-touch-section h4 {
        font-size: 2rem !important;
    }

    .get-in-touch-section .btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }

    .footer-section h5 {
        font-size: 1.25rem !important;
    }

    .footer-section h3 {
        font-size: 1.5rem !important;
    }
}

/* Improve touch targets on mobile */
@media (max-width: 768px) {
    .footer-section .list-unstyled li {
        margin-bottom: 1rem !important;
    }

    .footer-section .list-unstyled a {
        padding: 0.5rem 0;
    }
}

/* Ensure text doesn't overflow */
.text-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .gallery-item {
        height: 250px;
    }
}
        
@media (max-width: 576px) {
    .gallery-item {
        height: 200px;
    }
}
        
@media (min-width: 992px) {
    .min-height-lg-300px {
        min-height: 600px;
    }
}

@media (max-width: 768px) {
    .product-grid-title {
        font-size: 2rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .category-sidebar {
        margin-bottom: 30px;
    }
}

/* Product Card Mobile Responsiveness */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 20px;
    }
    
    .product-image {
        height: 180px;
        padding: 15px;
    }
    
    .product-image img {
        max-height: 150px;
        max-width: 80%;
        object-fit: contain;
    }
    
    .product-content {
        padding: 15px;
    }
    
    .product-content span {
        font-size: 0.95rem;
    }
    
    .product-content a i {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 576px) {
    .product-image {
        height: 160px;
        padding: 12px;
    }
    
    .product-image img {
        max-height: 130px;
        max-width: 75%;
    }
    
    .product-content {
        padding: 12px;
    }
    
    .product-content span {
        font-size: 0.9rem;
    }
    
    .product-content a span {
        font-size: 9px !important;
    }
    
    .product-grid-title {
        font-size: 1.75rem;
    }
    
    /* Adjust grid spacing for mobile */
    .product-category-content .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1.5rem;
    }
}

/* Ensure product cards have equal height in mobile */
@media (max-width: 768px) {
    .product-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    
    .product-image {
        flex-shrink: 0;
    }
    
    .product-content {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }
    
    .product-content > div {
        margin-top: auto;
    }
}

/* Adjust product grid columns for mobile */
@media (max-width: 767.98px) {
    .product-category-content .col-md-6 {
        flex: 0 0 auto;
        width: 100%;
    }
}

@media (max-width: 991.98px) and (min-width: 768px) {
    .product-category-content .col-md-6 {
        flex: 0 0 auto;
        width: 50%;
    }
}

/* Responsive styles for right-aligned search bar */
@media (max-width: 767.98px) {
    .search-container-right {
        width: 100%;
    }
    
    .search-container-right .input-group {
        max-width: 100% !important;
    }
    
    .product-grid-title {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 576px) {
    .search-container-right .form-control {
        height: 44px;
        padding: 10px 14px;
        font-size: 0.9rem;
    }
    
    .search-container-right .btn-warning {
        height: 44px;
        padding: 0 16px;
        font-size: 0.9rem;
    }
    
    .category-tags .badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Ensure proper spacing on mobile */
@media (max-width: 767.98px) {
    .product-grid-header .d-flex {
        gap: 1rem;
    }
}

/* Custom Accordion Responsive */
@media (max-width: 768px) {
    .custom-accordion .accordion-button {
        padding: 10px 0 !important;
        font-size: 0.95rem;
    }
    
    .custom-accordion .accordion-custom-icon {
        font-size: 11px;
    }
    
    .custom-accordion .accordion-body ul li a {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .square-button.fixed-square {
        height: 100px;
    }
}

@media (max-width: 576px) {
    .square-button.fixed-square {
        height: 80px;
    }
}

/* Responsive adjustments for square buttons */
@media (max-width: 768px) {
    .square-button i {
        font-size: 1.75rem;
    }
    
    .square-button span {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .square-button {
        aspect-ratio: 16/9; /* Make them rectangular on very small screens */
        padding: 0.75rem !important;
    }
    
    .square-button i {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .square-button span {
        font-size: 0.8rem;
    }
}


