/**
 * Responsive Stylesheet for SS Infotech E-Commerce Website
 * Mobile-First Responsive Design - ENHANCED POST-HOSTING VERSION
 * Breakpoints: 320px, 375px, 425px, 768px, 1024px, 1440px
 * Last Updated: December 10, 2025
 */

/* ========================================
   GLOBAL RESPONSIVE FIXES
======================================== */

/* Prevent horizontal scroll on all devices */
html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

* {
    box-sizing: border-box;
}


/* ========================================
   NOTE: Header and Navigation styles have been moved to header-menu.css
   for better organization and consistency across all pages.
======================================== */


/* ========================================
   SMALL MOBILE (320px - 374px)
======================================== */
@media (max-width: 374px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.875rem;
    }

    .logo-img {
        height: 30px;
    }

    .brand-name {
        font-size: 1rem;
    }
}

/* ========================================
   MOBILE (375px - 424px)
======================================== */
@media (min-width: 375px) and (max-width: 424px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

/* ========================================
   LARGE MOBILE (425px - 767px)
======================================== */
@media (min-width: 425px) and (max-width: 767px) {
    .main-content {
        padding: var(--spacing-xl) 0;
    }
}

/* ========================================
   TABLET (768px - 1023px)
======================================== */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 720px;
    }

    .navbar-brand .logo-img {
        height: 45px;
    }

    .brand-name {
        font-size: 1.375rem;
    }

    .main-content {
        padding: var(--spacing-2xl) 0;
    }
}

/* ========================================
   DESKTOP (1024px - 1439px)
======================================== */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container {
        max-width: 960px;
    }

    .logo-img {
        height: 50px;
    }
}

/* ========================================
   LARGE DESKTOP (1440px+)
======================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }

    .logo-img {
        height: 60px;
    }
}

/* ========================================
   FOOTER RESPONSIVE - ENHANCED
======================================== */

/* Mobile Footer - Optimized */
@media (max-width: 767px) {
    .main-footer {
        padding-top: 2.5rem !important;
        padding-bottom: 1.5rem !important;
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }

    .main-footer .row {
        text-align: center;
    }

    .footer-heading {
        font-size: 1.125rem;
        font-weight: 700;
        color: #ffffff !important;
        margin-bottom: 1rem;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links,
    .footer-contact {
        margin-bottom: 1.5rem;
    }

    .footer-links a {
        color: #cbd5e1 !important;
        font-size: 0.9375rem;
        transition: all 0.3s ease;
    }

    .footer-links a:hover {
        color: #0A47A3 !important;
        transform: translateX(5px);
    }

    .footer-contact li {
        justify-content: center;
        color: #cbd5e1 !important;
        font-size: 0.9375rem;
    }

    .footer-contact a {
        color: #cbd5e1 !important;
    }

    .footer-contact a:hover {
        color: #0A47A3 !important;
    }

    .footer-contact i {
        color: #0A47A3 !important;
    }

    .social-links {
        justify-content: center;
        margin-bottom: 1.5rem;
        gap: 1rem;
    }

    .social-link {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: #ffffff !important;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }

    .social-link:hover {
        background: #0A47A3;
        color: #ffffff !important;
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.4);
    }

    .footer-copyright,
    .footer-developer {
        text-align: center !important;
        margin-bottom: 0.75rem;
        color: #94a3b8 !important;
        font-size: 0.875rem;
    }

    .footer-developer strong {
        color: #0A47A3 !important;
        font-weight: 700;
        background: linear-gradient(135deg, #0A47A3, #1E90FF);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .footer-logo {
        height: 38px;
        filter: brightness(0) invert(1);
    }

    .footer-text {
        color: #cbd5e1 !important;
        font-size: 0.9375rem;
        line-height: 1.6;
    }
}

/* Tablet Footer - Optimized */
@media (min-width: 768px) and (max-width: 1023px) {
    .main-footer {
        padding-top: 3rem !important;
        padding-bottom: 1.5rem !important;
    }

    .footer-heading {
        font-size: 1.25rem;
        font-weight: 700;
        color: #ffffff !important;
    }

    .footer-links a,
    .footer-contact li,
    .footer-contact a {
        color: #cbd5e1 !important;
    }

    .footer-links a:hover,
    .footer-contact a:hover {
        color: #0A47A3 !important;
    }

    .footer-contact i {
        color: #0A47A3 !important;
    }

    .social-link {
        width: 42px;
        height: 42px;
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff !important;
    }

    .social-link:hover {
        background: #0A47A3;
        transform: translateY(-3px);
    }

    .footer-copyright,
    .footer-developer {
        color: #94a3b8 !important;
        font-size: 0.875rem;
    }

    .footer-developer strong {
        color: #0A47A3 !important;
        font-weight: 700;
    }
}

/* Desktop Footer - Optimized */
@media (min-width: 1024px) {
    .main-footer {
        padding-top: 3.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .footer-heading {
        font-size: 1.375rem;
        font-weight: 700;
        color: #ffffff !important;
    }

    .footer-links a {
        color: #cbd5e1 !important;
        font-size: 1rem;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
    }

    .footer-links a:hover {
        color: #0A47A3 !important;
        transform: translateX(5px);
    }

    .footer-contact li {
        color: #cbd5e1 !important;
        font-size: 1rem;
    }

    .footer-contact a {
        color: #cbd5e1 !important;
    }

    .footer-contact a:hover {
        color: #0A47A3 !important;
    }

    .footer-contact i {
        color: #0A47A3 !important;
        font-size: 1.125rem;
    }

    .social-link {
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff !important;
        font-size: 1.125rem;
    }

    .social-link:hover {
        background: #0A47A3;
        color: #ffffff !important;
        transform: translateY(-3px);
        box-shadow: 0 8px 16px rgba(0, 174, 239, 0.4);
    }

    .footer-copyright {
        color: #94a3b8 !important;
        font-size: 0.9375rem;
    }

    .footer-developer {
        color: #94a3b8 !important;
        font-size: 0.9375rem;
    }

    .footer-developer strong {
        color: #0A47A3 !important;
        font-weight: 800;
        background: linear-gradient(135deg, #0A47A3, #1E90FF);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-size: 1rem;
    }

    .footer-text {
        color: #cbd5e1 !important;
        font-size: 1rem;
        line-height: 1.8;
    }

    .footer-logo {
        height: 42px;
    }
}


/* ========================================
   GRID & LAYOUT RESPONSIVE
======================================== */

/* Product Grid */
.product-grid,
.category-grid {
    display: grid;
    gap: var(--spacing-lg);
}

/* Mobile: 1 column */
@media (max-width: 479px) {

    .product-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile: 2 columns */
@media (min-width: 480px) and (max-width: 767px) {

    .product-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

/* Tablet: 3 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   IMAGES RESPONSIVE
======================================== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.product-image,
.category-image,
.banner-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-md);
}

/* ========================================
   TYPOGRAPHY RESPONSIVE - ENHANCED
======================================== */

/* Mobile Typography - Enhanced Readability */
@media (max-width: 767px) {
    h1 {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
        color: #1e293b;
        font-weight: 800;
    }

    h2 {
        font-size: clamp(1.5rem, 4vw, 2rem);
        color: #1e293b;
        font-weight: 700;
    }

    h3 {
        font-size: clamp(1.25rem, 3vw, 1.75rem);
        color: #1e293b;
        font-weight: 700;
    }

    h4 {
        font-size: clamp(1.125rem, 2.5vw, 1.5rem);
        color: #1e293b;
        font-weight: 600;
    }

    h5 {
        font-size: clamp(1rem, 2vw, 1.25rem);
        color: #1e293b;
        font-weight: 600;
    }

    h6 {
        font-size: clamp(0.875rem, 1.5vw, 1.125rem);
        color: #1e293b;
        font-weight: 600;
    }

    p {
        font-size: 0.9375rem;
        line-height: 1.6;
        color: #475569;
    }

    /* Dark sections typography */
    .dark-section h1,
    .dark-section h2,
    .dark-section h3,
    .dark-section h4,
    .dark-section h5,
    .dark-section h6,
    .main-footer h1,
    .main-footer h2,
    .main-footer h3,
    .main-footer h4,
    .main-footer h5,
    .main-footer h6 {
        color: #ffffff !important;
    }

    .dark-section p,
    .main-footer p {
        color: #cbd5e1 !important;
    }
}

/* Tablet & Desktop Typography */
@media (min-width: 768px) {

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: #1e293b;
    }

    p {
        color: #475569;
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Dark sections */
    .dark-section h1,
    .dark-section h2,
    .dark-section h3,
    .dark-section h4,
    .dark-section h5,
    .dark-section h6,
    .main-footer h1,
    .main-footer h2,
    .main-footer h3,
    .main-footer h4,
    .main-footer h5,
    .main-footer h6 {
        color: #ffffff !important;
    }

    .dark-section p,
    .main-footer p {
        color: #cbd5e1 !important;
    }
}


/* ========================================
   BUTTONS RESPONSIVE - ENHANCED
======================================== */
@media (max-width: 767px) {
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
        font-weight: 600;
        min-height: 44px;
        min-width: 44px;
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-height: 40px;
    }

    .btn-primary {
        background: linear-gradient(135deg, #0A47A3, #1E90FF);
        color: #ffffff;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 174, 239, 0.3);
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 174, 239, 0.4);
        color: #ffffff;
    }

    .btn-outline-primary {
        border: 2px solid #0A47A3;
        color: #0A47A3;
        background: transparent;
    }

    .btn-outline-primary:hover {
        background: #0A47A3;
        color: #ffffff;
    }
}

@media (min-width: 768px) {
    .btn {
        min-height: 44px;
        transition: all 0.3s ease;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
    }
}


/* ========================================
   CARDS RESPONSIVE
======================================== */
@media (max-width: 767px) {
    .card {
        padding: var(--spacing-md);
    }

    .card-title {
        font-size: 1.125rem;
    }
}

/* ========================================
   FORMS RESPONSIVE
======================================== */
@media (max-width: 767px) {

    .form-control,
    .form-select {
        padding: var(--spacing-sm);
        font-size: 0.9375rem;
    }

    .form-label {
        font-size: 0.9375rem;
    }
}

/* ========================================
   BACK TO TOP BUTTON RESPONSIVE
======================================== */
@media (max-width: 767px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ========================================
   SPACING UTILITIES RESPONSIVE
======================================== */
@media (max-width: 767px) {
    .main-content {
        padding: var(--spacing-lg) 0;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }
}

@media (min-width: 768px) {
    .section {
        padding: var(--spacing-2xl) 0;
    }
}

/* ========================================
   OVERFLOW & SCROLL FIXES
======================================== */
body {
    overflow-x: hidden;
}

.container {
    overflow-x: hidden;
}

/* Prevent horizontal scroll on all devices */
* {
    max-width: 100%;
}

/* ========================================
   TOUCH TARGETS (Mobile Accessibility)
======================================== */
@media (max-width: 767px) {

    /* Ensure all clickable elements are at least 44x44px */
    .btn,
    .nav-link,
    .social-link,
    .back-to-top {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {

    .main-header,
    .main-footer,
    .back-to-top,
    .navbar-toggler {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .main-content {
        padding: 0;
    }
}

/* ========================================
   HIGH CONTRAST MODE
======================================== */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #ffffff;
        --text-secondary: #e0e0e0;
        --primary-color: #00d4ff;
    }

    .btn,
    .card,
    .form-control {
        border: 2px solid currentColor;
    }
}

/* ========================================
   REDUCED MOTION
======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION - ENHANCED
======================================== */
@media (max-width: 767px) and (orientation: landscape) {

    /* Reduce header height for landscape mode */
    .main-header .navbar {
        padding: 0.5rem 0;
    }

    .logo-img {
        height: 30px;
    }

    .brand-name {
        font-size: 1rem;
    }

    /* Optimize content spacing */
    .main-content {
        padding: var(--spacing-md) 0;
    }

    /* Reduce section padding */
    .section {
        padding: 1.5rem 0;
    }

    /* Optimize hero sections */
    .hero-modern {
        min-height: auto;
        padding: 2rem 0;
    }

    /* Reduce heading sizes */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Optimize button sizes */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Reduce modal heights */
    .modal-dialog {
        max-height: 90vh;
    }

    /* Optimize form spacing */
    .form-group {
        margin-bottom: 0.75rem;
    }
}

/* Landscape mode for larger phones */
@media (min-width: 568px) and (max-width: 767px) and (orientation: landscape) {
    .main-header .navbar {
        padding: 0.75rem 0;
    }

    .logo-img {
        height: 35px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Landscape mode for tablets */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
    .section {
        padding: 2.5rem 0;
    }
}

/* ========================================
   POST-HOSTING ENHANCEMENTS
======================================== */

/* Link Colors - Enhanced Visibility */
a {
    color: #0A47A3;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #0096d1;
    text-decoration: none;
}

/* Card Enhancements */
.card {
    background: #ffffff;
    border: 1px solid rgba(0, 174, 239, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: #0A47A3;
    box-shadow: 0 8px 24px rgba(0, 174, 239, 0.15);
}

/* Form Elements - Better Visibility */
.form-control,
.form-select {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.form-control:focus,
.form-select:focus {
    background: #ffffff;
    border-color: #0A47A3;
    box-shadow: 0 0 0 0.25rem rgba(0, 174, 239, 0.25);
    color: #1e293b;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-label {
    color: #1e293b;
    font-weight: 600;
}

/* Dark Section Form Elements */
.dark-section .form-control,
.dark-section .form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.dark-section .form-control:focus,
.dark-section .form-select:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #0A47A3;
    color: #ffffff;
}

.dark-section .form-control::placeholder {
    color: #94a3b8;
}

.dark-section .form-label {
    color: #ffffff;
}

/* Mobile-Specific Enhancements */
@media (max-width: 767px) {

    /* Better spacing on mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Improved section spacing */
    .section {
        padding: 2rem 0;
    }

    /* Better card spacing */
    .card {
        margin-bottom: 1.5rem;
    }

    /* Optimized images */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Tablet-Specific Enhancements */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .section {
        padding: 3rem 0;
    }
}

/* Desktop-Specific Enhancements */
@media (min-width: 1024px) {
    .section {
        padding: 4rem 0;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
======================================== */

/* Focus States */
*:focus {
    outline: 2px solid #0A47A3;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0A47A3;
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0A47A3;
    color: #ffffff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-to-content:focus {
    top: 0;
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
======================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Hardware Acceleration */
.navbar,
.btn,
.card,
.social-link {
    will-change: transform;
    transform: translateZ(0);
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   FINAL FIXES
======================================== */

/* Ensure no horizontal scroll */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .footer,
    .back-to-top,
    .social-links {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }
}