/* ==============================================
   EXTRA LARGE SCREENS (1400px+)
   ============================================== */
@media (min-width: 1400px) {
  .monthly_top_filter2 {
    margin-bottom: 20px;
  }

  /* 404 PAGE */
  #wsus__404 {
    margin: 25px 0 105px 0;
  }

  .wsus__404_text h2 {
    font-size: 100px;
  }

  .wsus__404_text h4 {
    font-size: 25px;
  }

  /* DASHBOARD */
  .dashboard_content .wsus__invoice_description .name {
    width: 40%;
  }

  .dashboard_content .wsus__invoice_description .total {
    width: 15%;
  }

  .wsus__dash_add_single {
    margin-bottom: 30px;
  }

  .add_address_btn {
    margin-top: 0;
  }
}

/* ==============================================
   LARGE SCREENS (1200px - 1399px)
   ============================================== */
@media (min-width: 1200px) and (max-width: 1399.99px) {

  /* HEADER */
  .wsus__icon_area li {
    margin-left: 5px;
  }

  .wsus__call {
    font-size: 30px;
    padding-top: 6px;
  }

  .wsus__call_text a {
    font-size: 14px;
  }

  /* MONTHLY TOP */
  .wsus__monthly_top_left {
    width: 60%;
  }

  .wsus__monthly_top_item .wsus__monthly_top_left:last-child {
    width: 40%;
  }

  .wsus__monthly_top_banner_img {
    height: 92%;
  }

  .monthly_top_filter button:last-child,
  .monthly_top_filter2 {
    margin-bottom: 20px;
  }

  /* HOT DEALS */
  .wsus__hot_deals_text {
    padding: 15px 0 5px 15px;
  }

  .wsus__hot_deals_proce {
    margin: 10px 0 5px 0;
  }

  .grid .wsus__hot_deals__single_img {
    width: 30%;
  }

  .grid .wsus__hot_deals__single_text {
    width: 70%;
  }

  .wsus__hot_deals__single_text {
    margin-top: 0;
  }

  .wsus__hot_deals__single_text h5,
  .wsus__hot_deals__single_text .wsus__tk {
    font-size: 14px;
  }

  /* SERVICES */
  .wsus__home_services_single {
    padding: 25px;
  }

  .wsus__home_services_single h5 {
    font-size: 15px;
  }

  /* BLOG */
  .wsus__blog_img {
    height: 230px;
  }

  /* PRODUCT DETAILS */
  .wsus_pro_hot_deals h5 {
    font-size: 18px;
  }

  .wsus_pro_det_sidebar_single i {
    font-size: 20px;
  }

  .wsus_pro_det_sidebar {
    padding: 10px;
  }

  .wsus__pro_det_vendor_text p span {
    width: 18%;
    font-size: 14px;
  }

  .wsus__pro_det_vendor_text p {
    font-size: 14px;
  }

  .wsus__pro_det_vendor_text .rating {
    margin: 5px 0 15px 0;
  }

  /* DASHBOARD */
  .dashboard_sidebar {
    width: 22%;
  }

  .wsus__message_img {
    width: 13%;
  }

  .wsus__dashboard_item i {
    font-size: 40px;
    margin-bottom: 10px;
  }

  .wsus__dashboard_item p {
    font-size: 14px;
  }

  .dashboard_content .wsus__invoice_description .name {
    width: 45%;
  }

  .dashboard_content .wsus__invoice_description .amount,
  .dashboard_content .wsus__invoice_description .quentity,
  .dashboard_content .wsus__invoice_description .total {
    width: 117px;
  }

  .dashboard_content .wsus__invoice_area {
    padding: 20px;
  }

  .wsus__dash_rev_text h5 {
    font-size: 16px;
  }

  .wsus__dash_rev_text h5 span {
    font-size: 13px;
  }

  #wsus__dashboard .wsus__pro_img {
    width: 120px;
  }

  #wsus__dashboard .wsus__pro_status {
    width: 140px;
  }

  #wsus__dashboard .wsus__pro_tk {
    width: 100px;
  }

  #wsus__dashboard .wsus__pro_name {
    width: 280px;
  }

  .wsus__dash_add_single {
    margin-bottom: 30px;
  }

  .add_address_btn {
    margin-top: 0;
  }

  .wsus__dash_add_single ul li span {
    width: 35%;
  }

  .wsus__chatlist .wsus_chat_list_text {
    width: 172px;
  }

  .wsus__chat_single {
    width: 100%;
  }

  .wsus__chat_single_text {
    width: 72%;
  }

  .wsus__hot_deals_text .wsus__hot_title {
    font-size: 19px;
  }

  .wsus__dashboard_order .package {
    width: 120px;
  }

  .wsus__dashboard_order .price {
    width: 100px;
  }

  .wsus__dashboard_order .status {
    width: 100px;
  }

  .wsus__dashboard_order table thead tr th,
  .wsus__dashboard_order table tr td {
    font-size: 14px;
  }

  .wsus__dashboard_order .status a {
    font-size: 14px;
  }
}

/* ==============================================
   DESKTOP SCREENS (1200px+) - CONSOLIDATED
   ============================================== */
@media (min-width: 1200px) {

  /* Hide mobile menu button on desktop */
  .mobile-menu-btn {
    display: none;
  }

  /* Dashboard Layout */
  #wsus__dashboard .col-12.col-lg-9.ms-lg-auto {
    width: 85%;
    margin-left: 15% !important;
  }

  #wsus__dashboard .dashboard_content {
    padding: 1.5rem;
    max-width: none;
  }

  #wsus__dashboard .card.border-0.shadow-sm.mb-4 {
    width: 100%;
    max-width: none;
  }

  #wsus__dashboard .row.g-2.mb-4>.col-6.col-md-3 {
    flex: 1 1 0;
    min-width: 180px;
  }

  /* Order Table */
  .order-header,
  .order-table-wrapper {
    width: 100%;
    max-width: none;
  }

  /* Dashboard Sidebar */
  .dashboard-sidebar {
    transform: translateX(0);
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
    width: 280px;
  }

  /* Hide mobile toggle on desktop */
  #mobileMenuToggle {
    display: none !important;
  }

  /* Ensure content is properly aligned */
  .dashboard-content {
    margin-left: 280px !important;
    width: calc(100% - 280px) !important;
  }

  /* Newsletter */
  #newsletter {
    flex-direction: row;
    max-width: 500px;
  }

  .newsletter_email {
    padding-right: 140px;
  }

  #newsletter .subscribe_btn {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: auto;
    padding: 0 25px;
  }

  /* Mega Menu */
  .mega-menu {
    width: 940px;
  }
}

/* ==============================================
   DESKTOP SCREENS (992px+)
   ============================================== */
@media (min-width: 992px) {

  /* Dashboard Sidebar */
  #dashboardSidebar {
    transform: translateX(0);
    transition: none;
  }

  .sidebar-overlay {
    display: none !important;
  }
}

/* ==============================================
   TABLET TO DESKTOP TRANSITION (791px - 991px)
   ============================================== */
@media (min-width: 791px) and (max-width: 991px) {

  /* Hide mobile menu button */
  .mobile-menu-btn {
    display: none;
  }

  /* Keep desktop menu layout but adjust for smaller screens */
  .nav-menu {
    display: flex;
    flex-direction: row;
    position: static;
    background: transparent;
    width: auto;
    height: auto;
    overflow: visible;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }

  .nav-link {
    display: block;
    padding: 15px 10px;
    text-decoration: none;
    color: #333;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
  }

  /* Remove bottom padding from nav items to eliminate gap */
  .nav-item {
    position: static;
    padding-bottom: 0;
  }

  /* Adjust mega menu for this range */
  .mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 800px;
    background: #fff;
    display: flex;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transition-delay: 0.2s;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    border-top: 3px solid #e18e96;
    padding: 15px 0;
    justify-content: center;
    border-bottom: 1px solid #e5e5e5;
    pointer-events: none;
  }

  /* Show mega menu on hover */
  .nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: flex;
    transition-delay: 0s;
  }

  .mega-menu:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    display: flex;
    transition-delay: 0s;
  }

  .mega-menu * {
    pointer-events: auto;
  }

  .mega-menu-link {
    pointer-events: auto;
    z-index: 1001;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
  }

  .mega-menu-link:hover {
    color: #000;
  }

  .mega-menu-column ul li a {
    pointer-events: auto;
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.3s ease;
  }

  .mega-menu-column ul li a:hover {
    color: #000;
  }

  .mega-menu-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    padding: 0 10px;
    margin: 0 auto;
    max-width: 800px;
  }

  .mega-menu-column {
    flex: 1;
    padding: 10px;
    position: relative;
  }
}

/* ==============================================
   TABLET SCREENS (768px - 991px)
   ============================================== */
@media (min-width: 768px) and (max-width: 991.98px) {

  /* Dashboard Layout */
  #wsus__dashboard .dashboard_content {
    max-width: 100%;
  }

  #wsus__dashboard .card.border-0.shadow-sm {
    max-width: 100%;
  }

  #wsus__dashboard .row.g-2.mb-4>.col-6.col-md-3 {
    flex: 0 0 auto;
  }

  /* Order Table */
  .order-table-wrapper {
    max-width: 100%;
  }

  .order-header {
    max-width: 100%;
  }

  /* Print Button */
  #wsus__dashboard .print_invoice {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
  }

  #wsus__dashboard .print_invoice i {
    font-size: 0.8rem;
  }

  /* Hot Deals */
  .wsus__hot_deals_text {
    padding-right: 5px;
  }
}

/* ==============================================
   MOBILE SCREENS (max-width: 991px) - CONSOLIDATED
   ============================================== */
@media (max-width: 991.98px) {

  /* Dashboard Sidebar */
  .dashboard_sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    z-index: 1050;
    transition: left 0.3s ease;
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .dashboard_sidebar.show {
    left: 0;
  }

  /* Dashboard Content */
  .dashboard_content {
    padding: 1rem;
  }

  /* Order Table */
  .order-table-wrapper .dataTables_wrapper {
    overflow-x: auto;
  }

  .order-table-wrapper table {
    min-width: 600px;
  }

  .wsus__cart_list .wsus__pro_name {
    width: 220px;
  }

  .wsus__cart_list .wsus__pro_img {
    width: 100px;
  }

  /* Mobile Dashboard Sidebar */
  #dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  #dashboard-sidebar.show {
    transform: translateX(0);
  }

  .dashboard-sidebar {
    transform: translateX(-100%) !important;
    width: 280px !important;
  }

  .dashboard-sidebar.show {
    transform: translateX(0) !important;
    width: 280px !important;
  }

  #mobileMenuToggle {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    left: 20px !important;
  }

  /* Ensure content is not hidden behind sidebar */
  .dashboard-content {
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Main Content Layout */
  .main-content {
    flex-direction: column;
    height: auto;
  }

  .left-column,
  .right-column {
    padding: 0;
    width: 100%;
    height: auto;
  }

  .left-column {
    margin-bottom: 0px;
  }

  .left-column .category {
    height: 500px;
  }

  .right-column .category {
    height: 300px;
  }

  .category-label {
    font-size: 24px;
  }

  /* RTL Support */
  html[dir="rtl"] .mega-menu {
    text-align: right !important;
  }
}

/* ==============================================
   MOBILE SCREENS (max-width: 790px)
   ============================================== */
@media (max-width: 790px) {

  /* Mega Menu Mobile Adjustments */
  .mega-menu {
    position: static !important;
    transform: none !important;
    width: 60% !important;
    margin: 0 auto !important;
    box-shadow: none !important;
  }

  /* Hide desktop site title */
  .site_title {
    display: none !important;
  }

  /* Show mobile site title */
  .mobile-site-title {
    display: block !important;
  }

  /* Container Adjustments */
  .nav-container {
    justify-content: space-between;
    padding: 0 15px;
  }

  /* Mobile Navigation Panel - styles moved to menu.css */

  /* Mobile menu header */
  .nav-menu.active .mobile-menu-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #e18e96 0%, #d17780 100%);
    color: white;
    margin-bottom: 0;
    list-style: none;
  }

  .mobile-menu-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
  }

  .mobile-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
  }

  .mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* Mobile Navigation Links */
  .nav-menu.active .nav-link {
    display: block;
    padding: 12px 5px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    letter-spacing: 0.5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: none;
    /* Disable transitions on mobile */
    position: relative;
    border-bottom: 1px solid #e0e0e0;
  }

  /* Remove desktop hover effects on mobile */
  .nav-menu.active .nav-link::after {
    display: none !important;
  }

  /* Disable hover effects completely on mobile menu */
  .nav-menu.active .nav-link:hover {
    color: #333;
    /* Keep original color, no hover effect */
  }

  /* Prevent any hover effects on mobile menu items */
  .nav-menu.active .nav-item {
    pointer-events: auto;
  }

  .nav-menu.active .nav-item:hover {
    background: none;
  }

  /* Completely disable desktop hover effects on mobile */
  .nav-item:hover .mega-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
  }

  /* Prevent hover effects on mobile menu items */
  .nav-menu.active .nav-item:hover .mega-menu {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
  }

  /* Only show mega menu when explicitly activated by click */
  .nav-menu.active .nav-item.active .mega-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* Mobile Mega Menu - Hidden by default */
  .mega-menu {
    display: none;
    position: static;
    width: 100%;
    background: #f8f9fa;
    padding: 0;
    margin: 5px 0;
    border-left: 3px solid #e18e96;
  }

  /* Show mega menu when nav-item is active */
  .nav-menu.active .nav-item.active .mega-menu {
    display: block;
  }

  .mega-menu-container {
    display: block;
    padding: 10px;
  }

  .mega-menu-column {
    padding: 10px;
    margin-bottom: 5px;
    background: #ffffff;
    border-bottom: 1px solid #e8e8e8;
  }

  .mega-menu-column:last-child {
    border-bottom: none;
  }

  .mega-menu-title {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333;
  }

  .mega-menu-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 8px 20px 8px 0;
    position: relative;
    display: block;
  }

  .mega-menu-subtitle::after {
    content: '▼';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #999;
    transition: transform 0.3s ease;
  }

  .mega-menu-subtitle:hover {
    color: #e18e96;
  }

  .mega-menu-column.expanded .mega-menu-subtitle {
    color: #e18e96;
    font-weight: 700;
  }

  .mega-menu-column.expanded .mega-menu-subtitle::after {
    transform: translateY(-50%) rotate(180deg);
  }

  /* Hide subcategory lists by default */
  .mega-menu-list {
    display: none;
    margin-top: 8px;
    padding-left: 15px;
  }

  /* Show subcategory lists when column is expanded */
  .mega-menu-column.expanded .mega-menu-list {
    display: block;
  }

  .mega-menu-item {
    margin: 4px 0;
    list-style: none;
  }

  .mega-menu-link {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 0;
    display: block;
    transition: color 0.2s ease;
  }

  .mega-menu-link:hover {
    color: #e18e96;
    padding-left: 5px;
  }

  /* View All links */
  .mega-menu-column .mega-menu-link:not(.mega-menu-item .mega-menu-link) {
    display: none;
  }

  .mega-menu-column.active .mega-menu-link:not(.mega-menu-item .mega-menu-link) {
    display: block;
    margin-top: 8px;
    font-weight: 600;
    color: #e18e96;
    border-top: 1px solid #e8e8e8;
    padding-top: 8px;
  }

  .menu-image {
    width: 50%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    margin-top: 10px;
  }

  /* Mobile Menu Button - styles moved to menu.css */

  /* Hide mobile menu button when menu is active - JavaScript will set inline style */
  .mega-menu-column:not(:last-child)::after {
    display: none;
  }

  /* RTL Mobile Menu Button - position on right side */
  [dir="rtl"] .mobile-menu-btn {
    position: absolute;
    right: 15px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  [dir="rtl"] .mobile-site-title {
    text-align: center;
    position: absolute;
    left: 50%;
    right: auto;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
  }

  [dir="rtl"] .mobile-menu-header {
    text-align: right;
  }

  [dir="rtl"] .mobile-menu-title {
    text-align: right;
  }

  [dir="rtl"] .nav-menu.active .nav-link {
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
  }

  [dir="rtl"] .mega-menu-container {
    text-align: right;
  }

  [dir="rtl"] .mega-menu-title {
    text-align: right;
  }

  [dir="rtl"] .mega-menu-subtitle {
    text-align: right;
  }

  [dir="rtl"] .mega-menu-subtitle::after {
    right: auto;
    left: 0;
  }

  [dir="rtl"] .mega-menu-list {
    padding-right: 15px;
    padding-left: 0;
  }

  [dir="rtl"] .mega-menu-link {
    text-align: right;
  }
}

/* ==============================================
   SMALL TABLETS (max-width: 767px)
   ============================================== */
@media (max-width: 767.98px) {

  /* Dashboard Layout */
  #wsus__dashboard {
    padding: 0.5rem 0;
  }

  .dashboard_content {
    padding: 0.75rem;
  }

  /* Order Cards */
  .order-info-cards {
    margin-bottom: 1rem;
  }

  .info-card {
    text-align: center;
    padding: 0.75rem;
  }

  /* Product Items */
  .product-item {
    padding: 1rem 0.75rem;
  }

  .product-main-info {
    gap: 0.75rem;
  }

  .product-pricing {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  /* Buttons */
  .btn-sm {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
  }

  /* Tables */
  .table-responsive {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .table th,
  .table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
    vertical-align: middle;
  }

  /* DataTable */
  .dataTables_length,
  .dataTables_filter,
  .dataTables_info,
  .dataTables_paginate {
    text-align: center;
    margin: 0.5rem 0;
  }

  .dataTables_filter input {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
  }

  .dataTables_length select {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
  }

  .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    background: white;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
  }

  .dataTables_paginate .paginate_button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
  }

  .dataTables_paginate .paginate_button.current {
    background: #08154A;
    border-color: #08154A;
    color: white;
  }

  .dataTables_info {
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 1rem;
  }

  /* Order Table Mobile */
  #user-order-table {
    min-width: 800px;
    width: auto;
    table-layout: auto;
  }

  #user-order-table th,
  #user-order-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
    vertical-align: middle;
    white-space: nowrap;
  }

  #user-order-table .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
  }

  #user-order-table .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }

  #user-order-table .product-item {
    margin-bottom: 0.25rem;
  }

  #user-order-table .product-item p {
    font-size: 0.75rem;
    margin-bottom: 0.1rem;
    line-height: 1.2;
  }

  /* Responsive Table Wrapper */
  .order-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Custom Scrollbar */
  .order-table-wrapper::-webkit-scrollbar {
    height: 8px;
  }

  .order-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .order-table-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
  }

  .order-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
  }

  /* Mobile Table Responsive */
  .order-table-wrapper .table-responsive {
    border: none;
    box-shadow: none;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  #user-order-table {
    min-width: 800px !important;
    width: 800px !important;
    table-layout: fixed !important;
  }

  #user-order-table th:nth-child(1),
  #user-order-table td:nth-child(1) {
    width: 120px !important;
  }

  #user-order-table th:nth-child(2),
  #user-order-table td:nth-child(2) {
    width: 120px !important;
  }

  #user-order-table th:nth-child(3),
  #user-order-table td:nth-child(3) {
    width: 250px !important;
  }

  #user-order-table th:nth-child(4),
  #user-order-table td:nth-child(4) {
    width: 100px !important;
  }

  #user-order-table th:nth-child(5),
  #user-order-table td:nth-child(5) {
    width: 120px !important;
  }

  #user-order-table th:nth-child(6),
  #user-order-table td:nth-child(6) {
    width: 100px !important;
  }

  #user-order-table th,
  #user-order-table td {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0.5rem 0.25rem !important;
    font-size: 0.8rem !important;
  }

  /* Add space in front of first column (INVOICE) on mobile */
  #user-order-table th:nth-child(1),
  #user-order-table td:nth-child(1) {
    padding-left: 1rem !important;
  }
}

/* ==============================================
   MOBILE SCREENS (max-width: 575px)
   ============================================== */
@media (max-width: 575.98px) {

  /* Dashboard Layout */
  .dashboard_content {
    width: 100%;
    text-align: center;
    padding: 0.5rem;
  }

  /* Center Cards */
  #wsus__dashboard .row.g-0.g-sm-3>.col-12.col-lg-9.ms-lg-auto {
    width: 100%;
    margin-left: 0 !important;
    display: flex;
    justify-content: center;
  }

  #wsus__dashboard .card.border-0.shadow-sm.mb-4 {
    width: 95%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  #wsus__dashboard .row.row-cols-2.row-cols-sm-2.row-cols-md-4>[class*="col"] {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  #wsus__dashboard .card.border-0.shadow-sm.h-100 {
    width: 95%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Order Details */
  .order-details-header,
  .products-section,
  .order-table-wrapper {
    border-radius: 6px;
  }

  .section-header h4 {
    font-size: 1rem;
  }

  .product-name,
  .price-value {
    font-size: 0.9rem;
  }

  /* Compact Pagination */
  .dataTables_paginate .paginate_button {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
  }

  /* Order Table Extra Small */
  #user-order-table th,
  #user-order-table td {
    padding: 0.375rem 0.2rem;
    font-size: 0.75rem;
  }

  #user-order-table .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }

  #user-order-table .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
  }

  .order-table-wrapper {
    margin: 0 -0.5rem;
  }

  /* Info Cards Mobile Layout */
  #wsus__dashboard .row.g-2.mb-4 {
    margin: 0 -0.5rem 1.5rem -0.5rem;
  }

  #wsus__dashboard .row.g-2.mb-4>.col-6.col-md-3 {
    width: 95%;
    max-width: 420px;
    margin: 0 auto 0.75rem auto;
    padding: 0 0.5rem;
  }

  /* Print Button */
  #wsus__dashboard .print_invoice {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
  }

  #wsus__dashboard .print_invoice i {
    font-size: 0.75rem;
  }

  #wsus__dashboard .card-footer {
    padding: 0.75rem 1rem;
    text-align: center;
  }

  #wsus__dashboard .card-body {
    padding: 0.75rem 1rem;
  }

  #wsus__dashboard .card-title {
    font-size: 0.75rem;
  }

  #wsus__dashboard .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.5em;
  }

  /* Extra Small Mobile Table */
  #user-order-table {
    min-width: 800px !important;
    width: 800px !important;
    display: table !important;
  }

  #user-order-table th:nth-child(1),
  #user-order-table td:nth-child(1) {
    width: 100px !important;
  }

  #user-order-table th:nth-child(2),
  #user-order-table td:nth-child(2) {
    width: 100px !important;
  }

  #user-order-table th:nth-child(3),
  #user-order-table td:nth-child(3) {
    width: 200px !important;
  }

  #user-order-table th:nth-child(4),
  #user-order-table td:nth-child(4) {
    width: 100px !important;
  }

  #user-order-table th:nth-child(5),
  #user-order-table td:nth-child(5) {
    width: 100px !important;
  }

  #user-order-table th:nth-child(6),
  #user-order-table td:nth-child(6) {
    width: 100px !important;
  }

  #user-order-table th,
  #user-order-table td {
    padding: 0.25rem 0.15rem !important;
    font-size: 0.7rem !important;
  }

  #user-order-table .btn {
    padding: 0.2rem 0.3rem !important;
    font-size: 0.65rem !important;
  }

  #user-order-table .badge {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.3rem !important;
  }

  /* Dashboard Sidebar */
  .dashboard-sidebar {
    width: 280px;
  }

  .sidebar-header {
    padding: 15px;
  }

  .user-profile {
    padding: 20px 15px;
  }

  .nav-link {
    padding: 12px 15px;
  }

  /* Home Page - Topbar adjustments */
  .wsus__topbar_right {
    font-size: 0.9rem;
  }
}

/* ==============================================
   EXTRA SMALL SCREENS (max-width: 400px)
   ============================================== */
@media (max-width: 400px) {

  /* Make Cards More Compact */
  #wsus__dashboard .row.g-2.mb-4>.col-6.col-md-3,
  #wsus__dashboard .card.border-0.shadow-sm.mb-4,
  #wsus__dashboard .order-details-header {
    width: 98%;
    max-width: 350px;
  }

  /* Smaller Print Button */
  #wsus__dashboard .print_invoice {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }

  /* Compact Card Padding */
  #wsus__dashboard .card-body {
    padding: 0.5rem 0.75rem;
  }

  #wsus__dashboard .card-footer {
    padding: 0.5rem 0.75rem;
  }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

/* Loading States */
.table-loading {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

.table-loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Improved Badges */
.badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 0.375rem;
}

/* Bootstrap Table Header Fix */
.table-responsive .table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.table-responsive .table thead th {
  position: sticky;
  top: 0;
  background-color: #f8e1e7;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
  z-index: 10;
}

/* ==============================================
   ORDER TABLE SPECIFIC STYLES
   ============================================== */

/* Base Table Styles */
#user-order-table {
  table-layout: fixed;
  width: 100% !important;
}

#user-order-table th,
#user-order-table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Column Widths */
#user-order-table th:nth-child(1),
#user-order-table td:nth-child(1) {
  width: 120px;
}

#user-order-table th:nth-child(2),
#user-order-table td:nth-child(2) {
  width: 120px;
}

#user-order-table th:nth-child(3),
#user-order-table td:nth-child(3) {
  width: 300px;
}

#user-order-table th:nth-child(4),
#user-order-table td:nth-child(4) {
  width: 120px;
}

#user-order-table th:nth-child(5),
#user-order-table td:nth-child(5) {
  width: 150px;
}

#user-order-table th:nth-child(6),
#user-order-table td:nth-child(6) {
  width: 100px;
}

/* ==============================================
   DARK MODE SUPPORT
   ============================================== */
@media (prefers-color-scheme: dark) {
  .order-details-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  }

  .info-card,
  .products-section {
    background: #2d3748;
    color: #e2e8f0;
  }

  .section-header {
    background: #f8e1e7;
    border-color: #e18e96;
  }

  .product-item:hover {
    background-color: #4a5568;
  }
}/*
 Global horizontal scroll fix for all screen sizes */
@media (max-width: 1920px) {
  body {
    overflow-x: hidden !important;
  }
  
  .container, .container-fluid {
    overflow-x: hidden;
  }
}

/* Mobile specific horizontal scroll fixes */
@media (max-width: 768px) {
  * {
    max-width: 100vw;
    box-sizing: border-box;
  }
  
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}