/*!
 * WF Modern — Food Menu for WooCommerce
 * Wolt/Glovo-inspired layout.
 * All selectors scoped under .wfm-* so nothing leaks to the theme.
 */

:root {
    --wfm-accent: #E24B4A;
    --wfm-accent-dark: #A32D2D;
    --wfm-text: #1A1A1A;
    --wfm-text-soft: #6B6B6B;
    --wfm-text-faint: #9A9A9A;
    --wfm-surface: #FFFFFF;
    --wfm-surface-alt: #F7F7F5;
    --wfm-surface-tint: #FCEBEB;
    --wfm-border: rgba(0, 0, 0, 0.08);
    --wfm-border-strong: rgba(0, 0, 0, 0.14);
    --wfm-radius-card: 16px;
    --wfm-radius-img: 12px;
    --wfm-radius-pill: 999px;
    --wfm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --wfm-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --wfm-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.16);
    --wfm-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --wfm-sidecart-w: 420px;
    --wfm-modal-w: 720px;
}

/* ============================================================
 * MENU CONTAINER
 * ============================================================ */
.wfm-menu {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wfm-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.wfm-menu *,
.wfm-menu *::before,
.wfm-menu *::after,
.wfm-modal *,
.wfm-sidecart *,
.wfm-overlay,
.wfm-floating-cart * {
    box-sizing: border-box;
}

/* Universal button reset for every interactive element this plugin renders.
   Themes love to override 'button' globally; this gives us a clean slate. */
.wfm-menu button,
.wfm-modal button,
.wfm-sidecart button,
.wfm-floating-cart {
    font-family: inherit;
    font-size: inherit;
    line-height: 1;
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--wfm-text);
    -webkit-appearance: none;
    appearance: none;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    text-decoration: none;
}

.wfm-menu button:hover,
.wfm-modal button:hover,
.wfm-sidecart button:hover {
    color: var(--wfm-text);
    background: none;
}

/* SVG icons should always be visible — use currentColor and explicit fill rules */
.wfm-menu svg,
.wfm-modal svg,
.wfm-sidecart svg,
.wfm-floating-cart svg {
    fill: none;
    stroke: currentColor;
}

.wfm-menu svg [fill="currentColor"],
.wfm-modal svg [fill="currentColor"],
.wfm-sidecart svg [fill="currentColor"],
.wfm-floating-cart svg [fill="currentColor"] {
    fill: currentColor;
    stroke: none;
}

.wfm-empty {
    padding: 32px;
    text-align: center;
    color: var(--wfm-text-soft);
}

/* ============================================================
 * HEADER BAR (status + opening hours)
 * ============================================================ */
.wfm-menu-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin: 0 0 18px;
    background: var(--wfm-surface);
    border: 1px solid var(--wfm-border);
    border-radius: var(--wfm-radius-card);
    box-shadow: var(--wfm-shadow-sm);
    color: var(--wfm-text);
}

.wfm-hours-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    flex: 1;
    color: inherit;
}

.wfm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: var(--wfm-radius-pill);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.wfm-status-badge.wfm-status-open {
    background: #E6F4EA;
    color: #1B6E3A;
}

.wfm-status-badge.wfm-status-closed {
    background: #FCEBEB;
    color: #A32D2D;
}

.wfm-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    position: relative;
}

.wfm-status-open .wfm-status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: wfm-pulse 1.8s ease-in-out infinite;
}

@keyframes wfm-pulse {
    0%, 100% { transform: scale(1); opacity: 0.35; }
    50%      { transform: scale(1.5); opacity: 0; }
}

.wfm-hours-text {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14px;
    color: var(--wfm-text-soft);
    flex-wrap: wrap;
}

.wfm-hours-label {
    font-weight: 500;
    color: var(--wfm-text-soft);
}

.wfm-hours-value {
    color: var(--wfm-text);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
    .wfm-menu-header { padding: 12px 14px; gap: 10px; }
    .wfm-hours-info { gap: 10px; }
    .wfm-hours-text { font-size: 13px; }
}

/* ============================================================
 * FILTER BAR — underline tabs (Wolt/Glovo style)
 * Horizontal scroll on mobile, sticky-like bottom border on container.
 * ============================================================ */
.wfm-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 26px;
    padding: 0;
    border-bottom: 1px solid var(--wfm-border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.wfm-filter::-webkit-scrollbar { display: none; }

.wfm-filter-chip,
.wfm-filter-chip:focus,
.wfm-filter-chip:focus-visible,
.wfm-filter-chip:active,
button.wfm-filter-chip {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 14px 4px;
    margin: 0 14px 0 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--wfm-text-soft) !important;
    transition: color 0.15s var(--wfm-ease);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    position: relative;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: none !important;
    text-decoration: none !important;
}

.wfm-filter-chip:focus-visible {
    outline: 2px solid var(--wfm-accent) !important;
    outline-offset: -4px;
    border-radius: 4px !important;
}

.wfm-filter-chip:first-child { margin-left: 0; }
.wfm-filter-chip:last-child { margin-right: 4px; }

.wfm-filter-chip::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background 0.15s var(--wfm-ease);
}

.wfm-filter-chip:hover {
    color: var(--wfm-text) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.wfm-filter-chip.is-active,
.wfm-filter-chip.is-active:focus,
.wfm-filter-chip.is-active:active,
.wfm-filter-chip.is-active:hover,
button.wfm-filter-chip.is-active {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--wfm-text) !important;
    font-weight: 600;
    box-shadow: none !important;
    border: 0 !important;
}

.wfm-filter-chip.is-active::after {
    background: var(--wfm-accent);
    height: 3px;
}

@media (max-width: 480px) {
    .wfm-filter-chip {
        font-size: 14px;
        padding: 12px 4px;
        margin-right: 16px;
    }
}

/* ============================================================
 * CATEGORY SECTION
 * ============================================================ */
.wfm-cat-section {
    margin-bottom: 36px;
}

.wfm-cat-section:last-child { margin-bottom: 0; }

.wfm-cat-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--wfm-text);
    border: 0;
}

.wfm-cat-title-text {
    color: var(--wfm-text);
}

.wfm-cat-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--wfm-text-faint);
    background: var(--wfm-surface-alt);
    padding: 2px 10px;
    border-radius: var(--wfm-radius-pill);
    line-height: 1.6;
}

@media (max-width: 480px) {
    .wfm-cat-section { margin-bottom: 28px; }
    .wfm-cat-title { font-size: 19px; }
}

/* ============================================================
 * GRID
 * ============================================================ */
.wfm-grid {
    display: grid;
    gap: 16px;
}

.wfm-grid.wfm-columns-2 { grid-template-columns: repeat(2, 1fr); }
.wfm-grid.wfm-columns-3 { grid-template-columns: repeat(3, 1fr); }
.wfm-grid.wfm-columns-4 { grid-template-columns: repeat(4, 1fr); }
.wfm-grid.wfm-columns-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 900px) {
    .wfm-grid.wfm-columns-4,
    .wfm-grid.wfm-columns-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
    .wfm-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
}
@media (max-width: 380px) {
    .wfm-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
 * GRID CARD
 * ============================================================ */
.wfm-card-grid {
    background: var(--wfm-surface);
    border: 1px solid var(--wfm-border);
    border-radius: var(--wfm-radius-card);
    box-shadow: var(--wfm-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s var(--wfm-ease),
                box-shadow 0.2s var(--wfm-ease),
                border-color 0.2s var(--wfm-ease);
}

.wfm-card-grid:hover {
    transform: translateY(-2px);
    box-shadow: var(--wfm-shadow-md);
    border-color: var(--wfm-border-strong);
}

.wfm-card-grid .wfm-card-image-link,
.wfm-card-grid .wfm-card-image-link:focus,
.wfm-card-grid .wfm-card-image-link:active,
.wfm-card-grid button.wfm-card-image-link {
    display: block;
    width: 100%;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
}

.wfm-card-grid .wfm-card-image-link:focus-visible {
    outline: 2px solid var(--wfm-accent) !important;
    outline-offset: -2px;
}

.wfm-card-grid .wfm-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--wfm-surface-alt);
    overflow: hidden;
}

.wfm-card-grid .wfm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--wfm-ease);
}

.wfm-card-grid:hover .wfm-card-image img {
    transform: scale(1.04);
}

.wfm-card-image-empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wfm-surface-alt), var(--wfm-surface-tint));
}

.wfm-card-grid .wfm-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.wfm-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--wfm-text);
    letter-spacing: -0.01em;
}

.wfm-card-title-link,
.wfm-card-title-link:link,
.wfm-card-title-link:visited,
.wfm-card-title-link:focus,
.wfm-card-title-link:focus-visible,
.wfm-card-title-link:active,
button.wfm-card-title-link {
    text-align: left;
    font: inherit;
    color: var(--wfm-text) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    padding: 0 !important;
}

.wfm-card-title-link:hover {
    color: var(--wfm-accent-dark) !important;
    background: transparent !important;
    background-color: transparent !important;
}

.wfm-card-title-link:focus-visible {
    outline: 2px solid var(--wfm-accent) !important;
    outline-offset: 2px;
    border-radius: 3px !important;
}

.wfm-card-desc {
    margin: 0;
    font-size: 13px;
    color: var(--wfm-text-soft);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wfm-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 8px;
}

.wfm-card-price {
    font-size: 16px;
    font-weight: 500;
    color: var(--wfm-text);
    line-height: 1.2;
}

.wfm-card-price del {
    color: var(--wfm-text-faint);
    font-size: 0.85em;
    font-weight: 400;
    margin-right: 4px;
}

.wfm-card-price ins {
    text-decoration: none;
    color: var(--wfm-accent);
}

.wfm-card-price .woocommerce-Price-amount,
.wfm-card-price .amount {
    font-weight: 500;
    color: inherit;
}

/* ============================================================
 * LIST
 * Three-column layout: [media] [title + description] [price + add]
 * ============================================================ */
.wfm-list {
    background: var(--wfm-surface);
    border: 1px solid var(--wfm-border);
    border-radius: var(--wfm-radius-card);
    box-shadow: var(--wfm-shadow-sm);
    overflow: hidden;
}

.wfm-card-list {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--wfm-border);
    transition: background 0.15s var(--wfm-ease);
}

.wfm-card-list:last-child { border-bottom: 0; }
.wfm-card-list:hover { background: var(--wfm-surface-alt); }

/* MEDIA — left, fixed square */
.wfm-card-list .wfm-card-media {
    position: relative;
    flex-shrink: 0;
    width: 104px;
    height: 104px;
    order: 1;
}

.wfm-card-list .wfm-card-image-link,
.wfm-card-list .wfm-card-image-link:focus,
.wfm-card-list .wfm-card-image-link:active,
.wfm-card-list button.wfm-card-image-link {
    display: block;
    width: 100%;
    height: 100%;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    padding: 0 !important;
}

.wfm-card-list .wfm-card-image-link:focus-visible {
    outline: 2px solid var(--wfm-accent) !important;
    outline-offset: 2px;
    border-radius: var(--wfm-radius-img);
}

.wfm-card-list .wfm-card-image {
    width: 104px;
    height: 104px;
    border-radius: var(--wfm-radius-img);
    overflow: hidden;
    background: var(--wfm-surface-alt);
}

.wfm-card-list .wfm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s var(--wfm-ease);
}

.wfm-card-list:hover .wfm-card-image img {
    transform: scale(1.05);
}

/* TEXT — flexible center column */
.wfm-card-list .wfm-card-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    order: 2;
}

.wfm-card-list .wfm-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--wfm-text);
    letter-spacing: -0.01em;
}

.wfm-card-list .wfm-card-title-link,
.wfm-card-list .wfm-card-title-link:link,
.wfm-card-list .wfm-card-title-link:visited,
.wfm-card-list .wfm-card-title-link:focus,
.wfm-card-list .wfm-card-title-link:active,
.wfm-card-list button.wfm-card-title-link {
    text-align: left;
    color: var(--wfm-text) !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    padding: 0 !important;
    font: inherit;
    transition: color 0.15s;
}

.wfm-card-list .wfm-card-title-link:hover {
    color: var(--wfm-accent) !important;
    background: transparent !important;
    background-color: transparent !important;
}

.wfm-card-list .wfm-card-desc {
    margin: 0;
    font-size: 13.5px;
    color: var(--wfm-text-soft);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ACTION — price stacked above add button, right column */
.wfm-card-list .wfm-card-action {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    order: 3;
    min-width: 80px;
}

.wfm-card-list .wfm-card-price {
    font-size: 17px;
    font-weight: 600;
    color: var(--wfm-text);
    line-height: 1.1;
    text-align: right;
    white-space: nowrap;
}

.wfm-card-list .wfm-card-price del {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--wfm-text-faint);
    margin-bottom: 2px;
}

.wfm-card-list .wfm-card-price ins {
    text-decoration: none;
    background: transparent;
    color: var(--wfm-accent);
}

/* Override: in list, "+" button is NOT absolutely positioned anymore */
.wfm-card-list .wfm-add-btn {
    position: static;
    bottom: auto;
    right: auto;
    width: 44px;
    height: 44px;
    border: 0;
}

.wfm-card-list .wfm-add-btn .wfm-icon-plus { width: 18px; height: 18px; }

.wfm-card-list .wfm-closed-badge {
    font-size: 10px;
    padding: 4px 8px;
    white-space: nowrap;
}

/* Mobile */
@media (max-width: 600px) {
    .wfm-card-list {
        gap: 12px;
        padding: 14px;
        align-items: center;
    }
    .wfm-card-list .wfm-card-media,
    .wfm-card-list .wfm-card-image { width: 88px; height: 88px; }
    .wfm-card-list .wfm-card-title { font-size: 15px; }
    .wfm-card-list .wfm-card-desc {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    .wfm-card-list .wfm-card-action {
        min-width: auto;
        gap: 8px;
    }
    .wfm-card-list .wfm-card-price { font-size: 15px; }
    .wfm-card-list .wfm-add-btn { width: 44px; height: 44px; }
}

@media (max-width: 380px) {
    .wfm-card-list .wfm-card-media,
    .wfm-card-list .wfm-card-image { width: 76px; height: 76px; }
}

/* ============================================================
 * BADGES
 * ============================================================ */
.wfm-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: var(--wfm-radius-pill);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.02em;
    z-index: 2;
}

.wfm-badge-sale {
    background: var(--wfm-accent);
    color: #fff;
    text-transform: lowercase;
    font-weight: 700;
}

/* Stacked second badge: shown below the "discount!" tag, gives the
 * exact savings (e.g. "save 6 €"). Lighter visual weight so the eye
 * goes to the discount! cue first. */
.wfm-badge-sale-amount {
    top: 38px; /* sits under the first badge */
    background: #fff;
    color: var(--wfm-accent);
    border: 1px solid var(--wfm-accent);
    font-weight: 600;
}

/* When there's no owner-set label badge above us, take the top slot
 * ourselves instead of sitting in the empty space below it. */
.wfm-badge-sale-amount:first-child {
    top: 10px;
}

.wfm-badge-soldout {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
}

.wfm-card-list .wfm-badge {
    top: -4px;
    left: -4px;
    font-size: 10px;
    padding: 3px 8px;
}

.wfm-card-list .wfm-badge-sale-amount {
    top: 22px; /* tighter spacing on compact list-view cards */
    left: -4px;
}

.wfm-card-list .wfm-badge-sale-amount:first-child {
    top: -4px;
}

.wfm-closed-badge {
    background: rgba(0, 0, 0, 0.08);
    color: var(--wfm-text-soft);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--wfm-radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.is-sold-out .wfm-card-body,
.is-sold-out .wfm-card-text {
    opacity: 0.5;
}

/* ============================================================
 * "+" ADD BUTTON
 * ============================================================ */
.wfm-add-btn {
    -webkit-appearance: none;
    appearance: none;
    background: var(--wfm-accent) !important;
    color: #fff !important;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Eliminate 300ms tap delay on iOS and avoid double-tap zoom on
     * tightly packed cards. This alone fixes most "needs two taps". */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.06);
    transition: background 0.15s var(--wfm-ease),
                transform 0.15s var(--wfm-ease),
                box-shadow 0.15s var(--wfm-ease);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Hover styles only apply on devices that can actually hover (mouse,
 * trackpad). On touch devices, hover-on-tap caused a "ghost click":
 * first tap = hover, second tap = actual click. */
@media (hover: hover) and (pointer: fine) {
    .wfm-add-btn:hover {
        background: var(--wfm-accent-dark) !important;
        color: #fff !important;
        transform: scale(1.06);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.wfm-add-btn:active { transform: scale(0.94); transition-duration: 0.08s; }
.wfm-add-btn:focus-visible { outline: 2px solid var(--wfm-accent); outline-offset: 2px; }

.wfm-add-btn .wfm-icon-plus {
    width: 18px;
    height: 18px;
    stroke: #fff;
}

.wfm-add-btn.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* ============================================================
 * MODAL
 * ============================================================ */
.wfm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.25s var(--wfm-ease);
}

.wfm-overlay.is-open {
    opacity: 1;
}

.wfm-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
    /* iPhone safe areas — keep the modal inside the visible region of
     * the screen, not under the dynamic island or the home indicator. */
    padding-top:    max(16px, env(safe-area-inset-top));
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    padding-left:   max(16px, env(safe-area-inset-left));
    padding-right:  max(16px, env(safe-area-inset-right));
}

.wfm-modal.is-open { pointer-events: auto; }

.wfm-modal-dialog {
    position: relative;
    width: 100%;
    max-width: var(--wfm-modal-w);
    /* dvh respects the dynamic browser UI on mobile (address bar shows /
     * hides). We subtract a bit extra to keep room around the dialog.
     * Falls back to vh on older browsers.
     */
    max-height: 90vh;
    max-height: min(90dvh, calc(100dvh - 32px));
    background: var(--wfm-surface);
    border-radius: var(--wfm-radius-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--wfm-shadow-lg);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s var(--wfm-ease), opacity 0.25s var(--wfm-ease);
}

.wfm-modal.is-open .wfm-modal-dialog {
    transform: translateY(0);
    opacity: 1;
}

.wfm-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    background: #fff !important;
    border-radius: 50%;
    color: #1A1A1A !important;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.15s, transform 0.15s;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.wfm-modal-close:hover { background: #f5f5f5 !important; transform: scale(1.05); color: #1A1A1A !important; }
.wfm-modal-close svg { width: 14px; height: 14px; stroke: #1A1A1A; }

.wfm-modal-inner {
    overflow-y: auto;
    max-height: 90vh;
    max-height: min(90dvh, calc(100dvh - 32px));
    /* Allow momentum scrolling on iOS */
    -webkit-overflow-scrolling: touch;
}

.wfm-modal-loading {
    padding: 80px;
    text-align: center;
}

.wfm-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--wfm-border);
    border-top-color: var(--wfm-accent);
    border-radius: 50%;
    animation: wfm-spin 0.8s linear infinite;
}

@keyframes wfm-spin { to { transform: rotate(360deg); } }

.wfm-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 720px) {
    .wfm-modal-content { grid-template-columns: 1fr; }
}

.wfm-modal-media {
    position: relative;
    background: var(--wfm-surface-alt);
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

@media (max-width: 720px) {
    .wfm-modal-media {
        /* Shorter on mobile so the form below has more vertical room
         * — important when there are variations or many addons. */
        aspect-ratio: 16 / 9;
        max-height: 30dvh;
    }
}

.wfm-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wfm-modal-image-empty {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--wfm-surface-alt), var(--wfm-surface-tint));
}

.wfm-modal-body {
    padding: 24px 28px 28px;
    /* Extra room at the bottom on iPhone so the "Add to cart" button at
     * the end of long forms (variations + addons) isn't covered by the
     * home indicator. env(safe-area-inset-bottom) is 34px on notch
     * iPhones, 0 elsewhere. */
    padding-bottom: max(28px, calc(28px + env(safe-area-inset-bottom)));
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.wfm-modal-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--wfm-text);
}

.wfm-modal-desc {
    font-size: 14px;
    color: var(--wfm-text-soft);
    line-height: 1.55;
}

.wfm-modal-desc p { margin: 0 0 8px; }
.wfm-modal-desc p:last-child { margin-bottom: 0; }

.wfm-modal-attrs {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid var(--wfm-border);
    border-bottom: 1px solid var(--wfm-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wfm-modal-attrs li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    padding: 0;
}

.wfm-modal-attr-name {
    color: var(--wfm-text-soft);
    font-weight: 500;
}

.wfm-modal-attr-value {
    color: var(--wfm-text);
    text-align: right;
}

.wfm-modal-price {
    font-size: 22px;
    font-weight: 600;
    color: var(--wfm-text);
}

.wfm-modal-notice {
    margin: 0;
    padding: 12px 16px;
    background: var(--wfm-surface-alt);
    border-radius: var(--wfm-radius-img);
    color: var(--wfm-text-soft);
    font-size: 14px;
    text-align: center;
}

/* Modal form */
.wfm-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
}

.wfm-qty-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--wfm-border-strong);
    border-radius: var(--wfm-radius-pill);
    overflow: hidden;
    align-self: flex-start;
}

.wfm-qty-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: 500;
    color: #1A1A1A !important;
    background: #fff !important;
    transition: background 0.1s;
    line-height: 1;
}

.wfm-qty-btn:hover { background: #F4F4F2 !important; color: #1A1A1A !important; }

.wfm-qty-input {
    width: 44px;
    height: 40px;
    border: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    background: #fff;
    color: #1A1A1A;
    -moz-appearance: textfield;
}

.wfm-qty-input::-webkit-outer-spin-button,
.wfm-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wfm-add-to-cart-btn,
.wfm-modal button.wfm-add-to-cart-btn,
button.wfm-add-to-cart-btn {
    background: var(--wfm-accent) !important;
    background-color: var(--wfm-accent) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    padding: 14px 20px !important;
    border: 0 !important;
    border-radius: var(--wfm-radius-pill) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    width: 100% !important;
    text-transform: none !important;
    text-shadow: none !important;
    cursor: pointer !important;
    transition: background 0.15s, transform 0.1s !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    line-height: 1.2 !important;
    min-height: 48px !important;
}

.wfm-add-to-cart-btn:hover,
button.wfm-add-to-cart-btn:hover { background: var(--wfm-accent-dark) !important; background-color: var(--wfm-accent-dark) !important; color: #fff !important; }
.wfm-add-to-cart-btn:active { transform: scale(0.99); }

.wfm-add-to-cart-btn .wfm-add-price,
.wfm-add-to-cart-btn .wfm-add-price * {
    font-weight: 600 !important;
    color: #fff !important;
}

.wfm-add-to-cart-btn .wfm-add-price .woocommerce-Price-amount,
.wfm-add-to-cart-btn .wfm-add-price bdi {
    color: #fff !important;
}

.wfm-add-to-cart-btn.is-loading {
    pointer-events: none;
    opacity: 0.7;
}

/* WooCommerce variation form styling inside modal */
.wfm-variable .variations {
    width: 100%;
    margin: 0 0 12px;
    border: 0;
}

.wfm-variable .variations td,
.wfm-variable .variations th {
    padding: 6px 0;
    border: 0;
    background: transparent;
}

.wfm-variable .variations label {
    font-size: 13px;
    font-weight: 500;
    color: var(--wfm-text-soft);
}

.wfm-variable .variations select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--wfm-border-strong);
    border-radius: var(--wfm-radius-img);
    font-family: inherit;
    font-size: 14px;
    background: #fff;
}

.wfm-variable .reset_variations {
    font-size: 12px;
    color: var(--wfm-text-soft);
    text-decoration: underline;
    margin-left: 8px;
}

.wfm-variable .single_variation_wrap .quantity {
    display: inline-flex;
    margin-right: 12px;
}

.wfm-variable .single_variation_wrap .qty {
    width: 60px;
    height: 44px;
    text-align: center;
    border: 1px solid var(--wfm-border-strong);
    border-radius: var(--wfm-radius-img);
    font-family: inherit;
    font-size: 15px;
}

/* Variable product "Add to cart" button — Woo renders it dynamically
   inside .single_variation_wrap; we cover several possible selectors
   because themes love to override .single_add_to_cart_button. */
.wfm-variable .single_variation_wrap .single_add_to_cart_button,
.wfm-variable .single_variation_wrap button.single_add_to_cart_button,
.wfm-variable .single_variation_wrap input.single_add_to_cart_button,
.wfm-variable button[name="add-to-cart"],
.wfm-variable .single_add_to_cart_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--wfm-accent) !important;
    color: #fff !important;
    border: 0 !important;
    padding: 14px 28px !important;
    border-radius: var(--wfm-radius-pill) !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    text-transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.15s, transform 0.1s !important;
    min-height: 44px;
}

.wfm-variable .single_variation_wrap .single_add_to_cart_button:hover,
.wfm-variable button[name="add-to-cart"]:hover,
.wfm-variable .single_add_to_cart_button:hover {
    background: var(--wfm-accent-dark) !important;
    color: #fff !important;
}

.wfm-variable .single_variation_wrap .single_add_to_cart_button:active,
.wfm-variable .single_add_to_cart_button:active {
    transform: scale(0.98);
}

/* Make sure the wrapper around the button gives it room and right alignment */
.wfm-variable .single_variation_wrap {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.wfm-variable .single_variation {
    width: 100%;
}

.wfm-variable .single_variation .price {
    font-size: 18px;
    font-weight: 600;
    color: var(--wfm-text);
}

/* ============================================================
 * SIDE CART
 * ============================================================ */
.wfm-sidecart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: var(--wfm-sidecart-w);
    background: var(--wfm-surface);
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.3s var(--wfm-ease);
    display: flex;
    flex-direction: column;
    box-shadow: var(--wfm-shadow-lg);
}

.wfm-sidecart.is-open { transform: translateX(0); }
.wfm-sidecart[hidden] { display: flex; }

.wfm-sidecart-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.wfm-sidecart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--wfm-border);
}

.wfm-sidecart-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--wfm-text);
}

.wfm-sidecart-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F4F4F2 !important;
    color: #1A1A1A !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.wfm-sidecart-close:hover { background: #E5E5E0 !important; color: #1A1A1A !important; }
.wfm-sidecart-close svg { width: 14px; height: 14px; stroke: #1A1A1A; }

.wfm-sidecart-empty {
    padding: 60px 24px;
    text-align: center;
    color: var(--wfm-text-soft);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wfm-sidecart-items {
    list-style: none;
    margin: 0;
    padding: 12px 0;
    overflow-y: auto;
    flex: 1;
}

.wfm-sidecart-item {
    display: flex;
    gap: 12px;
    padding: 12px 24px;
    align-items: center;
    border-bottom: 1px solid var(--wfm-border);
    position: relative;
}

.wfm-sidecart-item:last-child { border-bottom: 0; }

.wfm-sidecart-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--wfm-surface-alt);
    flex-shrink: 0;
}

.wfm-sidecart-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wfm-sidecart-item-body {
    flex: 1;
    min-width: 0;
}

.wfm-sidecart-item-title {
    margin: 0 0 2px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wfm-text);
    line-height: 1.3;
}

.wfm-sidecart-item-price {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--wfm-text-soft);
}

.wfm-sidecart-qty {
    display: inline-flex;
    align-items: center;
    background: #F4F4F2;
    border-radius: var(--wfm-radius-pill);
    padding: 0;
}

.wfm-sidecart-qty-btn {
    width: 28px;
    height: 28px;
    font-size: 16px;
    font-weight: 500;
    color: #1A1A1A !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wfm-sidecart-qty-btn:hover { color: var(--wfm-accent) !important; background: transparent !important; }

.wfm-sidecart-qty-num {
    min-width: 24px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #1A1A1A;
}

.wfm-sidecart-remove {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 24px;
    height: 24px;
    color: #9A9A9A !important;
    background: transparent !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    border-radius: 50%;
}

.wfm-sidecart-remove:hover { color: var(--wfm-accent) !important; background: transparent !important; }
.wfm-sidecart-remove svg { width: 10px; height: 10px; stroke: currentColor; }

.wfm-sidecart-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--wfm-border);
    background: var(--wfm-surface);
}

.wfm-sidecart-totals {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wfm-border);
}

.wfm-sidecart-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    color: var(--wfm-text-soft);
}

.wfm-sidecart-row span:last-child {
    color: var(--wfm-text);
    font-variant-numeric: tabular-nums;
}

.wfm-sidecart-row-discount span:last-child {
    color: var(--wfm-accent);
}

.wfm-sidecart-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.wfm-sidecart-total span {
    font-size: 15px;
    color: var(--wfm-text);
    font-weight: 600;
}

.wfm-sidecart-total strong {
    font-size: 22px;
    font-weight: 700;
    color: var(--wfm-text);
    font-variant-numeric: tabular-nums;
}

.wfm-sidecart-hint {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--wfm-text-faint);
    text-align: right;
}

.wfm-sidecart-checkout {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: var(--wfm-accent) !important;
    color: #fff !important;
    text-align: center;
    border-radius: var(--wfm-radius-pill);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background 0.15s;
    border: 0;
}

.wfm-sidecart-checkout:hover {
    background: var(--wfm-accent-dark) !important;
    color: #fff !important;
    text-decoration: none !important;
}

.wfm-sidecart-checkout-disabled,
.wfm-sidecart-checkout-disabled:hover {
    background: #E5E5E0 !important;
    color: #6B6B6B !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    border: 0;
}

.wfm-sidecart-closed-note {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--wfm-text-soft);
    text-align: center;
}

/* Same style applied to cart/checkout pages */
.wfm-order-disabled,
.wfm-order-disabled:hover {
    background: #E5E5E0 !important;
    color: #6B6B6B !important;
    cursor: not-allowed !important;
    border: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* Floating cart button */
.wfm-floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #1A1A1A !important;
    color: #fff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    z-index: 99997;
    transition: transform 0.2s var(--wfm-ease), background 0.15s;
}

.wfm-floating-cart:hover { transform: scale(1.05); background: var(--wfm-accent) !important; color: #fff !important; }
.wfm-floating-cart:active { transform: scale(0.95); }

.wfm-floating-cart svg { width: 24px; height: 24px; stroke: #fff; }
.wfm-floating-cart svg circle { fill: #fff; }

.wfm-floating-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    background: var(--wfm-accent);
    color: #fff !important;
    font-size: 11px;
    font-weight: 600;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #1A1A1A;
}

.wfm-floating-cart:hover .wfm-floating-cart-count {
    border-color: var(--wfm-accent);
    background: #fff;
    color: var(--wfm-accent) !important;
}

@media (max-width: 480px) {
    .wfm-sidecart { max-width: 100%; }
    .wfm-floating-cart { bottom: 16px; right: 16px; }
}

/* ============================================================
 * Reduced motion
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .wfm-menu *, .wfm-modal *, .wfm-sidecart *, .wfm-overlay, .wfm-floating-cart {
        transition: none !important;
        animation: none !important;
    }
    .wfm-card-grid:hover { transform: none; }
    .wfm-card-grid:hover .wfm-card-image img { transform: none; }
}

/* ============================================================
 * FEATURED / COMBO CATEGORY STYLE
 * Bigger cards, brand-coloured border, "Combo" badge, gradient backdrop.
 * Applied via .wfm-cat-style-featured on the section, and
 * .wfm-card-style-featured on individual cards.
 * ============================================================ */

/* Section header — combo badge */
.wfm-cat-style-featured .wfm-cat-title {
    color: var(--wfm-text);
}

.wfm-cat-style-featured .wfm-cat-title-text {
    position: relative;
}

.wfm-cat-style-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--wfm-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--wfm-radius-pill);
    line-height: 1.4;
    vertical-align: middle;
    margin-left: 2px;
    box-shadow: 0 2px 6px rgba(226, 75, 74, 0.25);
}

/* Featured GRID — each card spans 2 columns; brand accent border */
.wfm-cat-style-featured .wfm-grid {
    gap: 20px;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured {
    grid-column: span 2;
    border: 2px solid var(--wfm-accent) !important;
    box-shadow: 0 4px 16px rgba(226, 75, 74, 0.12), var(--wfm-shadow-sm);
    background: linear-gradient(180deg, #fff 0%, #fff 70%, rgba(226, 75, 74, 0.04) 100%);
    position: relative;
    overflow: hidden;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured:hover {
    border-color: var(--wfm-accent-dark) !important;
    box-shadow: 0 8px 28px rgba(226, 75, 74, 0.18), var(--wfm-shadow-md);
}

/* Force the featured grid card layout: image left, content right */
.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured {
    display: grid;
    grid-template-columns: 40% 1fr;
    align-items: stretch;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-image-link {
    height: 100%;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 200px;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-body {
    padding: 18px 22px 20px;
    gap: 10px;
    justify-content: center;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-desc {
    font-size: 14px;
    -webkit-line-clamp: 4;
    color: var(--wfm-text-soft);
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--wfm-accent);
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-add-btn {
    width: 44px;
    height: 44px;
}

.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-add-btn .wfm-icon-plus {
    width: 18px;
    height: 18px;
}

/* "Combo" corner ribbon on the image */
.wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-image::before {
    content: '★';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 30px;
    height: 30px;
    background: var(--wfm-accent);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(226, 75, 74, 0.3);
}

/* Featured LIST — each card has accent left border and larger image */
.wfm-cat-style-featured .wfm-list {
    background: linear-gradient(180deg, #fff 0%, rgba(226, 75, 74, 0.03) 100%);
    border-color: rgba(226, 75, 74, 0.2);
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured {
    padding: 18px 20px;
    border-left: 3px solid var(--wfm-accent);
    border-bottom-color: rgba(226, 75, 74, 0.1);
    gap: 20px;
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-media,
.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-image {
    width: 124px;
    height: 124px;
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-title {
    font-size: 17px;
    font-weight: 700;
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-desc {
    font-size: 14px;
    -webkit-line-clamp: 3;
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-price {
    font-size: 19px;
    font-weight: 700;
    color: var(--wfm-accent);
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-add-btn {
    width: 42px;
    height: 42px;
}

.wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-add-btn .wfm-icon-plus {
    width: 18px;
    height: 18px;
}

/* Responsive — collapse featured grid to single column on small screens */
@media (max-width: 900px) {
    .wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured {
        grid-template-columns: 1fr;
    }
    .wfm-cat-style-featured .wfm-card-grid.wfm-card-style-featured .wfm-card-image {
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
    .wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-media,
    .wfm-cat-style-featured .wfm-card-list.wfm-card-style-featured .wfm-card-image {
        width: 92px;
        height: 92px;
    }
}

/* ============================================================
 * ADD-ONS (in product modal)
 * ============================================================ */

.wfm-addons {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 16px 0 8px;
    padding: 16px 0;
    border-top: 1px solid var(--wfm-border);
    border-bottom: 1px solid var(--wfm-border);
}

.wfm-addon-group {
    border: 0;
    padding: 0;
    margin: 0;
}

.wfm-addon-group-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    padding: 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--wfm-text);
}

.wfm-addon-rules {
    font-size: 12px;
    font-weight: 500;
    color: var(--wfm-text-soft);
    background: var(--wfm-surface-alt);
    padding: 2px 8px;
    border-radius: var(--wfm-radius-pill);
    line-height: 1.6;
}

.wfm-addon-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wfm-addon-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--wfm-border);
    border-radius: var(--wfm-radius-img);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--wfm-surface);
}

.wfm-addon-option:hover {
    border-color: var(--wfm-border-strong);
    background: var(--wfm-surface-alt);
}

.wfm-addon-input {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--wfm-border-strong);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    margin: 0;
}

.wfm-addon-input:checked {
    border-color: var(--wfm-accent);
    background: var(--wfm-accent);
}

.wfm-addon-input:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.wfm-addon-input:checked + .wfm-addon-option-body .wfm-addon-option-name {
    font-weight: 600;
}

.wfm-addon-option:has(.wfm-addon-input:checked) {
    border-color: var(--wfm-accent);
    background: rgba(226, 75, 74, 0.04);
}

.wfm-addon-option-body {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.wfm-addon-option-name {
    font-size: 14px;
    color: var(--wfm-text);
    line-height: 1.3;
}

.wfm-addon-option-price {
    font-size: 13px;
    font-weight: 500;
    color: var(--wfm-text-soft);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.wfm-addon-error {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--wfm-accent);
    line-height: 1.4;
}

.wfm-modal-form-bottom {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 12px;
}

.wfm-modal-form-bottom .wfm-qty-wrapper {
    flex-shrink: 0;
}

.wfm-modal-form-bottom .wfm-add-to-cart-btn {
    flex: 1;
}

@media (max-width: 480px) {
    .wfm-modal-form-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .wfm-modal-form-bottom .wfm-qty-wrapper {
        align-self: center;
    }
}

/* ============================================================
 * SIDE-CART ITEM ADD-ONS
 * ============================================================ */
.wfm-sidecart-item-addons {
    list-style: none;
    margin: 4px 0 6px;
    padding: 0;
}

.wfm-sidecart-item-addons li {
    font-size: 12px;
    color: var(--wfm-text-soft);
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

.wfm-sidecart-addon-group {
    color: var(--wfm-text-faint);
    margin-right: 3px;
}

.wfm-sidecart-addon-values {
    color: var(--wfm-text-soft);
}

/* ============================================================
 * [wf_status] SHORTCODE — open/closed indicator
 *
 * Self-contained styles for embedding the status in any theme
 * area (header, sidebar, footer, custom page section).
 * ============================================================ */

/* Shared dot animation */
@keyframes wfm-status-pulse {
    0%, 100% { box-shadow: 0 0 0 0   rgba(34, 139, 34, 0.6); }
    50%      { box-shadow: 0 0 0 6px rgba(34, 139, 34, 0); }
}
@keyframes wfm-status-pulse-closed {
    0%, 100% { box-shadow: 0 0 0 0   rgba(163, 45, 45, 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(163, 45, 45, 0); }
}

/* Badge — pill style for headers */
.wfm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    vertical-align: middle;
    white-space: nowrap;
}

.wfm-status-badge.is-open {
    background: #E6F4EA;
    color: #1B6E3A;
}

.wfm-status-badge.is-closed {
    background: #FCEBEB;
    color: #A32D2D;
}

.wfm-status-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
}

.wfm-status-badge.is-open .wfm-status-badge-dot {
    animation: wfm-status-pulse 1.6s ease-in-out infinite;
}

.wfm-status-badge.is-closed .wfm-status-badge-dot {
    animation: wfm-status-pulse-closed 1.6s ease-in-out infinite;
}

.wfm-status-badge-text {
    font-weight: 600;
}

.wfm-status-badge-hours {
    opacity: 0.85;
    font-weight: 500;
}

/* Inline — plain text for body copy */
.wfm-status-inline {
    display: inline;
    font-weight: 500;
}

.wfm-status-inline.is-open strong {
    color: #1B6E3A;
}

.wfm-status-inline.is-closed strong {
    color: #A32D2D;
}

.wfm-status-inline-hours {
    color: inherit;
    opacity: 0.7;
    font-weight: 400;
}

/* Block — boxed card for sidebar / standalone section */
.wfm-status-block {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    vertical-align: middle;
    max-width: 100%;
}

.wfm-status-block-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wfm-status-block.is-open .wfm-status-block-dot {
    background: #228B22;
    animation: wfm-status-pulse 1.6s ease-in-out infinite;
}

.wfm-status-block.is-closed .wfm-status-block-dot {
    background: #A32D2D;
    animation: wfm-status-pulse-closed 1.6s ease-in-out infinite;
}

.wfm-status-block-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.wfm-status-block-text strong {
    font-size: 15px;
    font-weight: 600;
}

.wfm-status-block.is-open strong  { color: #1B6E3A; }
.wfm-status-block.is-closed strong { color: #A32D2D; }

.wfm-status-block-hours {
    font-size: 13px;
    color: #6B6B6B;
}

/* ============================================================
 * FLY-TO-CART ANIMATION
 *
 * Ghost element animates from product image to floating cart.
 * Pure CSS transition — the JS sets start/end positions and toggles
 * the .is-flying class.
 * ============================================================ */
.wfm-fly-ghost {
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    pointer-events: none;
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.55, 0.05, 0.55, 0.95),
                opacity   0.6s ease-out;
}

/* Cart shake on arrival */
@keyframes wfm-cart-shake {
    0%, 100% { transform: translateY(0)    rotate(0deg); }
    20%      { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
    40%      { transform: translateY(0)    rotate(5deg)  scale(1.05); }
    60%      { transform: translateY(-1px) rotate(-3deg) scale(1.03); }
    80%      { transform: translateY(0)    rotate(2deg)  scale(1.01); }
}

.wfm-floating-cart.is-shaking {
    animation: wfm-cart-shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Count badge pulse */
@keyframes wfm-count-pulse {
    0%   { transform: scale(1);    background-color: var(--wfm-accent); }
    50%  { transform: scale(1.45); background-color: #fff; color: var(--wfm-accent); }
    100% { transform: scale(1);    background-color: var(--wfm-accent); }
}

.wfm-floating-cart-count.is-pulse {
    animation: wfm-count-pulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Respect reduced-motion preference: snap straight to the cart. */
@media (prefers-reduced-motion: reduce) {
    .wfm-fly-ghost,
    .wfm-floating-cart.is-shaking,
    .wfm-floating-cart-count.is-pulse {
        animation: none !important;
        transition: none !important;
    }
}
