/* Mobile-first layout refinements for Sulan Peptide Official */

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    min-height: 64px;
    padding: 10px 16px;
  }

  .header-actions {
    order: 4;
    gap: 6px;
  }

  .brand {
    min-width: 0;
    gap: 10px;
  }

  .brand span {
    min-width: 0;
  }

  .brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand small {
    display: block;
    font-size: 11px;
    opacity: 0.72;
  }

  .menu-button {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
  }

  .menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .floating-support {
    top: auto;
    right: 16px;
    bottom: calc(26px + env(safe-area-inset-bottom, 0px));
    transform: none;
  }

  .floating-whatsapp {
    width: 52px;
    height: 52px;
    border: none;
    background: #25D366;
    color: #fff;
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.35);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .floating-whatsapp:hover,
  .floating-whatsapp:focus-visible {
    background: #1da851;
    color: #fff;
    transform: scale(1.05);
  }

  .floating-contact {
    width: 52px;
    height: 52px;
  }

  .floating-contact svg {
    width: 24px;
    height: 24px;
  }

  main {
    padding-bottom: 84px;
  }

  .hero {
    position: relative;
    min-height: auto;
    padding: 28px 16px 36px;
    background-position: center bottom !important;
    background-size: cover !important;
  }

  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(247, 251, 250, 0.98) 0%,
      rgba(247, 251, 250, 0.92) 58%,
      rgba(247, 251, 250, 0.78) 100%
    );
    pointer-events: none;
  }

  .hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
  }

  .hero .eyebrow {
    font-size: 11px;
    letter-spacing: 0.04em;
    line-height: 1.4;
  }

  .hero h1 {
    max-width: none;
    margin-bottom: 14px;
    font-size: clamp(30px, 8.5vw, 42px);
    line-height: 1.05;
  }

  .hero-content > p {
    font-size: 15px;
    line-height: 1.62;
    max-width: 36em;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    font-size: 14px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 18px;
  }

  .hero-stats span {
    min-width: 0;
    padding: 12px 8px;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
  }

  .hero-stats strong {
    display: block;
    margin-bottom: 2px;
    font-size: 18px;
    color: var(--navy);
  }

  .trust-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .trust-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 0;
  }

  .trust-icon {
    width: 48px;
    height: 48px;
    margin: 0 0 10px;
  }

  .trust-icon.service-icon-wrap img {
    width: 44px;
    height: 44px;
  }

  .trust-icon.janoshik-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 48px;
    height: 48px;
    margin: 0 0 10px;
    padding: 0;
    background: transparent;
  }

  .trust-icon.janoshik-logo-wrap img {
    display: block;
    width: 48px;
    max-height: 48px;
    margin: 0;
    object-fit: contain;
    object-position: left center;
  }

  .trust-item h2 {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.25;
  }

  .trust-item p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
  }

  .section {
    padding: 40px 16px;
  }

  .section-heading {
    margin-bottom: 18px;
  }

  .section-heading h2 {
    font-size: clamp(24px, 6.5vw, 32px);
    line-height: 1.12;
  }

  .section-heading p,
  .section p {
    font-size: 15px;
    line-height: 1.62;
  }

  .bestseller-trust-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .bestseller-trust-row::-webkit-scrollbar {
    display: none;
  }

  .bestseller-trust-row span {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .bestseller-category-grid {
    display: grid;
    grid-template-areas: none !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: auto;
    gap: 10px;
    margin-top: 0;
  }

  .bestseller-category-card.gr,
  .bestseller-category-card.sr,
  .bestseller-category-card.nr,
  .bestseller-category-card.rr,
  .bestseller-category-card.mr {
    grid-area: auto !important;
  }

  .bestseller-category-card {
    min-height: 160px;
    aspect-ratio: 4 / 3;
  }

  .bestseller-category-card img {
    object-position: center 72%;
  }

  .bestseller-category-label {
    top: 10px !important;
    left: 10px !important;
    max-width: calc(100% - 20px) !important;
    width: auto !important;
    min-height: 0 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: left;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(24, 52, 74, 0.18);
  }

  .bestseller-coa-button {
    top: auto !important;
    bottom: 14px !important;
    left: 14px !important;
    width: auto !important;
    min-width: 132px;
    min-height: 44px;
    padding: 0 16px;
    font-size: 13px;
  }

  .feedback-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .quote-card {
    min-height: 0;
    gap: 10px;
    padding: 12px;
    border-radius: 10px;
  }

  .quote-card-header {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  .quote-avatar {
    width: 34px;
    height: 34px;
    font-size: 10px;
  }

  .quote-card-header strong {
    font-size: 12px;
    line-height: 1.2;
  }

  .quote-card-header small {
    font-size: 10px;
    line-height: 1.25;
  }

  .quote-card-header b {
    grid-column: 1 / -1;
    margin-top: 0;
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
    max-width: 100%;
    white-space: normal;
    text-align: left;
  }

  .quote-card blockquote {
    font-family: inherit;
    font-size: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .quote-card footer {
    padding-top: 8px;
    font-size: 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .quick-message-board {
    gap: 20px;
    align-items: stretch;
  }

  .quick-message-fields {
    padding: 18px;
    border-radius: 12px;
  }

  .quick-message-fields input,
  .quick-message-fields textarea {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 8px;
  }

  .quick-message-fields textarea {
    min-height: 120px;
  }

  .quick-message-fields button {
    min-height: 50px;
    font-size: 15px;
    border-radius: 8px;
  }

  .evidence-section {
    gap: 18px;
    justify-items: stretch;
  }

  .coa-table-panel,
  .coa-report-viewer {
    width: 100%;
    justify-self: stretch;
    border-radius: 12px;
    overflow: hidden;
  }

  .coa-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(160px, 100%);
    min-height: 44px;
    margin: 8px auto 0;
    padding: 0 28px;
    justify-self: center;
    text-align: center;
  }

  .site-footer {
    padding: 32px 16px 24px;
    gap: 22px;
  }

  .footer-trust-notes {
    gap: 8px;
  }

  /* Blog */
  .blog-page-hero,
  .faq-page-hero,
  .contact-page-hero,
  .about-hero,
  .catalog-hero {
    padding-inline: 0;
  }

  .blog-page-layout,
  .faq-page-layout,
  .contact-page-grid {
    gap: 20px;
  }

  .blog-sidebar {
    padding: 16px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--line);
  }

  .blog-topic-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .blog-topic-list b {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(0, 140, 120, 0.18);
    border-radius: 999px;
    background: #f5fbf9;
    font-size: 12px;
    color: var(--teal-dark);
  }

  .blog-post-card {
    padding: 18px;
    border-radius: 12px;
  }

  .blog-post-card h2 {
    font-size: 20px;
    line-height: 1.25;
  }

  .blog-pagination {
    justify-content: center;
  }

  /* Products catalog */
  .products-page {
    padding: 12px 16px 72px;
  }

  .catalog-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    max-width: none;
    margin: 0 0 14px;
    padding: 0;
    overflow: visible;
    border-bottom: 0;
    background: transparent;
    position: static;
  }

  .catalog-filter-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: 100%;
    padding: 8px 6px;
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    word-break: break-word;
  }

  .catalog-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: none;
    margin-top: 0;
  }

  .catalog-product-card {
    min-height: 0;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
  }

  .catalog-product-card:hover {
    transform: none;
  }

  .catalog-product-image {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }

  .catalog-product-card p {
    font-size: 10px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-product-card h3 {
    font-size: 14px;
    line-height: 1.2;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-product-card dl {
    gap: 4px;
  }

  .catalog-product-card dl div {
    grid-template-columns: 1fr;
    gap: 1px;
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .catalog-product-card dl div:not(.catalog-specs-row):not(.catalog-price-row) {
    display: none;
  }

  .catalog-product-card dl .catalog-specs-row {
    display: grid !important;
  }

  .catalog-product-card dl .catalog-specs-row dt {
    display: none;
  }

  .catalog-product-card dl .catalog-specs-row dd {
    text-align: left;
    font-size: 11px;
    line-height: 1.35;
    white-space: normal;
    color: var(--muted);
  }

  .catalog-product-card dl .catalog-price-row {
    padding-top: 0;
  }

  .catalog-price-row dd {
    justify-content: flex-start;
    font-size: 13px;
    text-align: left;
  }

  .catalog-price-compare {
    font-size: 11px;
  }

  .product-card {
    border-radius: 12px;
  }

  /* Product detail */
  .product-detail-page {
    padding-inline: 16px;
  }

  .product-detail-hero {
    gap: 20px;
  }

  .product-detail-image {
    border-radius: 12px;
  }

  .format-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .purchase-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .purchase-actions .whatsapp-action,
  .purchase-actions .cart-action {
    width: 100%;
    min-height: 48px;
  }

  .purchase-actions .action-or {
    display: none;
  }

  /* FAQ */
  .faq-item {
    border-radius: 12px;
  }

  .faq-item button {
    min-height: 52px;
    padding: 14px 16px;
    font-size: 15px;
    text-align: left;
  }

  /* Contact */
  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-form-grid input,
  .contact-form-grid textarea,
  .contact-form-grid select {
    min-height: 48px;
    font-size: 16px;
  }

  /* About */
  .about-page-grid,
  .about-hero,
  .about-category-panel,
  .about-official-panel {
    gap: 18px;
  }

  .about-quality-band {
    grid-template-columns: 1fr;
    border-radius: 12px;
    overflow: hidden;
  }

  /* COA page */
  .coa-page {
    padding-inline: 16px;
  }

  .coa-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .coa-library-card {
    border-radius: 12px;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    padding: 12px 14px;
  }

  .hero-stats strong {
    margin: 0;
    font-size: 20px;
  }

  .brand strong {
    font-size: 14px;
  }

  .bestseller-category-card {
    min-height: 200px;
  }

  .quote-card-header {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .format-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  /* Homepage COA table — keep desktop-style rows on mobile */
  .coa-table-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .coa-table {
    min-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
  }

  .coa-table div {
    grid-template-columns: minmax(118px, 1.45fr) minmax(46px, 0.38fr) minmax(78px, 0.62fr) minmax(92px, 0.75fr);
    gap: 6px;
    padding: 10px 8px;
    font-size: 11px;
  }

  .coa-table span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .coa-table button {
    width: auto;
    min-height: 32px;
    font-size: 10px;
    padding: 0 6px;
  }
}

/* Blog detail — centered reading column (all viewports) */
.blog-detail-page .blog-breadcrumb,
.blog-detail-page .blog-article {
  width: 100%;
  max-width: 760px;
  margin-inline: auto;
}

/* COA "More" — solid green pill button, centered text */
.coa-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 120px;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 28px;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.coa-more-button:hover,
.coa-more-button:focus-visible {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: var(--white);
  outline: none;
}
