:root {
    --ap-green: #239b0b;
    --ap-green-dark: #155c12;
    --ap-green-soft: #eef7e9;
    --ap-yellow: #f4c421;
    --ap-ink: #173c17;
    --ap-muted: #677067;
    --ap-line: #e6ebe3;
}

.ap-legacy-header {
    display: none !important;
}

.ap-site-header {
    position: relative;
    z-index: 1000;
    background: linear-gradient(105deg, #249f08 0%, #168e0a 52%, #25a20b 100%);
    box-shadow: 0 3px 16px rgba(19, 83, 12, .14);
}

.ap-site-header .container,
.ap-home-hero .container,
.ap-home-discovery .container {
    max-width: 1440px;
}

.ap-header-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.ap-header-brand {
    width: 192px;
    min-width: 192px;
    padding-right: 24px;
    border-right: 1px solid rgba(255, 255, 255, .18);
}

.ap-header-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.ap-category-menu {
    position: relative;
    flex: 0 0 auto;
}

.ap-category-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    border: 0;
    padding: 12px 0;
    background: transparent;
    font: inherit;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.ap-category-trigger i {
    font-size: 25px;
}

.ap-category-panel,
.ap-stores-panel {
    position: absolute;
    top: calc(100% + 18px);
    left: 0;
    width: 270px;
    max-height: 430px;
    overflow-y: auto;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    box-shadow: 0 22px 50px rgba(21, 68, 21, .16);
}

.ap-category-panel ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ap-category-panel a,
.ap-stores-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
    color: #314431;
    font-size: 14px;
}

.ap-category-panel a:hover,
.ap-stores-panel a:hover,
.ap-stores-panel a.active {
    color: var(--ap-green);
    background: var(--ap-green-soft);
}

.ap-primary-nav {
    align-items: center;
    gap: 22px;
    min-width: 0;
    margin-right: auto;
}

.ap-primary-nav > a,
.ap-stores-menu > summary {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 92px;
    color: rgba(255, 255, 255, .94);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.ap-primary-nav > a::after,
.ap-primary-nav > a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: transparent;
}

.ap-primary-nav > a:hover,
.ap-primary-nav > a.active,
.ap-stores-menu > summary:hover {
    color: var(--ap-yellow);
}

.ap-primary-nav > a:hover::after,
.ap-primary-nav > a.active::after {
    background: var(--ap-yellow);
}

.ap-stores-menu {
    position: relative;
}

.ap-stores-menu summary {
    list-style: none;
}

.ap-stores-menu summary::-webkit-details-marker {
    display: none;
}

.ap-stores-menu[open] .ap-stores-panel {
    display: block;
}

.ap-stores-panel {
    display: none;
    top: calc(100% - 5px);
}

.ap-header-search {
    position: relative;
    width: 254px;
    flex: 0 0 254px;
}

.ap-header-search .input-group {
    height: 48px;
    flex-wrap: nowrap;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.ap-header-search .input-group-text,
.ap-header-search .form-control {
    height: 48px;
    border: 0;
    background: #fff;
}

.ap-header-search .input-group-text {
    padding: 0 4px 0 18px;
    color: var(--ap-green);
    font-size: 20px;
}

.ap-header-search .form-control {
    padding-left: 9px;
    font-size: 14px;
    box-shadow: none;
}

.ap-header-search .quick-search-panel,
.ap-mobile-search .quick-search-panel {
    top: calc(100% + 10px);
    border: 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(21, 68, 21, .18);
}

.ap-favorites-link {
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.ap-favorites-link:hover {
    color: var(--ap-yellow);
}

.ap-favorites-link i {
    font-size: 22px;
}

.ap-mobile-actions {
    margin-left: auto;
    gap: 8px;
}

.ap-mobile-actions button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 20px;
}

.ap-mobile-search,
.ap-mobile-nav {
    border-top: 1px solid rgba(255, 255, 255, .16);
    background: #168d0a;
}

.ap-mobile-search .container,
.ap-mobile-nav .container {
    padding-top: 14px;
    padding-bottom: 14px;
}

.ap-mobile-search .form-control,
.ap-mobile-search .btn {
    height: 46px;
    border: 0;
}

.ap-mobile-search .form-control {
    border-radius: 10px 0 0 10px;
}

.ap-mobile-search .btn {
    border-radius: 0 10px 10px 0;
    color: var(--ap-green);
    background: #fff;
}

.ap-mobile-nav .container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.ap-mobile-nav a {
    padding: 10px 12px;
    border-radius: 9px;
    color: #fff;
    font-weight: 700;
}

.ap-mobile-nav a:hover {
    color: var(--ap-yellow);
    background: rgba(255, 255, 255, .08);
}

.ap-home-hero {
    padding: 34px 0 0;
    background: #fff;
}

.ap-hero-panel {
    position: relative;
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(500px, 1.08fr);
    align-items: center;
    overflow: hidden;
    padding: 46px 92px 72px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 83% 20%, rgba(196, 226, 181, .48), transparent 25%),
        linear-gradient(118deg, #f8fbf5 0%, #f4f9ef 58%, #eef7e8 100%);
}

.ap-hero-copy {
    position: relative;
    z-index: 3;
}

.ap-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding: 9px 16px;
    border-radius: 999px;
    color: #4c9134;
    background: #eaf5e3;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.ap-hero-copy h1 {
    margin: 0 0 19px;
    color: var(--ap-ink);
    font-size: clamp(42px, 4vw, 64px);
    line-height: 1.08;
    letter-spacing: -.045em;
    font-weight: 800;
}

.ap-hero-copy p {
    margin: 0 0 28px;
    color: var(--ap-muted);
    font-size: 18px;
    line-height: 1.65;
}

.ap-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border-radius: 11px;
    color: #fff;
    background: var(--ap-green);
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(35, 155, 11, .19);
}

.ap-hero-cta:hover {
    color: #fff;
    background: #1d8509;
    transform: translateY(-1px);
}

.ap-hero-visual {
    position: absolute;
    z-index: 2;
    top: 18px;
    right: 20px;
    bottom: 24px;
    width: 54%;
}

.ap-hero-visual > img {
    position: absolute;
    z-index: 2;
    right: 4%;
    bottom: -11%;
    width: 86%;
    height: auto;
    filter: drop-shadow(0 23px 24px rgba(37, 92, 24, .13));
}

.ap-hero-orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(213, 234, 203, .57);
}

.ap-hero-orb-one {
    width: 430px;
    height: 430px;
    right: 14%;
    bottom: -80px;
}

.ap-hero-orb-two {
    width: 220px;
    height: 220px;
    right: 0;
    top: 18px;
}

.ap-floating-badge {
    position: absolute;
    z-index: 4;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 5px solid rgba(255, 255, 255, .72);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #53b828, #238f0a);
    box-shadow: 0 9px 22px rgba(36, 112, 18, .18);
    font-size: 29px;
    font-weight: 800;
}

.ap-badge-percent { top: 38px; left: 16%; }
.ap-badge-cart { bottom: 82px; left: 4%; font-size: 23px; }
.ap-badge-tag { top: 48px; right: 8%; font-size: 24px; }

.ap-retailer-strip {
    position: relative;
    z-index: 6;
    min-height: 86px;
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: -44px auto 0;
    padding: 12px;
    width: calc(100% - 170px);
    border: 1px solid rgba(224, 231, 220, .72);
    border-radius: 16px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 17px 40px rgba(35, 74, 26, .10);
}

.ap-retailer-strip > a {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #edf0eb;
    border-radius: 12px;
    color: #495249;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
}

.ap-retailer-strip > a:hover {
    border-color: #cfe2c7;
    color: var(--ap-green);
    box-shadow: 0 7px 18px rgba(35, 103, 19, .08);
}

.ap-retailer-strip .ap-retailer-all {
    flex: 1.3;
    color: #3b8827;
    background: #f1f8ed;
}

.ap-retailer-all i {
    font-size: 23px;
}

.ap-retailer {
    flex: 1;
}

.ap-retailer img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.ap-retailer-more {
    flex: .8;
}

.ap-home-discovery {
    padding: 54px 0 42px;
    background: #fff;
}

.ap-section-heading,
.ap-content-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ap-section-heading {
    margin-bottom: 22px;
}

.ap-section-heading h2 {
    margin: 0;
    color: #182b18;
    font-size: 22px;
    font-weight: 800;
}

.ap-section-heading h2 i {
    color: var(--ap-green);
}

.ap-section-heading > a,
.ap-content-heading > a {
    color: #348324;
    font-size: 14px;
    font-weight: 800;
}

.ap-discovery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.ap-discovery-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 24px;
    border: 1px solid;
    border-radius: 17px;
    color: #243524;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ap-discovery-card:hover {
    color: #243524;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(27, 74, 20, .09);
}

.ap-card-leaflets { border-color: #d7e8ce; background: linear-gradient(120deg, #f5fbf1, #edf7e7); }
.ap-card-stores { border-color: #eee3bf; background: linear-gradient(120deg, #fffdf4, #fbf3dc); }
.ap-card-deals { border-color: #d8e6da; background: linear-gradient(120deg, #f7fbf7, #eaf5ee); }
.ap-card-recipes { border-color: #efdacf; background: linear-gradient(120deg, #fff9f5, #fceedf); }

.ap-card-copy {
    position: relative;
    z-index: 3;
    width: 58%;
}

.ap-card-copy h3 {
    margin: 0 0 10px;
    color: #244624;
    font-size: 21px;
    line-height: 1.16;
    font-weight: 800;
}

.ap-card-copy p {
    min-height: 58px;
    margin: 0 0 16px;
    color: #6a746a;
    font-size: 14px;
    line-height: 1.5;
}

.ap-card-copy span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid #cfe1c9;
    border-radius: 10px;
    color: #327e23;
    background: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ap-card-leaflet-image,
.ap-card-basket-image,
.ap-card-recipe-image,
.ap-discount-tag {
    position: absolute;
    z-index: 2;
}

.ap-card-leaflet-image {
    right: -2px;
    bottom: -28px;
    width: 42%;
    height: 185px;
    object-fit: contain;
    transform: rotate(-8deg);
    filter: drop-shadow(0 12px 11px rgba(28, 66, 22, .14));
}

.ap-card-basket-image {
    right: -36px;
    bottom: -5px;
    width: 57%;
}

.ap-card-recipe-image {
    right: -75px;
    bottom: -54px;
    width: 69%;
}

.ap-discount-tag {
    right: 28px;
    bottom: 32px;
    width: 105px;
    height: 130px;
    display: grid;
    place-items: center;
    border-radius: 16px 16px 27px 16px;
    color: #fff;
    background: linear-gradient(145deg, #60c934, #279d11);
    box-shadow: 0 14px 25px rgba(36, 121, 20, .21);
    font-size: 58px;
    font-weight: 800;
    transform: rotate(-10deg);
}

.ap-discount-tag::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 13px;
    height: 13px;
    border: 3px solid rgba(255, 255, 255, .85);
    border-radius: 50%;
}

.ap-current-offers {
    padding-top: 34px !important;
    background: #f7f9f6 !important;
}

.ap-content-heading {
    max-width: 1200px;
    margin: 0 auto 18px;
    padding: 0 15px;
}

.ap-content-heading span {
    color: var(--ap-ink);
    font-size: 22px;
    font-weight: 800;
}

@media (max-width: 1399px) {
    .ap-header-inner { gap: 16px; }
    .ap-header-brand { width: 170px; min-width: 170px; padding-right: 17px; }
    .ap-primary-nav { gap: 15px; }
    .ap-primary-nav > a, .ap-stores-menu > summary { font-size: 14px; }
    .ap-header-search { width: 225px; flex-basis: 225px; }
    .ap-hero-panel { padding-left: 65px; padding-right: 65px; }
    .ap-retailer-strip { width: calc(100% - 90px); }
    .ap-retailer-strip > a { padding-left: 9px; padding-right: 9px; }
}

@media (max-width: 1199px) {
    .ap-header-inner { min-height: 76px; }
    .ap-header-brand { width: 180px; min-width: 180px; border: 0; }
    .ap-hero-panel { grid-template-columns: .95fr 1.05fr; min-height: 400px; padding: 44px 52px 70px; }
    .ap-hero-copy h1 { font-size: 48px; }
    .ap-hero-copy p { font-size: 16px; }
    .ap-retailer-strip { width: calc(100% - 60px); overflow-x: auto; justify-content: flex-start; }
    .ap-retailer-strip > a { flex: 0 0 155px; }
    .ap-discovery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .ap-home-hero { padding-top: 22px; }
    .ap-hero-panel { min-height: 650px; display: block; padding: 44px 44px 60px; }
    .ap-hero-copy { width: 76%; }
    .ap-hero-visual { top: auto; right: 0; bottom: 24px; width: 70%; height: 360px; }
    .ap-hero-visual > img { width: 78%; }
    .ap-retailer-strip { margin-top: -34px; }
}

@media (max-width: 767px) {
    .ap-header-inner { min-height: 68px; gap: 10px; }
    .ap-header-brand { width: 155px; min-width: 155px; }
    .ap-favorites-link { display: none !important; }
    .ap-home-hero { padding-top: 14px; }
    .ap-hero-panel { min-height: 600px; padding: 34px 25px 54px; border-radius: 18px; }
    .ap-hero-copy { width: 100%; }
    .ap-eyebrow { margin-bottom: 17px; font-size: 11px; }
    .ap-hero-copy h1 { font-size: clamp(36px, 10.5vw, 48px); }
    .ap-hero-copy p { font-size: 15px; }
    .ap-hero-copy p br { display: none; }
    .ap-hero-visual { width: 100%; height: 305px; bottom: 20px; }
    .ap-hero-visual > img { right: -7%; bottom: -8%; width: 93%; }
    .ap-hero-orb-one { width: 300px; height: 300px; right: 3%; bottom: -50px; }
    .ap-hero-orb-two { width: 150px; height: 150px; }
    .ap-floating-badge { display: none; }
    .ap-retailer-strip { width: calc(100% - 22px); min-height: 76px; margin-top: -30px; padding: 9px; }
    .ap-retailer-strip > a { flex-basis: 140px; }
    .ap-retailer-strip > a span { font-size: 12px; }
    .ap-home-discovery { padding-top: 40px; }
    .ap-section-heading { align-items: flex-end; }
    .ap-section-heading h2 { font-size: 20px; }
    .ap-section-heading > a { font-size: 12px; }
    .ap-discovery-grid { grid-template-columns: 1fr; gap: 13px; }
    .ap-discovery-card { min-height: 205px; }
    .ap-card-copy { width: 61%; }
    .ap-card-recipe-image { width: 60%; }
}

@media (max-width: 420px) {
    .ap-header-brand { width: 138px; min-width: 138px; }
    .ap-mobile-actions button { width: 38px; height: 38px; }
    .ap-hero-panel { min-height: 585px; }
    .ap-hero-cta { padding: 12px 15px; font-size: 13px; }
    .ap-section-heading > a { display: none; }
    .ap-card-copy { width: 64%; }
    .ap-card-copy h3 { font-size: 19px; }
}
