.h4bs-template-library {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 100%;
}

.h4bs-template-card,
.h4bs-product-card,
.h4bs-checkout-shell {
    max-width: 100%;
    background: #ffffff;
    border: 1px solid #dbe7e6;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgb(4 78 62 / 6%);
    padding: 1rem;
}

.h4bs-copy-template,
.h4bs-search-form button {
    appearance: none;
    border: 0;
    border-radius: 8px;
    background: #0a9b7a;
    color: #fff;
    cursor: pointer;
    padding: 0.55rem 0.95rem;
    font-weight: 600;
}

.h4bs-copy-template:hover,
.h4bs-search-form button:hover {
    background: #087d62;
}

.h4bs-slider {
    position: relative;
    overflow: hidden;
    max-width: 100%;
    border-radius: 14px;
    border: 1px solid #dbe7e6;
    background: #f6faf9;
}

.h4bs-slide {
    display: none;
    position: relative;
}

.h4bs-slide.is-active {
    display: block;
}

.h4bs-slide-image {
    width: 100%;
    height: auto;
    display: block;
}

.h4bs-siteshot-wrap {
    margin: 0;
    max-width: 100%;
}

.h4bs-siteshot-frame {
    position: relative;
    display: block;
    width: 100%;
    border: 2px solid #8c97a0;
    border-radius: 14px;
    overflow: hidden;
    background: #e8edf1;
    box-shadow: 0 10px 30px rgb(0 0 0 / 14%);
}

.h4bs-siteshot-frame::before {
    content: "";
    display: block;
    height: 16px;
    background: linear-gradient(90deg, #cad4dc 0, #f2f5f8 35%, #dce3e9 100%);
    border-bottom: 1px solid #bbc7cf;
}

.h4bs-siteshot-label {
    position: absolute;
    top: 5px;
    right: 8px;
    z-index: 2;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    color: #2f3d49;
    background: rgb(255 255 255 / 88%);
    border: 1px solid #95a2ad;
    border-radius: 999px;
    padding: 1px 8px;
}

.h4bs-siteshot-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.h4bs-siteshot-link {
    display: block;
    text-decoration: none;
}

.h4bs-siteshot-caption {
    margin-top: 0.45rem;
    font-size: 0.92rem;
    color: #50606f;
}

.h4bs-slide-content {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
    background: rgb(16 38 36 / 78%);
    color: #fff;
    border-radius: 10px;
    padding: 0.9rem 1rem;
}

.h4bs-slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgb(255 255 255 / 85%);
    z-index: 12;
}

.h4bs-slide-prev {
    left: 10px;
}

.h4bs-slide-next {
    right: 10px;
}

.h4bs-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
    max-width: 100%;
}

.h4bs-product-catalog {
    display: grid;
    gap: 0.75rem;
}

.h4bs-product-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 1.5fr) repeat(6, minmax(110px, 1fr)) auto auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #dbe7e6;
    border-radius: 12px;
    background: #f9fcfb;
}

.h4bs-product-toolbar input,
.h4bs-product-toolbar select {
    min-width: 0;
    width: 100%;
    border: 1px solid #c5d8d6;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    background: #fff;
}

.h4bs-product-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    font-size: 0.92rem;
}

.h4bs-product-toolbar-note {
    margin: 0;
    font-size: 0.92rem;
    color: #2d4f4a;
}

.h4bs-product-pager {
    margin: 0.1rem 0 0;
}

.h4bs-product-next {
    display: inline-block;
    text-decoration: none;
    border: 1px solid #0a9b7a;
    color: #0a9b7a;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    font-weight: 600;
}

.h4bs-product-next:hover {
    background: #0a9b7a;
    color: #fff;
}

.h4bs-product-price {
    color: #0a9b7a;
    font-weight: 700;
}

.h4bs-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.6rem;
    max-width: 100%;
}

.h4bs-search-form input,
.h4bs-search-form select {
    min-width: 0;
    border: 1px solid #c5d8d6;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    background: #fff;
    color: inherit;
}

.h4bs-search-form button,
.h4bs-checkout-shell select,
.h4bs-checkout-shell input,
.h4bs-checkout-shell textarea {
    min-width: 0;
    max-width: 100%;
}

.h4bs-search-results {
    grid-column: 1 / -1;
    margin-top: 0.75rem;
}

.h4bs-search-result-group h4 {
    margin-bottom: 0.4rem;
}

.h4bs-search-result-group ul {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.h4bs-search-result-group li {
    border: 1px solid #dbe7e6;
    border-radius: 9px;
    background: #fff;
    padding: 0.6rem 0.7rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
    .h4bs-search-form {
        grid-template-columns: 1fr;
    }
}

.h4bs-mega-parent > ul.sub-menu {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 0.7rem;
    min-width: min(95vw, 980px);
    max-width: 100%;
    padding: 1rem;
    border: 1px solid #dbe7e6;
    background: #fff;
}

.h4bs-mega-cols-2 > ul.sub-menu {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.h4bs-mega-cols-3 > ul.sub-menu {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.h4bs-mega-cols-5 > ul.sub-menu {
    grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.h4bs-mega-cols-6 > ul.sub-menu {
    grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.h4bs-menu-badge {
    margin-left: 0.4rem;
    font-size: 0.72rem;
    background: #ff7a33;
    color: #fff;
    border-radius: 6px;
    padding: 0.1rem 0.35rem;
}

.h4bs-form {
    margin: 0 0 1.25rem;
    padding: 1rem;
    border: 1px solid #dbe7e6;
    border-radius: 12px;
    background: #fff;
}

.h4bs-form-title {
    margin: 0 0 0.85rem;
}

.h4bs-form-notice {
    margin: 0 0 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #dbe7e6;
    font-weight: 600;
}

.h4bs-form-notice.is-success {
    color: #0b6b4a;
    background: #ecfff6;
    border-color: #86dfb8;
}

.h4bs-form-notice.is-error {
    color: #8a1b1b;
    background: #fff0f0;
    border-color: #e6aaaa;
}

.h4bs-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.75rem;
}

.h4bs-form-field {
    grid-column: span 12;
}

.h4bs-form-field--25 {
    grid-column: span 3;
}

.h4bs-form-field--33 {
    grid-column: span 4;
}

.h4bs-form-field--50 {
    grid-column: span 6;
}

.h4bs-form-field--66 {
    grid-column: span 8;
}

.h4bs-form-field--75 {
    grid-column: span 9;
}

.h4bs-form-field label {
    display: inline-block;
    margin: 0 0 0.35rem;
    font-weight: 600;
}

.h4bs-form-field input[type="text"],
.h4bs-form-field input[type="email"],
.h4bs-form-field input[type="tel"],
.h4bs-form-field input[type="url"],
.h4bs-form-field input[type="date"],
.h4bs-form-field input[type="time"],
.h4bs-form-field input[type="number"],
.h4bs-form-field select,
.h4bs-form-field textarea {
    width: 100%;
    padding: 0.6rem 0.65rem;
    border: 1px solid #c6d2d1;
    border-radius: 8px;
    background: #fff;
}

.h4bs-form-field textarea {
    min-height: 120px;
}

.h4bs-checkbox-label {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.h4bs-form-actions {
    margin-top: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.h4bs-form-submit {
    border: 0;
    border-radius: 8px;
    padding: 0.62rem 1rem;
    background: #0f6cbf;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.h4bs-form-submit.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.h4bs-form-live-message {
    font-size: 0.95rem;
    min-height: 1.2em;
}

.h4bs-form-live-message.is-success {
    color: #0b6b4a;
}

.h4bs-form-live-message.is-error {
    color: #8a1b1b;
}

.h4bs-form-honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 960px) {
    .h4bs-mega-parent > ul.sub-menu {
        width: 100%;
        min-width: 0;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .h4bs-product-toolbar {
        grid-template-columns: 1fr;
    }

    .h4bs-search-form {
        grid-template-columns: 1fr;
    }

    .h4bs-form-grid {
        grid-template-columns: 1fr;
    }

    .h4bs-form-field--25,
    .h4bs-form-field--33,
    .h4bs-form-field--50,
    .h4bs-form-field--66,
    .h4bs-form-field--75,
    .h4bs-form-field {
        grid-column: auto;
    }

    .h4bs-mega-parent > ul.sub-menu {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 7680px) {
    .h4bs-template-library,
    .h4bs-product-grid {
        gap: 2rem;
    }

    .h4bs-slide-nav {
        width: 64px;
        height: 64px;
    }
}
