/* Additional Responsive Fixes for Deenar Trading Website */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .row > [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Product Grid Mobile */
    .product-card {
        margin-bottom: 15px;
    }
    
    .product-image-container {
        height: 160px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-info h4 {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .product-info p {
        font-size: 11px;
        line-height: 1.3;
        margin-bottom: 8px;
    }
    
    .whatsapp-btn {
        padding: 4px 8px;
        font-size: 10px;
        bottom: 10px;
    }
    
    /* Section Headers */
    .section-head h2 {
        font-size: 18px !important;
        margin-bottom: 15px;
    }
    
    .section-head p {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    /* Slider Mobile */
    .main-slider .tp-banner-container {
        height: 300px !important;
    }
    
    .tp-caption {
        font-size: 16px !important;
        line-height: 1.2 !important;
        padding: 0 5px !important;
    }
    
    /* Navigation Mobile */
    .navbar-toggle {
        padding: 6px 8px;
        margin: 15px 10px 15px 0;
    }
    
    .navbar-toggle .icon-bar {
        width: 18px;
        height: 2px;
    }
    
    /* Footer Mobile */
    .footer-top {
        padding: 30px 0;
    }
    
    .footer-top .col-lg-3,
    .footer-top .col-md-6 {
        margin-bottom: 20px;
    }
    
    .widget-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Form Mobile */
    .form-control {
        font-size: 12px;
        padding: 6px 10px;
        height: 35px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .product-image-container {
        height: 200px;
    }
    
    .col-sm-12 {
        width: 100%;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .product-image-container {
        height: 220px;
    }
    
    .col-md-6 {
        width: 50%;
        float: left;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .product-image-container {
        height: 240px;
    }
}

/* Landscape Orientation Fixes */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .main-slider .tp-banner-container {
        height: 250px !important;
    }
    
    .tp-caption {
        font-size: 14px !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-header img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .header-nav,
    .footer-dark,
    #whatsapp-icon,
    .scroltop {
        display: none !important;
    }
    
    .main-slider {
        height: 200px !important;
    }
    
    .product-card {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .product-card {
        background: #2a2a2a;
        color: #fff;
    }
    
    .product-info h4 {
        color: #4CAF50 !important;
    }
    
    .product-info p {
        color: #ccc;
    }
}

/* Focus Improvements for Accessibility */
.whatsapp-btn:focus,
.site-button:focus,
.navbar-toggle:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Touch Device Improvements */
@media (pointer: coarse) {
    .whatsapp-btn,
    .site-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .navbar-toggle {
        min-height: 44px;
        min-width: 44px;
    }
}