/* User area styles: modern cards, icons, responsive layout */
:root{
  --accent:#8b0000;
  --muted:#6b6b6b;
  --card-bg:#ffffff;
  --glass:rgba(255,255,255,0.85);
}
body{font-family: var(--ui-font, Poppins), system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;}
.user-wrap{max-width:1100px;margin:36px auto;padding:18px}
.orders-filter-bar { display:flex; gap:8px; align-items:center; margin:12px 0 18px }
.orders-filter-bar .filter-btn { padding:8px 12px; background:#fff; border:1px solid rgba(0,0,0,0.06); border-radius:8px; cursor:pointer; font-weight:700 }
.orders-filter-bar .filter-btn.active { background:linear-gradient(90deg,var(--accent),#cc4b4b); color:#fff; border-color:transparent }
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.card{background:var(--card-bg);border:1px solid #eee;border-radius:10px;padding:16px;box-shadow:0 6px 20px rgba(0,0,0,0.04)}
.card h3{margin:0 0 8px 0;font-size:1.05rem}
.meta{color:var(--muted);font-size:0.95rem}
.btn{display:inline-block;padding:8px 12px;background:var(--accent);color:#fff;border-radius:8px;text-decoration:none;font-weight:600}
.btn-muted{background:#f5f5f5;color:#333;border:1px solid #e6e6e6}
.orders-list{display:flex;flex-direction:column;gap:12px}
.orders-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px}
.order-card{display:flex;align-items:center;gap:12px;justify-content:space-between}
.order-left{display:flex;align-items:center;gap:12px}
.order-icon{flex-shrink:0;width:56px;height:56px;border-radius:10px;background:linear-gradient(135deg,#fff,#fafafa);display:flex;align-items:center;justify-content:center;font-size:20px;color:var(--accent);border:1px solid #f0e6e6}
.order-details{flex-grow:1;min-width:0}
.order-title{font-weight:700;margin:0}
.order-sub{color:var(--muted);font-size:0.92rem}
.order-actions{display:flex;gap:8px;align-items:center}
.order-badge{padding:6px 10px;border-radius:999px;background:#f7f1f1;color:var(--accent);font-weight:700}
@media (max-width:680px){.order-card{flex-direction:column;align-items:flex-start}.order-actions{width:100%;display:flex;justify-content:space-between}}

/* Card hover and status pills */
.order-card{transition:transform .12s ease,box-shadow .12s ease}
.order-card:hover{transform:translateY(-4px);box-shadow:0 12px 30px rgba(0,0,0,0.06)}
.order-ribbon{position:absolute;left:12px;top:12px;z-index:1;padding:6px 10px;border-top-right-radius:8px;border-bottom-right-radius:8px;font-weight:700;font-size:0.85rem;background:var(--accent);color:#fff}
.ribbon-wrap{position:relative}
.status-pill{padding:6px 10px;border-radius:999px;font-weight:700;font-size:0.9rem}
.status-pending{background:#fff4e5;color:#a85a00;border:1px solid #ffe6c7}
.status-completed{background:#e9ffef;color:#00813a;border:1px solid #c8f5d0}
.status-cancelled{background:#ffeaea;color:#9b1a1a;border:1px solid #ffd0d0}
.status-processing{background:#eef6ff;color:#1a5aa8;border:1px solid #d6eaff}

/* Make the order-left clickable without breaking buttons */
.order-left a.card-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.order-left a.card-link:focus{outline:2px solid rgba(0,0,0,0.06)}

/* CTA button style */
.btn-cta{background:linear-gradient(90deg,var(--accent),#cc4b4b);box-shadow:0 8px 24px rgba(139,0,0,0.12);border-radius:10px;padding:10px 14px;color:#fff;font-weight:700;border:0}
.btn-cta:hover{transform:translateY(-2px)}

/* Action overlay on hover */
.order-actions{display:flex;gap:8px;align-items:center}
.order-card .action-overlay{display:flex;flex-direction:column;gap:8px;opacity:1;transform:translateY(0);transition:none}
.order-card:hover .action-overlay{opacity:1;transform:translateY(0)}

/* Animations */
@keyframes fadeInUp{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.card{animation:fadeInUp .22s ease both}

/* Status pill color mapping */
.status-pending{background:#fff4e5;color:#a85a00;border:1px solid #ffe6c7}
.status-processing{background:#eef6ff;color:#1a5aa8;border:1px solid #d6eaff}
.status-completed{background:#e9ffef;color:#00813a;border:1px solid #c8f5d0}
.status-cancelled{background:#ffeaea;color:#9b1a1a;border:1px solid #ffd0d0}

/* View order adjustments */
.breadcrumb{color:var(--muted);font-size:0.95rem;margin-bottom:12px}
.view-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.item-row{animation:fadeInUp .18s ease both}

/* Items table */
.items-table{width:100%;border-collapse:collapse;margin-top:12px}
.items-table th,.items-table td{padding:8px;border-bottom:1px solid #f0f0f0;text-align:left}
.items-table th{color:var(--muted);font-weight:600}

/* Account dropdown */
.account-dropdown{position:relative;display:inline-block}
.account-btn{background:transparent;border:0;color:inherit;font-weight:700;cursor:pointer;padding:8px 10px;border-radius:8px}
.account-btn .fa-caret-down{margin-left:8px}
.account-menu{position:absolute;left:50%;top:calc(100% + 12px);min-width:220px;background:#fff;border:1px solid rgba(0,0,0,0.08);border-radius:12px;box-shadow:0 10px 40px rgba(0,0,0,0.12);padding:8px;display:none;z-index:99999 !important;transform-origin:top center;opacity:0;transform:translateX(-50%) translateY(-10px) scale(.95);transition:all .2s cubic-bezier(0.165, 0.84, 0.44, 1)}
.account-menu.show{display:block;opacity:1;transform:translateX(-50%) translateY(0) scale(1)}
.account-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid rgba(0,0,0,0.08);
    border-top: 1px solid rgba(0,0,0,0.08);
}
.account-menu a{display:flex;gap:12px;align-items:center;padding:12px 16px;color:#444;text-decoration:none;font-weight:500;border-radius:8px;transition:all 0.2s}
.account-menu a:hover{background:#f8f9fa;color:var(--accent);transform:translateX(4px)}
.account-menu i{color:var(--accent);width:18px;text-align:center}
.account-menu .sep{height:1px;background:#f1f1f1;margin:6px 0}
.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 12px 24px;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    line-height: 1;
    margin: 0;
    font-size: 1.05rem;
}

.account-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.account-btn i {
    color: #ffd700;
}

.account-btn .fa-caret-down {
    font-size: 0.8em;
    opacity: 0.8;
    color: #fff;
}

/* Ensure header doesn't allow horizontal overflow and sits above most UI layers */
.main-header{overflow: hidden !important; z-index:11010 !important}

/* Modernized header sizing (uses global variables when available) */
.main-header {
    height: var(--nav-height, 68px);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--nav-gap, 18px);
}

/* Portal wrapper: menus moved to the document body to avoid stacking context issues */
.account-menu-portal{position:absolute;top:0;left:0;z-index:13000;pointer-events:auto}

/* Ensure dropdown is positioned relative to its container for fallback cases */
.account-dropdown {position:relative}

.order-icon img{width:56px;height:56px;object-fit:cover;border-radius:8px}

/* Order islands / summary + items layout */
.order-grid{display:grid;grid-template-columns:320px 1fr;gap:18px;align-items:start}
.order-summary{display:flex;flex-direction:column;gap:12px}
.order-summary .summary-row{display:flex;justify-content:space-between;align-items:center}
.order-summary .summary-row .label{color:var(--muted)}
.order-summary .total-big{font-size:1.6rem;font-weight:800;color:var(--accent)}
.order-progress{height:10px;background:#f0f0f0;border-radius:999px;overflow:hidden}
.order-progress > i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),#cc4b4b);width:0}

.order-items .item-row{display:flex;gap:12px;align-items:center;padding:12px;border-bottom:1px solid #f6f6f6}
.item-thumb{width:64px;height:64px;border-radius:8px;object-fit:cover;border:1px solid #eee}
.item-meta{flex:1}
.item-price{min-width:120px;text-align:right;font-weight:700}

/* Enhancements for My Orders Page */

/* Empty state illustration */
.card p::before {
  content: '\f07a'; /* Font Awesome shopping cart icon */
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  display: block;
  font-size: 48px;
  color: var(--muted);
  margin-bottom: 12px;
  text-align: center;
}

/* Status pill gradient */
.status-pill {
  background: linear-gradient(90deg, var(--accent), #cc4b4b);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Card hover effect */
.order-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

/* Fade-in animation for cards */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.order-card {
  animation: fadeIn 0.3s ease both;
}

/* Fix misaligned icons and overlapping order numbers */
.order-ribbon {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1; /* Ensure it stays above other elements */
  padding: 6px 10px;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--accent);
    margin-right: 0; /* Disable overlap effect */
}

/* Ensure order-icon and details are aligned */
.order-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff, #fafafa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  border: 1px solid #f0e6e6;
}

.order-details {
  flex-grow: 1;
  min-width: 0;
}

/* Make action buttons static */
.order-card .action-overlay {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 1; /* Always visible */
  transform: translateY(0); /* Remove hover effect */
  transition: none; /* Disable animation */
}

/* Adjust card layout to prevent overlapping */
.order-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  position: relative;
}

/* New: Modern Wide Order Card */
.order-card-wide {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(252,247,247,0.98));
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    overflow: hidden;
    padding: 0; /* style sections separately */
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.order-card-wide:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }

.order-card-wide .oc-header {
    padding: 18px 20px;
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.95));
}

.order-card-wide .oc-id {
    font-weight:700; color:var(--muted); font-size:0.95rem; background:transparent;
}

.oc-id { font-weight:700; color:var(--muted); }
.oc-id { cursor:pointer; color: #666; font-size: 0.95rem }

/* Order ribbon for quick info (e.g., Payment method) */
.order-count-ribbon { position:absolute; right:16px; top:12px; z-index:2; padding:6px 10px; border-radius:999px; background: rgba(0,0,0,0.06); color: #333; font-weight:700; font-size:0.85rem }

/* Improve action buttons */
.btn-buy-again, .btn-track { display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:10px; border:1px solid rgba(0,0,0,0.06); background:#fff }
.btn-buy-again i, .btn-track i { color:var(--accent) }

.order-card-wide .oc-body { padding: 16px 18px 20px 18px; display:flex; gap:18px; align-items:center }

.order-card-wide .oc-meta-item .oc-value { font-weight:700; color:#222; }

.order-card-wide .order-status-accent {
    width: 8px; height: 100%; position: absolute; left: 0; top: 0; border-right: 1px solid rgba(0,0,0,0.02);
}

/* Status accent colors */
.order-card-wide.status-pending .order-status-accent { background: linear-gradient(180deg,#ffd79f,#ffb74d); }
.order-card-wide.status-processing .order-status-accent { background: linear-gradient(180deg,#dbefff,#90caf9); }
.order-card-wide.status-shipped .order-status-accent { background: linear-gradient(180deg,#bbdefb,#64b5f6); }
.order-card-wide.status-delivered .order-status-accent { background: linear-gradient(180deg,#c8e6c9,#81c784); }
.order-card-wide.status-cancelled .order-status-accent { background: linear-gradient(180deg,#ffcdd2,#ef9a9a); }

.order-card-wide .product-thumb { border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); border-color: rgba(0,0,0,0.04); }
.order-card-wide:not(.order-card-compact) .product-thumb { margin-right: -12px; }
.order-card-wide .more-items-badge { background: linear-gradient(90deg,#f0f0f0,#e9e9e9); border: 0; font-weight:700 }

/* Make stepper more visible */
.order-card-wide .stepper-wrapper { max-width: 340px; }
.order-card-wide .stepper-fill { background: linear-gradient(90deg, var(--accent), #cc4b4b); }

/* Slight reflow for actions */
.order-card-wide .oc-actions { align-items:center; gap:10px; justify-content:flex-end }
.order-card-wide .btn-primary-outline { border-color: rgba(0,0,0,0.07); border-radius: 10px; padding: 10px 16px; }

/* Mobile adjustments */
/* Compact layout variant for denser order list */
.order-card-compact {
    padding: 12px 14px;
    display: grid;
    /* wider left column to avoid header & thumbnail overlap */
    grid-template-columns: 200px 1fr auto;
    align-items: center;
    gap: 12px;
}
.order-card-compact .oc-header { padding: 0; border-bottom: none }
.order-card-compact .oc-header { display:grid; grid-template-columns: 200px 1fr auto; gap:12px; align-items:center; padding:8px 12px }
.order-card-compact .oc-meta { display:none; }
.oc-meta-left { display:none }
.order-card-compact .oc-meta-left { display:flex; gap:10px; flex-direction:column; align-items:flex-start; width: 200px; padding-left: 14px }
.order-card-compact .oc-meta-left .oc-meta-item { display:grid; grid-template-columns: auto 1fr; gap:8px; align-items: center; width: 100% }
.order-card-compact .oc-meta-left .oc-label { font-size:0.78rem; color:var(--muted); white-space:nowrap; font-weight: 600; text-align: right }
.order-card-compact .oc-meta-left .oc-value { font-size:0.95rem; font-weight:700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.order-card-compact .oc-meta-item { display:flex; flex-direction:column }
.order-card-compact .oc-meta-item .oc-label { font-size:0.8rem; color:var(--muted) }
.order-card-compact .oc-meta-item .oc-value { font-size:0.95rem }
.order-card-compact .order-ribbon { display: none }
.order-card-compact .oc-body { padding: 8px 0; display:grid; grid-template-columns: auto 1fr auto; gap:12px; align-items:center }
.order-card-compact .oc-products-info { max-width: 320px; display:flex; flex-direction:column }
.order-card-compact .oc-status-stepper { align-items:center; min-width: 240px }
.order-card-compact .status-pill { padding: 6px 12px; font-size: 0.8rem; border-radius: 999px }
.order-card-compact .more-items-badge { width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:50%; font-size:0.8rem }
.order-card-compact .product-thumb-stack { display:flex; gap:8px; align-items:center }
.order-card-compact .product-thumb { border-radius:10px; }
.order-card-compact .oc-products-info { margin-left:8px }
.order-card-compact .oc-actions { justify-content:flex-end; min-width: 100px; }
.order-card-compact .order-status-accent { left:0; }

/* Reduce shadow and simplify for list */
.order-card-compact { box-shadow: 0 6px 18px rgba(0,0,0,0.04); border-radius:12px }

.order-card-compact .product-thumb { width:64px; height:64px; }
.order-card-compact .oc-products { display:flex; align-items:center; gap:12px }
.order-card-compact .oc-left { display:flex; flex-direction:column; gap:8px; }
.order-card-compact .oc-left { width: 200px; }
.order-card-compact .oc-meta-left .oc-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px }
.order-card-compact .stepper-wrapper { max-width:230px }

@media (max-width: 768px) {
    .order-card-wide .oc-body { flex-direction: column; align-items:flex-start }
    .order-card-wide .oc-meta { flex-wrap:wrap; }
    .order-card-wide .stepper-wrapper { width: 100%; }
}

@media (max-width: 680px) {
    .order-card-compact { grid-template-columns: 60px 1fr; grid-auto-rows: auto }
    .order-card-compact .oc-status-stepper { order: 3; width: 100%; margin-top: 8px }
    .order-card-compact .oc-actions { order: 4; width: 100%; display:flex; justify-content:flex-start; gap:8px }
    .order-card-compact .oc-products-info .product-name { max-width: 220px }
    .action-dropdown-menu { min-width: 140px; }
}

/* Hide duplicate header meta on compact, show oc-meta-left only on wide */
.order-card-compact .oc-meta-left { display:block }
.order-card-compact .oc-header .oc-meta { display:none }

    /* Collapsible details */
    .order-card-wide .order-details-panel { display: block; max-height: 0; opacity: 0; overflow: hidden; padding-top: 0; border-top: 1px dashed rgba(0,0,0,0.04); transition: max-height 0.35s ease, opacity 0.28s ease; }
    .order-card-wide.expanded .order-details-panel { display: block; max-height: 600px; opacity: 1; padding-top: 14px; }

    /* Add button group and UX touchups */
    .order-action-group { display:flex; gap:10px; align-items:center }
    .order-action-group .btn { padding:8px 10px; border-radius:10px; font-weight:700 }
    .order-action-group .btn-outline { background:transparent; border:1px solid rgba(0,0,0,0.06); color:#333 }
    .btn-icon { display:inline-flex; align-items:center; gap:8px }

    /* Collapsible toggle */
    .expand-toggle { background: transparent; border: 0; cursor: pointer; color: var(--muted); font-weight:700; display:flex; gap:8px; align-items:center }
    .expand-toggle:focus { outline: 3px solid rgba(128,0,0,0.12); border-radius:6px }
    .order-card-wide.expanded .expand-toggle i{ transform: rotate(180deg); }

    /* Action Dropdown */
    .action-dropdown { position: relative; }
    .action-dropdown-btn {
        background: transparent;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 8px;
        cursor: pointer;
        color: #666;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
    }
    .action-dropdown-btn:hover {
        background: #f5f5f5;
        color: #333;
        border-color: rgba(0,0,0,0.2);
    }
    .action-dropdown-menu {
        position: absolute;
        right: 0;
        top: 100%;
        background: #fff;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        min-width: 160px;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s ease;
        padding: 4px 0;
    }
    .action-dropdown.open .action-dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        transition: background 0.2s;
        border: none;
        background: transparent;
        width: 100%;
        text-align: left;
        cursor: pointer;
    }
    .dropdown-item:hover {
        background: #f8f9fa;
        color: var(--accent);
    }
    .dropdown-item i {
        width: 16px;
        text-align: center;
    }

    /* Improved progress bar with labels */
    .stepper-wrapper { width: 320px; max-width: 100%; }
    .stepper-legend { font-size: 0.85rem; color:#777; padding-top:8px }

    /* Line item table */
    .order-items-table { width:100%; border-collapse:collapse; margin-top:10px }
    .order-items-table th, .order-items-table td { padding:10px 8px; font-size:0.95rem; border-bottom:1px solid #f3f3f3; text-align:left }
    .order-items-table th { color:var(--muted); font-weight:700 }
    .order-items-thumb { width:64px; height:64px; border-radius:8px; object-fit:cover }

    /* Accessibility tweak for the stepper to show contrasting fill */
    .stepper-fill[style*="width: 100%"] { box-shadow: 0 2px 8px rgba(0,0,0,0.06) }

    /* Accessibility helpers */
    .sr-only { position: absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }



/* Product list summary next to thumbnails */
.oc-products-info { display:flex; flex-direction:column; gap:6px; font-size:0.95rem; color:var(--muted); }
.oc-products-info .product-name { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:360px; color:#333; font-weight:600 }
.oc-products-info .product-meta { font-size:0.85rem; color:var(--muted) }

/* Meta icons */
.oc-meta-item i { color: var(--accent); margin-right:8px; font-size:0.95rem; opacity:0.95 }

/* Action button updates */
.btn-track { background: linear-gradient(90deg,#fff,#fff); border:1px solid rgba(128,0,0,0.08); color:#800000; font-weight:700; padding:10px 12px; border-radius:10px }
.btn-buy-again { background: linear-gradient(90deg,var(--accent),#cc4b4b); color:#fff; border:0; padding:10px 12px }

/* Improve truck icon placement for accessibility */
.stepper-truck { top:-30px; }

/* Small thumbnail sizes for mobile */
@media (max-width:580px) {
    .product-thumb { width:48px; height:48px }
    .more-items-badge { width:32px; height:32px; font-size:0.75rem }
    .oc-products-info .product-name { max-width:160px }
}



/* Ensure proper spacing between elements */
.order-card .ribbon-wrap {
  margin-bottom: 12px;
}

/* Responsive adjustments */
@media (max-width: 680px) {
  .order-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .order-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* ===== ACCOUNT SIDEBAR DRAWER - MODERN DESIGN ===== */
.account-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: auto;
    width: 350px;
    max-width: 90vw;
    height: 100% !important; /* Force full height */
    min-height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    border-left: 1px solid rgba(0,0,0,0.05);
    z-index: 12000;
    transform: translate3d(100%, 0, 0);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.35s ease, visibility 0s 0.4s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px 0 0 0; /* Only round top-left corner */
}

.account-sidebar::before {
    display: none;
}

.account-sidebar.open,
.account-sidebar.active {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.4s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.35s ease;
}

.account-sidebar-header {
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    color: #333;
    box-shadow: none;
    position: relative;
    z-index: 2;
}

.account-sidebar-header::after {
    display: none;
}

.sidebar-logo-img {
    filter: brightness(0) invert(1);
    height: 36px;
}

.close-account-sidebar {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0,0,0,0.05);
    border: none;
    color: #333;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.close-account-sidebar:hover {
    background: rgba(0,0,0,0.1);
    transform: rotate(90deg);
}

.account-sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 60px 0 0 0;
    position: relative;
    z-index: 1;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.account-profile:hover {
    background: #fcfcfc;
    transform: none;
    box-shadow: none;
}

.account-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(204, 75, 75, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(139,0,0,0.3), 
                inset 0 -2px 8px rgba(0,0,0,0.2),
                0 0 0 3px rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.5);
}

.account-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.account-meta {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-size: 1.4rem; /* Increased from 1.15rem */
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.account-email {
    font-size: 1rem; /* Increased from 0.9rem */
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

.account-email .verified {
    color: #28a745;
    filter: drop-shadow(0 1px 2px rgba(40,167,69,0.3));
}

.account-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.account-menu-item {
    margin-bottom: 6px;
}

.account-menu-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px; /* Increased padding */
    color: #555;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem; /* Added font size */
    border-radius: 8px;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    box-shadow: none;
    margin: 2px 12px;
}

.account-menu-link::before {
    display: none;
}

.account-menu-link:hover {
    background: #f8f9fa;
    color: #800000;
    transform: translateX(4px);
    box-shadow: none;
}

.account-menu-item.active .account-menu-link {
    background: #fff5f5;
    color: #800000;
    font-weight: 600;
    box-shadow: none;
    border-left: none;
    border-radius: 8px;
    backdrop-filter: none;
    border-color: transparent;
}

.account-menu-item.active .account-menu-link i {
    color: #800000;
    filter: none;
}

.account-menu-link i {
    width: 24px; /* Increased width */
    text-align: center;
    color: var(--accent, #8b0000);
    transition: all 0.3s ease;
    font-size: 1.3rem; /* Increased from 1.1rem */
}

.account-menu-item.active .account-menu-link i {
    color: #fff;
}

.menu-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b0000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(255,215,0,0.3), 
                inset 0 1px 0 rgba(255,255,255,0.4);
    border: 1px solid rgba(255,215,0,0.3);
}

.logout-item .account-menu-link {
    color: #dc3545;
    margin-top: 16px;
}

.logout-item .account-menu-link:hover {
    background: rgba(255, 240, 245, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #c82333;
    box-shadow: 0 6px 20px rgba(220,53,69,0.15);
}

.logout-item .account-menu-link i {
    color: #dc3545;
}

/* Scrollbar styling for glassmorphic sidebar */
.account-sidebar-content::-webkit-scrollbar {
    width: 10px;
}

.account-sidebar-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    backdrop-filter: blur(8px);
}

.account-sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.7), 
        rgba(160, 0, 0, 0.8));
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.account-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        rgba(139, 0, 0, 0.85), 
        rgba(160, 0, 0, 0.95));
}

/* Vouchers Panel - Glassmorphic */
.sidebar-vouchers-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding-left: 36px;
}

.sidebar-vouchers-panel.open {
    max-height: 600px;
}

.vouchers-section {
    margin-top: 14px;
}

.vouchers-section h5 {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.vouchers-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sv-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 
                inset 0 1px 0 rgba(255,255,255,0.5),
                0 0 0 1px rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.sv-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.sv-item.used {
    opacity: 0.5;
    background: rgba(248, 249, 250, 0.6);
}

.sv-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.sv-amount {
    color: var(--accent, #8b0000);
    font-size: 1rem;
    font-weight: 700;
}

.copy-voucher {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(160, 0, 0, 0.95));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(139,0,0,0.3);
}

.copy-voucher:hover {
    background: linear-gradient(135deg, rgba(139, 0, 0, 1), rgba(160, 0, 0, 1));
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(139,0,0,0.4);
}

.sv-code {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #555;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.06);
}

/* Modern Account Button in Navbar */
.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    padding: 10px 20px;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    line-height: 1;
    margin: 0;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1), 
                inset 0 1px 0 rgba(255,255,255,0.15);
}

.account-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15), 
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.account-btn:active {
    transform: translateY(0);
}

.account-btn img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-right: 0 !important;
    border: 2px solid rgba(255,255,255,0.6) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2) !important;
}

.account-btn .fa-user {
    font-size: 1.1rem;
    color: #ffd700;
    filter: drop-shadow(0 2px 4px rgba(255,215,0,0.3));
}

.account-btn .fa-caret-down {
    font-size: 0.85em;
    opacity: 0.85;
    color: #fff;
    transition: transform 0.3s ease;
}

.account-btn:hover .fa-caret-down {
    transform: translateY(2px);
}

/* ===== Wishlist Page Styles ===== */
.wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}
.product-card-wishlist {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.product-card-wishlist:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(0,0,0,0.06); }
.product-card-wishlist .wc-image { height: 160px; overflow: hidden; display:flex;align-items:center;justify-content:center;background:#fafafa }
.product-card-wishlist .wc-image img { width:100%; height:100%; object-fit:cover }
.product-card-wishlist .wc-body { padding: 14px; display:flex;flex-direction:column; gap:10px }
.wc-title { font-size: 1rem; margin:0; color:#222 }
.wc-desc { font-size: 0.9rem; color:#666; margin:0 }
.wc-meta { display:flex; align-items:center; justify-content:space-between; gap:12px }
.wc-price { font-weight:700; color:#800000 }
.wc-actions { display:flex; gap:8px; align-items:center }
.btn-sm { padding:8px 10px; font-size:0.9rem; border-radius:8px }
.btn-outline { background: transparent; border: 1px solid #ddd; color:#333 }
.empty-state-card { text-align:center; padding:40px; background:#fff; border-radius:10px; border:1px solid #eee }



.account-sidebar.open,
.account-sidebar.active {
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.3s cubic-bezier(0.22, 0.9, 0.32, 1), opacity 0.25s ease;
}

/* Remove staggered child animations for instant responsiveness */
.account-sidebar .account-sidebar-content,
.account-sidebar .account-profile,
.account-sidebar .account-menu-item,
.account-sidebar .sidebar-vouchers-panel {
    /* No initial transform/opacity - instant display */
    transition: none;
}

.account-sidebar.open .account-sidebar-content,
.account-sidebar.active .account-sidebar-content,
.account-sidebar.open .account-profile,
.account-sidebar.active .account-profile,
.account-sidebar.open .account-menu-item,
.account-sidebar.active .account-menu-item,
.account-sidebar.open .sidebar-vouchers-panel,
.account-sidebar.active .sidebar-vouchers-panel {
    opacity: 1;
    transform: translateX(0);
}

.account-sidebar.open .account-menu-item:nth-of-type(1),
.account-sidebar.active .account-menu-item:nth-of-type(1) {
    transition-delay: 0.05s;
}

.account-sidebar.open .account-menu-item:nth-of-type(2),
.account-sidebar.active .account-menu-item:nth-of-type(2) {
    transition-delay: 0.1s;
}

.account-sidebar.open .account-menu-item:nth-of-type(3),
.account-sidebar.active .account-menu-item:nth-of-type(3) {
    transition-delay: 0.15s;
}

.account-sidebar.open .account-menu-item:nth-of-type(4),
.account-sidebar.active .account-menu-item:nth-of-type(4) {
    transition-delay: 0.2s;
}

.account-sidebar.open .account-menu-item:nth-of-type(5),
.account-sidebar.active .account-menu-item:nth-of-type(5) {
    transition-delay: 0.25s;
}

.account-sidebar.open .account-menu-item:nth-of-type(6),
.account-sidebar.active .account-menu-item:nth-of-type(6) {
    transition-delay: 0.3s;
}

.account-sidebar.open .account-menu-item:nth-of-type(7),
.account-sidebar.active .account-menu-item:nth-of-type(7) {
    transition-delay: 0.35s;
}

.account-sidebar.open .account-menu-item:nth-of-type(8),
.account-sidebar.active .account-menu-item:nth-of-type(8) {
    transition-delay: 0.4s;
}



.close-account-sidebar {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-account-sidebar:hover {
    background: rgba(255,255,255,0.4);
    transform: rotate(90deg);
}

.account-sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .account-sidebar, .account-sidebar.open, .account-sidebar.active {
        transition: none !important;
    }
    .account-sidebar .account-sidebar-content,
    .account-sidebar .account-profile,
    .account-sidebar .account-menu-item,
    .account-sidebar .sidebar-vouchers-panel {
        transition: none !important;
    }
    .account-sidebar-overlay { transition: none !important; }
}

.account-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 11500;
    opacity: 0;
    visibility: hidden;
    will-change: opacity;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.account-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
}

/* Hide original menu if it exists */
.account-menu {
    display: none !important;
}

/* Maroon Background Theme - Lighter & Modern */
.soft-bg-maroon {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Lighter gradient: Deep Red to Maroon */
    background: linear-gradient(135deg, #a62b2b 0%, #700808 100%);
    overflow: hidden;
    pointer-events: none;
}

/* Shape Blobs (copied from shop.css) */
.shape-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4; /* Slightly increased opacity for vibrancy */
    animation: blobFloat 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.shape-blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ff6b6b 0%, transparent 70%); /* Lighter red */
}

.shape-blob-2 {
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, #ff4d4d 0%, transparent 70%);
    animation-delay: -7s;
}

.shape-blob-3 {
    top: 40%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #ff8585 0%, transparent 70%); /* Even lighter */
    animation-delay: -14s;
}

@keyframes blobFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Update User Wrap for Maroon Theme */
.user-wrap h1 {
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.breadcrumb {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
}

/* Update Order Card for Maroon Theme - Modern Glassmorphism */
.order-card-wide {
    background: rgba(255, 255, 255, 0.92); /* More opaque for readability */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px; /* More rounded */
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.order-card-wide:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.98);
}

.oc-header {
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 18px 28px;
}

.oc-label {
    color: #777;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

.oc-value {
    color: #222;
    font-size: 1rem;
}

.oc-id {
    color: #555;
    background: rgba(0,0,0,0.04);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: -0.5px;
}

/* Buttons on Maroon Theme */
.print-history-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.print-history-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
}

.btn-cta {
    background: white;
    color: #a62b2b; /* Match new lighter maroon */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 700;
    border: none;
    transition: all 0.2s;
}

.btn-cta:hover {
    background: #fff;
    color: #800000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* New Buttons for My Orders */
.btn-buy-again {
    padding: 8px 16px;
    background: #800000;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-buy-again:hover {
    background: #5a0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(128, 0, 0, 0.2);
}

.btn-track {
    padding: 8px 16px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-track:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

/* View Order Page Specifics */
.order-header-card, .content-card {
    background: rgba(255, 255, 255, 0.95); /* High opacity for readability */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.order-title h1 {
    color: #222 !important; /* Force dark text */
}

.card-title {
    color: #222 !important;
    border-bottom-color: #eee !important;
}

.summary-row span {
    color: #444 !important;
}

.summary-row.total span {
    color: #222 !important;
}

.item-name {
    color: #222 !important;
}

.item-total {
    color: #222 !important;
}

/* ===== Header/Nav consistency (enforced) =====
   Keep header appearance identical to global styles and force navbar
   alignment so auth/index/shop pages don't drift visually. */
.main-header {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: var(--nav-height, 68px) !important;
    min-height: var(--nav-height, 68px) !important;
    padding: 12px 30px !important;
    background: linear-gradient(135deg, var(--primary, #800000) 0%, var(--primary-dark, #5d1212) 100%) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18) !important;
    border-radius: 0 !important;
    gap: 30px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.main-header .navbar-right {
    justify-content: flex-end !important;
    display: flex !important;
    gap: var(--nav-gap, 18px) !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
}

.main-header .navbar-left {
    justify-content: flex-start !important;
    display: flex !important;
    gap: var(--nav-gap, 18px) !important;
    margin-left: 0 !important;
    min-width: 0 !important;
    flex: 1 1 0 !important;
    flex-wrap: nowrap !important;
}

@media (max-width:980px){
    .main-header { padding: 10px 14px !important; }
}

/* =====================================================
   ENHANCED MOBILE-FIRST RESPONSIVE STYLES FOR USER DASHBOARD
   ===================================================== */

@media (max-width: 768px) {
    /* Header Mobile */
    .main-header {
        flex-wrap: wrap !important;
        padding: 10px 12px !important;
        gap: 10px !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    .main-header .navbar-left,
    .main-header .navbar-right {
        display: none !important;
    }
    
    .main-header .logo {
        order: 1;
        margin: 0 auto;
    }
    
    .main-header .logo img {
        height: 36px !important;
        width: auto !important;
    }
    
    /* User Wrap */
    .user-wrap {
        margin: 16px auto;
        padding: 12px;
    }
    
    /* Grid System */
    .grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    
    .orders-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Card Styles */
    .card {
        padding: 14px;
        border-radius: 12px;
    }
    
    .card h3 {
        font-size: 1rem;
    }
    
    /* Orders List */
    .orders-list {
        gap: 10px;
    }
    
    /* Order Card */
    .order-card {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
        padding: 14px;
    }
    
    .order-left {
        width: 100%;
    }
    
    .order-left a.card-link {
        gap: 10px;
    }
    
    .order-icon {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .order-icon img {
        width: 48px !important;
        height: 48px !important;
    }
    
    .order-details {
        min-width: 0;
    }
    
    .order-title {
        font-size: 0.95rem;
        line-height: 1.3;
        word-break: break-word;
    }
    
    .order-sub {
        font-size: 0.85rem;
    }
    
    .order-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .order-badge {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .status-pill {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    /* Order Filter Bar */
    .orders-filter-bar {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .orders-filter-bar .filter-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        flex: 1 1 auto;
        text-align: center;
        min-width: 70px;
    }
    
    /* Button Styles */
    .btn {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .btn-cta {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }
    
    /* Items Table */
    .items-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .items-table th,
    .items-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    /* View Header */
    .view-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    /* Order Card Wide */
    .order-card-wide {
        padding: 14px;
    }
    
    .order-card-wide .oc-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .order-card-wide .oc-body {
        flex-direction: column;
        gap: 12px;
    }
    
    .order-card-wide .oc-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .order-card-wide .oc-meta-item {
        font-size: 0.85rem;
    }
    
    .order-card-wide .stepper-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }
    
    /* Order Card Compact */
    .order-card-compact {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px;
    }
    
    .order-card-compact .oc-products-info {
        margin-left: 0;
    }
    
    .order-card-compact .oc-left {
        width: 100%;
    }
    
    .order-card-compact .oc-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .order-card-compact .product-thumb {
        width: 50px;
        height: 50px;
    }
    
    /* Action Dropdown */
    .action-dropdown-menu {
        position: fixed;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: 20px;
        transform: translateX(-50%);
        min-width: calc(100% - 32px);
        max-width: 320px;
        border-radius: 16px;
        z-index: 10001;
    }
    
    .dropdown-item {
        padding: 14px 16px;
        font-size: 0.95rem;
    }
    
    /* Account Dropdown */
    .account-dropdown {
        position: static;
    }
    
    .account-menu {
        position: fixed;
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        bottom: 20px;
        transform: none !important;
        min-width: auto;
        width: calc(100% - 32px);
        max-width: 320px;
        margin: 0 auto;
        border-radius: 16px;
    }
    
    .account-menu::before {
        display: none;
    }
    
    .account-menu a {
        padding: 14px 16px;
    }
    
    /* Product Thumbs */
    .product-thumbs {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .product-thumb {
        width: 40px;
        height: 40px;
    }
    
    /* Stepper */
    .stepper-wrapper {
        padding: 10px 0;
    }
    
    .stepper-step {
        font-size: 0.7rem;
    }
    
    .stepper-step .step-circle {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
}

/* Very Small Mobile (360px and below) */
@media (max-width: 360px) {
    .user-wrap {
        padding: 8px;
        margin: 10px auto;
    }
    
    .card {
        padding: 12px;
    }
    
    .order-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .order-icon img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .order-title {
        font-size: 0.9rem;
    }
    
    .order-sub {
        font-size: 0.8rem;
    }
    
    .orders-filter-bar .filter-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .status-pill {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
}

/* Touch Device Enhancements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .btn-cta,
    .filter-btn {
        min-height: 44px;
    }
    
    .action-dropdown-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .dropdown-item {
        min-height: 48px;
    }
    
    /* Disable hover effects on touch */
    .order-card:hover {
        transform: none;
        box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    }
    
    /* Active state for touch feedback */
    .btn:active,
    .order-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* Safe Area Support */
@supports (padding: env(safe-area-inset-bottom)) {
    .action-dropdown-menu,
    .account-menu {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Landscape Mobile */
@media (max-width: 812px) and (orientation: landscape) {
    .user-wrap {
        margin: 12px auto;
    }
    
    .orders-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
