/* Shared phone and tablet layout overrides. Remove the link to roll back. */
@media (max-width: 700px) {
    body { font-size: 15px; }
    .top { min-height: 62px; height: auto; padding: 10px 5%; gap: 12px; }
    .brand { font-size: 18px; white-space: nowrap; }
    .top nav { gap: 12px; font-size: 12px; }
    .top nav a { min-height: 42px; display: inline-flex; align-items: center; }
    .top nav .header-share { width: 44px; min-width: 44px; height: 44px; padding: 0; }
    .top nav .header-share span { display: none; }
    .nav-button, .button { min-height: 44px; align-items: center; justify-content: center; }

    .hero { min-height: 0; padding: 42px 6% 46px; gap: 26px; }
    .hero h1 { font-size: clamp(38px, 11vw, 54px); letter-spacing: -1.3px; }
    .hero-copy > p { font-size: 14px; }
    .hero-art { height: clamp(230px, 68vw, 330px); }
    .art-card { transform: scale(.82) rotate(-7deg); }

    .catalog { padding: 48px 5% 64px; }
    .section-head { margin-bottom: 24px; }
    .section-head h2, .about h2 { font-size: clamp(31px, 8vw, 40px); }
    .section-head > p { margin: 12px 0 0; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .product-image { height: clamp(140px, 43vw, 220px); }
    .product-info { gap: 6px; }
    .product-info h3 { font-size: 14px; line-height: 1.35; }
    .product-info p { font-size: 11px; line-height: 1.4; }
    .product-info strong { font-size: 12px; }

    .detail { width: 100%; margin: 18px auto 28px; padding: 12px; gap: 14px; }
    .detail .product-main-image { max-height: min(58vh, 440px); min-height: 220px; }
    .detail > .product-content { padding: 18px 16px; }
    .detail h1 { font-size: clamp(30px, 9vw, 40px); line-height: 1.12; overflow-wrap: anywhere; }
    .detail-copy { font-size: 14px; }
    .detail .price { font-size: 23px; }
    .detail .product-gallery { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; -webkit-overflow-scrolling: touch; }
    .detail .gallery-thumb { flex: 0 0 72px; }
    .contact-open { width: 100%; }
    .product-actions { grid-template-columns: 1fr; gap: 9px; }
    .share-dialog { margin: auto 0 0; border-radius: 14px 14px 0 0; padding: 28px 20px; }
    .share-links { display: grid; grid-template-columns: 1fr; }
    .qr { width: 150px; }
    .photo-lightbox { width: 100vw; max-height: 100dvh; padding: 48px 8px 8px; margin: auto 0 0; border-radius: 14px 14px 0 0; }
    .photo-lightbox > img { max-height: 82dvh; }

    .admin-wrap { width: 100%; margin: 28px auto; padding: 0 14px; }
    .admin-wrap h1 { font-size: 32px; }
    .admin-wrap h2 { font-size: 21px; line-height: 1.3; }
    .admin-form { padding: 16px; gap: 14px; }
    .admin-form input:not([type=checkbox]):not([type=radio]), .admin-form textarea,
    #form1 input[type=password], #form1 input[type=submit] { min-height: 44px; font-size: 16px; }
    .admin-form input[type=file] { width: 100%; min-height: 44px; font-size: 14px; }
    .admin-form .wide { grid-column: 1; }
    .admin-actions { flex-wrap: wrap; }
    .admin-actions input, .admin-form input[type=submit], #LoginButton { min-height: 44px; }
    .photo-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .photo-edit-card { width: 100%; min-width: 0; }
    .photo-edit-card img, .photo-choice img { width: 100%; height: clamp(95px, 28vw, 145px); }
    .admin-table-wrap, .analytics-table-wrap { max-width: calc(100vw - 28px); overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-table { min-width: 650px; }
    .admin-table th, .admin-table td { padding: 10px 8px; }
    .analytics-block { padding: 14px; }
    .analytics-block h2 { font-size: 27px; }
    .stats-grid { grid-template-columns: 1fr; }
    footer { justify-content: center; text-align: center; }
}

@media (max-width: 380px) {
    .top { padding-left: 4%; padding-right: 4%; }
    .brand { font-size: 16px; }
    .top nav { gap: 7px; font-size: 11px; }
    .products-grid { gap: 18px 9px; }
    .product-image { height: 140px; }
    .product-info { display: block; }
    .product-info strong { display: block; margin-top: 6px; }
}
