/* Layout fixes loaded after the theme stylesheet. Keep overrides small and scoped. */

/* Never allow sideways scrolling on phones. */
html, body { max-width: 100%; overflow-x: clip; }
img { max-width: 100%; }

/* Header: four icon buttons + badges must fit on small phones. */
@media (max-width: 459.99px) {
    .header-top .create-navbar .nav-right { gap: 6px; padding-right: 8px; }
    .header-top .create-navbar .nav-right .icon-circle { width: 36px; height: 36px; }
    .header-top .create-navbar .nav-right .icon-circle svg { width: 18px; height: 18px; }
    .header-top .create-navbar .nav-right .cart-count { right: -4px; }
}

/* Deal of the day (theme 2): the image was a fixed 960px and spilled past the section. */
@media (min-width: 992px) {
    .gs-deal-of-day.gs-deal-of-day-home2 .deal-of-day-img {
        left: 52%; right: 0; top: 0; bottom: 0; overflow: hidden;
    }
    .gs-deal-of-day.gs-deal-of-day-home2 .deal-of-day-img img {
        width: 100%; height: 100%; object-fit: contain; object-position: left bottom;
    }
}

/* Partner logos: two per row on phones instead of one huge logo per row. */
@media (max-width: 575.98px) {
    .gs-partnerss > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
    .gs-partnerss .single-partner img { max-height: 56px; width: auto; object-fit: contain; }
}

/* Footer: social icons stay on one line, address lines align with their icons. */
.gs-footer-section .footer-row .left-info > a { display: flex; align-items: flex-start; }
.gs-footer-section .footer-row .left-info > a svg { flex: 0 0 32px; }
.gs-footer-section .footer-row .left-info .social-links { gap: 10px; }
.gs-footer-section .footer-row .left-info .social-links a { margin-right: 0; }
/* Vendor header: long vendor names ran under the dropdown arrow. */
@media (min-width: 768px) {
    .gs-vendor-header .user-dropdown-wrapper { width: auto; min-width: 233px; }
    .gs-vendor-header .user-dropdown-wrapper .user-dropdown { padding-right: 40px; }
    .gs-vendor-header .user-dropdown-wrapper .user-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
}

/* Header logo: fixed visual height, keep aspect ratio, render crisply. */
.navbar-brand { display: inline-flex; align-items: center; padding: 4px 0; }
.navbar-brand .nav-logo {
    height: 48px; width: auto; max-width: 200px; object-fit: contain;
    image-rendering: -webkit-optimize-contrast; image-rendering: high-quality;
    backface-visibility: hidden; transform: translateZ(0);
}
@media (max-width: 991.98px) { .navbar-brand .nav-logo { height: 40px; max-width: 150px; } }
@media (max-width: 459.99px) { .navbar-brand .nav-logo { height: 34px; max-width: 120px; } }
