/* Concept B candidate: mobile-only marketplace layouts. Desktop rules remain untouched. */
.store-mobile-stats,
.store-section-tabs,
.store-search-link,
.store-breadcrumb { display: none; }

@media (max-width: 820px) {
  .store-page-wrap { background: #f3f7f4; }
  .store-page-top {
    position: relative;
    min-height: 62px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px 44px 46px;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #fff;
  }
  .store-page-top > .store-brand { grid-column: 1; grid-row: 1; min-width: 0; font-size: 22px; }
  .store-page-top > .store-search-link {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    place-items: center;
    width: 38px;
    height: 42px;
    border: 1px solid #e2e9e4;
    border-radius: 11px;
    color: #263b2f;
    text-decoration: none;
  }
  .store-search-link svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
  .store-page-top > .dzmarket-settings-anchor { grid-column: 3; grid-row: 1; width: 44px; }
  .store-page-top > .mobile-navigation-toggle { grid-column: 4; grid-row: 1; }
  .store-page-top > nav[data-mobile-navigation] { grid-column: 1 / -1; grid-row: 2; }
  .store-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #e4ebe6;
    background: #fff;
    color: #687a6e;
    font-size: 13px;
    line-height: 1.4;
  }
  .store-breadcrumb a { min-width: 0; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
  .store-breadcrumb a:last-child { color: #31553e; }
  .store-public-page { padding: 12px 12px 28px; }
  .store-public-banner {
    height: clamp(132px, 34vw, 220px);
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    border-radius: 16px 16px 0 0;
    background: #e8f0ea;
  }
  .store-public-banner img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .store-public-profile {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0 0 12px;
    padding: 0 14px 15px;
    border: 1px solid #dfe9e2;
    border-top: 0;
    border-radius: 0 0 17px 17px;
    background: #fff;
    box-shadow: 0 5px 16px #183c2909;
  }
  .store-public-logo {
    grid-column: 1;
    grid-row: 1;
    width: 64px;
    height: 64px;
    min-width: 64px;
    margin-top: -17px;
    border: 4px solid #fff;
    border-radius: 50%;
    background: #fff;
    z-index: 1;
  }
  .store-public-info { grid-column: 2; grid-row: 1; min-width: 0; padding: 6px 0 0; }
  .store-public-info .store-verified { display: block; margin-bottom: 4px; font-size: 11px; line-height: 1.35; }
  .store-public-info h1 { margin: 0 0 4px; font-size: clamp(19px, 5vw, 23px); line-height: 1.2; overflow-wrap: anywhere; }
  .store-public-info .store-sector,
  .store-public-info .store-location { margin: 3px 0 0; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
  .store-public-info .store-description { display: none; }
  .store-mobile-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    margin-top: 2px;
  }
  .store-mobile-stat {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #dce9df;
    border-radius: 12px;
    background: #f6faf7;
    color: #385644;
    font-size: 12px;
    line-height: 1.35;
  }
  .store-mobile-stat strong { flex: 0 0 auto; color: #246545; font-size: 19px; font-variant-numeric: tabular-nums; }
  .store-mobile-stat span { min-width: 0; overflow-wrap: anywhere; }
  .store-public-profile > .dzm-store-follow-panel {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .store-public-profile > .dzm-store-follow-panel .dzm-store-follow-meta { display: none; }
  .store-public-profile > .dzm-store-follow-panel .dzm-store-follow-form,
  .store-public-profile > .dzm-store-follow-panel .dzm-store-follow-button,
  .store-public-profile > .dzm-store-follow-panel > .dzm-store-follow-button,
  .store-public-profile > .dzm-store-follow-panel .dzm-store-follow-own {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .store-public-profile > .store-contact-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
    margin: 0;
  }
  .store-contact-actions .store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    padding: 9px 7px;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
  }
  .store-section-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 12px;
    padding: 4px;
    overflow-x: auto;
    border: 1px solid #dce8df;
    border-radius: 13px;
    background: #fff;
    scrollbar-width: thin;
  }
  .store-section-tabs [role="tab"] {
    flex: 1 0 auto;
    min-width: 0;
    padding: 10px 13px;
    border-radius: 9px;
    color: #31553e;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
  }
  .store-section-tabs [role="tab"][aria-selected="true"] { background: #eaf4ed; color: #246545; }
  .store-section-tabs [role="tab"] { appearance: none; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
  .store-products { margin-top: 0; }
  .store-about-panel {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid #dce8df;
    border-radius: 16px;
    background: #fff;
    color: #24362b;
    overflow-wrap: anywhere;
  }
  .store-about-panel[hidden] { display: none !important; }
  .store-about-panel h2 { margin: 0 0 12px; font-size: 18px; line-height: 1.3; }
  .store-about-facts { display: grid; gap: 10px; margin: 0; }
  .store-about-facts > div { padding-bottom: 10px; border-bottom: 1px solid #e6eee8; }
  .store-about-facts dt { color: #64766a; font-size: 12px; font-weight: 700; }
  .store-about-facts dd { margin: 3px 0 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
  .store-about-description { margin-top: 12px; }
  .store-about-description h3 { margin: 0 0 5px; font-size: 15px; }
  .store-about-description p,
  .store-about-empty,
  .store-about-empty-description { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
  .store-section-tabs [role="tab"]:focus-visible { outline: 3px solid #2169c7; outline-offset: 2px; }
  .store-results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 1px 10px; }
  .store-results-heading h2 { min-width: 0; margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
  .store-results-heading > span { flex: 0 0 auto; color: #64766a; font-size: 12px; }
  .store-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .store-product-card { min-width: 0; border-radius: 13px; }
  .store-product-image { height: clamp(112px, 32vw, 155px); }
  .store-product-image img { object-fit: contain; }
  .store-product-body { min-width: 0; padding: 9px; }
  .store-product-store-name { overflow-wrap: anywhere; }
  .store-product-body h3 { font-size: 13px; line-height: 1.35; }
  .store-product-body strong { font-size: 15px; }

  body.dark-theme .store-page-wrap { background: #17221b; }
  body.dark-theme .store-page-top,
  body.dark-theme .store-public-profile,
  body.dark-theme .store-breadcrumb,
  body.dark-theme .store-section-tabs { background: #202d25; border-color: #3a4b3e; }
  body.dark-theme .store-search-link { background: #26372c; border-color: #43584a; color: #d4e2d8; }
  body.dark-theme .store-breadcrumb { color: #c0cec4; }
  body.dark-theme .store-breadcrumb a:last-child { color: #e0f3e5; }
  body.dark-theme .store-mobile-stat { background: #26372c; border-color: #43584a; color: #d4e2d8; }
  body.dark-theme .store-mobile-stat strong { color: #b4e2c2; }
  body.dark-theme .store-section-tabs [role="tab"] { color: #d2e2d7; }
  body.dark-theme .store-section-tabs [role="tab"][aria-selected="true"] { background: #304b39; color: #e0f3e5; }
  body.dark-theme .store-about-panel { background: #202d25; border-color: #3a4b3e; color: #e2ece5; }
  body.dark-theme .store-about-facts > div { border-color: #3a4b3e; }
  body.dark-theme .store-about-facts dt { color: #bdc9c0; }
  body.dark-theme .store-results-heading > span { color: #bdc9c0; }
}

@media (max-width: 360px) {
  .store-products-grid { grid-template-columns: minmax(0, 1fr); }
  .store-contact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-mobile-stat { padding-inline: 8px; font-size: 11px; }
  .store-mobile-stat strong { font-size: 17px; }
}

@media (max-width: 820px) {
  .layout {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
  }
  .layout > .box { display: contents; }
  .layout .details { display: contents; }
  .layout #galleryStage { order: 1; width: 100%; height: auto; min-height: 0; aspect-ratio: 1 / 0.94; border-radius: 15px; }
  .layout #galleryStage .main-image-open { width: 100%; height: 100%; min-height: 0; }
  .layout #galleryStage #mainImage { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
  .layout #thumbnails { order: 2; display: flex; gap: 8px; width: 100%; max-width: 100%; padding: 4px 1px 7px; overflow-x: auto; box-sizing: border-box; }
  .layout .details > .dzmarket-category-breadcrumb { order: 3; }
  .layout .details > .category { order: 4; align-self: flex-start; max-width: 100%; }
  .layout .details > h1 { order: 5; margin: 0; font-size: clamp(21px, 6vw, 28px); line-height: 1.2; overflow-wrap: anywhere; }
  .layout .details > .price { order: 6; width: fit-content; max-width: 100%; padding: 9px 13px; border-radius: 12px; background: #e8f3eb; color: #205d3a; font-size: clamp(22px, 6vw, 28px); font-weight: 850; }
  .layout .details > .dzm-store-follow-ad { order: 7; width: 100%; box-sizing: border-box; }
  .layout .details > .favorite-form { order: 8; width: 100%; }
  .layout .details > #likes { order: 9; width: 100%; }
  .layout > .box > .description-box { order: 10; width: 100%; box-sizing: border-box; margin: 0; border: 1px solid #dfe9e2; border-radius: 14px; background: #fff; }
  .layout .details > .info { order: 11; width: 100%; box-sizing: border-box; }
  .layout .details > .seller-box { order: 12; width: 100%; box-sizing: border-box; margin: 0; padding: 14px; border: 1px solid #dfe9e2; border-radius: 15px; background: #fff; }
  .layout .details > #comments { order: 13; width: 100%; box-sizing: border-box; }
  .layout .details > .date { order: 14; }
  .layout .price bdi { unicode-bidi: isolate; }
  .layout .seller-box .phone,
  .layout .seller-box .social-brand-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; box-sizing: border-box; padding: 8px 11px; border-radius: 10px; background: #2f7d5a; color: #fff; text-decoration: none; overflow-wrap: anywhere; }
  .layout .seller-box .social-links { display: flex; flex-wrap: wrap; gap: 8px; }
  body.dark-theme .layout .price { background: #263c2d; color: #c3ebcf; }
  body.dark-theme .layout > .box > .description-box,
  body.dark-theme .layout .details > .seller-box { background: #202d25; border-color: #3a4b3e; }
}

@media (max-width: 820px) {
  body.dzmarket-ad-form-page .form-container { width: 100%; max-width: 760px; box-sizing: border-box; padding: 12px; }
  body.dzmarket-ad-form-page .form-card { padding: 16px; border: 1px solid #dfe9e2; border-radius: 17px; background: #fff; }
  body.dzmarket-ad-form-page .form-card > h1 { margin-top: 2px; font-size: clamp(21px, 6vw, 28px); line-height: 1.2; }
  body.dzmarket-ad-form-page .form-card .form-group { min-width: 0; }
  body.dzmarket-ad-form-page .dzm-public-contact-checks { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 8px; padding: 9px; border: 1px solid #dfe9e2; border-radius: 13px; background: #f6faf7; }
  body.dzmarket-ad-form-page .dzm-public-contact-checks > label,
  body.dzmarket-ad-form-page .dzm-public-contact-setting { min-width: 0; padding: 10px; border: 1px solid #e3ece6; border-radius: 10px; background: #fff; }
  body.dzmarket-ad-form-page .dzm-public-contact-toggle { display: flex !important; align-items: flex-start !important; gap: 9px !important; min-width: 0; }
  body.dzmarket-ad-form-page .dzm-public-contact-toggle input,
  body.dzmarket-ad-form-page .dzm-public-contact-checks > label input { flex: 0 0 auto; margin: 3px 0 0; }
  body.dzmarket-ad-form-page .dzm-public-contact-toggle span { min-width: 0; overflow-wrap: anywhere; }
  body.dzmarket-ad-form-page .dzm-public-contact-email,
  body.dzmarket-ad-form-page .dzm-public-contact-note { display: block; min-width: 0; margin: 5px 0 0 25px; overflow-wrap: anywhere; }
  body.dzmarket-ad-form-page .dzm-public-contact-email { direction: ltr; text-align: left; unicode-bidi: plaintext; }
  body.dzmarket-ad-form-page .dzmarket-comments-setting { padding: 11px; border: 1px solid #dfe9e2; border-radius: 11px; background: #fff; }
  body.dzmarket-ad-form-page .dzm-maps-section { min-width: 0; padding: 13px; border: 1px solid #dfe9e2; border-radius: 14px; background: #f8fbf9; }
  body.dzmarket-ad-form-page .dzm-maps-section .checks { padding: 10px; border-radius: 10px; }
  body.dzmarket-ad-form-page .dzm-maps-section input[type="url"] { width: 100%; min-width: 0; direction: ltr; text-align: left; unicode-bidi: plaintext; }
  body.dzmarket-ad-form-page .dzm-maps-help { line-height: 1.45; overflow-wrap: anywhere; }
  body.dark-theme.dzmarket-ad-form-page .form-card,
  body.dark-theme.dzmarket-ad-form-page .dzm-public-contact-checks > label,
  body.dark-theme.dzmarket-ad-form-page .dzm-public-contact-setting,
  body.dark-theme.dzmarket-ad-form-page .dzmarket-comments-setting { background: #202d25; border-color: #3a4b3e; color: #e2ece5; }
  body.dark-theme.dzmarket-ad-form-page .dzm-public-contact-checks,
  body.dark-theme.dzmarket-ad-form-page .dzm-maps-section { background: #19271f; border-color: #3a4b3e; }
  body.dark-theme.dzmarket-ad-form-page .dzm-public-contact-email,
  body.dark-theme.dzmarket-ad-form-page .dzm-public-contact-note { color: #c4d3c8; }
}
