/* SilonGems — mobile-first responsive helpers */

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Prevent iOS zoom on form focus */
input,
select,
textarea {
    font-size: 16px;
}

@media (min-width: 768px) {
    input,
    select,
    textarea {
        font-size: inherit;
    }
}

/* Comfortable tap targets on touch devices */
@media (max-width: 767px) {
    nav a:not(.mobile-auth-btn),
    nav button,
    footer a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    .touch-target {
        min-height: 44px;
        min-width: 44px;
    }

    /* Mobile Sign In / Sign Up — equal columns, centered text */
    nav .mobile-auth-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        width: 100%;
        min-width: 0;
        padding: 0.625rem 1rem;
        text-align: center;
        white-space: nowrap;
    }
}

/* Media never overflows containers */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* Logo — cap height so header stays compact */
.site-logo {
    max-height: 3rem;
    width: auto;
}

@media (min-width: 768px) {
    .site-logo {
        max-height: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .site-logo {
        max-height: 3.75rem;
    }
}

/* Page sections below sticky navbar */
.page-top {
    padding-top: 7.5rem;
}

@media (min-width: 768px) {
    .page-top {
        padding-top: 5.5rem;
    }
}

/* Product page: full-width action buttons on small screens */
@media (max-width: 639px) {
    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn-primary,
    .product-actions .btn-secondary,
    .product-actions .btn-icon {
        width: 100%;
        justify-content: center;
    }

    .product-actions .btn-icon {
        width: 100%;
    }
}

/* Trust marquee — respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .trust-track {
        animation: none !important;
        flex-wrap: wrap;
        justify-content: center;
        width: 100% !important;
        gap: 0.75rem;
    }

    .trust-track > div {
        flex-wrap: wrap;
        justify-content: center;
        white-space: normal !important;
        padding: 0.5rem;
    }
}

/* Footer safe area on notched phones */
footer {
    padding-bottom: max(4rem, env(safe-area-inset-bottom));
}
