/* Mobile Responsive CSS - Logo Color Theme */
/* Ensures all pages are mobile-friendly with consistent green color scheme */

/* Import Balaji Theme Colors */
@import url('balaji-theme.css');

/* Mobile-First Approach */
@media (max-width: 768px) {
    /* Global Mobile Styles */
    * {
        box-sizing: border-box;
    }
    
    html, body {
        width: 100%;
        overflow-x: hidden;
        font-size: 14px;
        line-height: 1.5;
    }
    
    .container {
        padding: 0 12px;
        max-width: 100%;
    }
    
    /* Typography Mobile */
    h1 { font-size: 24px; font-weight: 700; color: var(--balaji-text-dark); }
    h2 { font-size: 20px; font-weight: 600; color: var(--balaji-text-dark); }
    h3 { font-size: 18px; font-weight: 600; color: var(--balaji-text-dark); }
    h4 { font-size: 16px; font-weight: 500; color: var(--balaji-text-dark); }
    h5 { font-size: 14px; font-weight: 500; color: var(--balaji-text-dark); }
    h6 { font-size: 12px; font-weight: 500; color: var(--balaji-text-dark); }
    
    p { font-size: 14px; line-height: 1.6; color: var(--balaji-text-medium); }
    
    /* Button Mobile Styles */
    .btn {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 6px;
        font-weight: 600;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 44px; /* Touch-friendly */
    }
    
    .btn-primary {
        background: linear-gradient(135deg, var(--balaji-primary) 0%, var(--balaji-accent) 100%);
        color: white;
        border: none;
        box-shadow: 0 3px 10px rgba(46, 139, 87, 0.3);
    }
    
    .btn-primary:hover, .btn-primary:active {
        background: linear-gradient(135deg, var(--balaji-secondary) 0%, var(--balaji-primary) 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4);
    }
    
    .btn-secondary {
        background: transparent;
        color: var(--balaji-primary);
        border: 2px solid var(--balaji-primary);
    }
    
    .btn-secondary:hover, .btn-secondary:active {
        background: var(--balaji-primary);
        color: white;
    }
    
    /* Order Now Button - Primary CTA */
    .btn-order-now {
        width: 100%;
        padding: 12px 16px;
        background: linear-gradient(135deg, var(--balaji-primary) 0%, var(--balaji-accent) 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 48px;
    }
    
    .btn-order-now:hover, .btn-order-now:active {
        background: linear-gradient(135deg, var(--balaji-secondary) 0%, var(--balaji-primary) 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(46, 139, 87, 0.4);
    }
    
    .btn-order-now i {
        font-size: 16px;
    }
    
    /* WhatsApp Button */
    .btn-whatsapp {
        background: #25D366;
        color: white;
        border: none;
    }
    
    .btn-whatsapp:hover, .btn-whatsapp:active {
        background: #128C7E;
        color: white;
    }
    
    /* Card Styles Mobile */
    .card, .product-card, .brand-card {
        background: white;
        border: 1px solid var(--balaji-border);
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(46, 139, 87, 0.1);
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    .card:hover, .product-card:hover, .brand-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 20px rgba(46, 139, 87, 0.2);
        border-color: var(--balaji-primary);
    }
    
    /* Form Styles Mobile */
    .form-control, input, select, textarea {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid var(--balaji-border);
        border-radius: 8px;
        font-size: 14px;
        transition: all 0.3s ease;
        min-height: 44px; /* Touch-friendly */
    }
    
    .form-control:focus, input:focus, select:focus, textarea:focus {
        border-color: var(--balaji-primary);
        outline: none;
        box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
    }
    
    /* Grid Systems Mobile */
    .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
    
    /* Spacing Mobile */
    .section { padding: 25px 0; }
    .section-sm { padding: 15px 0; }
    .section-lg { padding: 40px 0; }
    
    .mb-1 { margin-bottom: 5px; }
    .mb-2 { margin-bottom: 10px; }
    .mb-3 { margin-bottom: 15px; }
    .mb-4 { margin-bottom: 20px; }
    .mb-5 { margin-bottom: 25px; }
    
    .mt-1 { margin-top: 5px; }
    .mt-2 { margin-top: 10px; }
    .mt-3 { margin-top: 15px; }
    .mt-4 { margin-top: 20px; }
    .mt-5 { margin-top: 25px; }
    
    .p-1 { padding: 5px; }
    .p-2 { padding: 10px; }
    .p-3 { padding: 15px; }
    .p-4 { padding: 20px; }
    .p-5 { padding: 25px; }
    
    /* Text Utilities Mobile */
    .text-center { text-align: center; }
    .text-left { text-align: left; }
    .text-right { text-align: right; }
    
    .text-primary { color: var(--balaji-primary); }
    .text-secondary { color: var(--balaji-secondary); }
    .text-success { color: var(--balaji-success); }
    .text-muted { color: var(--balaji-text-medium); }
    
    .bg-primary { background-color: var(--balaji-primary); color: white; }
    .bg-secondary { background-color: var(--balaji-secondary); color: white; }
    .bg-light { background-color: var(--balaji-lighter); }
    .bg-white { background-color: white; }
    
    /* Display Utilities Mobile */
    .d-block { display: block; }
    .d-inline { display: inline; }
    .d-inline-block { display: inline-block; }
    .d-flex { display: flex; }
    .d-grid { display: grid; }
    .d-none { display: none; }
    
    .flex-column { flex-direction: column; }
    .flex-row { flex-direction: row; }
    .justify-center { justify-content: center; }
    .justify-between { justify-content: space-between; }
    .align-center { align-items: center; }
    .align-start { align-items: flex-start; }
    .align-end { align-items: flex-end; }
    
    /* Border Utilities Mobile */
    .border { border: 1px solid var(--balaji-border); }
    .border-primary { border-color: var(--balaji-primary); }
    .border-radius { border-radius: 8px; }
    .border-radius-sm { border-radius: 4px; }
    .border-radius-lg { border-radius: 12px; }
    
    /* Shadow Utilities Mobile */
    .shadow-sm { box-shadow: 0 1px 3px rgba(46, 139, 87, 0.1); }
    .shadow { box-shadow: 0 2px 8px rgba(46, 139, 87, 0.15); }
    .shadow-lg { box-shadow: 0 4px 20px rgba(46, 139, 87, 0.2); }
    
    /* Animation Utilities Mobile */
    .fade-in {
        animation: fadeIn 0.5s ease-in-out;
    }
    
    .slide-up {
        animation: slideUp 0.5s ease-out;
    }
    
    .scale-hover:hover {
        transform: scale(1.02);
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    @keyframes slideUp {
        from { transform: translateY(20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    
    /* Touch-Friendly Interactions */
    .touch-target {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Loading States */
    .loading {
        position: relative;
        pointer-events: none;
    }
    
    .loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 20px;
        height: 20px;
        margin: -10px 0 0 -10px;
        border: 2px solid var(--balaji-border);
        border-top-color: var(--balaji-primary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    /* Error States */
    .error {
        color: #dc3545;
        border-color: #dc3545;
    }
    
    .success {
        color: var(--balaji-success);
        border-color: var(--balaji-success);
    }
    
    /* Modal Mobile Styles */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .modal-content {
        background: white;
        border-radius: 12px;
        padding: 20px;
        max-width: 90%;
        max-height: 90%;
        overflow-y: auto;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--balaji-border);
    }
    
    .modal-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--balaji-text-dark);
    }
    
    .modal-close {
        background: none;
        border: none;
        font-size: 24px;
        color: var(--balaji-text-medium);
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Notification Styles */
    .notification {
        position: fixed;
        top: 20px;
        right: 20px;
        background: white;
        border: 1px solid var(--balaji-border);
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        z-index: 10000;
        max-width: 300px;
        animation: slideInRight 0.3s ease-out;
    }
    
    .notification.success {
        border-left: 4px solid var(--balaji-success);
    }
    
    .notification.error {
        border-left: 4px solid #dc3545;
    }
    
    .notification.info {
        border-left: 4px solid var(--balaji-primary);
    }
    
    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    h1 { font-size: 20px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 40px;
    }
    
    .section { padding: 20px 0; }
    .section-lg { padding: 30px 0; }
    
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .notification {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .section { padding: 15px 0; }
    .section-lg { padding: 25px 0; }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 85%;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo .site-logo,
    .brand-logo,
    .product-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --balaji-text-dark: #e0e0e0;
        --balaji-text-medium: #b0b0b0;
        --balaji-bg-light: #1a1a1a;
        --balaji-border: #333333;
    }
    
    body {
        background-color: #121212;
        color: var(--balaji-text-dark);
    }
    
    .card, .product-card, .brand-card {
        background: #1e1e1e;
        border-color: var(--balaji-border);
    }
    
    .modal-content {
        background: #1e1e1e;
        color: var(--balaji-text-dark);
    }
}

/* Print Styles */
@media print {
    .top-bar,
    .mobile-menu-toggle,
    .btn-order-now,
    .btn-whatsapp,
    .modal,
    .notification {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Mobile Order Now Button - Logo Green Colors */
@media (max-width: 768px) {
    .btn-order-now,
    button[onclick*="orderNow"],
    .order-now-btn,
    .btn-whatsapp-order {
        background: linear-gradient(135deg, #2E8B57 0%, #32CD32 100%) !important;
        color: white !important;
        border: none !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.6px !important;
        box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4) !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        min-height: 44px !important;
        width: 100% !important;
        margin: 8px 0 !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    .btn-order-now:hover,
    .btn-order-now:active,
    .btn-order-now:focus,
    button[onclick*="orderNow"]:hover,
    button[onclick*="orderNow"]:active,
    .order-now-btn:hover,
    .order-now-btn:active {
        background: linear-gradient(135deg, #228B22 0%, #2E8B57 100%) !important;
        transform: translateY(-2px) scale(1.02) !important;
        box-shadow: 0 6px 20px rgba(46, 139, 87, 0.6) !important;
        color: white !important;
    }
    
    /* Remove any orange/red backgrounds */
    .btn-order-now:not(.btn-whatsapp-order) {
        background: linear-gradient(135deg, #2E8B57 0%, #32CD32 100%) !important;
    }
    
    /* Ensure WhatsApp buttons stay green too for consistency */
    .btn-whatsapp-order {
        background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    }
    
    .btn-whatsapp-order:hover,
    .btn-whatsapp-order:active {
        background: linear-gradient(135deg, #128C7E 0%, #0D6B5C 100%) !important;
    }
}

/* Force override any existing orange/red button styles */
@media (max-width: 480px) {
    .product-card .btn-order-now,
    .product-card-compact .btn-order-now,
    .product-card-premium .btn-order-now {
        background: linear-gradient(135deg, #2E8B57 0%, #32CD32 100%) !important;
        color: white !important;
        border: none !important;
        margin: 8px !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        box-shadow: 0 4px 15px rgba(46, 139, 87, 0.4) !important;
    }
    
    .product-card .btn-order-now:hover,
    .product-card-compact .btn-order-now:hover,
    .product-card-premium .btn-order-now:hover {
        background: linear-gradient(135deg, #228B22 0%, #2E8B57 100%) !important;
        transform: translateY(-2px) scale(1.02) !important;
        box-shadow: 0 6px 20px rgba(46, 139, 87, 0.6) !important;
    }
}
/* Contact Info Mobile - Remove Background and Border */
@media (max-width: 768px) {
    .contact-info {
        background: none !important;
        background-color: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 15px 0 !important;
        box-shadow: none !important;
    }
    
    .footer-col .contact-info {
        background: none !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .contact-info li {
        background: none !important;
        border: none !important;
        padding: 8px 0 !important;
    }
    
    .contact-info li i {
        background: rgba(50, 205, 50, 0.2) !important;
        border: none !important;
    }
}

@media (max-width: 480px) {
    .contact-info {
        background: none !important;
        background-color: transparent !important;
        border: none !important;
        padding: 10px 0 !important;
        margin: 0 !important;
    }
    
    .contact-info li {
        background: none !important;
        border: none !important;
        padding: 6px 0 !important;
        margin-bottom: 10px !important;
    }
}