/* =========================================================
   VALYX FEATURED PRODUCTS
   ========================================================= */

.valyx-featured-products {
    --vfp-container: 1200px;
    --vfp-brand: #0f172a;
    --vfp-brand-hover: #17233b;
    --vfp-text: #101828;
    --vfp-muted: #667085;
    --vfp-border: #e3e8ef;
    --vfp-media: #f4f7fb;
    --vfp-green: #16845b;
    --vfp-green-soft: #eaf8f1;

    width: 100%;

    background: #ffffff;
    color: var(--vfp-text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

.valyx-featured-products,
.valyx-featured-products *,
.valyx-featured-products *::before,
.valyx-featured-products *::after {
    box-sizing: border-box;
}

.valyx-featured-products__inner {
    width: min(calc(100% - 48px), var(--vfp-container));

    margin-inline: auto;
    padding: 68px 0 84px;
}

.valyx-featured-products__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 32px;

    margin-bottom: 25px;
}

.valyx-featured-products__eyebrow {
    margin: 0 0 8px;

    color: #2563eb;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.valyx-featured-products__title {
    margin: 0;

    color: var(--vfp-brand);

    font-size: clamp(28px, 2.5vw, 36px);
    line-height: 1.08;
    font-weight: 600;
    letter-spacing: -0.045em;
}

.valyx-featured-products__description {
    max-width: 520px;

    margin: 11px 0 0;

    color: var(--vfp-muted);

    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
}

.valyx-featured-products__view-all {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding-bottom: 3px;

    color: var(--vfp-brand);

    font-size: 12px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;

    transition:
        color 0.18s ease,
        transform 0.18s ease;
}

.valyx-featured-products__view-all:hover {
    transform: translateX(2px);

    color: #2563eb;
}

.valyx-featured-products__view-all svg {
    width: 14px;
    height: 14px;

    stroke: currentColor;
}

.valyx-featured-products__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 22px;
}

.valyx-featured-card {
    min-width: 0;
}

.valyx-featured-card__media {
    position: relative;

    display: block;

    overflow: hidden;

    width: 100%;
    aspect-ratio: 1 / 0.96;

    border: 1px solid rgba(227, 232, 239, 0.76);
    border-radius: 16px;

    background: var(--vfp-media);

    text-decoration: none;

    box-shadow:
        0 1px 2px
        rgba(15, 23, 42, 0.02);

    transition:
        transform 0.24s ease,
        border-color 0.24s ease,
        box-shadow 0.24s ease;
}

.valyx-featured-card:hover .valyx-featured-card__media {
    transform: translateY(-3px);

    border-color: #d4dae3;

    box-shadow:
        0 15px 34px
        rgba(15, 23, 42, 0.09);
}

.valyx-featured-card__image {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;
    object-position: center;

    transition:
        transform 0.38s
        cubic-bezier(0.2, 0.72, 0.25, 1);
}

.valyx-featured-card:hover .valyx-featured-card__image {
    transform: scale(1.025);
}

.valyx-featured-card__sale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 27px;

    padding: 0 10px;

    border-radius: 999px;

    background: var(--vfp-brand);
    color: #ffffff;

    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.valyx-featured-card__body {
    padding-top: 12px;
}

.valyx-featured-card__stock {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    padding: 6px 9px;

    border-radius: 7px;

    background: var(--vfp-green-soft);
    color: var(--vfp-green);

    font-size: 10px;
    line-height: 1;
    font-weight: 500;
}

.valyx-featured-card__stock::before {
    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: currentColor;
}

.valyx-featured-card__name {
    margin: 10px 0 0;

    color: var(--vfp-text);

    font-size: 15px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.valyx-featured-card__name a {
    color: inherit;

    text-decoration: none;
}

.valyx-featured-card__name a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.valyx-featured-card__price {
    min-height: 22px;

    margin-top: 5px;

    color: var(--vfp-muted);

    font-size: 11px;
    line-height: 1.4;
    font-weight: 400;
}

.valyx-featured-card__price ins {
    color: inherit;

    text-decoration: none;
}

.valyx-featured-card__price del {
    margin-right: 5px;

    color: #98a2b3;
}

.valyx-featured-card__actions {
    margin-top: 15px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 8px;
}

.valyx-featured-card__button {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 13px;

    border: 1px solid #d8dee7;
    border-radius: 999px;

    appearance: none;

    background: #ffffff;
    color: var(--vfp-brand);

    font-family: inherit;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;

    text-align: center;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

.valyx-featured-card__button:hover {
    transform: translateY(-1px);

    border-color: #bdc6d2;

    background: #f9fafb;
    color: var(--vfp-brand);
}

.valyx-featured-card__button--primary {
    border-color: var(--vfp-brand);

    background: var(--vfp-brand);
    color: #ffffff;

    box-shadow:
        0 6px 14px
        rgba(15, 23, 42, 0.1);
}

.valyx-featured-card__button--primary:hover {
    border-color: var(--vfp-brand-hover);

    background: var(--vfp-brand-hover);
    color: #ffffff;

    box-shadow:
        0 8px 18px
        rgba(15, 23, 42, 0.14);
}

.valyx-featured-card__button[disabled] {
    opacity: 0.62;

    cursor: wait;
}

.valyx-featured-products__mobile-progress {
    display: none;
}

/* Tablet */

@media (max-width: 980px) {
    .valyx-featured-products__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 28px 18px;
    }
}

/* Mobile two-column layout */

@media (max-width: 720px) {
    .valyx-featured-products__inner {
        width: 100%;

        padding: 50px 18px 66px;
    }

    .valyx-featured-products__header {
        align-items: flex-start;

        margin-bottom: 20px;
        padding-inline: 0;
    }

    .valyx-featured-products__eyebrow {
        font-size: 9px;
    }

    .valyx-featured-products__title {
        font-size: 27px;
    }

    .valyx-featured-products__description {
        max-width: 330px;

        margin-top: 8px;

        font-size: 12px;
        line-height: 1.5;
    }

    .valyx-featured-products__view-all {
        padding-top: 24px;

        font-size: 10px;
    }

    .valyx-featured-products__view-all span {
        display: none;
    }

    .valyx-featured-products__view-all svg {
        width: 18px;
        height: 18px;
    }

    .valyx-featured-products__viewport {
        overflow: visible;
        padding: 0;
    }

    .valyx-featured-products__grid {
        width: 100%;

        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 24px 10px;
    }

    .valyx-featured-card {
        min-width: 0;
    }

    .valyx-featured-card__media {
        aspect-ratio: 1 / 0.98;

        border-radius: 12px;
    }

    .valyx-featured-card__body {
        padding-top: 9px;
    }

    .valyx-featured-card__stock {
        gap: 5px;

        padding: 5px 7px;

        border-radius: 6px;

        font-size: 8px;
    }

    .valyx-featured-card__stock::before {
        width: 6px;
        height: 6px;
    }

    .valyx-featured-card__name {
        margin-top: 7px;

        font-size: 12px;
        line-height: 1.25;
    }

    .valyx-featured-card__price {
        min-height: 18px;

        margin-top: 3px;

        font-size: 9px;
        line-height: 1.35;
    }

    .valyx-featured-card__actions {
        margin-top: 10px;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 6px;
    }

    .valyx-featured-card__button {
        min-height: 35px;

        padding-inline: 7px;

        font-size: 9px;
    }

    .valyx-featured-products__mobile-progress {
        display: none;
    }
}

@media (max-width: 430px) {
    .valyx-featured-products__inner {
        padding-inline: 16px;
    }

    .valyx-featured-products__grid {
        gap: 22px 9px;
    }

    .valyx-featured-card__media {
        border-radius: 11px;
    }
}

@media (max-width: 370px) {
    .valyx-featured-products__inner {
        padding-inline: 14px;
    }

    .valyx-featured-products__grid {
        gap: 20px 8px;
    }

    .valyx-featured-card__button {
        min-height: 33px;

        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .valyx-featured-card__media,
    .valyx-featured-card__image,
    .valyx-featured-card__button,
    .valyx-featured-products__mobile-progress span {
        transition-duration: 0.01ms;
    }
}


/* Keep both product actions on one row on mobile. */
@media (max-width: 720px) {
    .valyx-featured-card__button {
        min-width: 0;
        padding-inline: 4px;
        white-space: nowrap;
    }
}

@media (max-width: 370px) {
    .valyx-featured-card__actions {
        gap: 5px;
    }

    .valyx-featured-card__button {
        padding-inline: 3px;
        font-size: 7.5px;
    }
}

/* =========================================================
   MOBILE ACTION BUTTONS — FINAL TWO-COLUMN OVERRIDE
   Keeps both actions on one row and prevents older theme rules
   from stacking them vertically.
   ========================================================= */

@media (max-width: 720px) {
    .valyx-featured-products .valyx-featured-card__actions {
        width: 100% !important;

        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        align-items: stretch !important;

        gap: 6px !important;

        margin-top: 10px !important;
    }

    .valyx-featured-products .valyx-featured-card__button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 34px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        margin: 0 !important;
        padding: 0 6px !important;

        font-size: 8.5px !important;
        line-height: 1 !important;
        font-weight: 600 !important;
        letter-spacing: -0.01em !important;
        white-space: nowrap !important;

        text-align: center !important;
    }
}

@media (max-width: 390px) {
    .valyx-featured-products .valyx-featured-card__actions {
        gap: 5px !important;
    }

    .valyx-featured-products .valyx-featured-card__button {
        min-height: 33px !important;
        padding-inline: 4px !important;
        font-size: 8px !important;
    }
}

@media (max-width: 350px) {
    .valyx-featured-products .valyx-featured-card__button {
        font-size: 7.5px !important;
    }
}
