/* =========================================================
   MOBILE.CSS — CLEAN, STABLE, CANONICAL
   Desktop CSS remains COMPLETELY untouched
   ========================================================= */


/* =========================================================
   HARD DESKTOP KILL SWITCH
   ========================================================= */
@media (min-width: 769px) {
  .mobile-drawer,
  .mobile-drawer *,
  .mobile-overlay,
  .mobile-header-controls,
  .mobile-menu-left,
  .mobile-menu-right {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}


/* =========================================================
   MOBILE ONLY
   ========================================================= */
@media (max-width: 768px) {

/* 🔥 KILL ALL LIST SPACING IN CATEGORY TREE */
.catalog-sidebar ul,
.catalog-sidebar li {
  margin: 0 !important;
  padding: 0 !important;
}

  body {
    overflow-x: hidden;
  }

  /* =====================================================
     HEADER — MOBILE STRUCTURE
     ===================================================== */

  /* Hide desktop-only elements */
  body.is-homepage header.top-header > .top-bar {
    display: none !important;
  }

  header.top-header nav.main-nav {
    display: none !important;
  }

  /* Header container */
  body.is-homepage header.top-header .main-header {
    position: relative;
    display: block !important;
    padding: 10px 48px;
    min-height: 96px;
  }

  /* Mobile control wrapper (layout-neutral) */
  body.is-homepage header.top-header .mobile-header-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  /* Left hamburger */
  body.is-homepage header.top-header .mobile-menu-left {
    position: absolute;
    left: 6px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
  }

  /* Right hamburger */
  body.is-homepage header.top-header .mobile-menu-right {
    position: absolute;
    right: 6px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
  }

  /* Logo */
  body.is-homepage header.top-header .header-left {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    z-index: 10000;
    text-align: center;
  }

  /* Hide catalog image */
  body.is-homepage header.top-header .header-right {
    display: none !important;
  }

  body.is-homepage header.top-header .header-search input {
    width: 100%;
    box-sizing: border-box;
  }

  body.is-homepage header.top-header .header-search {
    margin-top: 56px;
    margin-left: -46px;
    margin-right: -48px;
    display: flex;
    justify-content: center;
  }

  body.is-homepage header.top-header .header-search form {
    width: 100%;
    max-width: 210px;
    position: relative;
  }

  body.is-homepage header.top-header .header-search button {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
  }

  body.is-homepage header.top-header {
    padding-bottom: 16px;
  }

  /* =====================================================
     OVERLAY (shared)
     ===================================================== */

  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    display: none;
    pointer-events: none;
  }

  body.mobile-menu-open .mobile-overlay,
  body.mobile-options-open .mobile-overlay {
    display: block;
    pointer-events: auto;
  }


  /* =====================================================
     LEFT DRAWER — MAIN MENU
     ===================================================== */

  .mobile-drawer-left {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 80%;
    max-width: 320px;
    background: #000;
    color: #fff;
    z-index: 100000;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }

  body.mobile-menu-open .mobile-drawer-left {
    transform: translateX(0);
  }

  .mobile-drawer-content {
    padding: 16px;
  }

/* Top-level items */
  .mobile-main-nav .menu-item > a {
    display: block;
    padding: 12px 0;
    color: #d4af37;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-decoration: none;
  }


  /* =====================================================
     RIGHT DRAWER — OPTIONS (CATALOG / LANGUAGE)
     ===================================================== */

  .mobile-drawer-right {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    background: #000;
    color: #fff;
    z-index: 100000;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    pointer-events: none;
  }

  body.mobile-options-open .mobile-drawer-right {
    transform: translateX(0);
    pointer-events: auto;
  }

.mobile-options-nav a,
  .mobile-options-nav .mobile-option-link,
  .mobile-options-nav .mobile-option-title {
    display: block;
    padding: 14px 0;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    text-decoration: none;
  }

  .mobile-options-nav a.mob-gold,
  .mobile-options-nav .mobile-option-link.mob-gold,
  .mobile-options-nav .mobile-option-title.mob-gold {
    color: #d4af37;
  }

/* Align language submenu items to the left */
  .mobile-options-nav .submenu {
    padding: 0 0 0 14px !important;
    margin: 4px 0 8px !important;
  }

  .mobile-options-nav .submenu a {
    text-align: left;
  }

  .mobile-options-nav .submenu a.mob-gold {
    color: #d4af37;
  }

/* =====================================================
   MOBILE SUBMENU — HARD RESET (LEFT + RIGHT)
   ===================================================== */

  .mobile-main-nav .submenu,
  .mobile-options-nav .submenu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    display: none;
    margin: 6px 0 10px;
    padding-left: 14px;
    background: transparent;
    box-shadow: none;
  }

  .mobile-main-nav .menu-item.open > .submenu,
  .mobile-options-nav .menu-item.open > .submenu {
    display: block;
  }

  .mobile-main-nav .submenu a {
    display: block;
    padding: 8px 0;
    color: #d4af37;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
    text-decoration: none;
  }


  /* =====================================================
     CONTENT + FOOTER
     ===================================================== */

  .is-homepage .homepage-breadcrumbs {
    margin: 10px 0;
    padding-bottom: 1px;
  }

  .is-homepage .random-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .is-homepage .random-item img {
    width: 100%;
    height: auto;
  }

  .is-homepage .random-item .item-name {
    font-size: 13px;
    line-height: 1.3;
  }

  /* =====================================================
     HOMEPAGE — RANDOM PICKS (MOBILE REDUCTION)
     Show only 1 item per category on mobile
     ===================================================== */

  .homepage-random-picks .random-row .random-item {
    display: none;
  }

  .homepage-random-picks .random-row .random-item:first-child {
    display: block;
  }

  /* =====================================================
     HOMEPAGE — RANDOM PICKS SPACING (MOBILE)
     ===================================================== */

  .is-homepage .homepage-title {
    margin-bottom: 2px;
  }

  .is-homepage .homepage-random-picks .random-row {
    margin-bottom: 2px;
  }

  .is-homepage .random-item {
    margin-bottom: 2px;
  }

  .is-homepage .random-item-image {
    margin-bottom: 2px;
  }

  .homepage-random-picks .random-row {
    justify-items: center;
  }

  .homepage-random-picks .random-row .random-item {
    width: 100%;
    max-width: 240px;
  }

  .homepage-random-picks .random-row .random-item:first-child {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .is-homepage .random-item-info .issuer,
  .is-homepage .random-item-info .item-name,
  .is-homepage .random-item-info .year,
  .is-homepage .random-item-info .reference {
    margin-bottom: 2px;
  }

  /* =================================================
     NEWSLETTER — STACKED & CENTERED
     ================================================= */

  .site-footer .footer-newsletter {
    margin-bottom: 8px;
    padding-bottom: 0;
  }

  .footer-newsletter .newsletter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-newsletter .newsletter-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    gap: 8px;
  }

  .footer-newsletter .newsletter-row .mail-icon {
    display: block;
    text-align: center;
    font-size: 26px;
    margin-top: -4px;
    margin-bottom: 6px;
  }

  .footer-newsletter input[type="email"] {
    width: 100%;
    box-sizing: border-box;
  }

  .footer-newsletter button {
    width: 100%;
    margin-top: 8px;
  }

  /* =================================================
     FOOTER MAIN — STACK COLUMNS & PULL UP
     ================================================= */

  .site-footer .footer-main {
    margin-top: 0;
    padding-top: 0;
  }

  .site-footer .footer-main .footer-container {
    padding-top: 0;
  }

  .site-footer .footer-columns {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .site-footer .footer-column {
    width: 100%;
  }

  .site-footer h4 {
    margin-bottom: 8px;
  }

  .site-footer p,
  .site-footer li {
    margin-bottom: 6px;
  }

  /* =================================================
     SEPARATOR + BOTTOM
     ================================================= */

  .site-footer hr.footer-separator-bottom {
    margin-top: 6px;
    margin-bottom: 4px;
  }

  .site-footer .footer-bottom {
    margin-top: 0;
    padding-top: 4px;
  }

  .site-footer .footer-bottom .footer-container {
    padding-top: 0;
  }

  .site-footer .footer-bottom-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }

  .site-footer .footer-cloudflare img {
    display: block;
    max-width: 120px;
    height: auto;
  }

  /* =====================================================
     SCROLL TO TOP
     ===================================================== */

  .scroll-to-top {
    right: 12px !important;
    bottom: 16px;
    left: auto !important;
    transform: none !important;
  }

  /* =====================================================
     NON-HOMEPAGE HEADER (same as homepage)
     ===================================================== */

  body:not(.is-homepage) header.top-header > .top-bar {
    display: none !important;
  }

  body:not(.is-homepage) header.top-header nav.main-nav {
    display: none !important;
  }

  body:not(.is-homepage) header.top-header .main-header {
    position: relative;
    display: block !important;
    padding: 10px 48px;
    min-height: 96px;
  }

  body:not(.is-homepage) header.top-header .mobile-header-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  body:not(.is-homepage) header.top-header .mobile-menu-left {
    position: absolute;
    left: 6px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
  }

  body:not(.is-homepage) header.top-header .mobile-menu-right {
    position: absolute;
    right: 6px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
  }

  body:not(.is-homepage) header.top-header .header-left {
    position: absolute;
    left: 50%;
    top: 12px;
    transform: translateX(-50%);
    z-index: 10000;
    text-align: center;
  }

  body:not(.is-homepage) header.top-header .header-right {
    display: none !important;
  }

  body:not(.is-homepage) header.top-header .header-search {
    margin-top: 56px;
    margin-left: -46px;
    margin-right: -48px;
    display: flex;
    justify-content: center;
  }

  body:not(.is-homepage) header.top-header .header-search form {
    width: 100%;
    max-width: 210px;
    position: relative;
  }

  body:not(.is-homepage) header.top-header .header-search button {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
  }

  body:not(.is-homepage) header.top-header {
    padding-bottom: 16px;
  }

  /* =================================================
     BREADCRUMBS — MOBILE
     ================================================= */

  .catalog-breadcrumbs {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.4;
    margin-top: 2px;
  }

  .catalog-breadcrumbs .breadcrumbs {
    display: block;
    white-space: normal;
  }

  .catalog-breadcrumbs a {
    text-decoration: none;
  }

  .catalog-breadcrumbs .crumb-sep {
    margin: 0 4px;
  }

  /* =================================================
     CATEGORY NAVIGATION — MOBILE (REPLACES SIDEBAR)
     ================================================= */

	.catalog-columns:not(.member-profile-layout) {
    display: block;
  }

  .catalog-sidebar {
    width: 100%;
  }

  .catalog-sidebar .category-children {
    background: #e6e6e6;
  }

  /* =================================================
     TOOLBAR — MOBILE
     ================================================= */

  .catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    padding: 8px 0px;
    border-bottom: 1px solid #ddd;
    gap: 6px;
  }

  .catalog-toolbar > .toolbar-view,
  .catalog-toolbar > .toolbar-items {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .catalog-toolbar > .toolbar-limit,
  .catalog-toolbar > .toolbar-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
  }

  .catalog-toolbar > .toolbar-view {
    display: none !important;
  }

  .catalog-toolbar > .toolbar-items {
    order: 1;
    flex: 0 0 auto;
  }

  .catalog-toolbar > .toolbar-limit {
    order: 2;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .catalog-toolbar > .toolbar-sort {
    order: 3;
    width: 100%;
  }

  .catalog-toolbar > .toolbar-sort .sort-dir {
    margin-left: auto;
  }

  /* =================================================
     RESULTS — LIST VIEW (MOBILE)
     ================================================= */

  .catalog-list-item {
    display: block;
    width: 100% !important;
  }

  .catalog-sidebar,
  .catalog-sidebar * {
    box-sizing: border-box;
  }

  /* FIXED: was a.catalog-list-link, div not anchor */
  .catalog-list-item > .catalog-list-link {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    column-gap: 8px !important;
    width: 100% !important;
  }

  .catalog-list-info {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .catalog-list-image {
    width: 100% !important;
    padding: 8px !important;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
  }

  /* =================================================
     RESULTS — GRID VIEW (MOBILE)
     ================================================= */

  .catalog-grid {
    display: none !important;
  }

  /* =========================================================
     MOBILE CATEGORY TREE
     ========================================================= */

  .is-list .catalog-sidebar,
  .is-list .catalog-sidebar .category-item,
  .is-list .catalog-sidebar .category-item > a {
    width: 100%;
  }

  .catalog-sidebar .category-item > a {
    display: block;
    padding: 0px 40px 12px 10px;
    line-height: 1.25;
  }

  .catalog-sidebar .category-count {
    display: inline;
    margin-left: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #777;
    background: none;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .catalog-sidebar .category-item > a::before,
  .catalog-sidebar .category-item > a::after {
    content: none !important;
  }

  .is-list .catalog-sidebar {
    border-bottom: 1px solid #ddd;
    margin-bottom: 1px;
  }

  .catalog-sidebar .category-item {
    position: relative;
  }

  .catalog-sidebar .category-toggle {
    position: absolute;
    right: 10px;
    top: 30%;
    transform: translateY(-50%);
    font-size: 16px;
    cursor: pointer;
  }

  .catalog-sidebar .category-item.expanded > .category-children {
    display: block;
  }

  .catalog-sidebar .category-children .category-item > a {
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.2;
    padding-left: 12px;
  }

  /* =================================================
     PAGINATION — MOBILE
     ================================================= */

  .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
  }

  .pagination a,
  .pagination span.current,
  .pagination .dots {
    min-width: 26px;
    height: 32px;
    padding: 0 8px;
    box-sizing: border-box;
  }

  .pagination .goto {
    width: 100%;
    margin-left: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
  }

  .pagination .goto input {
    width: 60px;
    text-align: center;
  }

  .pagination .goto button {
    white-space: nowrap;
  }

  .catalog-pagination {
    overflow-x: hidden;
  }

  /* =================================================
     DISPLAY PAGE — MOBILE THUMBNAILS
     ================================================= */

  .product-display {
    display: block !important;
  }

  .thumbs {
    display: flex !important;
    flex-direction: row !important;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 8px 12px;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .thumbs img {
    flex: 0 0 auto;
    height: 64px;
    width: auto;
    cursor: pointer;
  }

  .thumbs::-webkit-scrollbar {
    display: none;
  }

  /* =================================================
     DISPLAY PAGE — MOBILE MAIN IMAGE
     ================================================= */

  .main-image {
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    justify-content: center;
    padding: 8px 12px;
    box-sizing: border-box;
  }

  .main-image img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
  }

  /* =================================================
     DISPLAY PAGE — ATTRIBUTES
     ================================================= */

  .attributes-bottom {
    padding-left: 0 !important;
    margin-left: 0 !important;
  }

  .attributes table {
    width: 100%;
    table-layout: fixed;
  }

  .attributes th {
    width: 30%;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .attributes td {
    width: 70%;
    min-width: 0;
  }

  .product-display,
  .attributes,
  .main-image,
  .thumbs,
  .catalog-main,
  .catalog-columns {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* =====================================================
     ABOUT US — MOBILE
     ===================================================== */

  .about_us-block,
  .about_us-block.about_us-reverse {
    display: block !important;
  }

  .about_us-text,
  .about_us-image {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .about_us-image {
    margin: 12px 0 24px;
  }

  .about_us-image img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* =====================================================
     EVALUATING PAGE — MOBILE
     ===================================================== */

  .eval-block,
  .eval-block.eval-reverse {
    display: block !important;
  }

  .eval-text,
  .eval-image {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .eval-image {
    margin: 12px 0 24px;
  }

  .eval-image img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* =====================================================
     GRADING PAGE — MOBILE
     ===================================================== */

  .grade-block,
  .grade-block.grade-reverse {
    display: block !important;
  }

  .grade-text,
  .grade-image {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }

  .grade-image {
    margin: 12px 0 24px;
  }

  .grade-image img {
    width: 100%;
    height: auto;
    display: block;
  }

  /* =====================================================
     NEWS PAGE — MOBILE
     ===================================================== */

  .news-main-container.catalog-columns {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
  }

  .news-sidebar-flex.catalog-sidebar {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
    border-right: none !important;
  }

  .news-filter-row {
    display: flex !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
  }

  .news-filter-row .toolbar-select {
    flex: 1 !important;
  }

  .news-scroll-list {
    display: block !important;
    height: 310px !important;
    max-height: 310px !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
    border: 1px solid #eee !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .news-preview-card {
    display: block;
    height: auto !important;
    border-bottom: 1px solid #eee !important;
    padding: 12px !important;
  }

  .news-reader-pane.catalog-main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 200px !important;
    overflow: visible !important;
    position: relative !important;
    float: none !important;
    padding: 20px 12px !important;
    border-top: 2px solid #eee !important;
    margin-bottom: 50px !important;
  }

  .reader-content-wrapper {
    height: auto !important;
    display: block !important;
    overflow: visible !important;
  }

  .news-reader-pane img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
  }

  .news-filter-row select {
    font-size: 16px !important;
  }

/* =================================================
     LOGIN PAGE — CLOUDFLARE TURNSTILE
     ================================================= */

#turnstile-wrapper,
  #turnstile-wrapper-reg {
    width: 100%;
    overflow: hidden;
    text-align: center;
  }

  #turnstile-wrapper .cf-turnstile,
  #turnstile-wrapper-reg .cf-turnstile {
    zoom: 0.91;
  }

/* =================================================
     ACCOUNT SETTINGS — MOBILE ACCORDION
     ================================================= */

  .as-layout {
    display: block !important;
  }

  .as-sidebar {
    display: none !important;
  }

.as-content {
    width: 100% !important;
    padding: 0 12px !important;
    box-sizing: border-box;
  }

  .as-section,
  .as-section-body,
  .as-field,
  .as-profile-card,
  .as-stats-card,
  .as-nav {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
  }

  .as-form-row {
    display: block !important;
  }

  .as-field {
    width: 100% !important;
    box-sizing: border-box;
  }

.as-input,
  .as-content select,
  .as-content input:not([type="checkbox"]) {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .as-toggle-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .as-toggle-row input[type="checkbox"] {
    flex-shrink: 0 !important;
    width: 15px !important;
    height: 15px !important;
  }

  .as-toggle-row > div {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .as-page {
    overflow-x: hidden;
  }

  .as-section {
    border-bottom: none;
    padding: 0 !important;
    margin: 0 !important;
  }

  .as-section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin: 0;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #ddd;
  }

  .as-section-title::after {
    content: '▸';
    font-size: 28px;
    color: #d4af37;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-right: 8px;
  }

  .as-section.mob-open .as-section-title::after {
    transform: rotate(90deg);
  }

  .as-section-body {
    display: none;
    padding-bottom: 20px;
  }

  .as-section.mob-open .as-section-body {
    display: block;
  }

/* =================================================
     MY COLLECTION PAGE — MOBILE
     ================================================= */

  .btn-import-link {
    opacity: 0.5;
  }

  .modal-overlay {
    align-items: flex-start !important;
    overflow-y: auto !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 16px !important;
    margin: 0 !important;
    max-height: none !important;
    overflow-y: visible !important;
  }

  .modal-content .form-grid {
    grid-template-columns: 1fr !important;
  }

  .modal-content .image-and-actions-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .modal-content .image-and-actions-row > div:first-child {
    flex: none !important;
    width: 100% !important;
  }

  .modal-content .modal-actions-container {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .modal-content .modal-actions-container label {
    white-space: normal !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 6px !important;
    font-size: 11px !important;
    color: #888 !important;
    line-height: 1.4 !important;
  }

  .modal-content .modal-actions-container label input[type="checkbox"] {
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    width: auto !important;
  }

  .modal-content .modal-actions-container button {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-content input,
  .modal-content select,
  .modal-content textarea {
    width: 100% !important;
    box-sizing: border-box !important;
  }

.my-collection-page,
  .my-wishlist-page,
  .my-offers-page,
  .my-favourites-page {
    overflow-x: hidden;
  }

  .my-wishlist-page .info-text-wrapper,
  .my-offers-page .info-text-wrapper,
  .my-favourites-page .info-text-wrapper {
    margin-bottom: 8px !important;
  }

  .my-wishlist-page .collector-actions-grid,
  .my-offers-page .collector-actions-grid,
  .my-favourites-page .collector-actions-grid,
  .catalog-list .collector-actions-grid {
    margin-top: 8px !important;
  }

  .my-collection-page .catalog-list-link {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto auto !important;
  }

  .my-collection-page .catalog-list-image {
    width: 100% !important;
    flex: none !important;
  }

  .my-collection-page .catalog-list-info {
    grid-column: 1 / -1 !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .my-collection-page .info-text-wrapper {
    height: auto !important;
    overflow: visible !important;
  }

  .my-collection-page .collector-actions-grid {
    height: auto !important;
    max-height: none !important;
    flex-wrap: wrap !important;
    overflow: visible !important;
    margin-top: 8px !important;
  }

  .my-collection-page .collector-actions-grid button {
    flex: 0 0 calc(50% - 2px) !important;
    width: calc(50% - 2px) !important;
    height: auto !important;
    min-height: 32px !important;
    white-space: normal !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .import-export-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 0;
  }

  .btn-import-export {
    flex: 1;
    text-align: center;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    line-height: 1 !important;
  }

/* =================================================
     COLLECTION SETTINGS MODAL — MOBILE
     ================================================= */

  #collection-settings-modal .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100svh !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #collection-settings-modal .cs-privacy-option {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px !important;
  }

  #collection-settings-modal .cs-privacy-content,
  #collection-settings-modal .cs-privacy-desc,
  #collection-settings-modal .cs-privacy-label {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
  }

  #collection-settings-modal .cs-privacy-option > div {
    flex: 1 !important;
    min-width: 0 !important;
  }

  #collection-settings-modal .cs-toggle-row > div {
    flex: 1 !important;
    min-width: 0 !important;
  }

  #collection-settings-modal input[type="radio"],
  #collection-settings-modal input[type="checkbox"] {
    flex-shrink: 0 !important;
    width: 15px !important;
    height: 15px !important;
  }

  #collection-settings-modal [style*="overflow-y:auto"],
  #collection-settings-modal [style*="overflow-y: auto"] {
    padding: 16px !important;
    box-sizing: border-box !important;
  }

  .cs-modal-footer {
    flex-wrap: wrap !important;
    padding: 10px 12px !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .cs-footer-spacer {
    display: none !important;
  }

  #cs-delete-collection-btn {
    order: 3 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #cs-cancel-btn {
    order: 1 !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
  }

  #cs-save-btn {
    order: 2 !important;
    flex: 1 1 auto !important;
    box-sizing: border-box !important;
  }

  .cs-privacy-option {
    padding: 10px !important;
  }

  .cs-toggle-row {
    gap: 10px;
  }

/* =================================================
     EXCHANGE PAGE — MOBILE
     ================================================= */

  .exchange-tabs {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .exchange-tab {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    border-bottom: 1px solid #eee !important;
  }

  .exchange-row {
    grid-template-columns: 80px 1fr !important;
    grid-template-rows: auto auto !important;
  }

  .exchange-thumb {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .exchange-info {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  .exchange-action {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .exchange-action button {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .exchange-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    font-size: 12px !important;
  }

  .ex-settings-columns {
    grid-template-columns: 1fr !important;
  }

  .ex-setting-row > div {
    min-width: 0 !important;
  }

/* =================================================
     MESSAGES PAGE — MOBILE
     ================================================= */

  .messages-page {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    border: none !important;
    overflow: visible !important;
  }

  .msg-folders {
    display: none;
    border-right: none !important;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px !important;
  }

  .msg-folders.mob-active {
    display: flex !important;
  }

  .msg-list-panel {
    display: none;
    border-right: none !important;
    height: auto !important;
    overflow: visible !important;
  }

  .msg-list-panel.mob-active {
    display: flex !important;
    flex-direction: column !important;
  }

  .msg-list {
    overflow-y: visible !important;
    max-height: none !important;
  }

  .msg-display-panel {
    display: none;
    height: auto !important;
    overflow: visible !important;
  }

  .msg-display-panel.mob-active {
    display: flex !important;
  }

  .msg-display-content {
    height: auto !important;
    overflow: visible !important;
  }

  .msg-display-body {
    overflow-y: visible !important;
    padding: 12px !important;
  }

  .msg-mobile-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #d4af37;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    background: #fdfaf3;
  }

  .msg-mobile-topbar {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e8e8e8;
    gap: 10px;
    background: #f9f9f9;
  }

  .msg-mobile-folder-btn {
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    color: #555;
  }

  .msg-compose-btn {
    margin: 0 0 12px !important;
  }

  .msg-folder-list {
    display: flex !important;
    flex-direction: row !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  .msg-folder-link {
    border: 1px solid #ddd !important;
    border-radius: 3px !important;
    padding: 8px 14px !important;
    font-size: 12px !important;
  }

  .msg-folder-link.active {
    border-color: #d4af37 !important;
    border-right: 1px solid #d4af37 !important;
  }

  .msg-display-toolbar {
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 8px 12px !important;
  }

  .msg-action-btn {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }

/* =================================================
     MEMBER PROFILE PAGE — MOBILE
     ================================================= */

  .member-profile-layout {
    flex-direction: column !important;
  }

  .member-profile-layout .catalog-sidebar {
    width: 100% !important;
    flex-shrink: 1 !important;
  }

  .member-profile-layout .catalog-main {
    width: 100% !important;
  }

  .member-avatar-card {
    padding: 14px 10px !important;
  }

  .member-contact-btn {
    margin-bottom: 10px !important;
  }

  .member-tab-btns {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
  }

  .member-tab-btn {
    flex: 1 1 auto !important;
    text-align: center !important;
    padding: 8px 10px !important;
    font-size: 11px !important;
  }

  .member-profile-layout .catalog-toolbar {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  .member-profile-layout .toolbar-items {
    width: 100% !important;
  }

  .member-profile-layout .toolbar-limit,
  .member-profile-layout .toolbar-sort {
    flex: 1 1 auto !important;
  }

/* Modal overlay must be above hamburger buttons */
  .modal-overlay {
    z-index: 10002 !important;
  }

/* =================================================
     DISPLAY PAGE — ACTION BUTTONS MOBILE
     ================================================= */

  .display-action-bar {
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px;
  }

.display-action-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    margin-top: 8px !important;
    margin-bottom: 10px !important;
  }

  .display-action-buttons button {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 11px !important;
    padding: 10px 8px !important;
    white-space: normal !important;
    text-align: center !important;
    min-height: 44px !important;
    line-height: 1.3 !important;
  }

  .display-collection-strip {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
  }

  .display-collection-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    margin-bottom: 6px !important;
  }

  .display-collection-row span {
    display: block !important;
    width: 100% !important;
  }
  
    .overlay {
    z-index: 100001 !important;
  }

  .overlay .close {
    z-index: 100002 !important;
  }
  
/* =================================================
     SIMILAR ITEMS — stack vertically on mobile
     ================================================= */
  .similar-items { margin-top: 30px; padding: 0 12px; box-sizing: border-box; }
  .similar-items-title { font-size: 20px; }

  .similar-items-ribbon {
    flex-direction: column;
    gap: 22px;
    min-height: 0;
  }

  .similar-card { width: 100%; }
  .similar-card-image {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
  }

/* =====================================================
   HOMEPAGE — MOBILE LAYOUT
   ===================================================== */

  .is-homepage .homepage {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 12px !important;
    gap: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .is-homepage .catalog-sidebar {
    order: 1 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }

  .is-homepage .catalog-main {
    order: 2 !important;
    width: 100% !important;
  }

  .is-homepage .homepage-right {
    order: 3 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .is-homepage .homepage-sidebar-title {
    font-size: 16px !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    width: 100% !important;
  }

  .is-homepage .catalog-sidebar .homepage-daily-item:nth-child(n+4),
  .is-homepage .homepage-right .homepage-daily-item:nth-child(n+4) {
    display: none !important;
  }

  .is-homepage .catalog-sidebar .homepage-daily-item,
  .is-homepage .homepage-right .homepage-daily-item {
    flex: 0 0 100% !important;
    width: 100% !important;
    display: block !important;
  }

  .is-homepage .homepage-boxes {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .is-homepage .homepage-box {
    padding: 16px 8px !important;
  }

  .is-homepage .homepage-box-image img {
    max-width: 200px !important;
  }

  .is-homepage .homepage-title {
    font-size: 22px !important;
    margin-top: 20px !important;
    margin-bottom: 16px !important;
  }
  
  .is-homepage .box-img-register {
    margin-left: 20px !important;
  }
  
  /* No-image placeholder: cancel desktop offset, keep it inside the column */
  .main-image img[src$="/media/no_image.png"] {
    transform: none !important;
    width: auto !important;
    max-width: 60% !important;
    height: auto !important;
    margin: 20px auto !important;
    display: block !important;
  }
  
} /* end @media (max-width: 768px) */  

/* =========================================================
   SMALL PHONES
   ========================================================= */
@media (max-width: 480px) {
  .is-homepage .random-row {
    grid-template-columns: 1fr;
  }
}
