:root {
    --abij-navy: #0b2b45;
    --abij-blue: #1769e0;
    --abij-blue-dark: #0f55bd;
    --abij-cyan: #eaf5ff;
    --abij-green: #16a06b;
    --abij-text: #12243a;
    --abij-muted: #63758a;
    --abij-border: #dbe6ef;
    --abij-surface: #ffffff;
    --abij-page: #f5f8fb;
}

.abij-announcement {
    align-items: center;
    background: var(--abij-navy);
    color: #fff;
    display: flex;
    font-size: 13px;
    font-weight: 650;
    gap: clamp(18px, 5vw, 64px);
    justify-content: center;
    letter-spacing: .01em;
    min-height: 38px;
    padding: 8px 20px;
    position: relative;
    z-index: 100;
}

.abij-announcement span::before {
    color: #6ee7b7;
    content: "✓";
    margin-right: 7px;
}

body:not(.wp-admin) header.wp-block-template-part,
body:not(.wp-admin) .wp-site-blocks > header {
    background: #fff !important;
    border-bottom: 1px solid var(--abij-border);
    box-shadow: 0 8px 30px rgba(11,43,69,.06);
    min-height: 0 !important;
    position: relative !important;
    top: auto !important;
    z-index: 90;
}

body:not(.wp-admin) header.wp-block-template-part .wp-block-group,
body:not(.wp-admin) .wp-site-blocks > header .wp-block-group {
    min-height: 0 !important;
    padding-block: 8px !important;
}

body:not(.wp-admin) header.wp-block-template-part > .wp-block-group,
body:not(.wp-admin) .wp-site-blocks > header > .wp-block-group {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: clamp(14px, 2.2vw, 34px) !important;
    justify-content: space-between !important;
    margin: 0 auto !important;
    max-width: 1440px !important;
    padding-inline: clamp(18px, 4vw, 64px) !important;
}

body:not(.wp-admin) header.wp-block-template-part .wp-block-site-title,
body:not(.wp-admin) .wp-site-blocks > header .wp-block-site-title {
    flex: 0 0 auto;
    font-size: 20px !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    max-width: 190px;
}

body:not(.wp-admin) header.wp-block-template-part .wp-block-navigation,
body:not(.wp-admin) .wp-site-blocks > header .wp-block-navigation {
    flex: 1 1 auto;
    font-size: 14px !important;
    justify-content: flex-end !important;
    min-width: 0;
    overflow-x: auto;
}

body:not(.wp-admin) header.wp-block-template-part .wp-block-navigation__container,
body:not(.wp-admin) .wp-site-blocks > header .wp-block-navigation__container {
    flex-wrap: nowrap !important;
    gap: clamp(12px, 1.8vw, 28px) !important;
    justify-content: flex-end !important;
    white-space: nowrap;
}

.abij-modern-commerce {
    background: var(--abij-page);
    color: var(--abij-text);
}

.abij-modern-commerce main,
.abij-modern-commerce .wp-site-blocks main {
    margin-top: 0 !important;
}

.abij-storefront-shell {
    margin: 24px auto 36px;
    max-width: 1440px;
    padding: 0 clamp(18px, 4vw, 64px);
    width: 100%;
}

.abij-hero {
    align-items: center;
    background-color: #eaf6ff;
    background-image: linear-gradient(90deg, rgba(234,246,255,1) 0%, rgba(234,246,255,.98) 38%, rgba(234,246,255,.15) 66%, rgba(234,246,255,0) 100%), url("abi-j-pharmacy-hero.png");
    background-position: center, right center;
    background-repeat: no-repeat;
    background-size: cover, auto 100%;
    border: 1px solid #d2e7f8;
    border-radius: 28px;
    box-shadow: 0 24px 60px rgba(23,105,224,.11);
    display: flex;
    min-height: 470px;
    overflow: hidden;
    padding: clamp(34px, 6vw, 78px);
}

.abij-hero__content { max-width: 650px; }
.abij-eyebrow {
    color: var(--abij-blue);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    margin: 0 0 14px;
    text-transform: uppercase;
}

.abij-hero h1 {
    color: var(--abij-navy);
    font-size: clamp(42px, 5.4vw, 74px);
    font-weight: 780;
    letter-spacing: -.045em;
    line-height: 1.02;
    margin: 0 0 22px;
}

.abij-hero p:not(.abij-eyebrow) {
    color: #415b72;
    font-size: clamp(17px, 1.5vw, 21px);
    line-height: 1.65;
    margin: 0 0 28px;
}

.abij-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.abij-button {
    border-radius: 12px;
    display: inline-flex;
    font-weight: 750;
    justify-content: center;
    padding: 14px 22px;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.abij-button:hover { transform: translateY(-2px); }
.abij-button--primary { background: var(--abij-blue); box-shadow: 0 12px 24px rgba(23,105,224,.24); color: #fff; }
.abij-button--primary:hover { background: var(--abij-blue-dark); color: #fff; }
.abij-button--secondary { background: #fff; border: 1px solid #bfd4e6; color: var(--abij-navy); }

.abij-product-search {
    background: #fff;
    border: 1px solid var(--abij-border);
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(11,43,69,.10);
    display: flex;
    margin-top: 28px;
    max-width: 610px;
    padding: 6px;
}
.abij-product-search input[type="search"] {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--abij-text);
    flex: 1;
    font-size: 15px;
    min-width: 0;
    outline: 0;
    padding: 10px 13px;
}
.abij-product-search button {
    background: var(--abij-navy);
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: 750;
    padding: 12px 21px;
}

.abij-category-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 22px;
}
.abij-category-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--abij-border);
    border-radius: 18px;
    color: var(--abij-text);
    display: flex;
    flex-direction: column;
    font-size: 16px;
    font-weight: 750;
    gap: 7px;
    min-height: 140px;
    padding: 20px;
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.abij-category-card:hover { border-color: #9cc8ef; box-shadow: 0 16px 35px rgba(11,43,69,.10); color: var(--abij-blue); transform: translateY(-3px); }
.abij-category-card__icon { align-items: center; background: var(--abij-cyan); border-radius: 12px; color: var(--abij-blue); display: inline-flex; font-size: 22px; height: 42px; justify-content: center; width: 42px; }
.abij-category-card small { color: var(--abij-muted); font-size: 12px; font-weight: 600; }

.abij-modern-commerce .woocommerce-products-header,
.abij-modern-commerce .woocommerce-result-count,
.abij-modern-commerce .woocommerce-ordering,
.abij-modern-commerce ul.products {
    max-width: 1312px;
}
.abij-modern-commerce .woocommerce-products-header { margin: 56px auto 16px; padding: 0 20px; }
.abij-modern-commerce .woocommerce-products-header__title,
.abij-modern-commerce .woocommerce-products-header h1 {
    color: var(--abij-navy);
    font-size: clamp(30px, 3vw, 44px);
    font-weight: 780;
    letter-spacing: -.03em;
}
.abij-modern-commerce .woocommerce-result-count { color: var(--abij-muted); margin-left: max(20px, calc((100% - 1272px)/2)); }
.abij-modern-commerce .woocommerce-ordering { margin-right: max(20px, calc((100% - 1272px)/2)); }
.abij-modern-commerce .woocommerce-ordering select { background: #fff; border: 1px solid var(--abij-border); border-radius: 11px; color: var(--abij-text); padding: 11px 36px 11px 13px; }

.woocommerce-page .woocommerce ul.products,
.woocommerce-page ul.products,
.abij-modern-commerce .woocommerce ul.products,
.abij-modern-commerce ul.products {
    display: grid !important;
    gap: 22px !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    margin: 28px auto 70px !important;
    padding: 0 20px !important;
}
.abij-modern-commerce .woocommerce ul.products::before,
.abij-modern-commerce .woocommerce ul.products::after { display: none !important; }
.woocommerce-page .woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.abij-modern-commerce .woocommerce ul.products li.product,
.abij-modern-commerce ul.products li.product {
    background: #fff;
    border: 1px solid var(--abij-border);
    border-radius: 19px;
    box-shadow: 0 10px 28px rgba(11,43,69,.06);
    display: flex;
    flex-direction: column;
    float: none !important;
    margin: 0 !important;
    overflow: hidden;
    padding: 14px 14px 16px !important;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    width: auto !important;
}
.abij-modern-commerce ul.products li.product:hover { border-color: #b6d4ed; box-shadow: 0 22px 44px rgba(11,43,69,.12); transform: translateY(-5px); }
.abij-modern-commerce ul.products li.product a.woocommerce-LoopProduct-link { color: inherit; text-decoration: none; }
.woocommerce-page ul.products li.product img,
.abij-modern-commerce ul.products li.product img {
    aspect-ratio: 1 / 1;
    background: #f7fafc;
    border-radius: 13px;
    height: auto !important;
    margin: 0 0 15px !important;
    object-fit: contain;
    padding: 14px;
    width: 100% !important;
}
.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
.abij-modern-commerce ul.products li.product .woocommerce-loop-product__title { color: var(--abij-text) !important; font-size: 17px !important; font-weight: 750 !important; line-height: 1.35; min-height: 46px; padding: 0 !important; }
.woocommerce-page ul.products li.product .price,
.abij-modern-commerce ul.products li.product .price { color: var(--abij-navy) !important; font-size: 18px !important; font-weight: 800 !important; margin: 8px 0 2px !important; }
.abij-stock { align-items: center; color: var(--abij-muted); display: flex; font-size: 12px; font-weight: 700; gap: 7px; margin: 3px 0 14px; }
.abij-stock span { background: currentColor; border-radius: 50%; height: 7px; width: 7px; }
.abij-stock.is-in-stock { color: var(--abij-green); }
.abij-stock.is-out-of-stock { color: #c84444; }
.woocommerce-page ul.products li.product .button,
.abij-modern-commerce ul.products li.product .button { background: var(--abij-blue) !important; border: 0 !important; border-radius: 10px !important; color: #fff !important; font-weight: 750 !important; margin-top: auto !important; padding: 13px 16px !important; text-align: center; width: 100%; }
.abij-modern-commerce ul.products li.product .button:hover { background: var(--abij-blue-dark) !important; }
.abij-modern-commerce .woocommerce-pagination { margin: 0 auto 70px; }

@media (max-width: 1050px) {
    .abij-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .abij-modern-commerce .woocommerce ul.products,
    .abij-modern-commerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 760px) {
    .abij-announcement { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
    .abij-hero { background-image: linear-gradient(90deg, rgba(234,246,255,.97), rgba(234,246,255,.83)), url("abi-j-pharmacy-hero.png"); min-height: 520px; padding: 32px 24px; }
    .abij-hero h1 { font-size: clamp(38px, 12vw, 58px); }
    .abij-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .abij-modern-commerce .woocommerce ul.products,
    .abij-modern-commerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 920px) {
    body:not(.wp-admin) header.wp-block-template-part > .wp-block-group,
    body:not(.wp-admin) .wp-site-blocks > header > .wp-block-group {
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    body:not(.wp-admin) header.wp-block-template-part .wp-block-navigation,
    body:not(.wp-admin) .wp-site-blocks > header .wp-block-navigation {
        justify-content: flex-start !important;
        max-width: 100%;
        width: 100%;
    }
    body:not(.wp-admin) header.wp-block-template-part .wp-block-navigation__container,
    body:not(.wp-admin) .wp-site-blocks > header .wp-block-navigation__container { justify-content: flex-start !important; }
}

@media (max-width: 480px) {
    .abij-storefront-shell { padding: 0 12px; }
    .abij-hero { border-radius: 20px; }
    .abij-hero__actions, .abij-button { width: 100%; }
    .abij-product-search { flex-direction: column; }
    .abij-category-grid { gap: 10px; }
    .abij-category-card { min-height: 128px; padding: 15px; }
    .abij-modern-commerce .woocommerce ul.products,
    .abij-modern-commerce ul.products { gap: 12px !important; padding: 0 12px !important; }
    .abij-modern-commerce ul.products li.product { padding: 9px 9px 12px !important; }
    .abij-modern-commerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .abij-button, .abij-category-card, .abij-modern-commerce ul.products li.product { transition: none; }
}

