

body.sidebar-open { overflow: hidden; }

/* ----------------- OVERLAY ----------------- */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1045;
}

body.sidebar-open #overlay {
  opacity: 1;
  visibility: visible;
}



#overlay-close-btn {
  position: fixed;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-dark);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size:1.3rem;
  z-index: 1070;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body.sidebar-open #overlay-close-btn {
  opacity: 1;
  pointer-events: auto;
}

/* ----------------- SIDEBAR ----------------- */
#sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  direction: rtl;
  top: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  width: min(90vw, 380px);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--secondary) 5%, transparent), transparent 180px),
    var(--bg);
  border-left:none;
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

#sidebar.open { transform: translateX(0); }

.sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  border-bottom: 6px solid var(--bg-light);
}

.sb-theme-radio {
  direction: ltr;
}

.sidebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border-muted);
  border-radius: 50%;
  color: var(--text-muted);
  background: var(--bg-dark);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.sidebar-close:hover {
  color: var(--text);
  background: var(--bg-light);
  transform: rotate(8deg);
}

.sidebar-close:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
}

/* ── Content (scrollable) ── */
.sb-content {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

/* ── Group ── */
.sb-group {
  padding: 0 16px;
  margin-bottom: 8px;
  border-bottom: 6px solid var(--bg-light);
}

.sb-content .sb-group:last-child {
  border-bottom: none;
}

.sb-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  padding: 10px 8px 6px;
  opacity: 0.6;
}

/* ── Menu ── */
.sb-menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sb-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.1s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: right;
  font-family: inherit;
  position: relative;
  line-height: 1.4;
}

.sb-menu-item i {
  font-size: 1.1rem;
  width: 1.2rem;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: color 0.1s;
}

.sb-menu-item:hover {
  background: color-mix(in srgb, var(--text) 6%, transparent);
}

.sb-menu-item:hover i {
  color: var(--text);
}

.sb-menu-item::after {
  content: "\ea64";
  font-family: "remixicon";
  margin-inline-start: auto;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--text-muted);
  opacity: 0.55;
  flex-shrink: 0;
  transition: color 0.1s, transform 0.15s;
}

.sb-menu-item:hover::after {
  color: var(--text);
  opacity: 1;
  transform: translateX(-3px);
}

#sbNotifBtn::after {
  content: none;
}

/* ── User Footer ── */
.sb-footer {
  flex-shrink: 0;
  border-top: 6px solid var(--bg-light);
  padding: 8px 16px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0));
}

.sb-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.sb-user-row:hover {
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.sb-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--info), var(--highlight));
  color: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.sb-user-info {
  flex: 1;
  min-width: 0;
}

.sb-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sb-user-phone {
  font-size: 0.78rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: right;
  line-height: 1.3;
}

.sb-footer i:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: transform 0.15s;
}

.sb-user-row:hover i:last-child {
  transform: translateX(-3px);
  color: var(--info);
}

/* ── Notification Badge ── */
#sbNotifBtn {
  position: relative;
}

.sb-notif-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

#sidebar.open { transform: translateX(0); }

.sb-notif-arrow {
  margin-right: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

#sbNotifBtn.active .sb-notif-arrow {
  transform: rotate(180deg);
}

/* ── Notification Section (inline) ── */
.sb-notif-section {
  display: none;
  flex-direction: column;
  padding: 8px;
}

.sb-notif-section.active {
  display: flex;
}

.sb-notif-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
  padding: 0 8px;
}

.sb-notif-empty {
  text-align: center;
  padding: 20px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.sb-notif-empty i {
  font-size: 1.4rem;
  opacity: 0.3;
}

.sb-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: color-mix(in srgb, var(--text) 4%, transparent);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
  cursor: pointer;
  position: relative;
}

.sb-notif-item:active {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.sb-notif-item.unread {
  background: color-mix(in oklch, var(--info) 6%, transparent);
}

.sb-notif-item.unread::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--info);
}

.sb-notif-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.sb-notif-icon.order {
  background: color-mix(in oklch, var(--info) 12%, transparent);
  color: var(--info);
}

.sb-notif-icon.support {
  background: color-mix(in oklch, var(--success) 12%, transparent);
  color: var(--success);
}

.sb-notif-body {
  flex: 1;
  min-width: 0;
}

.sb-notif-body-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1px;
  line-height: 1.3;
}

.sb-notif-body-msg {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-notif-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 1px;
  white-space: nowrap;
}

.sb-notif-mark-all {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 6px 8px;
  border-radius: 6px;
  transition: color 0.1s, background 0.1s;
  align-self: flex-start;
  margin: 4px 8px 0;
}

.sb-notif-mark-all:hover {
  color: var(--info);
  background: color-mix(in oklch, var(--info) 8%, transparent);
}

.notif-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  direction: rtl;
}

.notif-pagination[hidden] {
  display: none;
}

.notif-pagination button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 28px;
  min-width: 28px;
  padding: 0 8px;
  border: 1px solid var(--border-muted);
  border-radius: 7px;
  color: var(--text);
  background: var(--bg-dark);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.notif-pagination button i {
  font-size: 14px;
}

.notif-pagination button:hover:not(:disabled) {
  border-color: var(--info);
  background: var(--bg-light);
}

.notif-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}

.notif-pagination span {
  min-width: 48px;
  color: var(--text-muted);
  font-size: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sb-notif-section > .notif-pagination {
  margin-top: 7px;
}

.sb-notif-section {
  padding: 0 8px 8px;
}

.sb-notif-section .sb-notif-list {
  max-height: min(44dvh, 360px);
  padding: 0;
}

.sb-notif-list .nav-notif-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 8px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text);
  direction: rtl;
  text-align: right;
  text-decoration: none;
}

.sb-notif-list .nav-notif-item:last-of-type {
  border-bottom: 0;
}

.sb-notif-list .nav-notif-item > i {
  align-self: center;
  color: var(--text-muted);
  font-size: 18px;
}

.sb-notif-list .nav-notif-item.unread {
  background: color-mix(in srgb, var(--text) 5%, transparent);
}

.sb-notif-list .nav-notif-item__body,
.sb-notif-list .nav-notif-order-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.sb-notif-list .nav-notif-item__meta,
.sb-notif-list .nav-notif-order-details,
.sb-notif-list .nav-notif-ticket-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--text-muted);
  font-size: 10px;
}

.sb-notif-list .nav-notif-item__meta b,
.sb-notif-list .nav-notif-order-copy strong {
  color: var(--text);
  font-weight: 650;
}

.sb-notif-list .nav-notif-order-copy strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-notif-list .nav-notif-item__body > strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sb-notif-list .nav-notif-item__message {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sb-notif-list .nav-notif-order-steps {
  display: flex;
  align-items: center;
  margin-top: 2px;
  padding: 6px;
  border: 1px solid var(--border-muted);
  border-radius: 6px;
}

.sb-notif-list .nav-notif-step {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 9px;
  white-space: nowrap;
}

.sb-notif-list .nav-notif-step.done { color: var(--success); }
.sb-notif-list .nav-notif-step.active { color: var(--text); font-weight: 700; }

.sb-notif-list .nav-notif-step-line {
  min-width: 6px;
  height: 2px;
  flex: 1;
  margin: 0 4px;
  border-radius: 1px;
  background: var(--border-muted);
}

.sb-notif-list .nav-notif-step-line.done { background: var(--success); }
.sb-notif-list .nav-notif-step-line.active { background: linear-gradient(90deg, var(--border-muted), var(--success)); }

.sb-notif-list .nav-notif-order-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-notif-list .nav-notif-order-copy { flex: 1; }

.sb-notif-list .nav-notif-order-status,
.sb-notif-list .nav-notif-ticket-status,
.sb-notif-list .nav-notif-ticket-category {
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--info);
  background: color-mix(in srgb, var(--info) 12%, transparent);
  font-size: 10px;
}

.sb-notif-list .nav-notif-order-status.is-failed,
.sb-notif-list .nav-notif-ticket-status.is-closed {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.sb-notif-list .nav-notif-products {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.sb-notif-list .nav-notif-product {
  width: 40px;
  height: 48px;
  overflow: hidden;
  border: 1px solid var(--border-muted);
  border-radius: 4px;
}

.sb-notif-list .nav-notif-product img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----------------- CART BADGE & DROPDOWN ----------------- */
#cart-badge {
  position: absolute;
  top: -1px;
  right: -2px;
  background: var(--primary);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

#cart-dropdown {
  position: fixed;
  top: 60px;
  left: -1px;
  width: 385px;
  
  overflow: auto;
  max-height: 550px;

  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  padding: 8px;
  display: none;
  z-index: 960;
}

#cart-dropdown ul { padding: 0; margin: 0; }
#cart-dropdown li {
  padding: 6px 8px;

  color: var(--text);
}
#cart-dropdown li:last-child { border-bottom: none; }

#cart-button {
  position: relative;
  z-index: 951; /* slightly above top-left-buttons if needed */
}







.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid var(--border-muted);
    border-radius: 0.25rem;
    background: var(--bg-light);
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qty-btn:hover {
    background: var(--primary);
}

.qty-number {
    min-width: 20px;
    text-align: center;
}

.qty-btn .ri-delete-bin-line {
    font-weight: 300;
}

.qty-btn .ri-add-line {
    font-weight: 300;
}

.desktop-cart-dropdown .qty-btn .ri-add-line {
    font-size: 1rem;
}

#cart-dropdown .qty-btn i {
    font-size: 1rem;
}


.cart-footer {
    padding: 0.5rem;
    border-top: 1px solid var(--border-muted);
    text-align: center;
}

.checkout-btn {
    display: inline-block;
    padding: 0.65rem 2rem;
    background-color: var(--primary);
    color: var(--bg);
    font-weight: 600;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkout-btn:hover {
    background-color: var(--success);
}









/* ----------------- HAMBURGER ----------------- */
.hamburger {
  position: fixed;
  top: 10px;
  right: 8px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 1px solid var(--border-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: background 0.2s;
}

.hamburger:hover {
  background: var(--bg-light);
}

.mobile-notif-badge {
  position: absolute;
  top: -2px;
  right: auto;
  left: -2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  color: var(--bg);
  background: var(--primary);
  font-size: 0.7rem;
  font-weight: bold;
  line-height: 1;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 12px;
  z-index: 2;
  transform-origin: 50% 20%;
  animation: mobile-notif-ring 3s ease-in-out infinite;
}

@keyframes mobile-notif-ring {
  4%, 12%, 20% { transform: rotate(12deg); }
  8%, 16%, 24% { transform: rotate(-12deg); }
  28%, 100% { transform: rotate(0); }
}

/* =========================
   EMPTY CART STATE
   ========================= */

.empty-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem !important;
    border-bottom: none !important;
}

.empty-cart-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.empty-cart-icon-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-cart-icon {
    font-size: 1.5rem;
    color: var(--bg);
}

.empty-cart-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 0.75rem;
}

.empty-cart-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.empty-cart-link {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: var(--primary);
    color: var(--bg);
    border-radius: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.empty-cart-link:hover {
    opacity: 0.85;
}

@media (max-width: 400px) {
    .empty-cart-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-notif-badge {
    animation: none;
  }
}

.hamburger span {
  position: absolute;
  height: 2.5px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s ease, width 0.25s ease;
}

.hamburger span:nth-child(1) { width: 20px; transform: translateY(-5px); }
.hamburger span:nth-child(2) { width: 13px; transform: translateY(5px); left: 42%; translate: -50% ; }



/* ----------------- TOP-LEFT BUTTONS ----------------- */
#top-left-buttons {
  position: fixed;
  top:  8px;
  left: 8px;
  display: flex;
  gap: 6px;
  padding: 5px 6px;
  background: color-mix(in srgb, var(--bg) 30%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50px;
  border: 1px solid var(--border-muted  );
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 950;
   transition: top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}



#top-left-buttons .icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);

  cursor: pointer;
  transition: background 0.2s;
  border: 1px solid var(--border-muted);
  
}

#top-left-buttons .icon-btn:hover { background: var(--bg-light); }
#top-left-buttons i { font-size: 1.4rem; color: var(--text); }
#top-left-buttons .empty-cart-icon { color: var(--bg); }



/* ----------------- EXPANDABLE SEARCH ----------------- */
.search-expandable {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  border: 1px solid var(--border-muted);
  border-radius: 50%;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  overflow: hidden;
  transition: width 0.25s ease, border-radius 0.25s ease, padding 0.25s ease;
  cursor: pointer;
}

.search-expandable i {
  font-size: 1.4rem;
  color: var(--text);
  flex-shrink: 0;
}

.search-expandable form {
  display: flex;
  min-width: 0;
  overflow: hidden;
}

.search-expandable input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
  width: 0;
  min-width: 0;
  opacity: 0;
  padding: 0;
  flex: 0 0 0;
}

.search-expandable:focus-within,
.search-expandable.active {
  width: min(230px, calc(100vw - 170px));
  border-radius: 50px;
  padding: 0 14px 0 10px;
  justify-content: flex-start;
  gap: 8px;
  direction: rtl;
}


.search-expandable:focus-within input {
  opacity: 1;
  width: 100%;
  flex: 1;
  border-radius: 6px;
  background: var(--bg-dark);
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
}


#searchInput {
  width: 100%;
  border: none;
  border-radius: 6px;
  background: var(--bg-dark);
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
}

/* ----------------- NAV WRAPPER ----------------- */
nav#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: var(--bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);

}

/* ----------------- PAGE ----------------- */
#page {
  position: relative;
  overflow-x: hidden;
  transition: transform 0.1s cubic-bezier(0.4,0,0.2,1);
}
main {
  margin-top: 100px;
  padding: 24px;
}





/* icons behaivor after clicking on them */
#top-left-buttons .icon-btn:active i,
#top-left-buttons .icon-btn.active i {
  color: var(--primary);
}
#top-left-buttons .icon-btn:active {
  transform: scale(0.9);
  transition: transform 0.05s ease;
}



/* --- Remove all browser default focus and tap highlights --- */
button,
.icon-btn,
input,
a {
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important; /* Safari & Chrome on mobile */
  -webkit-focus-ring-color: transparent !important;     /* Safari blue ring */
  -moz-focus-inner: none !important;                    /* Firefox inner border */
}

button::-moz-focus-inner,
.icon-btn::-moz-focus-inner {
  border: 0 !important;
}

button:focus,
.icon-btn:focus,
input:focus,
a:focus {
  outline: none !important;
  box-shadow: none !important;
}
















#brand-header {
  background: var(--bg-light);
  color: var(--text);
  text-align: left;
  direction: ltr;
  padding: 16px 0 4px 20px; /* extra top padding for breathing room */
  position: relative;
  z-index: 5;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand {
  font-size: 1.8rem;
  line-height: 1;
  margin: 0;
}











/* testing */
/* Base mobile: hidden */
#desktop-nav {
  display: none;
}

/* Desktop layout override */
@media (min-width: 768px) {
  #brand-header,
  #top-left-buttons,
  #menu-toggle {
    display: none;
  }
  /* --- Desktop Nav Container --- */
  #desktop-nav {
    position: sticky;
    top: 0; 
    display: flex;
    flex-direction: column;
    padding: 0;
    background: color-mix(in oklch, var(--bg-dark) 86%, transparent);
    color: var(--text);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
  }

  .desktop-nav-main {
    width: min(100%, 1823px);
    min-height: 60px;
    margin-inline: auto;
    padding: 0 clamp(1.25rem, 4vw, 4rem);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    border-bottom: 1px solid color-mix(in oklch, var(--border-muted) 45%, transparent);
  }

  /* --- Sections Layout --- */
  .nav-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
  }

  .desktop-brand-name {
    justify-self: start;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.35rem, 2.1vw, 1.8rem);
    font-weight: 400;
    letter-spacing: 0.14em;
    line-height: 1;
    white-space: nowrap;
    text-transform: uppercase;
    transition: color 0.2s ease;
  }

  .desktop-brand-name:hover {
    color: var(--primary);
  }

  .desktop-brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* ── Desktop Notification ── */
  .desktop-notif-wrapper {
    position: relative;
  }

  .desktop-notif-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
  }

  .desktop-notif-btn:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--text) 6%, transparent);
  }

.desktop-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--danger);
    color: var(--bg);
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid var(--bg);
  }

  .desktop-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    background: var(--bg);
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0,0,0,0.04);
    z-index: 1100;
    overflow: hidden;
    animation: dropdown-in 0.15s ease;
  }

  @keyframes dropdown-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .desktop-notif-dropdown.active {
    display: block;
  }

  /* Customer notification center */
  .desktop-notif-dropdown {
    position: fixed;
    top: 72px;
    right: auto;
    left: clamp(16px, 4vw, 64px);
    width: min(500px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 88px));
    border-color: color-mix(in srgb, var(--text) 13%, var(--border-muted));
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-dark) 96%, var(--text));
    box-shadow: 0 24px 70px rgb(0 0 0 / 0.3);
  }

  .desktop-notif-dropdown.active {
    display: flex;
    flex-direction: column;
  }

  .customer-notif-tabs {
    display: flex;
    gap: 5px;
    padding: 10px 12px;
  }

  .customer-notif-tab {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-muted);
    background: transparent;
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
  }

  .customer-notif-tab:hover {
    border-color: var(--border-muted);
    color: var(--text);
  }

  .customer-notif-tab.active {
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    color: var(--bg-dark);
    background: var(--text);
  }

  .customer-notif-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 11px;
  }

  .customer-notif-list-heading > span:first-child {
    color: var(--text);
    font-weight: 680;
  }

  .desktop-notif-dropdown .sb-notif-list {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
    direction: rtl;
  }

  .desktop-notif-dropdown .sb-notif-item {
    min-height: 82px;
    gap: 10px;
    margin: 2px 0;
    padding: 11px 14px;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
  }

  .desktop-notif-dropdown .sb-notif-item[hidden] {
    display: none;
  }

  .desktop-notif-dropdown .sb-notif-item:hover {
    border-color: color-mix(in srgb, var(--text) 10%, transparent);
    background: color-mix(in srgb, var(--text) 5%, transparent);
  }

  .desktop-notif-dropdown .sb-notif-item.unread {
    background: transparent;
  }

  .desktop-notif-dropdown .sb-notif-item.unread::before {
    top: 16px;
    right: 7px;
    background: var(--text);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 12%, transparent);
  }

  .desktop-notif-dropdown .sb-notif-icon {
    width: 38px;
    height: 38px;
    border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
    border-radius: 11px;
  }

  .desktop-notif-dropdown .sb-notif-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
  }

  .customer-notif-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: 10px;
  }

  .customer-notif-meta > span {
    color: var(--text);
    font-weight: 650;
  }

  .desktop-notif-dropdown .sb-notif-body-title {
    font-size: 13px;
    font-weight: 700;
  }

  .desktop-notif-dropdown .sb-notif-body-msg {
    white-space: normal;
    font-size: 11px;
    line-height: 1.65;
  }

  .customer-notif-order-meta,
  .customer-notif-support-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 10px;
  }

  .customer-notif-order-meta > span:last-child {
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }

  .customer-notif-products {
    display: flex;
    gap: 4px;
    margin-top: 3px;
  }

  .customer-notif-product {
    position: relative;
    width: 34px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-muted);
    border-radius: 6px;
    background: var(--bg);
  }

  .customer-notif-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .customer-notif-product b {
    position: absolute;
    bottom: 0;
    left: 0;
    min-width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px 0 4px 0;
    color: var(--bg-dark);
    background: var(--text);
    font-size: 8px;
  }

  .customer-notif-arrow {
    align-self: center;
    color: var(--text-muted);
    font-size: 18px;
  }

  .customer-notif-footer {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-top: 1px solid var(--border-muted);
    color: var(--text-muted);
    font-size: 10px;
  }

  /* Navigation notification panel */
  .nav-notif-panel.desktop-notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: auto;
    left: 0;
    width: min(420px, calc(100vw - 32px));
    height: min(560px, calc(100vh - 88px));
    max-height: min(560px, calc(100vh - 88px));
    overflow: hidden;
    border: 1px solid var(--border-muted);
    border-radius: 0.5rem;
    background: var(--bg-dark);
    box-shadow: 0 20px 48px rgb(0 0 0 / 0.24);
  }

  .nav-notif-panel.desktop-notif-dropdown.active {
    display: flex;
    flex-direction: column;
  }

  .desktop-notif-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-muted);
  }

  .desktop-notif-title {
    color: var(--text);
    font-size: 1.05rem;
    font-weight: 600;
  }

  .notif-total-count {
    color: var(--text-muted);
    font-size: 0.8rem;
  }

  .desktop-notif-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
  }

  .desktop-notif-close-btn:hover {
    color: var(--text);
    background: var(--bg);
  }

  .desktop-notif-body {
    min-height: 0;
    flex: 1;
    overflow: hidden;
  }

  .nav-notif-list {
    display: grid;
    height: 100%;
    overflow-y: auto;
    padding: 0 8px 8px;
    direction: rtl;
  }

  .nav-notif-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16px;
    align-items: start;
    gap: 9px;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border-muted);
    color: var(--text);
    text-decoration: none;
    direction: rtl;
    text-align: right;
  }

  .nav-notif-item:hover {
    background: var(--bg);
  }

  .nav-notif-item:last-of-type {
    border-bottom: 0;
  }

  .nav-notif-item[hidden] {
    display: none;
  }

  .nav-notif-item.unread {
    background: color-mix(in srgb, var(--text) 5%, transparent);
  }

  .nav-notif-item__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--info);
    background: color-mix(in srgb, var(--info) 12%, transparent);
    font-size: 16px;
  }

  .nav-notif-item__icon.support {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 12%, transparent);
  }

  .nav-notif-item__body {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 4px;
  }

  .nav-notif-item__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-muted);
    font-size: 10px;
  }

  .nav-notif-item__meta b {
    color: var(--text);
    font-weight: 650;
  }

  .nav-notif-item__body strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-notif-item__message {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .nav-notif-item > i {
    align-self: center;
    color: var(--text-muted);
    font-size: 18px;
  }

  .nav-notif-order-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 10px;
  }

  .nav-notif-ticket-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--text-muted);
    font-size: 10px;
  }

  .nav-notif-order-summary {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-notif-order-copy {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 3px;
  }

  .nav-notif-order-steps {
    display: flex;
    align-items: center;
    min-width: 0;
    margin-top: 2px;
    padding: 7px 8px;
    border: 1px solid var(--border-muted);
    border-radius: 6px;
    background: color-mix(in srgb, var(--bg) 65%, transparent);
  }

  .nav-notif-step {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
  }

  .nav-notif-step.done {
    color: var(--success);
  }

  .nav-notif-step.active {
    color: var(--text);
    font-weight: 700;
  }

  .nav-notif-step-line {
    height: 2px;
    min-width: 8px;
    flex: 1;
    margin: 0 5px;
    border-radius: 1px;
    background: var(--border-muted);
  }

  .nav-notif-step-line.done {
    background: var(--success);
  }

  .nav-notif-step-line.active {
    background: linear-gradient(90deg, var(--border-muted), var(--success));
  }

  .nav-notif-order-status,
  .nav-notif-ticket-status,
  .nav-notif-ticket-category {
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--info);
    background: color-mix(in srgb, var(--info) 12%, transparent);
    font-weight: 650;
  }

  .nav-notif-order-status.is-failed,
  .nav-notif-ticket-status.is-closed {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12%, transparent);
  }

  .nav-notif-products {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-top: 1px;
    flex-shrink: 0;
  }

  .nav-notif-product {
    width: 46px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--border-muted);
    border-radius: 4px;
    background: var(--bg);
  }

  .nav-notif-product img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .nav-notif-product-more {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 650;
  }

  .nav-notif-list .sb-notif-empty {
    min-height: 160px;
  }

  .desktop-notif-footer {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border-muted);
  }

  .desktop-notif-mark-all {
    padding: 0;
    border: 0;
    color: var(--text-muted);
    background: transparent;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
  }

  .desktop-notif-mark-all:hover {
    color: var(--primary);
  }

  .desktop-nav-secondary {
    width: 100%;
    max-width: 1810px;
    max-height: 200px;
    padding: 0 clamp(1.25rem, 4vw, 4rem);
    display: flex;
    align-items: center;
    margin: auto;
    justify-content: center;
    gap: clamp(0.8rem, 2vw, 1.85rem);
    background: color-mix(in oklch, var(--bg) 22%, transparent);
    transition: max-height 0.35s ease;
    overflow: hidden;
    scrollbar-width: none;
  }

  .desktop-nav-secondary.nav-secondary--hidden {
    max-height: 0;
    min-height: 0;
  }

  .desktop-nav-secondary:has(.desktop-notif-dropdown.active) {
    overflow: visible;
  }

  .desktop-nav-secondary::-webkit-scrollbar {
    display: none;
  }

  .desktop-nav-secondary a {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .desktop-nav-secondary a i {
    font-size: 1.15rem;
  }

  .desktop-nav-secondary a:hover {
    color: var(--text);
  }

  .desktop-nav-secondary .nav-address-btn {
    flex: 0 0 auto;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    direction: rtl;
    padding: 0;
    margin-left: 5px;
  }

  .desktop-nav-secondary .nav-address-group {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-inline-end: auto;
  }

  .desktop-nav-secondary .nav-address-btn i {
    font-size: 1.15rem;
  }

  .desktop-nav-secondary .nav-address-btn:hover {
    color: var(--text);
  }

  .desktop-nav-secondary .nav-address-btn i {
    color: var(--primary);
  }

  /* --- Search --- */
  .search-wrapper {
    width: min(100%, 380px);
    display: flex;
    align-items: center;
    background: color-mix(in oklch, var(--bg) 76%, transparent);
    border: 1px solid var(--border-muted);
    border-radius: 8px;
    padding: 0 0.75rem;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
  }

  .search-wrapper i {
    color: var(--text-muted);
    font-size: 1rem;
  }

  .search-wrapper:hover {
    background: var(--bg-light);
  }

  .search-wrapper input {
    width: 100%;
    padding: 0.55rem 0.65rem;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text);
    font-size: 0.88rem;
  }

  .search-wrapper:focus-within {
    border-color: var(--primary);
    background: color-mix(in oklch, var(--bg-light) 90%, var(--bg-dark)) !important;
    box-shadow: 0 0 0 2px color-mix(in oklch, var(--primary) 30%, transparent);
  }

  /* --- Buttons (Filter & User) --- */
  .user-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-muted);
    color: var(--text);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.2s ease;
  }
  
  .user-btn:hover {
    color: var(--text);
    border-color: var(--primary);
    background: color-mix(in oklch, var(--primary) 15%, var(--bg-dark));
    box-shadow: 0 0 8px color-mix(in oklch, var(--primary) 30%, transparent);
    transform: translateY(-1px);
    
  }

  .user-btn i {
    font-size: 1.1rem;
  }

  .desktop-cart-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 0;
    height: 2.5rem;
    padding: 0 0.85rem;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-muted);
    color: var(--text);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .desktop-cart-trigger:hover {
    color: var(--text);
    border-color: var(--primary);
    background: color-mix(in oklch, var(--primary) 15%, var(--bg-dark));
    box-shadow: 0 0 8px color-mix(in oklch, var(--primary) 30%, transparent);
    transform: translateY(-1px);
  }

  .desktop-cart-trigger i {
    font-size: 1.1rem;
  }

  .desktop-nav-main .theme-radio {
    height: 2.75rem;
    padding: 2px;
  }

  .desktop-nav-main .theme-radio::before {
    top: 2px;
    left: 2px;
    width: 38px;
    height: 38px;
  }

  .desktop-nav-main .theme-radio span {
    width: 38px;
    height: 38px;
  }

  html[data-theme="light"] .desktop-nav-main .theme-radio::before {
    transform: translateX(38px);
  }


  #desktop-cart-badge {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    min-width: 1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 0.2rem;
    background: var(--primary);
    color: var(--bg);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* --- Search Shrink Responsively --- */
  @media (max-width: 1200px) {
    .desktop-nav-main {
      grid-template-columns: auto 1fr;
      gap: 1.5rem;
      padding: 0 1.5rem;
    }

    .search-wrapper {
      width: min(100%, 320px);
    }
  }

  @media (max-width: 1024px) {
    .desktop-nav-main {
      grid-template-columns: auto 1fr;
      gap: 1rem;
      padding: 0 1rem;
      min-height: 52px;
    }

    .desktop-brand-name {
      font-size: clamp(1.1rem, 2vw, 1.4rem);
    }

    .nav-right {
      gap: 0.5rem;
      flex-wrap: nowrap;
      overflow: hidden;
    }

    .search-wrapper {
      width: min(100%, 260px);
    }

    .user-btn {
      height: 2.2rem;
      padding: 0 0.6rem;
      font-size: 0.75rem;
    }

    .desktop-cart-trigger {
      height: 2.2rem;
      padding: 0 0.6rem;
      font-size: 0.75rem;
    }

    .desktop-nav-secondary {
      gap: clamp(0.5rem, 1.5vw, 1.2rem);
      padding: 0 1rem;
    }

    .desktop-nav-secondary a,
    .desktop-nav-secondary .nav-address-btn {
      font-size: 0.82rem;
    }
  }
}


/* --- Theme Toggle Button --- */
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--bg-dark) 90%, transparent);
  border: 1px solid var(--border-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.theme-btn i {
  font-size: 1.2rem;
  color: var(--text);
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Default (dark mode) */
.theme-btn .light-icon {
  opacity: 0;
  transform: translateY(8px);
}

.theme-btn .dark-icon {
  opacity: 1;
  transform: translateY(0);
}

/* Hover */
.theme-btn:hover {
  border-color: var(--primary);
  background: color-mix(in oklch, var(--primary) 15%, var(--bg-dark));
  box-shadow: 0 0 8px color-mix(in oklch, var(--primary) 25%, transparent);
}

/* Light mode state */
html[data-theme="light"] .theme-btn .light-icon {
  opacity: 1;
  transform: translateY(0);
}

html[data-theme="light"] .theme-btn .dark-icon {
  opacity: 0;
  transform: translateY(-8px);
}

/* --- Theme Transition (global) --- */
html {
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

/* Avoid weird flash on load before theme is set */
html.theme-transition {
  transition: none !important;
}







/* desktop cart */
.desktop-cart-dropdown {
    position: absolute;
    top: calc(100% + 0.1rem);
    right: clamp(2.55rem, 16vw, 16rem);
    left: auto;
    width: 540px;
    max-height: 600px;
    overflow-y: auto;
    background: var(--bg-dark);
    border: 1px solid var(--border-muted);
    border-radius: 0.5rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    z-index: 1000; /* ensure it's above other elements */
    padding: 0.75rem;

}

.desktop-cart-dropdown[hidden] {
    display: none !important;
}

.desktop-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-muted);
    margin-bottom: 0.5rem;
}

.mini-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-muted);
}

.mini-cart-item {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.2rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-muted);
    direction: rtl;
}

.mini-cart-thumb-link {
    flex-shrink: 0;
    line-height: 0;
}

.mini-cart-thumb-img,
.mini-cart-thumb-placeholder {
    display: block;
}

.mini-cart-item-link {
    grid-column: 1;
    grid-row: 1;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.mini-cart-item-details {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 0.4rem;
    direction: rtl;
    text-align: right;
}

.mini-cart-item-bottom {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
}

.mini-cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
}

.mini-cart-item-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mini-cart-price-top {
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-cart-item-right {
    display: flex;
    flex-direction: column;
    gap: 6  px;
    align-items: flex-end;
}

.mini-cart-thumb-img {
    width: 110px;
    height: 110px;
    max-width: 30vw;
    max-height: 30vw;
    object-fit: cover;
    border-radius: 0.25rem;
}

.mini-cart-thumb-placeholder {
    width: 110px;
    height: 110px;
    max-width: 30vw;
    max-height: 30vw;
    background: var(--secondary);
    border-radius: 0.25rem;
}

.mini-cart-item .desktop-cart-discounted-price {
    font-size: 0.8rem;
}

.mini-cart-item .cart-item-price del {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.mini-cart-item .desktop-cart-discount-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.desktop-cart-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.cart-total-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}


.desktop-cart-dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.desktop-cart-dropdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    padding-bottom: 0.75rem;
}

.desktop-cart-dropdown li:last-child {
    margin-bottom: 0.5;
}

.desktop-cart-dropdown .cart-item-name {
    font-size: 1rem;
    font-weight: 600;
}

.desktop-cart-dropdown .cart-item-size {
    font-size: 0.85rem;
}

.desktop-cart-dropdown .cart-item-price {
    font-size: 0.95rem;
    font-weight: 600;
}

.desktop-cart-dropdown .cart-item-price del {
    font-size: 0.75rem;
    opacity: 0.5;
    font-weight: 400;
    text-decoration: line-through;
}

.desktop-cart-dropdown .quantity-controls {
    border: 1px solid var(--border-muted);
    border-radius: 0.25rem;
    padding: 0.15rem 0.25rem;
}

.desktop-cart-dropdown .cart-item-variant {
    padding-right: 0;
}

.desktop-cart-dropdown .cart-footer {
    border-top: 1px solid var(--border-muted);
    padding-top: 0.5rem;
    text-align: center;
}

.desktop-cart-item {
    display: flex;
    align-items: start;
    direction: rtl;
    padding: 8px ;
    border: 1px solid var(--bg-light);
    border-radius: 6px;
}
[data-theme="light"] .desktop-cart-item {
    border: 1px solid var(--border-muted);
}
.desktop-cart-item-info {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 0.2rem;
    padding: 0;
    min-width: 0;
    flex: 1;
}

.desktop-cart-item-link {
    text-decoration: none;
    color: inherit;
}

.desktop-cart-price {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    direction: rtl;
}

.desktop-cart-price-top {
    display: flex;
    align-items: center;
    gap: 4px;
}

.desktop-cart-price del {
    direction: rtl;
}

.desktop-cart-discounted-price {
    display: inline;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    direction: rtl;
}

.desktop-cart-discount-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bg-dark);
    background: var(--primary);
    border-radius: 0.2rem;
    padding: 0.15rem 0.4rem;
    line-height: 1;
    direction: rtl;
}

.desktop-cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.desktop-cart-thumb-link {
    flex-shrink: 0;
    align-self: start;
}

.desktop-cart-thumb-img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.desktop-cart-thumb-placeholder {
    width: 130px;
    height: 130px;
    background: var(--secondary);
    border-radius: 0.25rem;
}





.cart-total {
  display:flex;
  align-items: center;
  justify-content:end;
  margin-left: 10px;
}









.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.desktop-cart-item-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
  padding: 0;
}

.cart-item-link {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  direction: rtl;
  text-align: right;
}

.cart-item-variant {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 15px;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--border-muted) !important;
  flex-shrink: 0;
}

.cart-item-size {
  font-size: 0.75rem;
  opacity: 0.7;
}

.cart-item-color {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-left: 0.4rem;
}

.cart-item-price {
  font-size: 0.85rem;
  font-weight: 500;
}







.desktop-cart-footer {
    position: sticky;
    bottom: 0;
    padding: 0.75rem;
    border-radius: 5px;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 10;
}

.desktop-cart-footer[hidden],
.mini-cart-footer[hidden],
.desktop-cart-footer.is-empty,
.mini-cart-footer.is-empty,
.desktop-cart-footer[data-cart-empty="true"],
.mini-cart-footer[data-cart-empty="true"] {
  display: none !important;
}

.desktop-cart-footer .cart-total {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.2rem;
    direction: rtl;
}

.cart-total-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cart-total-price del {
    font-size: 0.8rem;
    opacity: 0.5;
    text-decoration: line-through;
}

.cart-total-discounted {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cart-total-discount-badge {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bg-dark);
    background: var(--primary);
    border-radius: 0.2rem;
    padding: 0.1rem 0.3rem;
    line-height: 1;
}

.cart-close-sticky {
    position: sticky;
    top: 0;

    height: 0;              /* IMPORTANT */
    pointer-events: none;   /* wrapper is invisible */

    z-index: 20;
}

.desktop-cart-header .cart-close-btn,
.mini-cart-header .cart-close-btn {
    position: static;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.desktop-cart-header .cart-close-btn i,
.mini-cart-header .cart-close-btn i {
    font-size: 1.1rem;
}

.desktop-cart-header .cart-close-btn:hover,
.mini-cart-header .cart-close-btn:hover {
    background: var(--bg-light);
    color: var(--text);
}








/* Main dropdown container */
.mini-cart {
  position: absolute;           
  top: 100%;
  right: 0;

  display: flex;
  flex-direction: column;

  width: 300px;
  max-width: calc(100vw - 2rem);
  min-width: 240px;

  border-radius: 0.5rem;
  box-shadow: 0 12px 30px var(--border-muted);

  overflow: hidden;
  z-index: 1000;
}

/* Scrollable items area */
.mini-cart-body {

  flex: 1 1 auto;
  min-height: 0;                  /* necessary for flex scrolling */
  overflow-y: auto;
  overflow-x: hidden;

}

/* Remove default UL behavior */
#cart-items-list {
  margin: 0;
  padding: 0.5rem;
  list-style: none;
}

/* Each item row */
#cart-items-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-muted);
}

#cart-items-list li:last-child {
  border-bottom: none;
}

/* Product info */
.cart-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  direction: rtl;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-variant {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  font-size: 0.75rem;
  opacity: 0.8;
}

/* Color dot */
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2);
  flex-shrink: 0;
}

/* Quantity controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 3px;
  flex-shrink: 0;
  border: 1px solid var(--border-muted);
  border-radius: 5px;
}

.qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.qty-number {
  min-width: 18px;
  text-align: center;
  font-size: 0.8rem;
}

/* Sticky footer */
.mini-cart-footer {
  position: sticky;
  bottom: 0;
  padding: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  /* Transparent background */
  background: color-mix(in srgb, var(--bg-light) 85%, transparent);
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 10;
}

.mini-cart-footer .cart-total {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.2rem;
  direction: rtl;
}


/* Total */
.cart-total {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  direction: rtl;
  font-size: 0.9rem;
  width: 100%;
}

.cart-total-prices {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.cart-total-label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  margin-right: 10px;
}

/* Checkout button */
.checkout-btn {
  display: block;
  text-align: center;
  padding: 0.6rem;
  border-radius: 0.4rem;
  background: var(--primary);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
}





.cart-item-name {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    display: block;
}

/* ==================== NAV CATEGORIES DROPDOWN ==================== */

.nav-cats-wrapper {
  position: relative;
}

.nav-cats-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-cats-btn i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.nav-cats-btn:hover,
.nav-cats-wrapper.open .nav-cats-btn {
  background: var(--bg-light);
}

.nav-cats-wrapper.open .nav-cats-btn i {
  transform: rotate(180deg);
}

.nav-cats-dropdown {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: row;
  background: var(--bg);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  z-index: 1100;
  min-height: 320px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transform-origin: top center;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.nav-cats-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-cats-right {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 8px;
  background: var(--bg-dark);
  border-left: 1px solid var(--border-muted);
}

.nav-cats-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  gap: 12px;
}

.nav-cats-item:hover,
.nav-cats-item.active {
  background: var(--bg-light);
  color: var(--text);
}

.nav-cats-item i {
  font-size: 1rem;
  color: var(--text-muted);
}

.nav-cats-left {
  min-width: 600px;
  max-width: 700px;
  padding: 16px;
  overflow-y: auto;
  max-height: 400px;
}

.nav-cats-sublist {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 16px;
  align-items: start;
}

.nav-cats-sublist.active {
  display: grid;
}

.nav-cats-subgroup {
  margin-bottom: 8px;
}

.nav-cats-subitem {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-cats-subitem:hover {
  background: var(--bg-light);
  color: var(--text);
}

.nav-cats-subitem i {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-cats-subitem--parent {
  font-weight: 700;
}

.nav-cats-subitem--child {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .nav-cats-wrapper {        display: none;
  }
}

/* ----------------- SEARCH AUTOCOMPLETE DROPDOWN ----------------- */
.search-suggest {
  min-width: 0;
  max-height: min(70vh, 600px);
  overflow: hidden;
  background: var(--bg-dark);
  border: 1px solid var(--border-muted);
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  padding: 1rem;
  direction: rtl;
  text-align: right;
  z-index: 1200;
  font-family: inherit;
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  left: auto;
  width: 640px;
  max-width: min(640px, calc(100vw - 2rem));
}

.search-suggest__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-muted);
  margin-bottom: 0.5rem;
}

.search-suggest__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-muted);
  background: transparent;
  color: var(--text-muted);
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  padding: 0;
}

.search-suggest__close:hover {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text);
}

.search-suggest__close i {
  font-size: 1.1rem;
}

.search-suggest__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.search-suggest__count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-suggest__body-scroll {
  max-height: min(60vh, 500px);
  overflow-y: auto;
  padding: 0;
}

.search-suggest__footer {
  display: flex;
  justify-content: flex-start;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-muted);
  margin-top: 0.5rem;
}

.search-suggest__view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.search-suggest__view-all:hover {
  background: color-mix(in srgb, var(--primary) 15%, transparent);
}

.search-suggest__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 2rem 1rem;
  color: var(--text-muted);
  text-align: center;
}

.search-suggest__empty i {
  font-size: 2rem;
  opacity: 0.5;
}

.search-suggest__empty span {
  font-size: 0.9rem;
  font-weight: 500;
}

.search-suggest[hidden] {
  display: none;
}

.search-suggest__label {
  padding: 6px 10px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.search-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.1s ease;
}

.search-suggest__item.is-active,
.search-suggest__item:hover {
  background: color-mix(in srgb, var(--text) 8%, transparent);
}

.search-suggest__item--phrase i {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Product cards -> reuse the real product-card classes from the categories
   app (horizontal image + info), compacted to fit inside the dropdown. */
.search-suggest__product-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0 8px;
}

.search-suggest .product-card-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 8px !important;
  border: 1px solid var(--border-muted) !important;
  border-radius: 10px !important;
  background: var(--bg) !important;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.search-suggest .product-card-link.is-active,
.search-suggest .product-card-link:hover {
  border-color: var(--primary);
  background: var(--bg-light);
}

.search-suggest .product-image {
  width: 98px !important;
  min-width: 98px !important;
  aspect-ratio: 1 / 1.1 !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  border-radius: 8px;
  background: var(--info);
  position: relative;
  flex-shrink: 0;
}

.search-suggest .product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.search-suggest .product-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
  padding: 1px 2px;
}

.search-suggest .product-info h3 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-suggest .product-sizes {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.search-suggest .product-sizes p,
.search-suggest .product-colors p {
  margin: 0;
  font-size: 0.6rem;
  color: var(--text-muted);
}

.search-suggest .size-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  padding: 0 4px;
  border: 1px solid var(--border-muted);
  border-radius: 3px;
  color: var(--text);
}

.search-suggest .product-colors {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.search-suggest .product-colors .color {
  width: 13px;
  height: 13px;
  border-radius: 4px;
  border: 1px solid var(--border-muted);
}

.search-suggest .product-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.search-suggest .price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.search-suggest .price-top-row {
  display: flex;
  align-items: center;
}

.search-suggest .product-price {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.search-suggest .product-price.discounted-price {
  color: var(--primary);
}

.search-suggest .original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 500;
}

.search-suggest .card-discount-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--bg-dark);
  background: var(--primary);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1;
  direction: rtl;
}

.search-suggest .product-out-of-stock {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Mobile: fixed-position panel like the mini-cart dropdown. */
@media (max-width: 767px) {
  .search-suggest.search-suggest--mobile {
    position: fixed !important;
    top: 60px !important;
    left: 4px !important;
    right: 4px !important;
    width: auto !important;
    max-width: none;
    padding: 0.75rem;
    border-radius: 12px;
    z-index: 1100;
    max-height: min(70vh, 600px);
    overflow: hidden;
  }

  .search-suggest.search-suggest--mobile:not([hidden]) {
    display: flex;
    flex-direction: column;
  }

  .search-suggest__body-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }

  .search-suggest__footer {
    flex-shrink: 0;
  }

  .search-suggest.search-suggest--mobile .search-suggest__footer {
    display: none !important;
  }
}

/* Desktop: show product cards two-per-row, mirroring the results grid. */
@media (min-width: 768px) {
  .search-suggest__product-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .search-suggest .product-card-link {
    margin: 0;
    min-width: 0;
  }

  .search-suggest .product-image {
    width: 100px !important;
    min-width: 100px !important;
    aspect-ratio: 1 / 1.1 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .search-suggest .product-info {
    min-width: 0;
  }
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: color-mix(in oklch, var(--bg-dark) 55%, transparent);
  border: 1px solid var(--border-muted);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--bg-light);
}

.back-to-top i {
  font-size: 1.8rem;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
  }
  .back-to-top i {
    font-size: 1.6rem;
  }
}
