/* ============================================================
   Anghang Pinoy — Block Styles
   All custom ACF block styles.
   Design tokens are defined in theme main.css (:root).
   ============================================================ */

/* ─── Shared Block Helpers ──────────────────────────────────── */
.ap-block {
    position: relative;
}

.ap-block .ap-container {
    width: 100%;
    max-width: calc(1280px + 127px * 2);
    margin-inline: auto;
    padding-inline: 127px;
}

@media (max-width: 768px) {
    .ap-block .ap-container {
        padding-inline: 16px;
    }
}

/* Star Rating helper */
.ap-stars {
    display: flex;
    gap: 2px;
    align-items: center;
}

.ap-stars__star {
    width: 16px;
    height: 16px;
    color: #f5a623;
    fill: currentColor;
}

.ap-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

/* ─── Hero Block ────────────────────────────────────────────── */
.ap-hero {
    background: #fffaf5;
    padding-top: 80px;
    padding-bottom: 80px;
    overflow: hidden;
}

.ap-hero__inner {
    display: grid;
    grid-template-columns: 608fr 472fr;
    gap: 48px;
    align-items: center;
}

.ap-hero__badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ap-hero__headline {
    font-family: 'Poppins', sans-serif;
    font-size: 3.75rem; /* 60px */
    font-weight: 700;
    line-height: 1.1;
    color: #2d2d2d;
    margin-bottom: 20px;
}

.ap-hero__headline em {
    color: #c1272d;
    font-style: normal;
}

.ap-hero__description {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #6b6b6b;
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 480px;
}

.ap-hero__ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.ap-hero__ctas .ap-btn {
    padding: 16px 32px;
    font-size: 1rem;
}

.ap-hero__stars {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ap-hero__stars-label {
    font-size: 0.875rem;
    color: #6b6b6b;
    font-family: 'Inter', sans-serif;
}

.ap-hero__image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-hero__image-wrap img {
    max-width: 384px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
}

@media (max-width: 900px) {
    .ap-hero__inner {
        grid-template-columns: 1fr;
    }
    .ap-hero__image-wrap {
        order: -1;
    }
    .ap-hero__headline {
        font-size: 2rem;
    }
}

/* ─── Features / USP Block ──────────────────────────────────── */
.ap-features {
    background: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.ap-features__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .ap-features__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ap-features__grid {
        grid-template-columns: 1fr;
    }
}

.ap-features__card {
    background: #fffaf5;
    border-radius: 12px;
    padding: 28px 24px;
    text-align: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ap-features__card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ap-features__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: #fff0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ap-features__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ap-features__card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 8px;
}

.ap-features__card-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #6b6b6b;
    line-height: 1.6;
}

/* ─── Best Sellers Block ────────────────────────────────────── */
.ap-best-sellers {
    background: #fffaf5;
    padding-top: 80px;
    padding-bottom: 80px;
}

.ap-best-sellers__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .ap-best-sellers__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ap-best-sellers__grid {
        grid-template-columns: 1fr;
    }
}

.ap-product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ap-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ap-product-card__image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f5f2;
}

.ap-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ap-product-card:hover .ap-product-card__image img {
    transform: scale(1.04);
}

.ap-product-card__body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.ap-product-card__name {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2d2d2d;
    line-height: 1.3;
}

.ap-product-card__stars {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ap-product-card__price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #c1272d;
}

.ap-product-card__atc {
    display: block;
    width: 100%;
    text-align: center;
    background: #c1272d;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: auto;
    transition: background 0.2s ease;
}

.ap-product-card__atc:hover {
    background: #a01e23;
    text-decoration: none;
}

.ap-best-sellers__footer {
    text-align: center;
}

/* ─── Steps Block ───────────────────────────────────────────── */
.ap-steps {
    background: #fffaf5;
    padding-top: 80px;
    padding-bottom: 80px;
}

.ap-steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .ap-steps__grid {
        grid-template-columns: 1fr;
    }
}

.ap-steps__card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ap-steps__image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.ap-steps__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-steps__body {
    padding: 24px;
}

.ap-steps__label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #c1272d;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 8px;
    display: block;
}

.ap-steps__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 8px;
}

.ap-steps__text {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #6b6b6b;
    line-height: 1.65;
}

/* ─── CTA Banner Block ──────────────────────────────────────── */
.ap-cta-banner {
    background: #c1272d;
    padding-top: 48px;
    padding-bottom: 48px;
}

.ap-cta-banner__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.ap-cta-banner__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 527px;
}

.ap-cta-banner__headline {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem; /* 32px */
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

.ap-cta-banner__desc {
    font-family: 'Inter', sans-serif;
    font-size: 1rem; /* 16px */
    font-weight: 400;
    line-height: 1.5; /* 24px */
    color: rgba(255, 255, 255, 0.8);
    max-width: 477px;
    margin: 0;
}

.ap-cta-banner__desc strong {
    color: #f5a623;
    font-weight: 700;
}

.ap-cta-banner__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .ap-cta-banner__inner {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .ap-cta-banner__text {
        align-items: center;
        max-width: 100%;
    }
    .ap-cta-banner__headline {
        font-size: 1.5rem; /* 24px */
    }
    .ap-cta-banner__desc {
        text-align: center;
        max-width: 100%;
    }
    .ap-cta-banner__actions {
        justify-content: center;
    }
}

/* ─── Testimonials Block ────────────────────────────────────── */
.ap-testimonials {
    background: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.ap-testimonials__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .ap-testimonials__grid {
        grid-template-columns: 1fr;
    }
}

.ap-testimonial-card {
    background: #fffaf5;
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ap-testimonial-card__stars {
    display: flex;
    gap: 3px;
}

.ap-testimonial-card__quote {
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #2d2d2d;
    line-height: 1.7;
    font-style: italic;
    flex: 1;
}

.ap-testimonial-card__author-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #2d2d2d;
}

.ap-testimonial-card__author-location {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: #6b6b6b;
}

/* ─── Recipes Block ─────────────────────────────────────────── */
.ap-recipes {
    background: #ffffff;
    padding-top: 80px;
    padding-bottom: 80px;
}

.ap-recipes__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .ap-recipes__grid {
        grid-template-columns: 1fr;
    }
}

.ap-recipe-card {
    background: #f8f5f2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ap-recipe-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.ap-recipe-card__image {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.ap-recipe-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ap-recipe-card:hover .ap-recipe-card__image img {
    transform: scale(1.04);
}

.ap-recipe-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.ap-recipe-card__category {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #c1272d;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    background: #fff0e0;
    padding: 3px 10px;
    border-radius: 9999px;
    width: fit-content;
}

.ap-recipe-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1.3;
}

.ap-recipe-card__excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    color: #6b6b6b;
    line-height: 1.6;
    flex: 1;
}

.ap-recipe-card__link {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: #c1272d;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.ap-recipe-card__link:hover {
    gap: 8px;
    text-decoration: none;
}

/* ─── FAQ Block ─────────────────────────────────────────────── */
.ap-faq {
    background: #fffaf5;
    padding-top: 80px;
    padding-bottom: 80px;
}

.ap-faq__list {
    max-width: 800px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ap-faq__item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.ap-faq__trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    gap: 16px;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #2d2d2d;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ap-faq__trigger:hover { color: #c1272d; }

.ap-faq__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
    transition: transform 0.3s ease;
}

.ap-faq__icon::before,
.ap-faq__icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.ap-faq__icon::before {
    width: 2px;
    height: 12px;
    top: 4px;
    left: 9px;
}

.ap-faq__icon::after {
    width: 12px;
    height: 2px;
    top: 9px;
    left: 4px;
}

.ap-faq__item.is-open .ap-faq__icon::before {
    transform: rotate(90deg);
    opacity: 0;
}

.ap-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.ap-faq__answer-inner {
    padding: 0 24px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #6b6b6b;
    line-height: 1.7;
}

.ap-faq__item.is-open .ap-faq__trigger { color: #c1272d; }

/* ─── Newsletter Block ──────────────────────────────────────── */
.ap-newsletter {
    background: #2d2d2d;
    padding-top: 80px;
    padding-bottom: 80px;
    text-align: center;
}

.ap-newsletter__content {
    max-width: 540px;
    margin-inline: auto;
}

.ap-newsletter .ap-eyebrow { color: #f5a623; }

.ap-newsletter__heading {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
}

.ap-newsletter__desc {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 28px;
}

.ap-newsletter__form {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ap-newsletter__input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9375rem;
    color: #2d2d2d;
    background: #ffffff;
}

.ap-newsletter__input::placeholder {
    color: #6b6b6b;
}

.ap-newsletter__submit {
    background: #f5a623;
    color: #2d2d2d;
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 16px 28px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.ap-newsletter__submit:hover { background: #e0941a; }

.ap-newsletter__privacy {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 12px;
}

@media (max-width: 480px) {
    .ap-newsletter__form {
        flex-direction: column;
        border-radius: 8px;
    }
    .ap-newsletter__submit {
        padding: 14px;
    }
}

/* ─── Block Preview State ───────────────────────────────────── */
.block-editor-block-preview__container .ap-block {
    pointer-events: none;
}
