@media only screen and (max-width: 768px) {
    .section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    .social-icon-widget {
        display: none;
    }

    footer {
        padding-bottom: 75px;
    }

    .mobile-bottom-bar {
        display: block;
        position: fixed;
        bottom: -3px;
        left: -1px;
        width: calc(100% + 2px);
        z-index: 1000;
    }

    .mobile-bottom-bar>.bottom-bar {
        width: calc(50% + 1px);
        display: inline-block;
        text-align: center;
        height: 100%;
        margin: -2px;
        padding: 0.75rem 0;
        border-radius: 0;
        border: solid black 1px;
    }

    .mobile-bottom-bar>.bottom-bar.btn-bottom-login {
        background-color: white;
    }

    .mobile-bottom-bar>.bottom-bar.btn-bottom-login:hover {
        background-color: black;
    }

    .mobile-bottom-bar>.bottom-bar.btn-bottom-login:hover > i, 
    .mobile-bottom-bar>.bottom-bar.btn-bottom-login:hover {
        color: white;
    }

    .mobile-bottom-bar>.bottom-bar.btn-bottom-register {
        background-color: black;
    }

    .mobile-bottom-bar>.bottom-bar.btn-bottom-register > i, 
    .mobile-bottom-bar>.bottom-bar.btn-bottom-register {
        color: white;
    }
    
    .mobile-bottom-bar>.bottom-bar.btn-bottom-register:hover {
        background-color: white;
    }

    .mobile-bottom-bar>.bottom-bar.btn-bottom-register:hover > i, 
    .mobile-bottom-bar>.bottom-bar.btn-bottom-register:hover {
        color: black;
    }

    /* Orders page mobile improvements */
    .member-section {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .order-img {
        width: 100%;
    }
    
    .card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile navigation tabs */
    .navbar-nav .nav-link {
        padding: 0;
        border-radius: 8px;
        margin-bottom: 0.25rem;
        transition: all 0.2s ease;
        border: 1px solid transparent;
    }
    
    .navbar-nav .nav-item.active .nav-link {
        background-color: #026AA2;
        color: white !important;
        border-color: #026AA2;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: #f8fafc;
        border-color: #e2e8f0;
    }
    
    /* Product options mobile styling */
    .product-options p {
        font-size: 0.875rem;
        line-height: 1.25;
        margin-bottom: 0.25rem;
    }
    
    /* Compact installment progress on mobile */
    .progress {
        height: 6px;
        border-radius: 3px;
    }
    
    /* Shipping info mobile optimization */
    .bg-light.p-3 {
        padding: 0.75rem !important;
    }
    
    /* Modal mobile improvements */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .modal-title {
        font-size: 1.1rem;
        font-weight: 600;
    }
    
    /* Rating stars mobile touch optimization */
    .rating-stars .rating-star {
        padding: 0.25rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .rating-stars .rating-star:hover {
        transform: scale(1.1);
    }
    
    /* Better badge spacing on mobile */
    .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .btn-mobile-home {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 52px;
        width: 52px;
    }

    .button-login {
        display: inline-flex;
        width: calc(100% - 114px);
    }

    .btn-notification {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 52px;
        width: 52px;
    }
    
    /* Action buttons mobile optimization */
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        font-weight: 500;
    }
    
    .btn-main {
        background: linear-gradient(135deg, #026AA2 0%, #0284c7 100%);
        border: none;
        box-shadow: 0 2px 4px rgba(2, 106, 162, 0.2);
    }
    
    .btn-main:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(2, 106, 162, 0.3);
    }
    
    /* Responsive text sizing */
    h1, .h1 {
        font-size: 1.5rem;
    }
    
    h5, .h5 {
        font-size: 1.1rem;
    }
    
    h6, .h6 {
        font-size: 1rem;
    }
    
    /* Alert mobile styling */
    .alert {
        padding: 0.75rem;
        border-radius: 8px;
        font-size: 0.875rem;
    }
    
    /* Form control mobile improvements */
    .form-control, .form-select {
        padding: 0.75rem;
        border-radius: 8px;
        border: 1px solid #d1d5db;
        font-size: 1rem;
    }
    
    .form-control:focus, .form-select:focus {
        border-color: #026AA2;
        box-shadow: 0 0 0 3px rgba(2, 106, 162, 0.1);
    }
    
    /* Textarea mobile optimization */
    textarea.form-control {
        resize: vertical;
        min-height: 100px;
    }
    
    /* Image preview mobile styling */
    #image_preview img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 6px;
    }
    
    /* Member sidebar mobile improvements */
    .profile-image {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .accordion-body {
        padding: 0.5rem 1rem 1rem;
    }
    
    .accordion-body ul li {
        padding: 0.5rem 0;
    }
    
    /* Hide/show elements based on screen size */
    .d-mobile-none {
        display: none !important;
    }
    
    .d-mobile-block {
        display: block !important;
    }
    
    .d-mobile-flex {
        display: flex !important;
    }
    
    /* Touch-friendly button states */
    .btn-touch-active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    /* Modal mobile-specific styling */
    .mobile-modal .modal-dialog {
        margin: 0;
        height: 100vh;
        max-height: none;
        display: flex;
        flex-direction: column;
    }
    
    .mobile-modal .modal-content {
        height: 100%;
        border-radius: 0;
        border: none;
    }
    
    .mobile-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Prevent body scroll when modal is open on mobile */
    body.modal-open-mobile {
        position: fixed;
        width: 100%;
        overflow: hidden;
    }
    
    /* Better form input spacing on mobile */
    .form-group:not(:last-child) {
        margin-bottom: 1rem;
    }
    
    /* Improved select dropdown on mobile */
    .form-select {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 0.75rem center;
        background-size: 16px 12px;
        padding-right: 2.5rem;
    }
    
    /* Better checkbox and radio styling */
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.125rem;
    }
    
    .form-check-label {
        padding-left: 0.5rem;
        font-size: 0.95rem;
    }
    
    /* Sticky header for modals on mobile */
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 1;
        background: white;
        border-bottom: 1px solid #e2e8f0;
    }
    
    /* Sticky footer for modals on mobile */
    .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 1;
        background: white;
        border-top: 1px solid #e2e8f0;
    }
    
    /* Better spacing for status badges */
    .badge {
        white-space: nowrap;
        font-weight: 500;
    }
    
    /* Improved shipping info display */
    .shipping-info-mobile {
        background: #f8fafc;
        border-radius: 8px;
        padding: 0.75rem;
        border-left: 4px solid #026AA2;
    }
    
    /* Better payment progress styling */
    .payment-progress-mobile {
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        border-radius: 8px;
        padding: 0.75rem;
        border: 1px solid #bae6fd;
    }
    
    /* Improved product options display */
    .product-options-mobile {
        background: #fafafa;
        border-radius: 6px;
        padding: 0.5rem;
        border: 1px solid #e5e7eb;
        margin-top: 0.5rem;
    }
    
    /* Better file input styling */
    .form-control[type="file"] {
        padding: 0.5rem;
        border: 2px dashed #d1d5db;
        background: #f9fafb;
        border-radius: 8px;
    }
    
    .form-control[type="file"]:focus {
        border-color: #026AA2;
        background: #f0f9ff;
    }
    
    /* Image preview grid */
    #image_preview {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    /* Loading states */
    .btn.loading {
        position: relative;
        color: transparent;
    }
    
    .btn.loading::after {
        content: "";
        position: absolute;
        width: 16px;
        height: 16px;
        top: 50%;
        left: 50%;
        margin-left: -8px;
        margin-top: -8px;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }
    
    /* Better focus states for accessibility */
    .btn:focus,
    .form-control:focus,
    .form-select:focus {
        outline: 2px solid #026AA2;
        outline-offset: 2px;
    }
    
    /* Smooth transitions */
    * {
        transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    }
    
    /* Reduce motion for users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        * {
            transition: none !important;
            animation: none !important;
        }
    }
}