/* ==========================================================================
   QrexOrder — Theme 4 ("Aurora")

   A food-app inspired menu: inset rounded photography, circular category
   icons with labels beneath, accent-coloured pricing and solid round add
   buttons. Everything is namespaced under `.thm4` so it can never leak into
   theme 1 / 2 / 3.

   Light + dark are driven by the body classes `theme-light` / `theme-dark`
   that the app already sets, so the existing theme toggle just works.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */

.thm4 {
    --thm4-accent: var(--primaryColor, #50cd89);
    --thm4-accent-rgb: var(--primaryColorRGB, 80, 205, 137);

    --thm4-r-sm: 12px;
    --thm4-r-md: 18px;
    --thm4-r-lg: 24px;
    --thm4-r-xl: 30px;

    --thm4-gap: 22px;
    --thm4-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

    /* light defaults — overridden for dark below */
    --thm4-surface: #ffffff;
    --thm4-surface-2: #f6f8fb;
    --thm4-surface-3: #eceff4;
    --thm4-text: #14181f;
    --thm4-text-soft: #656e7e;
    --thm4-muted: #98a0ae;
    --thm4-border: #ebeef3;
    --thm4-shadow: 0 2px 6px rgba(18, 24, 38, 0.04), 0 10px 28px rgba(18, 24, 38, 0.07);
    --thm4-shadow-lg: 0 4px 10px rgba(18, 24, 38, 0.06), 0 24px 50px rgba(18, 24, 38, 0.14);
    --thm4-skeleton-a: #eceff4;
    --thm4-skeleton-b: #e0e5ed;
    --thm4-glass: rgba(255, 255, 255, 0.88);
}

.theme-light .thm4 {
    --thm4-surface: #ffffff;
    --thm4-surface-2: #f6f8fb;
    --thm4-surface-3: #eceff4;
    --thm4-text: #14181f;
    --thm4-text-soft: #656e7e;
    --thm4-muted: #98a0ae;
    --thm4-border: #ebeef3;
    --thm4-shadow: 0 2px 6px rgba(18, 24, 38, 0.04), 0 10px 28px rgba(18, 24, 38, 0.07);
    --thm4-shadow-lg: 0 4px 10px rgba(18, 24, 38, 0.06), 0 24px 50px rgba(18, 24, 38, 0.14);
    --thm4-skeleton-a: #eceff4;
    --thm4-skeleton-b: #e0e5ed;
    --thm4-glass: rgba(255, 255, 255, 0.88);
}

.theme-dark .thm4 {
    --thm4-surface: #151c2b;
    --thm4-surface-2: #101725;
    --thm4-surface-3: #1e2637;
    --thm4-text: #edf0f5;
    --thm4-text-soft: #a7b0c0;
    --thm4-muted: #788294;
    --thm4-border: rgba(255, 255, 255, 0.08);
    --thm4-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 10px 28px rgba(0, 0, 0, 0.32);
    --thm4-shadow-lg: 0 4px 10px rgba(0, 0, 0, 0.4), 0 24px 50px rgba(0, 0, 0, 0.5);
    --thm4-skeleton-a: #1a2233;
    --thm4-skeleton-b: #242e42;
    --thm4-glass: rgba(16, 23, 37, 0.88);
}

/* --------------------------------------------------------------------------
   2. Layout shell
   -------------------------------------------------------------------------- */

.thm4 {
    color: var(--thm4-text);
    padding-bottom: 46px;
}

.thm4 .restaurant-container {
    max-width: 1320px;
}

.thm4 .thm4-section {
    padding: 44px 0 6px;
}

.thm4 .thm4-section--alt {
    margin-top: 44px;
    padding-bottom: 44px;
    background: var(--thm4-surface-2);
}

.thm4 .thm4-block {
    margin-bottom: 44px;
}

.thm4 .thm4-block:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   3. Headings — big, left-aligned, editorial
   -------------------------------------------------------------------------- */

.thm4 .thm4-heading {
    margin: 0 0 28px;
}

.thm4 .thm4-heading h1 {
    margin: 0;
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--thm4-text);
}

.thm4 .thm4-heading p {
    margin: 12px 0 0;
    max-width: 620px;
    color: var(--thm4-text-soft);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* row above each group of items */
.thm4 .thm4-blockhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.thm4 .thm4-blockhead h4 {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--thm4-text);
}

.thm4 .thm4-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--thm4-text-soft) !important;
    text-decoration: none;
    transition: color 0.2s var(--thm4-ease);
}

.thm4 .thm4-more:hover {
    color: var(--thm4-accent) !important;
}

.thm4 .thm4-more i {
    font-size: 0.7rem;
}

.thm4 .thm4-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.thm4 .thm4-offertag {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 13px;
    border-radius: 999px;
    background: var(--thm4-accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.thm4 .thm4-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: var(--thm4-accent);
    color: #fff !important;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 8px 20px rgba(var(--thm4-accent-rgb), 0.32);
    transition: transform 0.22s var(--thm4-ease), box-shadow 0.22s var(--thm4-ease);
}

.thm4 .thm4-btn:hover,
.thm4 .thm4-btn:focus {
    background: var(--thm4-accent) !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(var(--thm4-accent-rgb), 0.42);
}

.thm4 .thm4-btn:active {
    transform: translateY(0);
}

.thm4 .out_of_stock {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--thm4-surface-3);
    color: var(--thm4-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   5. Search — icon on the left, action pill on the right
   -------------------------------------------------------------------------- */

.thm4 .thm4-searchbar {
    margin-bottom: 30px;
}

.thm4 .searchSection.welcomeSearch {
    display: block;
    margin: 0;
}

.thm4 .thm4-search {
    max-width: 620px;
}

/* The shared base rules (.search-box-2, .searchBar-2, .search-btn, and the
   767px breakpoint in responsive.css) fight this component hard: absolute
   positioning, a translate(-50%,-50%) transform, a 35px circular button
   sized for an icon-only glyph, and one box-shadow declared with its own
   !important. Everything below is pinned with !important so this can never
   silently lose a property to those rules regardless of load order. */
.thm4 .thm4-search .searchBar-2 {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.thm4 .thm4-search .search-box-2 {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    height: 58px !important;
    padding: 0 6px 0 20px !important;
    border-radius: 999px !important;
    background: var(--thm4-surface) !important;
    box-shadow: var(--thm4-shadow) !important;
    transition: box-shadow 0.25s var(--thm4-ease);
}

.thm4 .thm4-search .search-box-2::before {
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    flex: 0 0 auto;
    color: var(--thm4-muted);
    font-size: 0.92rem;
}

.thm4 .thm4-search .search-box-2:focus-within {
    box-shadow: var(--thm4-shadow-lg) !important;
}

.thm4 .thm4-search .search-txt-2 {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: var(--thm4-text) !important;
    font-size: 0.95rem;
}

.thm4 .thm4-search .search-txt-2::placeholder {
    color: var(--thm4-muted);
}

.thm4 .thm4-search .search-btn {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 20px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--thm4-accent) !important;
    color: #fff !important;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s var(--thm4-ease);
}

.thm4 .thm4-search .search-btn:hover {
    transform: scale(1.04);
}

.thm4 .thm4-search .search-btn i {
    font-size: 1rem;
}

/* --------------------------------------------------------------------------
   6. Category rail — circular thumbnails, labels underneath
   -------------------------------------------------------------------------- */

.thm4 .thm4-filterbar {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 0 10px;
    margin-bottom: 26px;
    background: var(--thm4-glass);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    transition: box-shadow 0.25s var(--thm4-ease);
}

.thm4 .thm4-filterbar.is-stuck {
    box-shadow: 0 10px 26px rgba(18, 24, 38, 0.08);
}

.theme-dark .thm4 .thm4-filterbar.is-stuck {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.thm4 .thm4-filterbar__inner {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.thm4 .gallery_sort.thm4-chips {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0;
    padding: 2px 0 4px;
    list-style: none;
    background: transparent;
    border: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.thm4 .gallery_sort.thm4-chips::-webkit-scrollbar {
    display: none;
}

.thm4 .gallery_sort.thm4-chips > li {
    flex: 0 0 auto;
    margin: 0;
    list-style: none;
}

/* the shared `.categoryItem` rule already forces `display:flex !important;
   flex-direction:row !important` — this design goes with that grain instead
   of fighting it, which is what made the previous stacked-circle version
   fragile. */
.thm4 .gallery_sort.thm4-chips > li > button.thm4-chip {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 9px;
    height: 44px;
    padding: 4px 16px 4px 4px;
    border: 0;
    border-radius: 999px;
    background: var(--thm4-surface) !important;
    box-shadow: var(--thm4-shadow);
    color: var(--thm4-text-soft) !important;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.22s var(--thm4-ease), background 0.22s var(--thm4-ease), box-shadow 0.22s var(--thm4-ease);
}

.thm4 .thm4-chip .catImg,
.thm4 .thm4-chip > i {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transform: none !important;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    object-fit: cover;
    background: var(--thm4-surface-2);
    box-shadow: none;
    transition: background 0.22s var(--thm4-ease), color 0.22s var(--thm4-ease);
}

.thm4 .thm4-chip > i {
    color: var(--thm4-muted);
    font-size: 0.95rem;
}

.thm4 .thm4-chip.categoryItem i.fas.fa-list-ul {
    padding: 0;
    font-size: 0.95rem;
}

.thm4 .thm4-chip .categoryName {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.thm4 .gallery_sort.thm4-chips > li > button.thm4-chip:hover {
    box-shadow: var(--thm4-shadow-lg);
    color: var(--thm4-text) !important;
}

.thm4 .gallery_sort.thm4-chips > li > button.thm4-chip.active {
    background: var(--thm4-accent) !important;
    color: #fff !important;
}

.thm4 .gallery_sort.thm4-chips > li > button.thm4-chip.active .catImg,
.thm4 .gallery_sort.thm4-chips > li > button.thm4-chip.active > i {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

/* sub-categories: small pills under the rail */
.thm4 .subcategories.subcat_1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.thm4 .subcategories.subcat_1 > li {
    flex: 0 0 auto;
    margin: 0;
    list-style: none;
}

.thm4 .subcategories.subcat_1 > li > a,
.thm4 .subcategoryList ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--thm4-surface) !important;
    color: var(--thm4-text-soft) !important;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--thm4-shadow);
    transition: all 0.22s var(--thm4-ease);
}

.thm4 .subcategories.subcat_1 > li > a img,
.thm4 .subcategoryList ul > li > a img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.thm4 .subcategories.subcat_1 > li > a:hover,
.thm4 .subcategories.subcat_1 > li > a.active,
.thm4 .subcategoryList ul > li > a:hover,
.thm4 .subcategoryList ul > li.active > a {
    background: var(--thm4-accent) !important;
    color: #fff !important;
}

.thm4 .thm4-subcats {
    margin-bottom: 26px;
}

.thm4 .subcategoryList ul {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 2px 0;
    list-style: none;
    overflow-x: auto;
}

.thm4 .subcategoryList ul > li {
    flex: 0 0 auto;
    list-style: none;
}

/* --------------------------------------------------------------------------
   7. Item tile

   Inset rounded photograph inside a soft card, accent-coloured price and a
   solid round add button — the signature of this theme.
   -------------------------------------------------------------------------- */

.thm4 .thm4-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--thm4-gap);
    align-items: stretch;
}

.thm4 .thm4-grid__cell {
    min-width: 0;
    display: block;
}

.thm4 .thm4-tile {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px 8px 4px;
    border-radius: var(--thm4-r-lg);
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
    transition: transform 0.32s var(--thm4-ease), box-shadow 0.32s var(--thm4-ease);
}

.thm4 .thm4-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--thm4-shadow-lg);
}

/* --- photograph — kept shorter than square so it doesn't dominate the tile --- */
.thm4 .thm4-tile__media {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--thm4-r-md);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    background: var(--thm4-surface-3);
}

.thm4 .thm4-tile__img {
    width: 100%;
    height: 100%;
    background-color: var(--thm4-surface-3);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    transition: transform 0.7s var(--thm4-ease);
}

/* skeleton shimmer until the lazy loader swaps the real image in */
.thm4 .thm4-tile__img.bg_loader {
    background-image: linear-gradient(100deg, var(--thm4-skeleton-a) 20%, var(--thm4-skeleton-b) 40%, var(--thm4-skeleton-a) 60%);
    background-size: 220% 100%;
    animation: thm4-shimmer 1.4s linear infinite;
}

@keyframes thm4-shimmer {
    0% {
        background-position: 140% 0;
    }

    100% {
        background-position: -40% 0;
    }
}

.thm4 .thm4-tile:hover .thm4-tile__img {
    transform: scale(1.07);
}

/* --- chips floating over the photograph --- */
.thm4 .thm4-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--thm4-accent);
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(var(--thm4-accent-rgb), 0.4);
}

.thm4 .thm4-veg {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.5rem;
    box-shadow: 0 3px 10px rgba(10, 16, 28, 0.22);
}

.thm4 .thm4-veg.is_veg,
.thm4 .thm4-dot.is_veg {
    color: #21a366;
}

.thm4 .thm4-veg.is_nonveg,
.thm4 .thm4-dot.is_nonveg {
    color: #d43f3f;
}

.thm4 .thm4-dot {
    font-size: 0.5rem;
    vertical-align: middle;
}

/* --- text + action --- */
.thm4 .thm4-tile__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 12px;
    padding: 14px 8px 12px;
}

.thm4 .thm4-tile__text {
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
}

.thm4 .thm4-tile__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -0.015em;
    color: var(--thm4-text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.thm4 .thm4-tile__desc {
    margin: 5px 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--thm4-muted);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.thm4 .thm4-tile__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}

.thm4 .thm4-tile__price {
    min-width: 0;
    flex: 1 1 auto;
}

.thm4 .thm4-tile__price .priceGroup {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 8px;
    line-height: 1.2;
}

.thm4 .thm4-tile__price .currentPrice {
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--thm4-accent);
    overflow-wrap: anywhere;
}

.thm4 .thm4-tile__price .previous_price {
    font-size: 0.78rem;
    font-weight: 500;
}

.thm4 .thm4-fab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--thm4-accent);
    color: #fff !important;
    font-size: 0.85rem;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(var(--thm4-accent-rgb), 0.38);
    transition: transform 0.26s var(--thm4-ease), box-shadow 0.26s var(--thm4-ease);
}

.thm4 .thm4-fab:hover,
.thm4 .thm4-fab:focus {
    color: #fff !important;
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 9px 22px rgba(var(--thm4-accent-rgb), 0.52);
}

.thm4 .thm4-fab:active {
    transform: scale(0.95);
}

/* --- shops that hide photography --- */
.thm4 .thm4-tile--noimg {
    padding: 6px;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(var(--thm4-accent-rgb), 0.14) 0%, rgba(var(--thm4-accent-rgb), 0) 62%),
        var(--thm4-surface);
}

.thm4 .thm4-tile--noimg .thm4-tile__body {
    min-height: 150px;
    padding: 18px;
}

.thm4 .thm4-tile--noimg .thm4-tile__title {
    font-size: 1.08rem;
    -webkit-line-clamp: 3;
}

.thm4 .thm4-tile--noimg .thm4-tile__desc {
    -webkit-line-clamp: 2;
}

/* --------------------------------------------------------------------------
   8. Highlight slider
   -------------------------------------------------------------------------- */

.thm4 .thm4-highlight {
    margin-bottom: 40px;
}

.thm4 .thm4-slider {
    margin: 0 -10px;
}

.thm4 .thm4-slider .thm4-slider__cell {
    padding: 6px 10px 16px;
    height: auto;
}

.thm4 .thm4-slider .slick-track {
    display: flex;
    align-items: stretch;
}

.thm4 .thm4-slider .slick-slide {
    height: auto;
}

.thm4 .thm4-slider .slick-slide > div {
    height: 100%;
}

.thm4 .thm4-slider .slick-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--thm4-accent);
    color: #fff;
    z-index: 5;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(var(--thm4-accent-rgb), 0.35);
}

/* --------------------------------------------------------------------------
   9. Packages / accordions
   -------------------------------------------------------------------------- */

.thm4 .thm4-package {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: var(--thm4-r-lg);
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
    transition: box-shadow 0.28s var(--thm4-ease);
}

.thm4 .thm4-package:hover {
    box-shadow: var(--thm4-shadow-lg);
}

.thm4 .thm4-package__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 20px;
    background: var(--thm4-surface-2);
    border-bottom: 1px solid var(--thm4-border);
    color: var(--thm4-text);
}

.thm4 .thm4-accordions .thm4-package__head {
    cursor: pointer;
}

/* the shared arrow_up / arrow_down chevron becomes a round toggle button
   instead of a bare glyph floated to the right — content/rotation logic
   stays exactly as the shared JS/CSS already drives it */
.thm4 .thm4-package__head.arrow_up::after,
.thm4 .thm4-package__head.arrow_down::after {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
    color: var(--thm4-accent) !important;
    font-size: 0.8rem;
    float: none !important;
    transition: transform 0.3s var(--thm4-ease), background 0.22s var(--thm4-ease);
}

.thm4 .thm4-package__title {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.thm4 .thm4-package__title h4 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--thm4-text);
}

.thm4 .thm4-package__price {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
}

.thm4 .thm4-package__price .bg-round {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 15px;
    margin: 0;
    border-radius: 999px;
    background: rgba(var(--thm4-accent-rgb), 0.13);
    color: var(--thm4-accent);
    font-size: 0.95rem;
    font-weight: 800;
}

.thm4 .thm4-package__price .price_discount {
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: line-through;
}

.thm4 .thm4-package__body {
    padding: 20px;
    background: var(--thm4-surface);
    color: var(--thm4-text-soft);
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.thm4 .thm4-package__overview {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: var(--thm4-r-md);
    background: var(--thm4-surface-2);
    color: var(--thm4-text-soft);
    font-size: 0.87rem;
    line-height: 1.6;
}

.thm4 .thm4-package__overview p {
    margin: 0;
}

.thm4 .thm4-package__action {
    margin-top: 18px;
    text-align: center;
}

.thm4 .thm4-accordions .accordion_content {
    display: none;
}

.thm4 .thm4-accordions .accordion_content.block {
    display: block;
}

.thm4 .thm4-qrfoot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 26px 0 10px;
}

.thm4 .thm4-successmsg {
    text-align: center;
}

/* shared package item row — a compact, list-style cousin of the item tile */
.thm4 .homeSingle_packages {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    height: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: var(--thm4-r-md);
    background: var(--thm4-surface-2);
    transition: background 0.22s var(--thm4-ease);
}

.thm4 .homeSingle_packages:hover {
    background: var(--thm4-surface-3);
}

.thm4 .homeSingle_packages .packageImg {
    flex: 0 0 auto;
    width: 68px;
    height: 68px;
    border-radius: var(--thm4-r-sm);
    background-size: cover !important;
    background-position: center !important;
    box-shadow: var(--thm4-shadow);
}

.thm4 .homeSingle_packages .singleItemDetails {
    min-width: 0;
    padding-top: 2px;
}

.thm4 .homeSingle_packages .topPackageItem {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.thm4 .homeSingle_packages h4 {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--thm4-text);
}

/* the price line lives inside .topPackageItem, sibling to the title */
.thm4 .homeSingle_packages .topPackageItem > p {
    flex: 0 0 auto;
    margin: 0;
    color: var(--thm4-accent);
    font-size: 0.86rem;
    font-weight: 800;
}

/* the overview line is a direct child of .singleItemDetails */
.thm4 .homeSingle_packages .singleItemDetails > p {
    margin: 4px 0 0;
    font-size: 0.79rem;
    line-height: 1.45;
    color: var(--thm4-muted);
}

.thm4 .homeSingle_packages .p-0 p {
    margin: 6px 0 0;
}

.thm4 .homeSingle_packages .p-0 .capital {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--thm4-surface);
    color: var(--thm4-muted);
    font-size: 0.66rem !important;
    font-weight: 600;
    text-transform: capitalize;
}

/* --------------------------------------------------------------------------
   10. Specialties (shared partial)
   -------------------------------------------------------------------------- */

.thm4 .homeSinglePackage {
    display: flex;
    align-items: stretch;
    height: 100%;
    overflow: hidden;
    margin: 10px;
    border-radius: var(--thm4-r-lg);
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
    transition: transform 0.3s var(--thm4-ease), box-shadow 0.3s var(--thm4-ease);
}

.thm4 .homeSinglePackage:hover {
    transform: translateY(-4px);
    box-shadow: var(--thm4-shadow-lg);
}

.thm4 .homeSinglePackage .special_img {
    flex: 0 0 42%;
    min-height: 210px;
    background-size: cover !important;
    background-position: center !important;
}

.thm4 .homeSinglePackage .text {
    flex: 1 1 auto;
    min-width: 0;
    padding: 22px;
}

.thm4 .homeSinglePackage .package_heading {
    margin-bottom: 8px;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--thm4-text);
}

.thm4 .homeSinglePackage .text p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--thm4-text-soft);
}

.thm4 .homeSinglePackage .package_price span:first-child {
    color: var(--thm4-accent);
    font-size: 1.02rem;
    font-weight: 800;
}

.thm4 .homeSinglePackage .package_price .price_discount {
    margin-left: 8px;
    font-size: 0.82rem;
    text-decoration: line-through;
}

.thm4 .thm4-specials {
    margin: 0 -10px;
}

.thm4 .specialiatiesButton {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* --------------------------------------------------------------------------
   11. Category page header
   -------------------------------------------------------------------------- */

.thm4 .thm4-cathead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 32px 0 26px;
}

.thm4 .thm4-cathead__select {
    flex: 1 1 260px;
    min-width: 0;
}

.thm4 .thm4-cathead__search {
    flex: 1 1 340px;
    min-width: 0;
}

.thm4 .thm4-cathead__search .thm4-search {
    max-width: none;
}

.thm4 select.thm4-select {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 62px;
    padding: 0 46px 0 22px;
    border: 0;
    border-radius: 999px;
    background-color: var(--thm4-surface);
    background-image: linear-gradient(45deg, transparent 50%, var(--thm4-muted) 50%), linear-gradient(135deg, var(--thm4-muted) 50%, transparent 50%);
    background-position: calc(100% - 24px) 28px, calc(100% - 19px) 28px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    color: var(--thm4-text);
    font-size: 0.98rem;
    font-weight: 600;
    box-shadow: var(--thm4-shadow);
    cursor: pointer;
    outline: 0;
}

.thm4 select.thm4-select option {
    background: var(--thm4-surface);
    color: var(--thm4-text);
}

/* --------------------------------------------------------------------------
   12. Home category carousel (common_layouts/categoryItem.php)

   This partial is shared by every theme and ships completely unstyled here
   by default — large circular photos in an oversized card. Reskin it to
   match the rest of theme 4 instead of leaving it in the base look.
   -------------------------------------------------------------------------- */

.thm4 .categorySection {
    margin-bottom: 44px;
}

.thm4 .categorySection .defaultHeading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 18px;
    padding: 0;
}

.thm4 .categorySection .defaultHeading h4 {
    margin: 0;
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--thm4-text);
}

.thm4 .topCategory {
    overflow: visible;
}

.thm4 .singleCatItem {
    width: 104px;
    min-height: 0;
    margin: 4px;
    padding: 14px 8px;
    border: 0;
    border-radius: var(--thm4-r-lg);
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
    transition: transform 0.28s var(--thm4-ease), box-shadow 0.28s var(--thm4-ease);
}

.thm4 .swiper-slide:hover .singleCatItem {
    transform: translateY(-4px);
    box-shadow: var(--thm4-shadow-lg);
}

.thm4 .catTop {
    --imgWidth: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    box-shadow: none;
}

.thm4 .singleCatItem h4 {
    padding: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--thm4-text-soft);
}

.thm4 .swiper-button-next,
.thm4 .swiper-button-prev {
    width: 38px;
    height: 38px;
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
}

.thm4 .swiper-button-next:after,
.thm4 .swiper-button-prev:after {
    font-size: 14px;
    color: var(--thm4-text-soft);
}

/* --------------------------------------------------------------------------
   13. Panels, empty states, pagination, misc
   -------------------------------------------------------------------------- */

.thm4 .thm4-panel {
    margin: 32px 0;
    padding: 34px;
    border-radius: var(--thm4-r-xl);
    background: var(--thm4-surface);
    box-shadow: var(--thm4-shadow);
}

.thm4 .thm4-richtext {
    color: var(--thm4-text-soft);
    font-size: 0.95rem;
    line-height: 1.75;
}

.thm4 .thm4-richtext img {
    max-width: 100%;
    height: auto;
    border-radius: var(--thm4-r-md);
}

.thm4 .thm4-empty {
    padding: 64px 20px;
    text-align: center;
}

.thm4 .thm4-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin-bottom: 18px;
    border-radius: 50%;
    background: var(--thm4-surface-3);
    color: var(--thm4-muted);
    font-size: 1.9rem;
}

.thm4 .thm4-empty h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--thm4-text-soft);
}

.thm4 .thm4-pagination {
    margin-top: 34px;
    text-align: center;
}

.thm4 .thm4-pagination ul.ci-pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.thm4 .thm4-pagination ul.ci-pagination li {
    list-style: none;
}

.thm4 .thm4-pagination ul.ci-pagination li a,
.thm4 .thm4-pagination ul.ci-pagination li strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--thm4-surface);
    color: var(--thm4-text-soft) !important;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--thm4-shadow);
    transition: all 0.22s var(--thm4-ease);
}

.thm4 .thm4-pagination ul.ci-pagination li a:hover,
.thm4 .thm4-pagination ul.ci-pagination li.active a,
.thm4 .thm4-pagination ul.ci-pagination li strong {
    background: var(--thm4-accent) !important;
    color: #fff !important;
}

.thm4 .thm4-ajaxresult.load {
    position: relative;
    min-height: 220px;
}

/* sidebar category list (rightbar) */
.thm4 .thm4-sidelist {
    margin: 0;
    padding: 0;
    list-style: none;
}

.thm4 .thm4-sidelist > li {
    margin-bottom: 8px;
    list-style: none;
}

.thm4 .thm4-sidelist > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--thm4-r-md);
    background: var(--thm4-surface);
    color: var(--thm4-text-soft) !important;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--thm4-shadow);
    transition: all 0.22s var(--thm4-ease);
}

.thm4 .thm4-sidelist > li > a:hover {
    color: var(--thm4-accent) !important;
    transform: translateX(3px);
}

.thm4 .thm4-sidelist__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(var(--thm4-accent-rgb), 0.12);
    color: var(--thm4-accent);
    font-size: 0.75rem;
}

/* offers page */
.thm4 .thm4-offerpage {
    padding-top: 32px;
}

.thm4 .offerList .singleOffer img {
    width: 100%;
    height: auto;
    border-radius: var(--thm4-r-lg);
    box-shadow: var(--thm4-shadow);
}

/* coupons */
.thm4 .couponArea {
    margin: 26px 0;
}

.thm4 .couponList {
    margin-bottom: 14px;
    padding: 17px 20px;
    border: 1px dashed rgba(var(--thm4-accent-rgb), 0.55);
    border-radius: var(--thm4-r-md);
    background: rgba(var(--thm4-accent-rgb), 0.07);
}

.thm4 .couponList h4 {
    margin-bottom: 4px;
    font-size: 0.98rem;
    color: var(--thm4-text);
}

.thm4 .couponList p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--thm4-text-soft);
}

/* utility used by auth.js when filtering sub-categories */
.thm4 .dis-none {
    display: none;
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {
    .thm4 {
        --thm4-gap: 18px;
    }

    .thm4 .thm4-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .thm4 .thm4-section {
        padding-top: 34px;
    }

    .thm4 .thm4-heading h1 {
        font-size: 1.9rem;
    }

    .thm4 .homeSinglePackage {
        display: block;
    }

    .thm4 .homeSinglePackage .special_img {
        min-height: 190px;
    }
}

@media (max-width: 767px) {
    .thm4 {
        --thm4-gap: 14px;
        --thm4-r-xl: 22px;
        --thm4-r-lg: 18px;
    }

    .thm4 .thm4-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .thm4 .thm4-heading {
        margin-bottom: 22px;
    }

    .thm4 .thm4-heading h1 {
        font-size: 1.55rem;
    }

    .thm4 .thm4-heading p {
        font-size: 0.87rem;
    }

    .thm4 .thm4-blockhead h4 {
        font-size: 1.1rem;
    }

    /* the base rules for these are pinned with !important (see section 5),
       so the overrides here need it too or they're silently dropped */
    .thm4 .thm4-search .search-box-2,
    .thm4 select.thm4-select {
        height: 54px !important;
    }

    .thm4 .thm4-search .search-box-2 {
        padding: 0 6px 0 18px !important;
    }

    .thm4 .thm4-search .search-txt-2 {
        height: 40px !important;
    }

    .thm4 .thm4-search .search-btn {
        height: 40px !important;
        min-width: 40px !important;
        padding: 0 16px !important;
        font-size: 0.82rem;
    }

    .thm4 select.thm4-select {
        background-position: calc(100% - 24px) 24px, calc(100% - 19px) 24px;
    }

    .thm4 .thm4-filterbar {
        padding: 10px 0 6px;
        margin-bottom: 20px;
    }

    .thm4 .gallery_sort.thm4-chips > li > button.thm4-chip {
        height: 40px;
        gap: 7px;
        padding: 3px 13px 3px 3px;
        font-size: 0.78rem;
    }

    .thm4 .thm4-chip .catImg,
    .thm4 .thm4-chip > i {
        width: 32px;
        height: 32px;
    }

    .thm4 .thm4-tile {
        padding: 7px 7px 2px;
    }

    .thm4 .thm4-tile__body {
        gap: 10px;
        padding: 11px 6px 10px;
    }

    .thm4 .thm4-tile__title {
        font-size: 0.87rem;
    }

    .thm4 .thm4-tile__desc {
        display: none;
    }

    .thm4 .thm4-tile__price .currentPrice {
        font-size: 0.95rem;
    }

    .thm4 .thm4-tile__price .previous_price {
        font-size: 0.7rem;
    }

    .thm4 .thm4-fab {
        width: 34px;
        height: 34px;
        font-size: 0.78rem;
    }

    .thm4 .thm4-badge {
        height: 24px;
        padding: 0 9px;
        font-size: 0.62rem;
    }

    .thm4 .thm4-veg {
        width: 22px;
        height: 22px;
    }

    .thm4 .thm4-package__head,
    .thm4 .thm4-package__body {
        padding: 16px;
    }

    .thm4 .thm4-panel {
        padding: 22px;
    }

    .thm4 .thm4-cathead {
        margin-top: 24px;
    }
}

@media (max-width: 479px) {
    .thm4 .thm4-grid {
        gap: 12px;
    }

    .thm4 .thm4-tile__foot {
        gap: 6px;
    }

    .thm4 .thm4-qrfoot {
        gap: 12px;
    }
}

/* --------------------------------------------------------------------------
   15. RTL
   -------------------------------------------------------------------------- */

[dir="rtl"] .thm4 .thm4-badge {
    right: auto;
    left: 10px;
}

[dir="rtl"] .thm4 .thm4-veg {
    left: auto;
    right: 10px;
}

[dir="rtl"] .thm4 .thm4-search .search-box-2 {
    padding: 0 22px 0 8px;
}

[dir="rtl"] .thm4 select.thm4-select {
    padding: 0 22px 0 46px;
    background-position: 19px 28px, 24px 28px;
    background-image: linear-gradient(45deg, var(--thm4-muted) 50%, transparent 50%), linear-gradient(135deg, transparent 50%, var(--thm4-muted) 50%);
}

[dir="rtl"] .thm4 .thm4-sidelist > li > a:hover {
    transform: translateX(-3px);
}

/* --------------------------------------------------------------------------
   16. Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .thm4 *,
    .thm4 *::before,
    .thm4 *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
