/*
 * EmbroHub storefront design (2026-11).
 * Loaded last in frontend/layouts/app.blade.php, after the theme CSS and the inline :root colour block.
 * New markup uses em-* classes (header cart, bottom nav, product card, grids, listing toolbar,
 * product page blocks, sticky bars). The rest restyles the theme's existing markup.
 */

/* Phones must never pan sideways. The theme's 16px gutter rows sit in a 15px-padded container, so they
   stuck out 1px on each side and iPhones let the whole page slide left and right. clip (unlike hidden)
   keeps sticky headers working; fixed menus and drawers are not affected. */
.container > .row.gutters-16 { margin-left: -15px; margin-right: -15px; }
.aiz-main-wrapper { overflow-x: clip; }

/* html:root outranks the theme's inline :root block whatever the order */
html:root {
    --em-brand: #e4602a;
    --em-brand-dark: #c74d1b;
    --em-brand-soft: #fdf1ea;
    --em-ink: #171b26;
    --em-ink-2: #3a4050;
    --em-muted: #6b7280;
    --em-line: #e9eaee;
    --em-surface: #f6f6f8;
    --em-img-bg: #f7f5f2;
    --em-radius: 14px;
    --em-radius-sm: 10px;
    --em-shadow: 0 1px 2px rgba(23, 27, 38, .04), 0 4px 16px rgba(23, 27, 38, .06);
    --em-shadow-hover: 0 10px 28px rgba(23, 27, 38, .12);
    --em-nav-h: 62px;

    /* theme variables used by the CMS for buttons, prices, badges, links */
    --primary: var(--em-brand);
    --hov-primary: var(--em-brand-dark);
    --soft-primary: rgba(228, 96, 42, .12);
}

/* ---------- Base ---------- */
body {
    font-size: 14px;
    color: var(--em-ink-2);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--em-ink); letter-spacing: -.015em; }
a { transition: color .15s ease; }
::selection { background: var(--em-brand); color: #fff; }
.text-primary { color: var(--em-brand) !important; }

.btn { border-radius: var(--em-radius-sm) !important; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease; }
.btn-primary, .btn-primary:not(:disabled):not(.disabled) { background-color: var(--em-brand); border-color: var(--em-brand); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background-color: var(--em-brand-dark); border-color: var(--em-brand-dark); box-shadow: 0 6px 16px rgba(228, 96, 42, .28); }
.btn-soft-dark { background: var(--em-surface); color: var(--em-ink); border: 1px solid var(--em-line); }
.btn-soft-dark:hover { background: #eceef2; color: var(--em-ink); }
.btn:active { transform: translateY(1px); }
.form-control { border-radius: var(--em-radius-sm); border-color: #dfe1e6; }
.form-control:focus { border-color: var(--em-brand); box-shadow: 0 0 0 3px rgba(228, 96, 42, .14); border-width: 1px !important; }
.modal-content { border-radius: 18px !important; overflow: hidden; }
.dropdown-menu { border-radius: 12px; border-color: var(--em-line); box-shadow: var(--em-shadow-hover); }
.minw-0 { min-width: 0; }

/* ---------- Top bar (desktop only) ---------- */
.top-navbar { background: #fafafa !important; border-bottom: 1px solid var(--em-line); height: 34px; }
.top-navbar a, .top-navbar span { font-size: 12px !important; }

/* ---------- Header: logo, search, cart ---------- */
.logo-bar-area { background: #fff; border-bottom: 1px solid var(--em-line) !important; }
.em-logobar { gap: 0; min-height: 68px; }
.em-logobar > .col-auto > a { padding-top: 12px !important; padding-bottom: 12px !important; }

.front-header-search .search-input-box .input-group { flex-wrap: nowrap; }
.front-header-search input#search {
    height: 46px;
    border: 1.5px solid #e3e5ea !important;
    border-right: 0 !important;
    border-radius: 999px 0 0 999px !important;
    background: #f7f7f9;
    padding-left: 20px;
    font-size: 14px !important;
}
.front-header-search input#search:focus { background: #fff; border-color: var(--em-brand) !important; box-shadow: none; }
.front-header-search input#search:focus + .input-group-append #img-search-btn { border-color: var(--em-brand) !important; background: #fff !important; }
.front-header-search #img-search-btn {
    height: 46px;
    border: 1.5px solid #e3e5ea !important;
    border-left: 0 !important;
    border-radius: 0 999px 999px 0 !important;
    background: #f7f7f9 !important;
    padding: 0 16px !important;
}
.front-header-search #img-search-btn:hover { color: var(--em-brand) !important; }
.hov-animate-outline::before, .hov-animate-outline::after { display: none !important; }

/* cart: desktop button with dropdown */
.em-header-cart .em-cart-btn {
    padding: 6px 14px 6px 12px;
    margin: 11px 0;
    height: auto !important;
    border: 1.5px solid var(--em-line);
    border-radius: 999px;
    color: var(--em-ink) !important;
    background: #fff;
}
.em-header-cart .em-cart-btn:hover { border-color: var(--em-brand); }
.em-header-cart .em-cart-btn > span + span { margin-left: 16px !important; }
.em-header-cart .dropdown-menu { margin-top: 0; min-width: 340px; }
/* cart: phones and tablets */
.em-cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--em-ink) !important;
    background: var(--em-surface);
}
.em-cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--em-brand);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.em-cart-link .em-cart-badge { top: 2px; right: 0; }
.em-cart-badge.em-zero { display: none; }

/* phones: search gets its own full-width row under the logo, always visible */
@media (max-width: 991.98px) {
    .em-logobar { flex-wrap: wrap; min-height: 0; padding: 4px 0 10px; }
    .em-logobar > .col-auto > a { padding-top: 8px !important; padding-bottom: 8px !important; }
    .front-header-search {
        position: static !important;
        opacity: 1 !important;
        transform: none !important;
        order: 99;
        flex: 0 0 100%;
        width: 100%;
        height: auto;
    }
    .front-header-search > .position-relative { padding: 0 !important; }
    .front-header-search input#search, .front-header-search #img-search-btn { height: 42px; }
}

/* ---------- Menu bar (desktop) ---------- */
.em-menubar { background: #fff; border-bottom: 1px solid var(--em-line); height: 52px !important; }
.em-menubar .header_menu_links {
    color: var(--em-ink-2) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 15px 14px !important;
    background: transparent !important;
    position: relative;
}
.em-menubar .header_menu_links:hover, .em-menubar .header_menu_links.active { color: var(--em-brand) !important; }
.em-menubar .header_menu_links.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 8px;
    height: 2px;
    border-radius: 2px;
    background: var(--em-brand);
}
.em-menubar .animate-underline-white::before, .em-menubar .animate-underline-white::after { display: none !important; }
.em-allcat {
    background: var(--em-brand) !important;
    border-radius: 10px;
    margin: 7px 0;
}
.em-allcat > div { padding-top: 8px !important; padding-bottom: 8px !important; width: 250px !important; }
.em-allcat .fs-16 { font-size: 14px !important; }

/* ---------- Mobile bottom nav ---------- */
html body .em-bottom-nav {
    display: flex;
    align-items: stretch;
    width: 100% !important;
    height: auto !important;
    left: 0 !important;
    right: 0 !important;
    border-radius: 0 !important;
    border-top: 1px solid var(--em-line);
    box-shadow: 0 -6px 24px rgba(23, 27, 38, .07);
    padding-bottom: env(safe-area-inset-bottom);
}
.em-bn-item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: var(--em-nav-h);
    padding: 6px 2px;
    color: #7a7f8c !important;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none !important;
}
.em-bn-item > i, .em-bn-item > span > i { font-size: 24px; line-height: 1; }
.em-bn-item.active { color: var(--em-brand) !important; }
.em-bn-item .em-cart-badge { top: -4px; right: -10px; }
.em-bn-avatar img { width: 24px; height: 24px; object-fit: cover; }
@media (max-width: 1199.98px) {
    /* side drawers (filters, menu, account) scroll all the way, on every phone and tablet size */
    .collapse-sidebar-wrap .collapse-sidebar {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: calc(28px + env(safe-area-inset-bottom));
    }
    /* while a drawer or a pop-up is open the bottom nav and the sticky buy/pay bars step aside
       (the nav sits above everything so ads cannot cover it, so it would cover the drawer too) */
    body.em-drawer-open .aiz-mobile-bottom-nav,
    body.em-drawer-open .em-sticky-bar,
    body.modal-open .aiz-mobile-bottom-nav,
    body.modal-open .em-sticky-bar,
    body:has(.collapse-sidebar-wrap.active) .aiz-mobile-bottom-nav,
    body:has(.collapse-sidebar-wrap.active) .em-sticky-bar { display: none !important; }
    /* the floating buttons sit on top of content and repeat what the bottom nav already offers */
    .floating-buttons-section { display: none !important; }
    /* room for the bottom nav at the end of every page */
    .aiz-main-wrapper { padding-bottom: calc(var(--em-nav-h) + env(safe-area-inset-bottom)); }
}

/* ---------- Sections and headings ---------- */
.home-banner-area { background-color: transparent !important; padding-top: 16px; }
.home-banner-area .carousel-box > a, .home-banner-area .carousel-box img { border-radius: var(--em-radius); }
@media (max-width: 767.98px) {
    /* show the whole banner on phones instead of cropping its sides */
    .home-banner-area .carousel-box > a > div { height: auto !important; }
    .home-banner-area .carousel-box img { height: auto !important; width: 100%; object-fit: contain; }
}
.em-section { margin: 28px 0; }
.em-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.em-section-title { font-size: 21px; font-weight: 800; margin: 0; line-height: 1.25; }
.em-section-head .em-section-title::after,
.em-how .em-section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 0;
    margin-top: 7px;
    border-top: 3px dashed var(--em-brand);
}
.em-how .em-section-title::after { margin-left: auto; margin-right: auto; }
.em-section-sub { margin: 4px 0 0; font-size: 13px; color: var(--em-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.em-viewall { flex-shrink: 0; font-size: 13.5px; font-weight: 700; color: var(--em-brand) !important; white-space: nowrap; }
.em-viewall:hover { color: var(--em-brand-dark) !important; }
.em-viewall i { transition: transform .15s ease; }
.em-viewall:hover i { transform: translateX(3px); }
@media (max-width: 767.98px) {
    .em-section { margin: 20px 0; }
    .em-section-title { font-size: 17px; }
}

/* category tiles: a sideways-scrolling row on phones, a grid from tablets up */
.em-cat-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 30%;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden; /* sideways only */
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.em-cat-row::-webkit-scrollbar { display: none; }
@media (min-width: 576px) { .em-cat-row { grid-auto-columns: 22%; } }
@media (min-width: 768px) { .em-cat-row { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; gap: 18px; } }
@media (min-width: 1200px) { .em-cat-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.em-cat-group { scroll-margin-top: 140px; }
.em-cat-tile { display: block; scroll-snap-align: start; text-align: center; color: var(--em-ink) !important; text-decoration: none !important; }
.em-cat-img {
    position: relative;
    display: block;
    aspect-ratio: 1;
    margin: 7px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--em-img-bg);
    /* embroidery hoop: two wooden rings around the picture */
    box-shadow: 0 0 0 5px #d9a46c, 0 0 0 7px #b47a43, 0 10px 22px rgba(120, 70, 30, .22);
}
.em-cat-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .35s ease; }
.em-cat-img::after {
    /* running stitch just inside the hoop */
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .85);
    pointer-events: none;
    transition: transform .8s ease;
}
.em-cat-tile:hover .em-cat-img::after { transform: rotate(45deg); }
.em-cat-tile:hover .em-cat-img img { transform: scale(1.06); }
.em-cat-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}
.em-cat-tile:hover .em-cat-name { color: var(--em-brand); }
@media (max-width: 575.98px) { .em-cat-name { font-size: 12px; } }

/* all-categories page: always a grid */
.em-cat-row.em-cat-grid { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
@media (min-width: 576px) { .em-cat-row.em-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 992px) { .em-cat-row.em-cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* home category groups: 3 per row on phones, 6 on wider screens; extra ones show after "View all" */
.em-cat-row.em-cat-home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 768px) { .em-cat-row.em-cat-home { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.em-cat-home:not(.em-open) .em-cat-extra { display: none; }
.em-cat-toggle { border: 0; background: transparent; padding: 0; cursor: pointer; }
.em-cat-toggle .em-show-less, .em-cat-toggle[aria-expanded="true"] .em-show-more { display: none; }
.em-cat-toggle[aria-expanded="true"] .em-show-less { display: inline; }
@media (prefers-reduced-motion: no-preference) {
    .em-cat-home.em-open .em-cat-extra { animation: em-rise .45s cubic-bezier(.2, .7, .2, 1) backwards; }
}
.em-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.em-chip { padding: 6px 12px; border: 1px solid var(--em-line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--em-ink-2) !important; background: #fff; }
.em-chip:hover { border-color: var(--em-brand); color: var(--em-brand) !important; }
.em-chip.active { background: var(--em-ink); border-color: var(--em-ink); color: #fff !important; }
.em-chips-label { align-self: center; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--em-muted); margin-right: 2px; }
.em-chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.em-chips-scroll::-webkit-scrollbar { display: none; }
.em-chips-scroll > * { flex-shrink: 0; white-space: nowrap; }

/* home: why buy here */
.em-usp { margin: 14px 0 6px; }
.em-usp-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.em-usp-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--em-radius); background: var(--em-surface); }
.em-usp-item > i { font-size: 28px; color: var(--em-brand); flex-shrink: 0; }
.em-usp-item strong { display: block; font-size: 14px; color: var(--em-ink); line-height: 1.25; }
.em-usp-item span { display: block; font-size: 12px; color: var(--em-muted); line-height: 1.3; }
@media (max-width: 991.98px) { .em-usp-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }
@media (max-width: 575.98px) {
    .em-usp-item { padding: 10px; gap: 8px; }
    .em-usp-item > i { font-size: 22px; }
    .em-usp-item strong { font-size: 12.5px; }
    .em-usp-item span { font-size: 11px; }
}

/* home: how it works */
.em-how-box { padding: 28px 20px; border-radius: 18px; background: linear-gradient(135deg, var(--em-brand-soft), #fff 70%); border: 1px solid #f6dccd; }
.em-how-sub { color: var(--em-muted); font-size: 14px; margin: 4px 0 20px; }
.em-how-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.em-how-step { text-align: center; padding: 6px 8px; }
.em-how-step strong { display: block; font-size: 15px; color: var(--em-ink); margin: 10px 0 4px; }
.em-how-step .em-how-icon::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px dashed rgba(228, 96, 42, .55); }
.em-how-step > span:not(.em-how-icon) { display: block; font-size: 13px; color: var(--em-muted); }
.em-how-step .em-how-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--em-brand); color: #fff; font-size: 26px; box-shadow: 0 8px 20px rgba(228, 96, 42, .28); }
@media (max-width: 767.98px) {
    .em-how-box { padding: 20px 14px; }
    .em-how-steps { grid-template-columns: 1fr; gap: 12px; }
    .em-how-step { display: grid; grid-template-columns: 48px 1fr; column-gap: 12px; text-align: left; align-items: center; }
    .em-how-step .em-how-icon { grid-row: 1 / span 2; width: 48px; height: 48px; font-size: 22px; }
    .em-how-step strong { margin: 0; }
}

/* premium category tiles (home) */
@media (max-width: 767px) { html body .premium-category-tile { min-height: 170px; } }

/* ---------- Product grid ---------- */
.em-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 576px) { .em-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 992px) { .em-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1200px) { .em-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } .em-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.em-grid-item { min-width: 0; display: flex; }
.em-grid-item > * { width: 100%; }
@media (max-width: 767.98px) { .em-ad-item { display: none !important; } }

/* ---------- Product card ---------- */
.em-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--em-line);
    border-radius: var(--em-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
@media (hover: hover) {
    .em-card:hover { box-shadow: var(--em-shadow-hover); transform: translateY(-3px); border-color: transparent; }
    .em-card:hover .em-card-img img { transform: scale(1.03); }
}
.em-card-img { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--em-img-bg); overflow: hidden; }
.em-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.em-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--em-brand);
    line-height: 1.4;
}
.em-badge-dark { background: var(--em-ink); }
.em-card-wish {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .94);
    color: var(--em-ink-2);
    box-shadow: 0 2px 8px rgba(23, 27, 38, .12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 2;
}
.em-card-wish:hover { color: var(--em-brand); }
.em-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; padding: 10px 12px 12px; }
.em-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--em-ink) !important;
}
.em-card-title:hover { color: var(--em-brand) !important; }
.em-card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.em-card-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.em-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--em-surface); color: var(--em-ink-2); font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.em-tag-format { background: var(--em-brand-soft); color: var(--em-brand-dark); }
.em-price { font-size: 16px; font-weight: 800; color: var(--em-ink); }
.em-card-price del { font-size: 12px; color: var(--em-muted); }
.em-card-code { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--em-muted); letter-spacing: .02em; }
.em-card-cart {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    height: 38px;
    border: 1.5px solid var(--em-brand);
    border-radius: var(--em-radius-sm);
    background: #fff;
    color: var(--em-brand) !important;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color .15s ease, color .15s ease;
}
.em-card-cart i { font-size: 17px; }
.em-card-cart:hover, .em-card-cart:focus { background: var(--em-brand); color: #fff !important; outline: none; }
@media (max-width: 575.98px) {
    .em-card-body { padding: 8px 9px 10px; gap: 5px; }
    .em-card-title { font-size: 12.5px; }
    .em-price { font-size: 15px; }
    .em-card-cart { height: 36px; font-size: 12.5px; }
    .em-card-wish { width: 30px; height: 30px; font-size: 16px; }
}

/* older grids and carousels (shop, flash deal, today's deal, recently viewed) that hold the new card:
   drop their cell borders so cards are not double-framed */
.row:has(> .col > .em-card) { border: 0 !important; }
.col:has(> .em-card), .carousel-box:has(> .em-card) { border: 0 !important; padding-top: 8px; padding-bottom: 8px; text-align: left; box-shadow: none !important; }

/* other product cards the theme still prints (related, top selling, other pages) */
.aiz-card-box { border: 1px solid var(--em-line); border-radius: var(--em-radius); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.aiz-card-box:hover { transform: translateY(-3px); box-shadow: var(--em-shadow-hover); border-color: transparent; }
.aiz-card-box img { border-radius: var(--em-radius-sm); }

/* ---------- Listing page (category / search) ---------- */
.em-breadcrumb { padding: 0; margin-bottom: 8px; font-size: 12.5px; }
.em-breadcrumb a { color: var(--em-muted); }
.em-breadcrumb .breadcrumb-item.active { color: var(--em-ink); font-weight: 600; }
.em-listing-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.em-listing-title { font-size: 24px; font-weight: 800; margin: 0 0 2px; line-height: 1.25; }
.em-listing-count { font-size: 13px; color: var(--em-muted); }
.em-listing-tools { display: flex; gap: 8px; }
.em-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid var(--em-line);
    background: #fff;
    color: var(--em-ink);
    font-size: 14px;
}
.em-tool-btn i { font-size: 18px; }
.em-sort { position: relative; display: block; }
.em-sort > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--em-muted); pointer-events: none; }
.em-sort-select { height: 42px !important; min-width: 200px; padding-left: 38px; border: 1.5px solid var(--em-line); font-size: 14px; font-weight: 600; color: var(--em-ink); cursor: pointer; }
@media (max-width: 767.98px) {
    .em-listing-title { font-size: 19px; }
    .em-listing-tools { width: 100%; }
    .em-listing-tools > * { flex: 1 1 0; }
    .em-tool-btn { justify-content: center; }
    .em-sort-select { min-width: 0; width: 100%; }
}
.aiz-filter-sidebar .collapse-sidebar > .bg-white.border,
.aiz-filter-sidebar .bg-white.border { border-radius: var(--em-radius); border-color: var(--em-line) !important; }
/* filter options as compact chips (all visible at once); the chosen ones turn orange */
.aiz-filter-sidebar .aiz-checkbox-list { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 14px 16px !important; }
.aiz-filter-sidebar .aiz-checkbox-list .aiz-checkbox {
    display: inline-flex;
    align-items: center;
    margin: 0 !important;
    padding: 6px 12px 6px 32px;
    border: 1px solid var(--em-line);
    border-radius: 999px;
    background: #fff;
}
.aiz-filter-sidebar .aiz-checkbox-list .aiz-checkbox .aiz-square-check { left: 11px; top: 50%; transform: translateY(-50%); border-radius: 50%; }
.aiz-filter-sidebar .aiz-checkbox-list .aiz-checkbox .fs-14 { font-size: 13px !important; font-weight: 600 !important; }
.aiz-filter-sidebar .aiz-checkbox-list .aiz-checkbox:has(input:checked) { border-color: var(--em-brand); background: var(--em-brand-soft); }
.aiz-filter-sidebar .filter-section { font-size: 15px; font-weight: 700; }
.aiz-pagination .page-link { border-radius: 10px !important; border-color: var(--em-line); }
.aiz-pagination .page-item.active .page-link { background: var(--em-brand); border-color: var(--em-brand); color: #fff; }

/* ---------- Product page ---------- */
.em-pd { display: flex; flex-direction: column; }
.em-pd > .product-title { order: -6; }
.em-pd > .em-pd-meta { order: -5; }
.em-pd > .em-pd-price { order: -4; }
.em-pd > .em-pd-options { order: -3; }
.em-pd > .em-pd-buy { order: -2; }
.em-pd > .em-pd-trust { order: -1; }
.em-pd > hr { display: none; }

.product-title { font-size: 26px !important; font-weight: 800 !important; line-height: 1.3; margin-bottom: 6px !important; }
.em-pd-meta { font-size: 13px; color: var(--em-muted); margin-bottom: 10px !important; }
.em-pd-meta p { margin-bottom: 0; }
.em-pd-price { margin-bottom: 18px !important; }
.em-pd-price > .col-sm-2 { display: none; }
.em-pd-price > .col-sm-10 { flex: 0 0 100%; max-width: 100%; }
.product-price { font-size: 30px !important; font-weight: 800 !important; color: var(--em-ink) !important; letter-spacing: -.02em; }
.em-pd-price del { font-size: 16px !important; }
.em-pd-price .bg-primary { border-radius: 999px; width: auto !important; padding: 3px 10px !important; }

.em-pd-options { display: block; margin-bottom: 4px; }
.em-pd-options > .row { margin: 0 0 12px !important; }
.em-pd-options #chosen_price_div > .col-sm-2 { display: none; }
.em-pd-options #chosen_price_div > .col-sm-10 { flex: 0 0 100%; max-width: 100%; }
.em-block-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--em-muted); margin-bottom: 8px; }
.em-specs { margin-bottom: 14px; }
.em-specs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.em-spec { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--em-line); border-radius: 12px; background: #fff; }
.em-spec > i { font-size: 22px; color: var(--em-brand); flex-shrink: 0; }
.em-spec-label { font-size: 11.5px; color: var(--em-muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-spec-value { font-size: 14.5px; font-weight: 800; color: var(--em-ink); line-height: 1.3; word-break: break-word; }
.em-choice { margin-bottom: 12px; }
.em-pd-code { font-size: 13px; }
.em-pd-code b { color: var(--em-ink); letter-spacing: .02em; }
.em-pd > .em-sizes { order: -1; }
.em-sizes { margin: 6px 0 14px; }
.em-sizes-table { font-size: 13.5px; border: 1px solid var(--em-line); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.em-sizes-table th { background: var(--em-surface); font-size: 12px; font-weight: 700; color: var(--em-muted); border: 0 !important; padding: 8px 12px; white-space: nowrap; }
.em-sizes-table td { border-top: 1px solid var(--em-line); padding: 8px 12px; white-space: nowrap; color: var(--em-ink-2); }
@media (max-width: 575.98px) {
    .em-specs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .em-sizes-table th, .em-sizes-table td { padding: 7px 9px; }
}
.aiz-megabox .aiz-megabox-elem { border-radius: 8px !important; border-width: 1.5px; font-weight: 600; min-height: 36px; }
.aiz-megabox > input:checked ~ .aiz-megabox-elem { border-color: var(--em-brand); background: var(--em-brand-soft); color: var(--em-brand-dark); }

.em-pd-buy { display: flex; gap: 10px; margin: 14px 0 0 !important; }
.em-pd-buy .btn {
    flex: 1 1 0;
    max-width: 260px;
    min-width: 0 !important;
    height: 52px;
    margin: 0 !important;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.em-pd-buy .btn.d-none { display: none !important; }
.em-pd-buy .btn-secondary-base { background: #fff !important; border: 1.5px solid var(--em-ink) !important; color: var(--em-ink) !important; }
.em-pd-buy .btn-secondary-base:hover { background: var(--em-ink) !important; color: #fff !important; }

.em-pd-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 6px; padding: 12px 16px; border-radius: 12px; background: var(--em-surface); font-size: 13px; color: var(--em-ink-2); }
.em-pd-trust li { display: flex; align-items: center; gap: 6px; }
.em-pd-trust i { font-size: 19px; color: var(--em-brand); }
.em-pd-trust a { color: var(--em-ink); font-weight: 700; }
.em-pd-links { font-size: 13px; margin-top: 8px; }

.product-gallery img { border-radius: var(--em-radius); }
.product-gallery-thumb .carousel-box { border-radius: 10px !important; overflow: hidden; }

@media (max-width: 767.98px) {
    .product-title { font-size: 20px !important; }
    .product-price { font-size: 24px !important; }
}

/* quick-add pop-up (Add to cart from a product card) */
.em-modal-buy { display: flex; gap: 10px; }
.em-modal-buy .btn { flex: 1 1 0; height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; }
.em-modal-buy .btn.d-none { display: none !important; }
#addToCart .modal-body h2 { font-size: 18px !important; }
@media (max-width: 991.98px) {
    #addToCart .w-90px { display: none; }
    #addToCart .product-gallery img { width: 100%; max-height: 36vh; object-fit: contain; }
    #addToCart .modal-body { padding: 18px 16px 20px !important; }
}

/* ---------- Cart ---------- */
#cart-details .bg-white.border, #cart_summary .bg-white.border, #cart_summary > .border, #cart-details .border.bg-white { border-radius: var(--em-radius); border-color: var(--em-line) !important; }
#cart_summary .bg-primary { border-radius: 10px; }
#proceed-to-payment { height: 50px; display: flex; align-items: center; justify-content: center; font-size: 15px !important; }
/* payment pop-up (Proceed to Payment) */
#paymentInfoModal .modal-dialog { max-width: 620px; }
#paymentInfoModal .modal-title { font-weight: 800; color: var(--em-ink); }
#paymentInfoModal .aiz-megabox-elem { border-radius: 12px !important; padding: 14px 16px !important; }
#paymentInfoModal h3 { font-size: 15px !important; margin-bottom: 12px; }
.em-pay-actions #submitOrderBtn { height: 52px; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; }
#cart-details .list-group-item img.size-64px { border-radius: 10px; background: var(--em-img-bg); }
@media (max-width: 767.98px) {
    /* one compact row per item: tick, picture + name, line total, remove */
    #cart-details .list-group-item > .row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; align-items: center; margin: 0; }
    #cart-details .list-group-item > .row > div { max-width: none; width: auto; padding: 0; margin: 0 !important; }
    #cart-details .list-group-item > .row > div:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
    #cart-details .list-group-item > .row > div:nth-child(2) { grid-column: 2; grid-row: 1; }
    #cart-details .list-group-item > .row > div:nth-child(3) { display: none !important; }
    #cart-details .list-group-item > .row > div:nth-child(4) { grid-column: 2; grid-row: 2; flex-direction: row !important; align-items: center; gap: 12px; padding-left: 74px; }
    #cart-details .list-group-item > .row > div:nth-child(4) .text-primary { color: var(--em-ink) !important; font-size: 15px !important; }
    #cart-details .list-group-item > .row > div:nth-child(5) { grid-column: 3; grid-row: 1 / span 2; }
}

/* ---------- Floating buttons (desktop): smaller and quieter until hovered ---------- */
.floating-buttons-section .aiz-floating-button .circle { transform: scale(.8); opacity: .8; transition: opacity .15s ease, transform .15s ease; }
.floating-buttons-section .aiz-floating-button:hover .circle { transform: scale(.88); opacity: 1; }

/* ---------- Footer ---------- */
footer a:hover { color: var(--em-brand) !important; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 991.98px) {
    /* product page: picture no longer fills the whole first screen */
    .product-gallery .carousel-box img { max-height: 56vh; object-fit: contain; }

    /* fixed action bars (product: Add to cart / Buy now, cart: total + pay) sit just above the
       bottom nav; footer.blade.php corrects `bottom` when ads move the nav */
    .em-sticky-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: var(--em-nav-h);
        z-index: 1040;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 !important;
        padding: 10px 12px;
        background: #fff;
        border-top: 1px solid var(--em-line);
        box-shadow: 0 -8px 24px rgba(23, 27, 38, .08);
    }
    .em-pd-buy .btn { max-width: none; height: 48px; font-size: 14.5px; padding-left: 8px; padding-right: 8px; }
    .em-cart-sticky { justify-content: space-between; }
    .em-cart-sticky .btn { flex-shrink: 0; height: 48px; padding: 0 18px; display: inline-flex; align-items: center; gap: 6px; }
    body:has(.em-sticky-bar) .aiz-main-wrapper { padding-bottom: calc(var(--em-nav-h) + 78px); }
}


/* ======================= Home hero: hoops, thread and a stitched frame ======================= */
.em-hero { margin: 16px 0 6px; }
.em-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 44px 40px;
    /* cream cotton with a fine weave */
    background-color: #fbf4ea;
    background-image:
        radial-gradient(circle at 85% 20%, rgba(228, 96, 42, .10), transparent 45%),
        repeating-linear-gradient(0deg, rgba(150, 105, 60, .045) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(90deg, rgba(150, 105, 60, .045) 0 1px, transparent 1px 5px);
}
.em-hero-card::before {
    /* stitched edge, like a patch */
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 18px;
    border: 2px dashed rgba(228, 96, 42, .38);
    pointer-events: none;
}
.em-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: center; }
.em-hero-text { min-width: 0; }
.em-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    color: var(--em-brand-dark);
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(150, 90, 40, .10);
}
.em-hero-kicker i { font-size: 17px; }
.em-hero-title { margin: 16px 0 12px; font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: var(--em-ink); }
.em-hero-accent { position: relative; display: inline-block; color: var(--em-brand); white-space: nowrap; }
.em-stitch-line { position: absolute; left: 0; right: 0; bottom: -10px; width: 100%; height: 14px; overflow: visible; }
.em-stitch-line path { fill: none; stroke: var(--em-brand); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 9 7; }
.em-hero-sub { font-size: 16px; color: var(--em-ink-2); max-width: 520px; margin: 18px 0 20px; }
.em-hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 540px;
    padding: 6px 6px 6px 16px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid #efdccb;
    box-shadow: 0 10px 30px rgba(150, 90, 40, .12);
}
.em-hero-search:focus-within { border-color: var(--em-brand); }
.em-hero-search > i { font-size: 20px; color: var(--em-muted); }
.em-hero-search input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--em-ink); height: 42px; }
.em-hero-search .btn { border-radius: 999px !important; height: 44px; padding: 0 22px; }
.em-hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.em-hero-chips .em-chip { background: rgba(255, 255, 255, .8); border-color: #efdccb; }
.em-hero-machines { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.em-machine-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--em-ink);
    color: #fff !important;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.em-machine-btn + .em-machine-btn { background: #fff; color: var(--em-ink) !important; border: 1.5px solid #efdccb; }
.em-machine-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(23, 27, 38, .16); }
.em-machine-btn svg { color: var(--em-brand); flex-shrink: 0; }
.em-machine-btn .la-arrow-right { transition: transform .15s ease; }
.em-machine-btn:hover .la-arrow-right { transform: translateX(3px); }

/* the picture side: three hoops, thread spools and a running stitch between them */
.em-hero-art { position: relative; width: 100%; max-width: 520px; aspect-ratio: 1.15; margin-left: auto; }
.em-hoop { position: absolute; display: block; border-radius: 50%; aspect-ratio: 1; }
.em-hoop-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--em-img-bg);
    box-shadow: 0 0 0 9px #d9a46c, 0 0 0 12px #b47a43, 0 22px 44px rgba(120, 70, 30, .28);
}
.em-hoop-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.em-hoop::before {
    /* the hoop's tightening screw */
    content: "";
    position: absolute;
    top: -20px;
    left: 50%;
    width: 22px;
    height: 16px;
    margin-left: -11px;
    border-radius: 4px;
    background: linear-gradient(#e0b27e, #a8713e);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.em-hoop::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .9);
    pointer-events: none;
}
.em-hoop-1 { width: 58%; left: 4%; top: 16%; z-index: 2; }
.em-hoop-2 { width: 34%; right: 2%; top: 2%; z-index: 1; }
.em-hoop-3 { width: 30%; right: 9%; bottom: 3%; z-index: 3; }
.em-hoop-2::before, .em-hoop-3::before { top: -17px; width: 16px; height: 12px; margin-left: -8px; }
.em-spool { position: absolute; width: 8%; height: auto; aspect-ratio: 40 / 58; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .18)); z-index: 4; }
.em-spool-1 { left: 0; top: 2%; transform: rotate(-12deg); }
.em-spool-2 { left: 46%; bottom: 0; transform: rotate(8deg); }
.em-spool-3 { right: 0; top: 46%; transform: rotate(14deg); }
.em-hero-thread { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 0; }
.em-hero-thread .em-thread-path { fill: none; stroke: #d6457a; stroke-width: .8; stroke-dasharray: 2.6 1.9; stroke-linecap: round; opacity: .8; }
.em-needle { display: none; }
.em-needle path { fill: #8b93a3; }
.em-needle .em-needle-eye { fill: #fbf4ea; }

/* motion: entrance, floating hoops, moving thread (all off when the visitor prefers less motion) */
@media (prefers-reduced-motion: no-preference) {
    .em-hero-text > * { animation: em-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
    .em-hero-text > :nth-child(2) { animation-delay: .08s; }
    .em-hero-text > :nth-child(3) { animation-delay: .16s; }
    .em-hero-text > :nth-child(4) { animation-delay: .24s; }
    .em-hero-text > :nth-child(5) { animation-delay: .32s; }
    .em-hero-text > :nth-child(6) { animation-delay: .4s; }
    .em-stitch-line { animation: em-sew 4.5s .5s ease-in-out infinite; }
    .em-hoop { animation: em-pop .8s cubic-bezier(.2, .8, .2, 1.2) both, em-float 5s 1s ease-in-out infinite alternate; }
    .em-hoop-2 { animation-delay: .15s, 1.6s; }
    .em-hoop-3 { animation-delay: .3s, 2.2s; }
    .em-hoop::after { animation: em-spin 24s linear infinite; }
    .em-cat-img::after { animation: em-spin 30s linear infinite; }
    .em-cat-tile:hover .em-cat-img::after { animation-duration: 4s; }
    .em-how-step .em-how-icon::after { animation: em-spin 12s linear infinite; }
    .em-hero-kicker i { animation: em-twinkle 2.4s ease-in-out infinite; }
    .em-section-head.em-reveal .em-section-title::after { width: 0; transition: width .9s .25s cubic-bezier(.2, .7, .2, 1); }
    .em-section-head.em-reveal.em-in .em-section-title::after { width: 64px; }
    .em-needle { display: inline; animation: em-needle-in .6s 1.2s both; }
    .em-spool { animation: em-bob 3.5s ease-in-out infinite alternate; }
    .em-spool-2 { animation-delay: .8s; }
    .em-spool-3 { animation-delay: 1.6s; }
    .em-hero-thread .em-thread-path { animation: em-march 1.4s linear infinite; }

    /* listing pages: the first cards come in one after another */
    /* "backwards": once a card has arrived it is an ordinary element again (no animation layer kept,
       which left some freshly loaded pictures unpainted in Chrome) */
    .em-grid-item.em-enter { animation: em-rise .55s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 60ms); }
    .em-listing-head, .em-listing .em-chips { animation: em-rise .5s cubic-bezier(.2, .7, .2, 1) backwards; }
    .em-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
    .em-reveal.em-in { opacity: 1; transform: none; }
    .em-grid > .em-grid-item:nth-child(6n+2) { transition-delay: .06s; }
    .em-grid > .em-grid-item:nth-child(6n+3) { transition-delay: .12s; }
    .em-grid > .em-grid-item:nth-child(6n+4) { transition-delay: .18s; }
    .em-grid > .em-grid-item:nth-child(6n+5) { transition-delay: .24s; }
    .em-grid > .em-grid-item:nth-child(6n) { transition-delay: .3s; }
}
@keyframes em-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes em-sew {
    0% { clip-path: inset(0 100% 0 0); }
    35%, 85% { clip-path: inset(0 0 0 0); }
    100% { clip-path: inset(0 0 0 100%); }
}
@keyframes em-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes em-float { 0% { translate: 0 0; rotate: -2deg; } 100% { translate: 0 -16px; rotate: 2deg; } }
@keyframes em-spin { to { transform: rotate(360deg); } }
@keyframes em-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(20deg); } }
@keyframes em-needle-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes em-bob { from { translate: 0 0; } to { translate: 0 -8px; } }
@keyframes em-march { to { stroke-dashoffset: -9; } }

@media (max-width: 1199.98px) {
    .em-hero-title { font-size: 36px; }
}
@media (max-width: 991.98px) {
    .em-hero-card { padding: 26px 20px 28px; border-radius: 20px; }
    .em-hero-card::before { inset: 7px; border-radius: 14px; }
    .em-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .em-hero-art { order: -1; max-width: 340px; margin: 6px auto 4px; }
    .em-hero-text { text-align: center; }
    .em-hero-sub { margin-left: auto; margin-right: auto; }
    .em-hero-search { display: none; } /* the header search is always on screen on phones */
    .em-hero-chips, .em-hero-machines { justify-content: center; }
}
@media (max-width: 575.98px) {
    .em-hero { margin-top: 10px; }
    .em-hero-title { font-size: 27px; margin-top: 12px; }
    .em-hero-sub { font-size: 14px; margin: 16px auto 4px; }
    .em-hero-kicker { font-size: 12px; }
    .em-hero-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 14px -20px 0; padding: 0 20px; }
    .em-hero-chips::-webkit-scrollbar { display: none; }
    .em-hero-chips .em-chip { flex-shrink: 0; }
    .em-machine-btn { flex: 1 1 100%; justify-content: center; padding: 11px 14px; font-size: 13.5px; }
    .em-hoop-img { box-shadow: 0 0 0 6px #d9a46c, 0 0 0 8px #b47a43, 0 14px 30px rgba(120, 70, 30, .25); }
}


/* ======================= Embroidery rate calculator (product page) ======================= */
.em-calc {
    position: relative;
    padding: 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--em-line);
    box-shadow: var(--em-shadow);
}
.em-calc::before { content: ""; position: absolute; inset: 6px; border-radius: 13px; border: 1.5px dashed rgba(228, 96, 42, .28); pointer-events: none; }
.em-calc-head { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.em-calc-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--em-brand-soft); color: var(--em-brand); font-size: 26px; flex-shrink: 0; }
.em-calc-title { margin: 0; font-size: 18px; font-weight: 800; color: var(--em-ink); scroll-margin-top: 140px; }
.em-calc-formula { font-size: 12.5px; color: var(--em-muted); }
.em-calc-note { position: relative; display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: #eefaf4; color: #17694a; font-size: 13px; }
.em-calc-note i { font-size: 18px; margin-top: 1px; }
.em-calc-rate { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--em-surface); font-weight: 700; color: var(--em-ink); cursor: text; }
.em-calc-rate small { font-weight: 500; color: var(--em-muted); }
.em-calc-rate-input { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 46px; border-radius: 12px; background: #fff; border: 1.5px solid var(--em-brand); min-width: 150px; }
.em-calc-rate-input b { color: var(--em-brand); }
.em-calc-rate-input input { width: 100%; min-width: 0; border: 0; outline: 0; font-size: 18px; font-weight: 800; color: var(--em-ink); background: transparent; }
.em-calc-table { position: relative; }
.em-calc-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.2fr) minmax(0, .7fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 0; }
.em-calc-row-head { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--em-muted); border-bottom: 1px solid var(--em-line); padding-bottom: 8px; }
.em-calc-row + .em-calc-row { border-top: 1px dashed var(--em-line); }
.em-calc-row input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #dfe1e6;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--em-ink);
    background: #fff;
}
.em-calc-row input:focus { outline: 0; border-color: var(--em-brand); box-shadow: 0 0 0 3px rgba(228, 96, 42, .14); }
.em-calc-row input[readonly] { border-color: transparent; background: transparent; text-align: right; font-weight: 800; padding-right: 0; }
.em-calc-part { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.em-calc-part .calc-type-input { font-weight: 800; }
.em-calc-size { font-size: 11px; color: var(--em-muted); padding-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-calc-add { margin-top: 6px; padding: 6px 12px; border: 1.5px dashed var(--em-line); border-radius: 10px; background: #fff; color: var(--em-ink-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.em-calc-add:hover { border-color: var(--em-brand); color: var(--em-brand); }
.em-calc-lace { position: relative; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--em-surface); }
.em-calc-lace summary { cursor: pointer; font-weight: 700; color: var(--em-ink); outline: 0; }
.em-calc-lace summary small { font-weight: 500; color: var(--em-muted); }
.em-calc-lace[open] summary { margin-bottom: 6px; }
.em-calc-lace-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1fr); }
.em-calc-total { position: relative; display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: var(--em-ink); color: #fff; font-weight: 800; font-size: 16px; }
.em-calc-total-value { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; color: #fff; }
.em-calc-total input { width: 140px; border: 0; background: transparent; color: #fff; font-size: 22px; font-weight: 800; text-align: right; outline: 0; }
.em-calc-share { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.em-calc-share button {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--em-line);
    border-radius: 999px;
    background: #fff;
    color: var(--em-ink-2);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.em-calc-share button i { font-size: 17px; }
.em-calc-share button:hover { border-color: var(--em-brand); color: var(--em-brand); }
.em-calc-share .em-calc-wa { background: #25d366; border-color: #25d366; color: #fff; }
.em-calc-share .em-calc-wa:hover { background: #1ebe5b; color: #fff; }
@media (max-width: 575.98px) {
    .em-calc { padding: 16px 14px; }
    .em-calc-rate { flex-direction: column; align-items: stretch; }
    .em-calc-rate-input { min-width: 0; }
    .em-calc-row { gap: 6px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, .65fr) minmax(0, 1fr); }
    .em-calc-row input { height: 38px; padding: 0 7px; font-size: 13px; }
    .em-calc-share button { flex: 1 1 30%; padding: 0 8px; }
}


/* ======================= Login / sign-up (auth/focused/user_login_registration) ======================= */
.em-auth-wrap.aiz-main-wrapper { padding-bottom: 0; min-height: 100vh; }
.em-auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); min-height: 100vh; background: #fff; }
.em-auth-art {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 48px 56px;
    background-color: #fbf4ea;
    background-image:
        radial-gradient(circle at 80% 15%, rgba(228, 96, 42, .12), transparent 45%),
        repeating-linear-gradient(0deg, rgba(150, 105, 60, .045) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(90deg, rgba(150, 105, 60, .045) 0 1px, transparent 1px 5px);
}
.em-auth-art::before { content: ""; position: absolute; inset: 14px; border-radius: 22px; border: 2px dashed rgba(228, 96, 42, .38); pointer-events: none; }
.em-auth-art-inner { position: relative; width: 100%; max-width: 620px; margin: 0 auto; }
.em-auth-logo img { height: 46px; width: auto; }
.em-auth-headline { margin: 26px 0 18px; font-size: 40px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; color: var(--em-ink); }
.em-auth-headline span { display: block; color: var(--em-brand); }
.em-auth-benefits { margin: 0; }
.em-auth-benefits li { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 15px; font-weight: 600; color: var(--em-ink-2); }
.em-auth-benefits i { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--em-brand); font-size: 19px; box-shadow: 0 4px 12px rgba(150, 90, 40, .12); flex-shrink: 0; }
.em-auth-art .em-auth-hoops { max-width: 430px; margin: 24px 0 0 auto; }

.em-auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.em-auth-card { width: 100%; max-width: 410px; }
.em-auth-card-head { text-align: left; margin-bottom: 6px; }
.em-auth-icon { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; }
.em-auth-title { margin: 14px 0 4px; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--em-ink); }
.em-auth-sub { margin: 0; color: var(--em-muted); font-size: 14.5px; }
.em-auth-card label { font-size: 12.5px !important; font-weight: 700 !important; color: var(--em-ink-2) !important; }
.em-auth-card .form-control { height: 50px; border-radius: 12px !important; border: 1.5px solid #e1e3e8; font-size: 15px; }
.em-auth-card .form-control:focus { border-color: var(--em-brand); border-width: 1.5px !important; box-shadow: 0 0 0 4px rgba(228, 96, 42, .12); }
.em-auth-card .iti { width: 100%; }
.em-auth-card .btn-primary { height: 52px; border-radius: 12px !important; font-size: 15.5px !important; letter-spacing: .01em; }
.em-auth-card .password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); cursor: pointer; color: var(--em-muted); }
.em-auth-card .social a { width: 44px; height: 44px; line-height: 44px; border-radius: 12px; }

@media (prefers-reduced-motion: no-preference) {
    .em-auth-art-inner > * { animation: em-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
    .em-auth-art-inner > :nth-child(2) { animation-delay: .1s; }
    .em-auth-art-inner > :nth-child(3) { animation-delay: .2s; }
    .em-auth-art-inner > :nth-child(4) { animation-delay: .3s; }
    .em-auth-card { animation: em-rise .7s .15s cubic-bezier(.2, .7, .2, 1) both; }
}

@media (max-width: 991.98px) {
    .em-auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .em-auth-art { padding: 22px 22px 28px; }
    .em-auth-art::before { inset: 8px; border-radius: 16px; }
    .em-auth-art .em-auth-hoops, .em-auth-benefits { display: none; }
    .em-auth-logo img { height: 36px; }
    .em-auth-headline { margin: 12px 0 0; font-size: 24px; }
    .em-auth-panel { padding: 24px 18px 40px; align-items: flex-start; }
    .em-auth-title { font-size: 24px; margin-top: 8px; }
    .em-auth-icon { display: none; }
}
