/* Responsive Adjustments for FrontStore E-Commerce */

/* General Responsive Adjustments */
@media (max-width: 1199.98px) {
    /* Large devices (desktops, less than 1200px) */
}

@media (max-width: 991.98px) {
    /* Medium devices (tablets, less than 992px) */
    
    /* Adjust product cards to show 2 per row */
    .featured-products .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Dashboard sidebar adjustments */
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        min-height: auto;
        position: static;
    }
    
    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767.98px) {
    /* Small devices (landscape phones, less than 768px) */
    
    /* Navigation adjustments */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    /* Hero section adjustments */
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .lead {
        font-size: 1rem;
    }
    
    /* Product cards full width on mobile */
    .featured-products .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Checkout page adjustments */
    .checkout .col-lg-8, 
    .checkout .col-lg-4 {
        order: 1;
    }
    
    .checkout .col-lg-4 {
        margin-bottom: 2rem;
    }
    
    /* Cart table adjustments */
    .table-responsive {
        border: 0;
    }
    
    .table-responsive table {
        width: 100%;
    }
    
    .table-responsive thead {
        display: none;
    }
    
    .table-responsive tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }
    
    .table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem;
        text-align: right;
        border-bottom: 1px solid #dee2e6;
    }
    
    .table-responsive td::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: auto;
        padding-right: 1rem;
        text-align: left;
    }
    
    /* Dashboard adjustments */
    .dashboard .card {
        margin-bottom: 1rem;
    }
    
    /* Contact page adjustments */
    .contact .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
}

@media (max-width: 575.98px) {
    /* Extra small devices (portrait phones, less than 576px) */
    
    /* Typography adjustments */
    h1, h2, h3 {
        font-size: 1.5rem;
    }
    
    /* Navigation adjustments */
    .navbar-collapse {
        padding-top: 1rem;
    }
    
    /* Hero section adjustments */
    .hero h1 {
        font-size: 1.75rem;
    }
    
    /* Button adjustments */
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Forms adjustments */
    .form-control, .form-select {
        font-size: 0.9rem;
    }
    
    /* Card adjustments */
    .card-body {
        padding: 1rem;
    }
    
    /* Auth pages adjustments */
    .auth-form .card-body {
        padding: 1.5rem;
    }
    
    /* Footer adjustments */
    footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

/* Specific Component Adjustments */

/* Product cards on mobile */
@media (max-width: 767.98px) {
    .product-card .card-img-top {
        height: 150px;
    }
    
    .product-card .card-body {
        padding: 1rem;
    }
    
    .product-card .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Dashboard sidebar toggle */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        z-index: 1000;
        left: -250px;
        top: 0;
        bottom: 0;
        transition: left 0.3s ease;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    #sidebarToggle {
        display: block !important;
    }
}

/* Checkout form adjustments */
@media (max-width: 767.98px) {
    .checkout-form .row > div {
        margin-bottom: 1rem;
    }
    
    .checkout-form .form-group {
        margin-bottom: 1rem;
    }
}

/* Cart page adjustments */
@media (max-width: 767.98px) {
    .cart-table td[data-label="Product"] {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-table .input-group {
        width: 100%;
    }
    
    .cart-summary {
        margin-top: 2rem;
    }
}

/* Product details page adjustments */
@media (max-width: 767.98px) {
    .product-details .row > div:first-child {
        margin-bottom: 1.5rem;
    }
    
    .product-thumbnails {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Footer adjustments */
@media (max-width: 767.98px) {
    footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    footer .text-center {
        text-align: center !important;
    }
}

/* Modal adjustments */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem auto;
    }
    
    .modal-content {
        border-radius: 0;
    }
}

/* Utility classes for responsive adjustments */
@media (max-width: 767.98px) {
    .mobile-stack {
        flex-direction: column !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-mt-2 {
        margin-top: 0.5rem !important;
    }
    
    .mobile-mb-3 {
        margin-bottom: 1rem !important;
    }
}

/* Print styles */
@media print {
    .navbar, footer, .no-print {
        display: none !important;
    }
    
    body {
        padding: 0;
        background: white;
        color: black;
    }
    
    .container {
        width: auto;
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        border: none;
        box-shadow: none;
    }
    
    a[href]::after {
        content: none !important;
    }
}