/* Phone-first shopping: compact discovery, clear cards, reachable actions. */
.mobile-discovery,
.mobile-tabs,
.mobile-action {
  display: none;
}
.toast-action {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-left: 1rem;
  white-space: nowrap;
}
#toast.show {
  pointer-events: auto;
}
@media (max-width: 600px) {
  :root {
    --phone-bar: 68px;
    --phone-header: 68px;
  }
  html {
    scroll-padding-top: 90px;
  }
  body {
    padding-bottom: calc(var(--phone-bar) + env(safe-area-inset-bottom));
  }
  header {
    position: sticky;
    top: 0;
    min-height: var(--phone-header);
    padding-block: 0.65rem;
    background: #faf9f6f5;
    backdrop-filter: blur(14px);
    border-bottom-color: #213b3112;
  }
  .announcement {
    font-size: 0.6875rem;
    padding: 0.4rem 1rem;
  }
  .logo {
    font-size: 1.75rem;
  }
  header .actions > a {
    font-size: 0;
    width: 44px;
    position: relative;
    padding: 0;
    justify-content: center;
  }
  header .actions > a::before {
    content: "";
    width: 15px;
    height: 16px;
    border: 1.5px solid var(--ink);
    border-radius: 3px;
  }
  header .actions > a::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 5px;
    border: 1.5px solid var(--ink);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    top: 9px;
    left: 17px;
  }
  header .actions span {
    font-size: 10px;
    background: var(--lime);
    border: 0;
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 17px;
    height: 17px;
    padding: 1px 4px;
    display: grid;
    place-items: center;
  }
  header #search-open {
    font-size: 26px;
  }
  header #menu {
    font-size: 25px;
  }
  .actions {
    gap: 0;
  }
  nav.open {
    border-radius: 0 0 20px 20px;
    padding: 0.5rem 6% 1rem;
  }
  nav a {
    border-bottom: 1px solid var(--line);
    padding: 0.8rem 0.25rem;
  }
  nav a:last-child {
    border: 0;
  }
  .mobile-discovery {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.875rem 5%;
    padding-left: 0.875rem;
    background: #eef0e9;
    border: 1px solid #e1e5d9;
    border-radius: 12px;
  }
  .mobile-discovery input {
    background: none;
    border: 0;
    padding: 0.75rem 0.25rem;
    height: 48px;
    min-height: 48px;
  }
  .mobile-discovery button {
    border: 0;
    background: none;
    min-width: 48px;
    min-height: 48px;
    padding: 0.75rem;
  }
  .mobile-discovery:focus-within {
    outline: 2px solid #8da849;
    outline-offset: 2px;
  }
  .mobile-discovery input:focus-visible {
    outline: none;
  }
  .hero {
    margin: 0 4%;
    border-radius: 20px;
    gap: 0;
    background: #e9ecdf;
  }
  .hero-visual {
    grid-row: 1;
    aspect-ratio: auto;
    height: clamp(180px, 52vw, 240px);
    min-height: 0;
  }
  .hero-visual img {
    object-position: center 39%;
  }
  .hero-label {
    bottom: 24px;
    left: 20px;
    font-size: 0.625rem;
  }
  .hero-label span:last-child {
    display: none;
  }
  .hero-copy {
    position: relative;
    z-index: 1;
    padding: 1.25rem 1.25rem 1.5rem;
    background: #e9ecdf;
    border-radius: 20px 20px 0 0;
    margin-top: -15px;
  }
  .hero-copy .eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.16em;
  }
  .hero h1 {
    font-size: clamp(2rem, 8.5vw, 2.8rem);
    line-height: 1.12;
    margin: 0.625rem 0;
    max-width: 12ch;
    letter-spacing: -0.05em;
  }
  .hero h1 br {
    display: none;
  }
  .hero p {
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0.25rem 0;
    max-width: none;
  }
  .hero p br {
    display: none;
  }
  .hero .btn {
    width: 100%;
    margin-top: 1rem;
    min-height: 50px;
    border-radius: 10px;
    font-size: 0.9375rem;
  }
  .benefits {
    border: 0;
    gap: 0.5rem;
    padding: 1rem 6% 0;
    font-size: 0.75rem;
  }
  .benefits span {
    flex: 1 1 45%;
    gap: 0.3rem;
  }
  .benefits b {
    margin: 0;
    font-size: 1rem;
  }
  .benefits span:last-child {
    display: none;
  }
  .section {
    padding: 2rem 5%;
  }
  .section-head {
    margin-bottom: 1rem;
    gap: 0.25rem;
  }
  .section-head h2 {
    font-size: 1.65rem;
    letter-spacing: -0.06em;
    margin: 0.4rem 0;
  }
  .section-head .eyebrow {
    font-size: 0.625rem;
  }
  .section-head > div {
    flex-basis: auto;
  }
  .section-head .text-link {
    font-size: 0.75rem;
    padding-block: 0.5rem;
  }
  .section-head > .small {
    font-size: 0.8125rem;
  }
  .categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.625rem;
  }
  .category,
  .category:last-child {
    display: flex;
    flex-direction: column;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 14px;
    background: #e9ebe3;
  }
  .category img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
  }
  .category-label {
    position: static;
    display: block;
    background: none;
    padding: 0.65rem 0.4rem 0.8rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
  }
  .category-label small {
    display: none;
  }
  .products {
    gap: 1rem 0.75rem;
  }
  .products > article {
    border: 1px solid #e3e7dc;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
  }
  .product-picture {
    aspect-ratio: 1.08;
    margin: 0;
    overflow: hidden;
    border-radius: 13px 13px 0 0;
  }
  .product-picture img {
    object-fit: cover;
  }
  .quick {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0 !important;
    border-radius: 0;
  }
  .product-picture .quick {
    display: none;
  }
  .product-info {
    padding: 0.75rem 0.7rem 0.85rem;
    margin: 0;
    gap: 0.25rem;
    align-items: flex-start;
  }
  .product-info h3 a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
  }
  .product-info p {
    font-size: 0.75rem;
    color: #58675e;
    margin: 0.2rem 0;
    min-height: 2.8em;
  }
  .product-info .dots {
    display: none;
  }
  .product-info .price {
    font-weight: 700;
    font-size: 0.9375rem;
  }
  .card-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: calc(100% - 1.4rem);
    margin: 0 0.7rem 0.7rem;
    min-height: 44px;
    border: 1px solid #dce2d3;
    border-radius: 8px;
    background: #f5f7f0;
    font-size: 0.8125rem;
    font-weight: 500;
  }
  .badge {
    background: #faf9f6f5;
    border-radius: 5px;
    font-size: 0.5625rem;
    padding: 0.3rem 0.4rem;
  }
  .editorial {
    margin: 0.5rem 4%;
    border-radius: 20px;
    overflow: hidden;
  }
  .editorial img {
    aspect-ratio: 1.5;
  }
  .editorial-copy {
    padding: 1.5rem;
  }
  .editorial h2 {
    font-size: 2rem;
    margin-block: 0.75rem;
  }
  .editorial h2 br {
    display: none;
  }
  .editorial p {
    font-size: 0.9375rem;
  }
  .editorial .btn {
    width: 100%;
    border-radius: 10px;
  }
  .page-title {
    padding: 1.5rem 5% 0.5rem;
  }
  .page-title h1 {
    font-size: 2rem;
    margin-block: 0.5rem;
  }
  .page-title .eyebrow {
    font-size: 0.625rem;
  }
  .page-title p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
  .shop-controls {
    gap: 0.75rem;
  }
  .shop-bottom {
    order: -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 125px;
    gap: 0.5rem;
  }
  .shop-bottom input {
    border-radius: 10px;
    padding: 0.75rem;
  }
  .shop-bottom select {
    border-radius: 10px;
    font-size: 0.875rem;
    padding: 0.65rem 0.4rem;
  }
  .filter-tabs {
    gap: 0.5rem;
  }
  .filter-tabs button {
    font-size: 0.8125rem;
    border-radius: 10px;
    min-height: 46px;
  }
  .results {
    font-size: 0.8125rem;
    margin-bottom: 1rem;
  }
  .btn {
    border-radius: 10px;
    min-height: 50px;
  }
  .breadcrumb {
    padding: 1rem 5% 0;
    font-size: 0.8125rem;
  }
  .detail {
    padding: 1rem 5% 2rem;
    gap: 1.25rem;
  }
  .gallery-frame {
    border-radius: 18px;
    aspect-ratio: 1.3;
  }
  .thumbs {
    gap: 0.75rem;
  }
  .thumbs button {
    width: 70px;
    border-radius: 8px;
    overflow: hidden;
  }
  .detail > div:first-child > .small {
    font-size: 0.75rem;
    margin-bottom: 0;
  }
  .detail h1 {
    font-size: 2rem;
    margin: 0.5rem 0;
  }
  .detail .large-price {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
  }
  .detail p {
    font-size: 0.9375rem;
  }
  .detail .field {
    margin: 1.25rem 0;
  }
  .detail .field label {
    font-size: 0.9375rem;
    font-weight: 600;
  }
  .detail .options button {
    border-radius: 10px;
    min-height: 48px;
  }
  .detail select {
    border-radius: 10px;
    min-height: 50px;
  }
  .detail .add-row {
    margin-top: 1rem;
  }
  .detail .add-row > [data-add] {
    display: none;
  }
  .detail .quantity {
    border-radius: 10px;
    overflow: hidden;
  }
  .detail details {
    background: #f0f2eb;
    padding: 0.5rem 0.875rem;
    border: 0;
    border-radius: 10px;
    margin: 0.75rem 0;
  }
  .detail details:first-of-type {
    margin-top: 1.5rem;
  }
  .mobile-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 15;
    background: #faf9f6fa;
    backdrop-filter: blur(16px);
    border-top: 1px solid #dce1d7;
    padding: 0.4rem max(0.5rem, env(safe-area-inset-right))
      max(0.4rem, env(safe-area-inset-bottom))
      max(0.5rem, env(safe-area-inset-left));
  }
  .mobile-tabs a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    gap: 0.2rem;
    border-radius: 12px;
    font-size: 0.6875rem;
    color: #68756c;
  }
  .mobile-tabs a[aria-current="page"] {
    color: var(--ink);
    background: #eaf0df;
    font-weight: 700;
  }
  .mobile-count {
    position: absolute;
    left: calc(50% + 4px);
    top: 1px;
    min-width: 17px;
    height: 17px;
    border-radius: 20px;
    padding: 0 4px;
    background: var(--ink);
    color: white;
    display: grid;
    place-items: center;
    font-size: 0.625rem;
  }
  body[data-page="product"] .mobile-tabs,
  body[data-page="checkout"] .mobile-tabs,
  body[data-mobile-action="true"] .mobile-tabs {
    display: none;
  }
  body[data-page="checkout"] {
    padding-bottom: 0;
  }
  body[data-mobile-action="true"] .mobile-action {
    position: fixed;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 5% max(0.75rem, env(safe-area-inset-bottom));
    background: #faf9f6fa;
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px #213b3108;
  }
  body[data-mobile-action="true"] {
    padding-bottom: calc(90px + env(safe-area-inset-bottom));
  }
  .mobile-action .btn {
    flex: 1;
    font-size: 0.9375rem;
    padding-inline: 1rem;
  }
  .mobile-price {
    flex: 0 1 45%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  .mobile-price strong {
    font-size: 1.2rem;
  }
  .mobile-price span {
    font-size: 0.6875rem;
    color: var(--muted);
  }
  #toast {
    z-index: 25;
    bottom: calc(85px + env(safe-area-inset-bottom));
    border-radius: 12px;
    padding: 0.5rem 0.875rem;
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    box-shadow: 0 8px 24px #213b3133;
  }
  .cart-item {
    background: white;
    border: 1px solid #e0e5d8;
    border-radius: 14px;
    padding: 1rem;
    margin-block: 0.75rem;
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .cart-item img {
    width: 72px;
    height: 72px;
    border-radius: 8px;
  }
  .cart-item h3 {
    font-weight: 600;
  }
  .cart-item p {
    font-size: 0.8125rem;
  }
  .cart-item .quantity {
    border-radius: 10px;
    overflow: hidden;
  }
  .cart-item > div:last-child {
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
  }
  .summary-box {
    border-radius: 14px;
  }
  body[data-mobile-action="true"] .summary-box > .btn {
    display: none;
  }
  .cart-layout {
    padding-inline: 5%;
    gap: 1.25rem;
  }
  .form .field {
    margin-block: 1rem;
  }
  .form input,
  .form textarea,
  .form select {
    border-radius: 10px;
    min-height: 50px;
  }
  .form input[type="checkbox"] {
    min-height: 22px;
    accent-color: var(--ink);
  }
  .form input:invalid:not(:placeholder-shown):not([type="checkbox"]) {
    border-color: #a34833;
  }
  .form .field label {
    font-size: 0.9375rem;
  }
  .contact-layout {
    padding-inline: 5%;
  }
  dialog {
    position: fixed;
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: calc(100dvh - 32px);
    padding: 0.75rem 5% max(1.25rem, env(safe-area-inset-bottom));
  }
  dialog::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    background: #c5cdbf;
    border-radius: 8px;
    margin: 0 auto 0.25rem;
  }
  .dialog-close {
    background: #eef1e8;
    border-radius: 50%;
    width: 44px;
    min-height: 44px;
    font-size: 1.5rem;
  }
  .quick-layout {
    gap: 0.75rem;
  }
  .quick-layout img {
    max-height: 190px;
    border-radius: 12px;
  }
  .quick-layout h2 {
    font-size: 1.75rem;
  }
  .quick-layout p {
    font-size: 0.875rem;
    margin-block: 0.5rem;
  }
  .quick-layout .btn {
    margin-top: 0.5rem;
  }
  .statement {
    padding: 2.5rem 7%;
  }
  footer {
    padding-top: 2rem;
  }
  .footer-grid > div:last-child p {
    font-size: 0.8125rem;
  }
  .success {
    margin: 2.5rem auto;
  }
}
.card-preview {
  display: none;
}
@media (max-width: 600px) {
  .card-preview {
    display: flex;
  }
}
@media (max-width: 360px) {
  header .logo {
    font-size: 1.5rem;
  }
  header .actions button,
  header .actions > a {
    width: 40px;
    min-width: 40px;
  }
  header .actions > a::after {
    left: 15px;
  }
  .hero-copy {
    padding-inline: 1rem;
  }
  .hero h1 {
    font-size: 1.95rem;
  }
  .category-label {
    font-size: 0.75rem;
  }
  .product-info {
    padding-inline: 0.55rem;
  }
  .card-preview {
    width: calc(100% - 1.1rem);
    margin-inline: 0.55rem;
  }
  .mobile-action {
    gap: 0.6rem !important;
  }
  .mobile-price {
    flex-basis: 40%;
  }
  .mobile-action .btn {
    font-size: 0.875rem;
    padding-inline: 0.7rem;
  }
}
@media (max-width: 600px) and (max-height: 500px) {
  header {
    position: relative;
  }
  .mobile-tabs {
    position: static;
    border-top: 1px solid var(--line);
  }
  body {
    padding-bottom: 0;
  }
  body[data-mobile-action="true"] {
    padding-bottom: 90px;
  }
}

@media (max-width: 600px) {
  .shop-controls {
    position: sticky;
    top: var(--phone-header);
    z-index: 8;
    background: var(--paper);
    padding-block: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
  }
  body:has(input:focus, textarea:focus) .mobile-tabs {
    display: none;
  }
  .product-picture a {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 600px) and (max-height: 700px) {
  .announcement {
    display: none;
  }
  .hero-visual {
    height: 125px;
  }
  .hero-copy {
    padding: 1rem;
  }
  .hero h1 {
    font-size: 1.8rem;
    max-width: 15ch;
  }
  .hero p {
    font-size: 0.8125rem;
  }
  .hero .btn {
    margin-top: 0.75rem;
  }
}
