/* ==========================================================================
   ToolHub — Premium SaaS eCommerce Marketplace
   Bootstrap 5.3.x + Custom Styles
   ========================================================================== */

:root {
    /* === Brand: albastru eMAG + accent rosu === */
    --th-emag-blue: #0074c2;
    --th-emag-blue-bright: #0091ea;
    --th-emag-blue-light: #a8d4f5;
    --th-emag-blue-soft: #e3f2fc;
    --th-emag-blue-dark: #005a9e;
    --th-emag-red: #e20613;
    --th-emag-red-dark: #c00510;
    --th-emag-red-soft: #fff5f5;
    --th-emag-red-border: #f5d0d3;
    --th-emag-red-hover-bg: #ffe8ea;
    --th-emag-red-hover-border: #f0a8ae;
    --th-emag-blue-hover-bg: #eef5fc;
    --th-emag-blue-hover-border: #c5d9ef;
    --th-emag-genius: #6c3082;
    --th-emag-nav-cta: #e20613;
    --th-emag-nav-cta-hover: #c00510;
    --th-emag-gradient: linear-gradient(90deg, #0091ea 0%, #0074c2 55%, #005a9e 100%);

    /* === Neutre (fundal, text, chenare) === */
    --th-text: #222222;
    --th-text-secondary: #555555;
    --th-text-muted: #777777;
    --th-text-light: #999999;
    --th-dark: var(--th-text);
    --th-gray: var(--th-text-muted);
    --th-gray-light: var(--th-text-light);
    --th-border: #dddddd;
    --th-border-light: #e8ecef;
    --th-border-card: #e8e8e8;
    --th-border-subtle: #ececec;
    --th-border-muted: #eeeeee;
    --th-bg: #f0f4f8;
    --th-surface: #ffffff;
    --th-surface-muted: #f5f5f5;
    --th-surface-subtle: #fafbfc;
    --th-white: #ffffff;
    --th-on-primary: #ffffff;
    --th-on-primary-muted: rgba(255, 255, 255, 0.82);
    --th-on-primary-subtle: rgba(255, 255, 255, 0.78);
    --th-footer: #2b2b2b;
    --th-topbar: #333333;

    /* === Semantic === */
    --th-primary: var(--th-emag-blue);
    --th-primary-dark: var(--th-emag-blue-dark);
    --th-primary-light: var(--th-emag-blue-bright);
    --th-primary-rgb: 0, 116, 194;
    --th-danger: var(--th-emag-red);
    --th-success: #15803d;
    --th-warning: #f59e0b;
    --th-brand: var(--th-emag-blue);
    --th-brand-light: var(--th-emag-blue-light);
    --th-brand-gradient: var(--th-emag-gradient);

    /* === ToolHub (accent secundar, folosit rar) === */
    --th-toolhub-indigo: #4f46e5;
    --th-toolhub-indigo-dark: #4338ca;
    --th-toolhub-indigo-soft: #eef2ff;
    --th-toolhub-amber: #d97706;
    --th-toolhub-amber-soft: #fffbeb;
    --th-badge-count: #e20613;

    /* === Efecte === */
    --th-focus-ring: rgba(0, 130, 230, 0.2);
    --th-shadow-primary: rgba(0, 94, 184, 0.12);
    --th-shadow-danger: rgba(226, 6, 19, 0.12);

    /* === Bootstrap sync === */
    --bs-primary: #0074c2;
    --bs-primary-rgb: 0, 116, 194;
    --bs-danger: #e20613;
    --bs-danger-rgb: 226, 6, 19;
    --bs-body-bg: var(--th-bg);
    --bs-body-color: var(--th-text);
    --bs-border-color: var(--th-border);

    /* === Layout === */
    --th-sidebar-width: 272px;
    --th-topbar-height: 42px;
    --th-header-height: 72px;
    --th-navbar-emag-height: 44px;
    --th-masthead-sticky-top: calc(
        var(--th-topbar-height) + var(--th-header-height) + var(--th-navbar-emag-height) + 0.75rem
    );
    --th-page-x: 0.75rem;
    --th-hero-height: 400px;
    --th-radius: 10px;
    --th-radius-lg: 12px;
    --th-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --th-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
    --th-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --th-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --th-font-heading: 'DM Sans', var(--th-font);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: var(--th-font);
}

body.toolhub-body,
button,
input,
select,
textarea,
.form-control,
.form-select,
.btn,
.dropdown-menu,
.offcanvas,
.modal {
    font-family: inherit;
}

body.toolhub-body {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--th-text);
    background-color: var(--th-bg);
    line-height: 1.55;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#main-content {
    background-color: var(--th-surface);
}

h1, h2, h3, h4, h5, h6,
.section-title,
.hero-title,
.logo-text,
.newsletter-title,
.sidebar-products-title,
.footer-heading,
.why-title {
    font-family: var(--th-font-heading);
    letter-spacing: -0.025em;
}

a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

::selection {
    background: var(--th-emag-blue-light);
    color: var(--th-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--th-emag-blue-bright);
    box-shadow: 0 0 0 0.2rem var(--th-focus-ring);
}

img {
    max-width: 100%;
    height: auto;
}

/* --------------------------------------------------------------------------
   TOP BAR
   -------------------------------------------------------------------------- */
.topbar {
    position: relative;
    z-index: 1;
    width: 100%;
    height: var(--th-topbar-height);
    background-color: var(--th-topbar);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.topbar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.topbar-announcement {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.2;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-announcement-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

.topbar-announcement-link:hover {
    color: var(--th-on-primary);
}

@media (max-width: 767.98px) {
    .topbar-announcement {
        font-size: 0.75rem;
    }
}

/* --------------------------------------------------------------------------
   LOGO
   -------------------------------------------------------------------------- */
.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--th-primary);
    color: var(--th-on-primary);
    border-radius: var(--th-radius);
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--th-dark);
    letter-spacing: -0.02em;
}

.logo-accent {
    color: var(--th-emag-red);
}

.footer-logo .logo-text {
    color: var(--th-on-primary);
}

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.site-header {
    position: relative;
    z-index: 1020;
    background: var(--th-white);
    border-bottom: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
    overflow: visible;
}

.site-header .container,
.header-main,
.header-actions {
    overflow: visible;
}

/* Sticky gestionat de .site-masthead — fără fixed separat pe header */

.header-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem 2rem;
    min-height: var(--th-header-height);
    padding: 0.75rem 0;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header-search {
    width: 100%;
    min-width: 0;
}

.search-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    border: 1px solid var(--th-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--th-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input-group:focus-within {
    border-color: var(--th-primary);
    box-shadow: 0 0 0 3px rgba(var(--th-primary-rgb), 0.15);
}

.search-field {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    box-shadow: none;
    font-size: 0.9375rem;
    padding: 0.7rem 1.15rem;
    background: transparent;
    color: var(--th-dark);
}

.search-field::placeholder {
    color: #9ca3af;
}

.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0;
    background: var(--th-primary);
    color: var(--th-on-primary);
    padding: 0 1.35rem;
    font-size: 1.125rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: var(--th-primary-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
    flex-shrink: 0;
}

.header-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--th-dark);
    white-space: nowrap;
    line-height: 1;
    transition: color 0.2s ease;
}

.header-action:hover {
    color: var(--th-emag-blue);
}

.header-action > .bi {
    font-size: 1.35rem;
    color: var(--th-gray);
    flex-shrink: 0;
    line-height: 1;
}

.header-action:hover > .bi {
    color: var(--th-emag-blue);
}

.header-action-text {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
}

.header-action-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.header-action-icon-wrap .bi {
    font-size: 1.35rem;
    color: var(--th-gray);
}


.wishlist-badge,
.cart-badge {
    position: absolute;
    top: -7px;
    right: -9px;
    background: var(--th-badge-count);
    color: var(--th-on-primary);
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

/* Header actions — stil ToolHub (nu clona eMAG) */
.header-actions--toolhub {
    gap: 1.35rem;
}

.header-actions--toolhub .header-action {
    position: relative;
    padding: 0.45rem 0.65rem;
    margin: 0 -0.65rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-actions--toolhub .header-action:hover,
.header-hover-dropdown.is-open .header-action {
    background-color: #f3f6f9;
    color: var(--th-emag-blue);
}

.header-actions--toolhub .header-action-chevron {
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.55rem;
    line-height: 1;
    color: var(--th-gray-light);
    margin-left: 0.2rem;
    opacity: 0.85;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.header-actions--toolhub .header-action:hover .header-action-chevron,
.header-hover-dropdown.is-open .header-action-chevron {
    color: var(--th-emag-blue);
    opacity: 1;
}

.header-hover-dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.header-hover-dropdown [data-header-trigger] {
    display: inline-flex;
}

.header-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    width: max-content;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

.header-hover-dropdown.is-open .header-popover,
.header-hover-dropdown:focus-within .header-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.header-popover-body {
    position: relative;
    background: var(--th-white);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 12px 28px rgba(0, 0, 0, 0.1);
    padding: 1rem 1.125rem 1.125rem;
    text-align: left;
}

.header-popover-body::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--th-white);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    transform: translateX(-50%) rotate(45deg);
    z-index: 1;
}

.header-popover-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.header-popover-head .header-popover-icon-badge {
    margin: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
}

.header-popover-head .header-popover-title {
    margin: 0 0 0.2rem;
    font-size: 0.9375rem;
}

.header-popover-head .header-popover-desc {
    font-size: 0.8125rem;
}

.header-popover-note {
    margin: 0 0 0.875rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eef1f4;
    font-size: 0.8125rem;
    color: var(--th-gray);
    line-height: 1.45;
}

.header-popover-cta {
    display: block;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: var(--th-white);
    background: var(--th-emag-blue);
    border-radius: 8px;
    transition: background-color 0.15s ease;
}

.header-popover-cta:hover {
    color: var(--th-white);
    background: var(--th-emag-blue-dark);
}

.header-popover-cta--outline {
    color: var(--th-emag-blue);
    background: var(--th-white);
    border: 1px solid var(--th-border);
}

.header-popover-cta--outline:hover {
    color: var(--th-emag-blue-dark);
    background: #f3f6f9;
    border-color: var(--th-emag-blue-light);
}

.header-popover-eyebrow {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--th-gray);
    margin-bottom: 0.35rem;
}

.header-popover-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--th-dark);
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.header-popover-desc {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--th-gray);
    line-height: 1.5;
}

.header-popover-actions--stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid #eef1f4;
}

.btn-th-primary {
    background: var(--th-toolhub-indigo);
    border: 1px solid var(--th-toolhub-indigo);
    color: var(--th-on-primary);
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-th-primary:hover {
    background: var(--th-toolhub-indigo-dark);
    border-color: var(--th-toolhub-indigo-dark);
    color: var(--th-on-primary);
}

.btn-th-outline {
    background: var(--th-white);
    border: 1px solid var(--th-border);
    color: var(--th-dark);
    font-weight: 600;
    border-radius: 8px;
}

.btn-th-outline:hover {
    border-color: var(--th-toolhub-indigo);
    color: var(--th-toolhub-indigo);
    background: var(--th-toolhub-indigo-soft);
}

.header-popover-icon-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
}

.header-popover-icon-badge--wishlist {
    background: #fef2f2;
    color: #e11d48;
}

.header-popover-icon-badge--cart {
    background: var(--th-emag-blue-hover-bg);
    color: var(--th-emag-blue);
}

.header-popover--account {
    min-width: 260px;
    max-width: 280px;
}

.header-popover--wishlist {
    min-width: 260px;
    max-width: 300px;
}

.header-popover--cart {
    min-width: 260px;
    max-width: 300px;
}

.header-popover--cart .cart-popover-filled {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eef1f4;
}

.header-popover-summary {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--th-emag-blue);
    text-align: left;
}

.header-popover-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
    max-height: 100px;
    overflow-y: auto;
}

.header-popover-list li {
    font-size: 0.75rem;
    color: var(--th-dark);
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--th-border);
}

.header-popover-list li:last-child {
    border-bottom: 0;
}

.header-action--cart .header-action-icon-wrap .bi,
.header-action--wishlist .header-action-icon-wrap .bi {
    color: var(--th-dark);
}

.header-hover-dropdown.is-open .header-action--cart .header-action-icon-wrap .bi,
.header-hover-dropdown.is-open .header-action--wishlist .header-action-icon-wrap .bi,
.header-actions--toolhub .header-action:hover .header-action-icon-wrap .bi,
.header-actions--toolhub .header-action:hover > .bi {
    color: var(--th-emag-blue);
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   SITE MASTHEAD (eMAG-style top)
   -------------------------------------------------------------------------- */
.site-masthead {
    position: sticky;
    top: 0;
    z-index: 1050;
    width: 100%;
    background: var(--th-white);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* --------------------------------------------------------------------------
   NAVBAR eMAG — gradient bar + buton Produse
   -------------------------------------------------------------------------- */
.site-navbar-emag {
    position: relative;
    z-index: 1015;
    background: var(--th-emag-gradient);
    min-height: var(--th-navbar-emag-height);
}

.navbar-emag-grid {
    display: grid;
    grid-template-columns: var(--th-sidebar-width) 1fr auto;
    align-items: stretch;
    min-height: var(--th-navbar-emag-height);
    gap: 0;
}

.navbar-emag-sidebar-col {
    display: flex;
    align-items: stretch;
}

.btn-produse {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: 100%;
    min-height: var(--th-navbar-emag-height);
    padding: 0 1.125rem;
    border: 0;
    background-color: var(--th-surface);
    color: var(--th-dark);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-produse .bi {
    font-size: 1.25rem;
    line-height: 1;
}

.btn-produse:hover {
    background: #f8fafc;
}

.navbar-emag-links {
    align-items: center;
    gap: 0.15rem;
    padding: 0 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.navbar-emag-links::-webkit-scrollbar {
    display: none;
}

.navbar-emag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    color: var(--th-on-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.navbar-emag-link:hover {
    color: var(--th-on-primary);
    background: rgba(255, 255, 255, 0.15);
}

.navbar-emag-utils {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-left: 0.5rem;
    flex-shrink: 0;
}

.navbar-emag-util {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    color: var(--th-on-primary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 4px;
    transition: background 0.15s ease;
}

.navbar-emag-util:hover {
    color: var(--th-on-primary);
    background: rgba(255, 255, 255, 0.12);
}

.navbar-emag-util--cta {
    background: var(--th-emag-nav-cta);
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.navbar-emag-util--cta:hover {
    background: var(--th-emag-nav-cta-hover);
    color: var(--th-on-primary);
}

.btn-produse-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    border: 0;
    background: rgba(255, 255, 255, 0.2);
    color: var(--th-on-primary);
    border-radius: 6px;
}

.btn-produse-mobile:hover {
    background: rgba(255, 255, 255, 0.3);
    color: var(--th-on-primary);
}

.category-list .list-group-item,
.category-offcanvas-list .list-group-item {
    border-color: var(--th-border);
    padding: 0;
}

.category-list .list-group-item a,
.category-offcanvas-list .list-group-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: var(--th-white);
    color: var(--th-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.category-list .list-group-item a i:first-child {
    color: var(--th-gray);
    font-size: 1.1rem;
    width: 1.25rem;
    text-align: center;
}

.category-list .list-group-item a:hover,
.category-offcanvas-list .list-group-item a:hover {
    background: var(--th-white);
    color: var(--th-primary);
    padding-left: 1.15rem;
}

.category-list .list-group-item a:hover i:first-child {
    color: var(--th-primary);
}

.category-list .list-group-item.deals-item a,
.category-offcanvas-list .deals-item a {
    color: var(--th-danger);
}

.category-list .list-group-item.deals-item a i:first-child {
    color: var(--th-danger);
}

/* --------------------------------------------------------------------------
   HEADER eMAG — search pill + acțiuni
   -------------------------------------------------------------------------- */
.header-main--toolhub,
.header-main--emag {
    gap: 1.25rem 2rem;
    padding: 0.875rem 0;
}

.logo--toolhub .logo-icon,
.logo--emag .logo-icon {
    background: var(--th-toolhub-indigo);
    border-radius: 8px;
}

.logo--toolhub .logo-accent,
.logo--emag .logo-accent {
    color: var(--th-emag-red);
}

.header-search--toolhub,
.header-search--emag {
    max-width: 720px;
    margin: 0 auto;
}

.search-pill {
    display: flex;
    align-items: stretch;
    gap: 1px;
    width: 100%;
    padding: 1px;
    border: 1px solid var(--th-brand-light);
    border-radius: 8px;
    background: var(--th-white);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-pill:focus-within {
    border-color: var(--th-brand);
    box-shadow: 0 0 0 3px rgba(var(--th-primary-rgb), 0.15);
}

.search-pill-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0.5rem 0.25rem 0.5rem 1.15rem;
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--th-dark);
}

.search-pill-input::placeholder {
    color: var(--th-gray-light);
}

.search-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    min-height: 0;
    margin: 0;
    border: 0;
    background: var(--th-emag-blue);
    color: var(--th-on-primary);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.15s ease;
}

.search-pill-btn:hover {
    background: var(--th-emag-blue-dark);
    color: var(--th-on-primary);
}

.search-pill--autocomplete {
    position: relative;
    overflow: visible;
}

.search-pill--autocomplete.is-open {
    border-color: var(--th-brand);
    box-shadow: 0 0 0 3px rgba(var(--th-primary-rgb), 0.15);
}

.search-autocomplete {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    z-index: 1080;
}

.search-autocomplete-inner {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.search-autocomplete-section {
    padding: 0.65rem 0.75rem 0.5rem;
}

.search-autocomplete-section + .search-autocomplete-section {
    border-top: 1px solid #f1f5f9;
}

.search-autocomplete-label {
    margin-bottom: 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.search-autocomplete-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}

.search-autocomplete-item:hover,
.search-autocomplete-item.is-active {
    background: #f8fafc;
}

.search-autocomplete-item mark {
    padding: 0;
    background: rgba(0, 116, 194, 0.12);
    color: inherit;
    font-weight: 700;
}

.search-autocomplete-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #eef2f7;
}

.search-autocomplete-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-autocomplete-copy {
    flex: 1;
    min-width: 0;
}

.search-autocomplete-title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-autocomplete-meta {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-autocomplete-price {
    flex-shrink: 0;
    text-align: right;
}

.search-autocomplete-price strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 800;
    color: #0f172a;
}

.search-autocomplete-price small {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.search-autocomplete-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.search-autocomplete-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.search-autocomplete-chip:hover,
.search-autocomplete-chip.is-active {
    background: var(--th-emag-blue-soft);
    border-color: rgba(0, 116, 194, 0.2);
    color: var(--th-primary);
}

.search-autocomplete-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--th-primary);
    text-decoration: none;
}

.search-autocomplete-footer:hover,
.search-autocomplete-footer.is-active {
    background: var(--th-emag-blue-soft);
}

.search-autocomplete-loading,
.search-autocomplete-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    color: #64748b;
    font-size: 0.875rem;
}

.search-autocomplete-empty i {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: #94a3b8;
}

.search-autocomplete-empty p {
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: #0f172a;
}

.search-autocomplete-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.45rem;
    border: 2px solid #cbd5e1;
    border-top-color: var(--th-primary);
    border-radius: 50%;
    vertical-align: -0.15rem;
    animation: search-spin 0.7s linear infinite;
}

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

.search-page-header {
    margin: 1rem 0 1.25rem;
}

.search-page-title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.search-page-count {
    margin: 0;
    color: #64748b;
    font-size: 0.9375rem;
}

.search-page-empty {
    padding: 3rem 1rem;
    text-align: center;
    border: 1px dashed #dbe3ec;
    border-radius: 12px;
    background: #fafbfc;
}

.search-page-empty i {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 2rem;
    color: #94a3b8;
}

.header-actions--emag {
    gap: 1.5rem;
}

.header-action--account .bi-person-circle {
    font-size: 1.5rem;
    color: var(--th-gray);
}

.header-actions--emag .header-action-chevron {
    font-size: 0.6rem;
    color: var(--th-gray-light);
    margin-left: 0.15rem;
}

/* --------------------------------------------------------------------------
   HERO — sidebar + slider same height (eMAG layout)
   -------------------------------------------------------------------------- */
.hero-section--emag {
    padding: 0;
    background-color: var(--th-surface);
}

.hero-section--emag > .container {
    background-color: var(--th-surface);
}

.hero-layout,
.hero-layout--emag {
    display: grid;
    grid-template-columns: var(--th-sidebar-width) 1fr;
    gap: 0;
    align-items: stretch;
    height: var(--th-hero-height);
    position: relative;
}

.hero-layout--emag {
    box-sizing: border-box;
    background-color: var(--th-surface);
    border-bottom: 0;
}

.hero-layout--emag .hero-slider {
    border-bottom: 1px solid var(--th-border);
    border-bottom-right-radius: var(--th-radius-lg);
    overflow: hidden;
}

.hero-layout--emag.is-mega-open .hero-slider {
    border-bottom: 0;
}

.hero-categories {
    flex-direction: column;
    background-color: var(--th-surface);
    border: 1px solid var(--th-border);
    border-radius: var(--th-radius-lg);
    overflow: hidden;
    box-shadow: var(--th-shadow);
    height: var(--th-hero-height);
}

.hero-categories--emag {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    background-color: var(--th-surface);
    border-radius: 0;
    border-top: 0;
    border-right: 1px solid var(--th-border);
    border-left: 0;
    border-bottom: 0;
    box-shadow: none;
    position: relative;
    z-index: 30;
    overflow: visible;
}

.hero-categories--emag .hero-categories-nav {
    background-color: var(--th-surface);
}

.hero-categories--emag .hero-cat-item {
    background-color: var(--th-surface);
}

.hero-cat-item {
    flex: 1;
    display: flex;
    min-height: 0;
}

.hero-categories-head {
    flex-shrink: 0;
    padding: 0.875rem 1.125rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--th-gray);
    background: var(--th-white);
    border-bottom: 1px solid var(--th-border);
}

.hero-categories--emag .hero-categories-head {
    background: var(--th-white);
}

.hero-categories-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.hero-categories--emag .hero-cat-link {
    padding: 0 0.75rem 0 0;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.hero-categories--emag .hero-cat-icon {
    width: 1.25rem;
    height: auto;
    min-height: 0;
    justify-content: flex-start;
    background: transparent;
    border-radius: 0;
    font-size: 1.05rem;
    color: var(--th-gray);
}

.hero-cat-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0 1rem;
    min-height: 0;
    color: var(--th-dark);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--th-surface);
    border: 0;
    box-shadow: inset 0 1px 0 transparent, inset 0 -1px 0 transparent;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.hero-categories--emag .hero-cat-link {
    background-color: var(--th-surface);
}

.hero-cat-link:focus,
.hero-cat-link:focus-visible {
    outline: none;
}

.hero-cat-link:hover,
.hero-cat-item.is-active .hero-cat-link {
    background-color: var(--th-surface);
    color: var(--th-emag-blue);
}

.hero-cat-link:hover {
    box-shadow: inset 0 1px 0 var(--th-border), inset 0 -1px 0 var(--th-border);
}

/* Evita linie dubla intre categorie hover si cea de deasupra */
.hero-cat-item:has(+ .hero-cat-item:hover) .hero-cat-link {
    box-shadow: inset 0 -1px 0 transparent;
}

/* Fara bordura sub ultimul element din meniu */
.hero-categories--emag .hero-cat-item:last-child .hero-cat-link:hover,
.hero-categories--emag .hero-cat-item:last-child.is-active .hero-cat-link {
    box-shadow: inset 0 1px 0 var(--th-border), inset 0 -1px 0 transparent;
}

/* Mega deschis: ascunde border-ul sidebar, fara border-right pe link (evita flash) */
.hero-layout--emag.is-mega-open .hero-categories--emag {
    border-right-color: transparent;
}

.hero-layout--emag.is-mega-open .hero-cat-link:hover {
    box-shadow: inset 0 1px 0 var(--th-border), inset 0 -1px 0 var(--th-border);
}

.hero-layout--emag.is-mega-open .hero-cat-item:has(+ .hero-cat-item:hover) .hero-cat-link,
.hero-layout--emag.is-mega-open .hero-cat-item:has(+ .hero-cat-item.is-active) .hero-cat-link {
    box-shadow: inset 0 -1px 0 transparent;
}

.hero-layout--emag.is-mega-open .hero-cat-item:last-child .hero-cat-link:hover,
.hero-layout--emag.is-mega-open .hero-cat-item:last-child.is-active .hero-cat-link:hover {
    box-shadow: inset 0 1px 0 var(--th-border), inset 0 -1px 0 transparent, 1px 0 0 var(--th-white);
}

.hero-layout--emag.is-mega-open .hero-cat-item.is-active .hero-cat-link {
    position: relative;
    z-index: 31;
    box-shadow: 1px 0 0 var(--th-white);
}

.hero-layout--emag.is-mega-open .hero-cat-item.is-active:not(:last-child) .hero-cat-link:hover {
    box-shadow:
        inset 0 1px 0 var(--th-border),
        inset 0 -1px 0 var(--th-border),
        1px 0 0 var(--th-white);
}

.hero-layout--emag.is-mega-open .hero-cat-item.is-active:last-child .hero-cat-link {
    box-shadow: 1px 0 0 var(--th-white);
}

.hero-cat-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
    color: var(--th-gray);
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.hero-cat-link:hover .hero-cat-icon,
.hero-cat-item.is-active .hero-cat-icon {
    background: transparent;
    color: var(--th-emag-blue);
}

.hero-cat-label {
    flex: 1;
    min-width: 0;
    line-height: 1.25;
}

.hero-cat-arrow {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: var(--th-gray-light);
    transition: color 0.15s ease, transform 0.15s ease;
}

.hero-cat-link:hover .hero-cat-arrow,
.hero-cat-item.is-active .hero-cat-arrow {
    color: var(--th-emag-blue);
    transform: translateX(2px);
}

.hero-cat-link--deals {
    background-color: var(--th-surface);
    color: var(--th-dark);
}

.hero-cat-link--deals:hover,
.hero-cat-item--deals.is-active .hero-cat-link--deals {
    background-color: var(--th-surface);
    color: var(--th-emag-red);
}

.hero-cat-icon--deals {
    background: transparent;
    color: var(--th-emag-red);
}

.hero-cat-link--deals:hover .hero-cat-icon--deals,
.hero-cat-item--deals.is-active .hero-cat-icon--deals {
    background: transparent;
    color: var(--th-emag-red);
}

.hero-cat-link--deals:hover .hero-cat-arrow {
    color: var(--th-danger);
}

.hero-slider {
    position: relative;
    height: var(--th-hero-height);
    overflow: hidden;
}

.hero-layout--emag .hero-slider {
    height: 100%;
    min-height: 0;
}

/* Mega menu — acoperă întregul slider la hover categorie */
.hero-mega-panel {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: var(--th-white);
    border: 1px solid var(--th-border);
    border-left: 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}

.hero-mega-panel.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-left: 1px solid var(--th-border);
    border-bottom: 1px solid var(--th-border);
    border-bottom-right-radius: var(--th-radius-lg);
}

.hero-mega-pane {
    display: none;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.hero-mega-pane.is-active {
    display: block;
}

.hero-mega-pane-inner {
    padding: 1.25rem 1.5rem 1.5rem;
    min-height: 100%;
}

.hero-mega-tip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--th-gray);
}

.hero-mega-tip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.4rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--th-emag-red);
    border: 1px solid var(--th-emag-red);
    border-radius: 3px;
    line-height: 1.2;
}

.hero-mega-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
}

.hero-mega-col-title {
    margin: 0 0 0.65rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

.hero-mega-col-title a {
    color: var(--th-dark);
    text-decoration: none;
}

.hero-mega-col-title a:hover {
    color: var(--th-emag-blue);
}

.hero-mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-mega-links li {
    margin-bottom: 0.35rem;
}

.hero-mega-links a {
    font-size: 0.8125rem;
    color: var(--th-gray);
    text-decoration: none;
    line-height: 1.35;
}

.hero-mega-links a:hover {
    color: var(--th-emag-blue);
    text-decoration: underline;
}

.hero-mega-group {
    margin-top: 0.75rem;
}

.hero-mega-group-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--th-dark);
    margin-bottom: 0.35rem;
}

.hero-mega-links--sub a {
    font-size: 0.75rem;
}

.hero-layout--emag.is-mega-open .hero-carousel {
    pointer-events: none;
}

@media (max-width: 1199.98px) {
    .hero-mega-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.hero-carousel {
    height: var(--th-hero-height);
    border-radius: var(--th-radius-lg);
    overflow: hidden;
    box-shadow: var(--th-shadow);
}

.hero-layout--emag .hero-carousel {
    height: 100%;
    min-height: 0;
    border-radius: 0;
    border-bottom-right-radius: var(--th-radius-lg);
    box-shadow: none;
    border: 0;
    border-right: 1px solid var(--th-border);
    overflow: hidden;
}

.hero-layout--emag .hero-carousel .carousel-inner,
.hero-layout--emag .hero-carousel .carousel-item,
.hero-layout--emag .hero-slide {
    height: 100% !important;
    min-height: 0 !important;
}

.hero-layout--emag .hero-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    margin: 0 4px;
}

.hero-layout--emag .hero-indicators .active {
    background-color: var(--th-emag-red);
}

.hero-layout--emag .hero-indicators [data-bs-target]:not(.active) {
    background-color: var(--th-emag-blue-bright);
    opacity: 0.55;
}

.hero-carousel .carousel-inner {
    height: var(--th-hero-height) !important;
    overflow: hidden;
}

.hero-carousel .carousel-item {
    height: var(--th-hero-height) !important;
    min-height: var(--th-hero-height);
}

.hero-slide {
    position: relative;
    height: var(--th-hero-height) !important;
    min-height: var(--th-hero-height);
    width: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.85) 0%, rgba(17, 24, 39, 0.45) 55%, rgba(17, 24, 39, 0.2) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem 3rem;
    max-width: 520px;
    color: var(--th-on-primary);
}

.hero-badge-label {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--th-emag-blue);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-buttons .btn-lg {
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    border-radius: var(--th-radius);
}

.hero-discount-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 3;
    background: var(--th-emag-red);
    color: var(--th-on-primary);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    box-shadow: var(--th-shadow-lg);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    width: 100px;
    height: 100px;
    border-radius: 12px;
    transform: rotate(-5deg);
}

.hero-discount-badge .badge-up {
    font-size: 0.625rem;
    font-weight: 600;
    opacity: 0.9;
}

.hero-discount-badge .badge-off {
    font-size: 1.125rem;
    line-height: 1.1;
}

.hero-indicators {
    margin-bottom: 1rem;
}

.hero-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.6;
}

.hero-indicators button.active {
    opacity: 1;
    background: var(--th-primary);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   SERVICES BAR (sub hero slider)
   -------------------------------------------------------------------------- */
.services-section {
    padding: 1rem 0 1.5rem;
    background-color: var(--th-surface);
}

.services-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 1.5rem 2rem;
    padding: 1.25rem 2rem;
    background: var(--th-surface-muted);
    border-radius: 12px;
    border: 1px solid var(--th-border-muted);
}

.services-bar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    min-width: 0;
}

.services-bar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.65rem;
    line-height: 1;
    color: var(--th-text-secondary);
}

.services-bar-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.services-bar-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--th-text);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.services-bar-desc {
    display: block;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--th-text-muted);
    line-height: 1.3;
}

@media (max-width: 991.98px) {
    .services-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem 1.5rem;
        padding: 1.25rem 1.5rem;
    }

    .services-bar-item {
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .services-bar {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.125rem 1.25rem;
    }
}

/* --------------------------------------------------------------------------
   SECTIONS
   -------------------------------------------------------------------------- */
.bg-section {
    background-color: var(--th-bg);
}

.section-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--th-text);
    letter-spacing: -0.02em;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-primary);
    text-decoration: none;
}

.section-link:hover {
    color: var(--th-primary-dark);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   CATEGORIES — patrate rotunjite
   -------------------------------------------------------------------------- */
.categories-section {
    padding: 1.75rem 0 2.25rem;
    background-color: var(--th-surface);
}

.categories-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem 0.75rem;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    text-align: center;
    text-decoration: none;
    color: var(--th-text);
    transition: color 0.15s ease;
}

.category-item:hover {
    color: var(--th-primary);
}

.category-item-thumb {
    display: block;
    width: 80px;
    height: 80px;
    background: var(--th-surface-muted);
    border: 1px solid var(--th-border-subtle);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.category-item-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.2s ease;
}

.category-item:hover .category-item-thumb {
    background: var(--th-emag-blue-hover-bg);
    border-color: var(--th-emag-blue-hover-border);
    box-shadow: 0 4px 12px var(--th-shadow-primary);
}

.category-item:hover .category-item-thumb img {
    transform: scale(1.05);
}

.category-item-label {
    max-width: 7.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
}

.category-item--deals .category-item-thumb {
    background: var(--th-emag-red-soft);
    border-color: var(--th-emag-red-border);
}

.category-item--deals:hover {
    color: var(--th-emag-red);
}

.category-item--deals:hover .category-item-thumb {
    background: var(--th-emag-red-hover-bg);
    border-color: var(--th-emag-red-hover-border);
    box-shadow: 0 4px 12px var(--th-shadow-danger);
}

@media (min-width: 992px) {
    .categories-row {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: flex-start;
        width: 100%;
    }

    /* Aceeasi latime la toate → distanta egala intre ele */
    .category-item {
        flex: 0 0 7.5rem;
        width: 7.5rem;
        align-items: center;
    }

    .category-item-thumb {
        width: 120px;
        height: 120px;
    }

    .category-item-label {
        width: 100%;
        max-width: 100%;
        font-size: 0.875rem;
    }
}

@media (max-width: 575.98px) {
    .categories-row {
        display: flex;
        flex-wrap: nowrap;
        gap: 1.1rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0 0.75rem 0.5rem;
        margin: 0 -0.75rem;
    }

    .categories-row::-webkit-scrollbar {
        display: none;
    }

    .category-item {
        flex: 0 0 auto;
        width: 96px;
        scroll-snap-align: start;
    }

    .category-item-thumb {
        width: 96px;
        height: 96px;
    }
}

/* --------------------------------------------------------------------------
   PRODUCT CARDS — catalog profesional
   -------------------------------------------------------------------------- */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--th-border-card);
    border-radius: 10px;
    overflow: hidden;
    background: var(--th-white);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.product-card:hover {
    border-color: var(--th-emag-blue-hover-border);
    box-shadow: 0 8px 28px var(--th-shadow-primary);
    transform: translateY(-3px);
}

.product-card--flash {
    border-color: var(--th-emag-red-border);
}

.product-card--flash:hover {
    border-color: #f1aeb5;
    box-shadow: 0 8px 28px rgba(226, 6, 19, 0.1);
}

.product-card-media {
    position: relative;
    flex-shrink: 0;
}

.product-card-badges {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    pointer-events: none;
}

.product-card-discount {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--th-on-primary);
    background: var(--th-emag-red);
    border-radius: 4px;
    line-height: 1;
}

.product-card-wishlist {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--th-gray);
    font-size: 0.95rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-card-wishlist:hover,
.product-card-wishlist.active {
    color: var(--th-emag-red);
    border-color: #fecaca;
    background: var(--th-white);
}

.product-card-img-link {
    display: block;
    text-decoration: none;
}

.product-card-img {
    position: relative;
    padding-top: 100%;
    background: #f0f0f0;
    overflow: hidden;
}

.product-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

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

.product-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem 1rem 1rem;
}

.product-card-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--th-dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    transition: color 0.15s ease;
}

.product-card-title:hover {
    color: var(--th-emag-blue);
}

.product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.1rem;
}

.product-card-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    line-height: 1;
}

.product-card-stars .bi-star-fill,
.product-card-stars .bi-star-half {
    color: var(--th-warning);
    font-size: 0.7rem;
}

.product-card-stars .bi-star {
    color: #e5e7eb;
    font-size: 0.7rem;
}

.product-card-reviews {
    font-size: 0.75rem;
    color: var(--th-gray-light);
    line-height: 1;
}

.product-card-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    margin-top: 0.1rem;
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--th-dark);
    line-height: 1.1;
}

.product-card--flash .product-card-price {
    color: var(--th-emag-red);
}

.product-card-price-old {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--th-gray-light);
    text-decoration: line-through;
    line-height: 1.2;
}

.product-card-stock {
    margin-top: 0.15rem;
}

.product-card-stock-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--th-gray);
}

.product-card-stock-bar {
    height: 5px;
    background: #ececec;
    border-radius: 999px;
    overflow: hidden;
}

.product-card-stock-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--th-emag-red) 0%, #ff4d5a 100%);
    border-radius: inherit;
    transition: width 0.3s ease;
}

.product-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    margin-top: auto;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--th-emag-blue);
    border-radius: 8px;
    background: var(--th-white);
    color: var(--th-emag-blue);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.product-card-cta:hover {
    background: var(--th-emag-blue);
    border-color: var(--th-emag-blue);
    color: var(--th-on-primary);
}

.product-card--flash .product-card-cta {
    border-color: var(--th-emag-red);
    color: var(--th-emag-red);
}

.product-card--flash .product-card-cta:hover {
    background: var(--th-emag-red);
    border-color: var(--th-emag-red);
    color: var(--th-on-primary);
}

/* Compatibilitate vechi (sidebar / alte zone) */
.discount-badge {
    background: var(--th-emag-red);
    color: var(--th-on-primary);
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
}

.btn-wishlist {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: var(--th-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--th-shadow);
    color: var(--th-gray);
}

.price-current {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--th-dark);
}

.price-old {
    font-size: 0.8125rem;
    color: var(--th-gray-light);
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   COUNTDOWN
   -------------------------------------------------------------------------- */
.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--th-dark);
    color: var(--th-on-primary);
    min-width: 48px;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.2;
}

.countdown-box small {
    font-size: 0.5625rem;
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
}

.countdown-sep {
    font-weight: 700;
    color: var(--th-dark);
    align-self: center;
}

/* --------------------------------------------------------------------------
   PROMO BANNERS
   -------------------------------------------------------------------------- */
.promo-banner {
    position: relative;
    min-height: 200px;
    display: block;
}

.promo-banner-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.promo-banner:hover .promo-banner-bg {
    transform: scale(1.05);
}

.promo-banner-content {
    position: relative;
    z-index: 2;
    padding: 1.75rem;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-banner h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--th-on-primary);
    margin-bottom: 0.75rem;
    line-height: 1.25;
}

.promo-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

.promo-dark .promo-banner-overlay,
.promo-dark .promo-banner-bg::after {
    content: '';
}

.promo-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.5) 100%);
    z-index: 1;
}

.promo-blue::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--th-primary-rgb), 0.92) 0%, rgba(var(--th-primary-rgb), 0.55) 100%);
    z-index: 1;
}

.promo-wood::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.88) 0%, rgba(69, 26, 3, 0.6) 100%);
    z-index: 1;
}

/* --------------------------------------------------------------------------
   WHY CHOOSE
   -------------------------------------------------------------------------- */
.why-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--th-white);
    border-radius: var(--th-radius-lg);
    font-size: 1.75rem;
    color: var(--th-primary);
    box-shadow: var(--th-shadow);
}

.why-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.why-desc {
    font-size: 0.8125rem;
}

/* --------------------------------------------------------------------------
   RECENZII CLIENTI — feedback-block (accent stanga)
   -------------------------------------------------------------------------- */
.testimonials-section {
    background-color: var(--th-surface);
}

.feedback-block {
    display: flex;
    flex-direction: column;
    padding: 1.15rem;
    background: var(--th-surface-subtle);
    border-radius: 10px;
    transition: background-color 0.15s ease;
}

.feedback-block:hover {
    background: #f3f7fb;
}

.feedback-block-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
}

.feedback-block-initials {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--th-emag-blue-dark);
    background: var(--th-emag-blue-soft);
}

.feedback-block-meta {
    flex: 1;
    min-width: 0;
}

.feedback-block-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    font-style: normal;
    color: var(--th-dark);
    line-height: 1.25;
    margin-bottom: 0.2rem;
}

.feedback-block-rating {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    line-height: 1;
}

.feedback-block-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.05rem;
    color: var(--th-warning);
    font-size: 0.6875rem;
    line-height: 1;
}

.feedback-block-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--th-success);
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1;
}

.feedback-block-verified .bi {
    display: block;
    flex-shrink: 0;
    font-size: 0.8125rem;
    line-height: 1;
}

.feedback-block-verified-text {
    line-height: 1;
    transform: translateY(1px);
}

.feedback-block-text {
    flex: 1;
    margin: 0 0 0.875rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--th-text-secondary);
}

.feedback-block-product {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--th-border-light);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--th-emag-blue);
    text-decoration: none;
    line-height: 1.3;
}

.feedback-block-product:hover {
    color: var(--th-emag-blue-dark);
}

.feedback-block-product img {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--th-white);
    border: 1px solid #e5e9ed;
}

.feedback-block-product span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* --------------------------------------------------------------------------
   BRANDS
   -------------------------------------------------------------------------- */
.brand-logo {
    font-size: 1rem;
    font-weight: 800;
    color: var(--th-gray-light);
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.brand-logo:hover {
    opacity: 1;
    color: var(--th-gray);
}

/* --------------------------------------------------------------------------
   NEWSLETTER — banda compacta
   -------------------------------------------------------------------------- */
.site-footer-newsletter {
    padding: 1.15rem 0;
    background: linear-gradient(90deg, var(--th-emag-blue-dark) 0%, var(--th-emag-blue) 45%, var(--th-emag-blue-bright) 100%);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.newsletter-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

@media (min-width: 768px) {
    .newsletter-panel {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
    }
}

.newsletter-intro {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    color: var(--th-on-primary);
}

@media (min-width: 768px) {
    .newsletter-intro {
        flex-shrink: 0;
    }
}

.newsletter-intro-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
}

.newsletter-intro-text {
    min-width: 0;
}

.newsletter-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--th-on-primary);
    white-space: nowrap;
}

.newsletter-subtitle {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--th-on-primary-muted);
}

.newsletter-signup {
    flex: 1;
    min-width: 0;
}

@media (min-width: 768px) {
    .newsletter-signup {
        flex: 0 1 auto;
        margin-left: auto;
    }
}

.newsletter-form {
    width: 100%;
}

@media (min-width: 768px) {
    .newsletter-form {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        width: auto;
        max-width: 100%;
    }
}

.newsletter-controls {
    width: 100%;
}

@media (min-width: 576px) {
    .newsletter-controls {
        width: max-content;
        max-width: 100%;
    }
}

.newsletter-legal {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    line-height: 1.45;
    text-align: left;
    color: var(--th-on-primary-muted);
}

.newsletter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.4rem;
}

.newsletter-input {
    width: 100%;
    max-width: 100%;
    height: 40px;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: var(--th-dark);
    background: var(--th-white);
    border: 0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.newsletter-input::placeholder {
    color: var(--th-gray-light);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--th-emag-blue-bright);
    box-shadow: 0 0 0 2px var(--th-focus-ring);
}

.newsletter-btn {
    height: 40px;
    padding: 0 1.1rem;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 8px;
    white-space: nowrap;
    background: var(--th-emag-red);
    border: 1px solid var(--th-emag-red);
    color: var(--th-on-primary);
}

.newsletter-btn:hover,
.newsletter-btn:focus {
    background: var(--th-emag-red-dark);
    border-color: var(--th-emag-red-dark);
    color: var(--th-on-primary);
}

@media (min-width: 576px) {
    .newsletter-input--name,
    .newsletter-input--email {
        flex: 0 0 280px;
        width: 280px;
        max-width: 280px;
    }

    .newsletter-btn {
        flex: 0 0 auto;
    }
}

/* --------------------------------------------------------------------------
   SIDEBAR PRODUCTS (Recently / Trending)
   -------------------------------------------------------------------------- */
.sidebar-products-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.sidebar-products-title .bi {
    color: var(--th-emag-blue);
}

.browsing-history-viewed {
    display: block;
    font-size: 0.75rem;
    color: var(--th-gray);
    margin-bottom: 0.2rem;
}

.browsing-history-empty {
    margin: 0;
    font-size: 0.875rem;
    color: var(--th-gray);
}

.sidebar-product-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--th-border);
    color: var(--th-dark);
    transition: background 0.2s ease;
}

.sidebar-product-item:last-child {
    border-bottom: 0;
}

.sidebar-product-item:hover {
    background: var(--th-bg);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--th-radius);
}

.sidebar-product-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-product-price {
    color: var(--th-primary);
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    background: transparent;
}

.site-footer-main {
    background: var(--th-footer);
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 0;
}

.footer-about {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-heading {
    color: var(--th-on-primary);
    font-size: 0.9375rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--th-on-primary);
}

.social-link {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--th-on-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.social-link:hover {
    background: var(--th-primary);
    color: var(--th-on-primary);
}

.footer-copyright {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.8125rem;
}

.footer-bottom-links a:hover {
    color: var(--th-on-primary);
}

/* --------------------------------------------------------------------------
   BACK TO TOP
   -------------------------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--th-primary);
    color: var(--th-on-primary);
    border: 0;
    border-radius: var(--th-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--th-shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1040;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--th-primary-dark);
    color: var(--th-on-primary);
}

/* --------------------------------------------------------------------------
   TOAST / CART FEEDBACK
   -------------------------------------------------------------------------- */
.cart-toast {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    background: var(--th-dark);
    color: var(--th-on-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--th-radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--th-shadow-lg);
    z-index: 1050;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.cart-toast.show {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 1200px) {
    :root {
        --th-page-x: 1rem;
    }
}

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    :root {
        --th-hero-height: 320px;
    }

    .navbar-emag-grid {
        grid-template-columns: 1fr auto;
    }

    .navbar-emag-sidebar-col {
        display: none;
    }

    .hero-layout,
    .hero-layout--emag {
        grid-template-columns: 1fr;
        height: var(--th-hero-height);
        gap: 0;
    }

    .hero-layout--emag .hero-carousel {
        border-left: 1px solid var(--th-border);
        border-top: 0;
        border-radius: var(--th-radius-lg);
    }

    .header-main,
    .header-main--toolhub,
.header-main--emag {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 0.75rem 1rem;
        min-height: auto;
        padding: 0.75rem 0;
    }

    .logo {
        grid-column: 1;
        grid-row: 1;
    }

    .header-actions {
        grid-column: 2;
        grid-row: 1;
        gap: 0.75rem;
    }

    .header-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .header-action-text {
        display: none;
    }

    .header-actions--toolhub .header-action-chevron {
        display: none;
    }

    .hero-slide-content {
        padding: 2rem 1.5rem;
    }

    .hero-discount-badge {
        width: 80px;
        height: 80px;
        font-size: 0.9rem;
        top: 1rem;
        right: 1rem;
    }

    .promo-banner {
        min-height: 180px;
    }
}

@media (max-width: 767.98px) {
    :root {
        --th-topbar-height: 40px;
        --th-header-height: auto;
        --th-hero-height: 280px;
    }

    .header-main {
        padding: 0.65rem 0;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-desc {
        font-size: 0.875rem;
    }

    .hero-buttons .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .countdown-wrap {
        width: 100%;
        justify-content: flex-start;
    }

    .newsletter-intro {
        justify-content: center;
        text-align: center;
    }

    .newsletter-signup {
        text-align: center;
    }

    .newsletter-form {
        align-items: stretch;
    }

    .newsletter-legal {
        text-align: left;
    }

    .newsletter-row {
        justify-content: stretch;
    }

    .newsletter-input--name,
    .newsletter-input--email {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* Bootstrap overrides */
.btn-primary {
    background-color: var(--th-primary);
    border-color: var(--th-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--th-primary-dark);
    border-color: var(--th-primary-dark);
}

.btn-primary:active,
.btn-primary.active {
    background-color: var(--th-emag-blue-dark);
    border-color: var(--th-emag-blue-dark);
}

.btn-danger {
    background-color: var(--th-emag-red);
    border-color: var(--th-emag-red);
}

.btn-danger:hover,
.btn-danger:focus {
    background-color: var(--th-emag-red-dark);
    border-color: var(--th-emag-red-dark);
}

.badge-genius {
    background: var(--th-emag-genius);
    color: var(--th-on-primary);
}

.btn-outline-primary {
    color: var(--th-primary);
    border-color: var(--th-primary);
}

.btn-outline-primary:hover {
    background-color: var(--th-primary);
    border-color: var(--th-primary);
}

.text-primary {
    color: var(--th-primary) !important;
}

.bg-primary {
    background-color: var(--th-primary) !important;
}

.progress-bar {
    background-color: var(--th-primary);
}
/* ==========================================================================
   PDP — product detail (ToolHub) — stil profesional
   ========================================================================== */

.pdp {
    --pdp-radius: 12px;
    --pdp-radius-sm: 8px;
    --pdp-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 24px rgba(15, 23, 42, 0.06);
    --pdp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --pdp-line: #e8ecf1;
    --pdp-muted-bg: #f6f8fa;
    --pdp-price: #1a1a1a;
    --pdp-accent: var(--th-primary);
    padding: 0 0 4rem;
    background: var(--th-bg);
}

.pdp > .container {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-top: 0.5rem;
}

.pdp > .container > .pdp-crumb {
    margin-bottom: 0.5rem;
    padding: 0;
    box-sizing: border-box;
}

.pdp-crumb {
    --th-crumb-row: 2.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem 0.75rem;
    width: 100%;
    height: var(--th-crumb-row);
    min-height: var(--th-crumb-row);
    margin-bottom: 0.8rem;
    padding: 0;
    box-sizing: border-box;
}

.pdp-breadcrumb {
    --bs-breadcrumb-divider: "";
    --bs-breadcrumb-padding-x: 0;
    --bs-breadcrumb-padding-y: 0;
    --bs-breadcrumb-margin-bottom: 0;
    --bs-breadcrumb-item-padding-x: 0;
    --bs-breadcrumb-divider-color: transparent;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 0.75rem;
    line-height: 1;
    flex: 1;
    min-width: 0;
}

.pdp-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
    align-self: stretch;
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.pdp-breadcrumb .breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
}

.pdp-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    float: none !important;
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: stretch;
    width: auto;
    height: 100%;
    padding: 0 0.4rem;
    margin: 0;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: 400 !important;
    font-size: 0.625rem;
    line-height: 1;
    color: #cbd5e1;
    content: "\f285";
}

.pdp-breadcrumb .breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    height: 100%;
    line-height: 1;
    color: #64748b;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.pdp-breadcrumb .breadcrumb-item a span {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.pdp-breadcrumb .breadcrumb-item a:hover {
    color: var(--pdp-accent);
}

.pdp-breadcrumb .breadcrumb-item:first-child a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    line-height: 1;
}

.pdp-breadcrumb .breadcrumb-item.active {
    display: flex;
    align-items: center;
    height: 100%;
    color: #1e293b;
    font-weight: 600;
    line-height: 1;
    max-width: min(100%, 22rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdp-sku {
    display: inline-flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    background: #f1f5f9;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    line-height: 1;
}

.pdp-board {
    margin-bottom: 1.75rem;
    background: var(--th-surface);
    border: 1px solid var(--pdp-line);
    border-radius: var(--pdp-radius);
    box-shadow: var(--pdp-shadow);
    overflow: hidden;
}

.pdp-board-col {
    padding: 1.5rem 1.75rem;
}

.pdp-board-col--gallery {
    background: var(--pdp-muted-bg);
    border-right: 1px solid var(--pdp-line);
}

.pdp-board-right {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pdp-board-head {
    padding: 1.5rem 1.75rem 1.35rem;
    border-bottom: 1px solid var(--pdp-line);
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.pdp-board-head .pdp-title {
    margin-bottom: 0.45rem;
}

.pdp-board-head .pdp-rating {
    margin-bottom: 0;
}

.pdp-board-body {
    flex: 1;
}

.pdp-board-col--detail {
    border-right: 1px solid var(--pdp-line);
}

.pdp-board-col--buy {
    display: flex;
    align-items: flex-start;
}

/* Galerie */
.pdp-gallery-wrap {
    max-width: 100%;
}

.pdp-gallery-square {
    position: relative;
    width: 100%;
}

.pdp-gallery-square::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.pdp-gallery-stage {
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: var(--pdp-radius-sm);
    overflow: hidden;
    box-shadow: var(--pdp-shadow-sm);
}

.pdp-gallery-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.pdp-badge-sale {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.625rem;
    padding: 0 0.65rem;
    box-sizing: border-box;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--th-on-primary);
    background: var(--th-emag-red);
    border-radius: 5px;
}

.pdp-thumbs-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
}

.pdp-thumbs-track {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.pdp-thumbs-track::-webkit-scrollbar {
    display: none;
}

.pdp-thumbs-nav {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--pdp-line);
    border-radius: 6px;
    background: #fff;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.pdp-thumbs-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.pdp-thumbs-nav:not(:disabled):hover {
    border-color: var(--pdp-accent);
    color: var(--pdp-accent);
}

.pdp-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--pdp-radius-sm);
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    box-shadow: var(--pdp-shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pdp-thumb.is-active {
    border-color: var(--pdp-accent);
    box-shadow: 0 0 0 1px var(--pdp-accent);
}

.pdp-thumb:hover:not(.is-active) {
    border-color: #cbd5e1;
}

.pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Detalii */
.pdp-detail {
    min-width: 0;
}

.pdp-title {
    font-size: clamp(1.2rem, 1.6vw, 1.375rem);
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    margin: 0 0 0.75rem;
    letter-spacing: -0.015em;
}

.pdp-rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.pdp-rating .product-stars {
    color: #f59e0b;
}

.pdp-rating-val {
    font-weight: 700;
    color: #111827;
}

.pdp-rating-sep {
    color: #cbd5e1;
}

.pdp-rating-link {
    color: var(--pdp-accent);
    text-decoration: none;
    font-weight: 500;
}

.pdp-rating-link:hover {
    text-decoration: underline;
}

.pdp-delivery-options {
    margin: 0 0 1.35rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.pdp-delivery-options li {
    display: grid;
    grid-template-columns: 1.5rem 1fr auto;
    align-items: center;
    gap: 0.65rem 1rem;
    padding: 0.75rem 0;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--pdp-line);
}

.pdp-delivery-options li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pdp-delivery-options li:first-child {
    padding-top: 0;
}

.pdp-delivery-options i {
    font-size: 1.125rem;
    color: var(--pdp-accent);
    line-height: 1;
}

.pdp-delivery-label {
    font-weight: 600;
    color: #111827;
    display: block;
    line-height: 1.3;
}

.pdp-delivery-meta {
    color: #64748b;
    text-align: right;
    white-space: nowrap;
    font-size: 0.75rem;
}

.pdp-delivery-meta strong {
    color: #111827;
    font-weight: 700;
}

.pdp-benefits-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin: 0 0 0.75rem;
}

.pdp-benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pdp-benefits-grid li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.35;
}

.pdp-benefits-grid i {
    color: var(--pdp-accent);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Buy box — același plan cu restul board-ului, fără card în card */
.pdp-buybox {
    position: sticky;
    top: 1.25rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.pdp-buybox-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0;
}

.pdp-buybox-prices {
    min-width: 0;
}

.pdp-price-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.6rem;
}

.pdp-price {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--pdp-price);
    letter-spacing: -0.03em;
}

.pdp-price-was {
    font-size: 0.875rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.pdp-save-line {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.15rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #047857;
    background: #ecfdf5;
    border-radius: 4px;
}

.pdp-stock {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.3rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #047857;
    background: #ecfdf5;
    border-radius: 999px;
}

.pdp-stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.pdp-buybox-cta {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0;
}

.pdp-qty {
    display: inline-flex;
    flex-shrink: 0;
    border: none;
    border-radius: var(--pdp-radius-sm);
    overflow: hidden;
    background: var(--pdp-muted-bg);
}

.pdp-qty-btn {
    width: 2.5rem;
    height: 2.875rem;
    border: none;
    background: var(--pdp-muted-bg);
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}

.pdp-qty-btn:hover {
    background: #e8ecf1;
}

.pdp-qty-input {
    width: 2.5rem;
    height: 2.875rem;
    border: none;
    border-left: 1px solid rgba(15, 23, 42, 0.06);
    border-right: 1px solid rgba(15, 23, 42, 0.06);
    background: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 0.9375rem;
    color: #111827;
    -moz-appearance: textfield;
}

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

.pdp-buybox-cta .pdp-add-btn {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.15rem;
    min-height: 2.875rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    border: none;
    border-radius: var(--pdp-radius-sm);
    background: linear-gradient(180deg, var(--th-emag-blue-bright) 0%, var(--th-primary) 100%);
    box-shadow: 0 2px 6px rgba(0, 116, 194, 0.28);
    transition: box-shadow 0.2s, transform 0.15s;
}

.pdp-buybox-cta .pdp-add-btn:hover {
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 116, 194, 0.35);
    transform: translateY(-1px);
}

.pdp-wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    align-self: center;
    margin: 0.25rem 0 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: color 0.15s;
}

.pdp-wa-btn:hover {
    color: #166534;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pdp-wa-btn i {
    font-size: 1.125rem;
    color: #25d366;
}

/* Tab-uri & continut */
.pdp-content {
    background: var(--th-surface);
    border: 1px solid var(--pdp-line);
    border-radius: var(--pdp-radius);
    box-shadow: var(--pdp-shadow-sm);
    overflow: hidden;
}

.pdp-tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0 1rem;
    background: var(--pdp-muted-bg);
    border-bottom: 1px solid var(--pdp-line);
    overflow-x: auto;
    scrollbar-width: none;
}

.pdp-tabs::-webkit-scrollbar {
    display: none;
}

.pdp-tab {
    padding: 0.9rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
}

.pdp-tab:hover {
    color: #111827;
}

.pdp-tab.is-active {
    color: var(--pdp-accent);
    border-bottom-color: var(--pdp-accent);
    font-weight: 600;
    background: #fff;
}

.pdp-panels {
    padding: 1.75rem 2rem 2rem;
}

.pdp-panel {
    display: none;
    scroll-margin-top: 5rem;
}

.pdp-panel.is-active {
    display: block;
}

.pdp-panel p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1rem;
}

.pdp-lead {
    font-size: 1.0625rem !important;
    color: #111827 !important;
    font-weight: 500;
    line-height: 1.55 !important;
}

.pdp-features {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.pdp-features li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.5;
}

.pdp-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pdp-accent);
}

.pdp-specs {
    margin: 0;
    border: 1px solid var(--pdp-line);
    border-radius: var(--pdp-radius-sm);
    overflow: hidden;
}

.pdp-specs > div {
    display: grid;
    grid-template-columns: minmax(140px, 34%) 1fr;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background: #fff;
    border-bottom: 1px solid var(--pdp-line);
}

.pdp-specs > div:nth-child(even) {
    background: var(--pdp-muted-bg);
}

.pdp-specs > div:last-child {
    border-bottom: none;
}

.pdp-specs dt {
    margin: 0;
    font-weight: 600;
    color: #64748b;
}

.pdp-specs dd {
    margin: 0;
    color: #111827;
}

.pdp-reviews-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--pdp-line);
}

.pdp-reviews-score {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.pdp-reviews-count {
    font-size: 0.875rem;
    color: #64748b;
}

.pdp-review {
    margin: 0;
    padding: 1.15rem 1.25rem;
    background: var(--pdp-muted-bg);
    border: 1px solid var(--pdp-line);
    border-radius: var(--pdp-radius-sm);
    font-size: 0.875rem;
}

.pdp-review footer {
    font-size: 0.8125rem;
    color: #64748b;
    margin-bottom: 0.45rem;
}

.pdp-review p {
    margin: 0 !important;
    color: #475569 !important;
}

.pdp-related {
    margin-top: 2.5rem;
}

.pdp-related-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #111827;
    margin-bottom: 1.25rem;
}

.pdp-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--pdp-line);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(8px);
}

.pdp-sticky-price {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--pdp-price);
    flex-shrink: 0;
}

.pdp-sticky .pdp-add-btn {
    flex: 1;
    min-width: 0;
    min-height: 2.75rem;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: var(--pdp-radius-sm);
    background: linear-gradient(180deg, var(--th-emag-blue-bright) 0%, var(--th-primary) 100%);
    box-shadow: 0 2px 6px rgba(0, 116, 194, 0.25);
}

@media (max-width: 991.98px) {
    .pdp {
        padding-bottom: 5.5rem;
    }

    .pdp-board-col {
        padding: 1.25rem;
        border-right: none !important;
        border-bottom: 1px solid var(--pdp-line);
    }

    .pdp-board-col--buy {
        border-bottom: none;
    }

    .pdp-board-head {
        padding: 1.25rem;
    }

    .pdp-buybox {
        position: static;
    }

    .pdp-benefits-grid {
        grid-template-columns: 1fr;
    }

    .pdp-buybox-cta {
        flex-direction: column;
    }

    .pdp-qty {
        width: 100%;
        justify-content: center;
    }

    .pdp-buybox-cta .pdp-add-btn {
        width: 100%;
        min-height: 3rem;
    }

    .pdp-panels {
        padding: 1.25rem;
    }
}



/* ==========================================================================
   Checkout
   ========================================================================== */

.checkout {
    --co-radius: 12px;
    --co-radius-sm: 8px;
    --co-line: #e8ecf1;
    --co-muted: #f6f8fa;
    --co-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.07);
    --co-inner-x: 1.25rem;
    --pdp-line: #e8ecf1;
    --pdp-accent: var(--th-primary);
    padding: 0 0 3.5rem;
    background: var(--th-bg);
}

@media (min-width: 1200px) {
    .checkout {
        --co-inner-x: 1.5rem;
    }
}

.checkout > .container {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-top: 0.5rem;
}

.checkout > .container > .pdp-crumb {
    margin-bottom: 0.5rem;
    padding: 0;
    box-sizing: border-box;
}

.checkout-body {
    margin-top: 0;
    padding: 1.25rem 0 2.5rem;
    background: var(--th-surface);
    border-radius: var(--co-radius);
}

@media (min-width: 768px) {
    .checkout-body {
        padding: 1.5rem 0 2.75rem;
    }
}

@media (min-width: 1200px) {
    .checkout-body {
        padding: 1.5rem 0 3rem;
    }
}

.checkout-body .checkout-layout {
    margin-left: 0;
    margin-right: 0;
}

.checkout-body .checkout-layout > :first-child {
    padding-left: var(--co-inner-x);
}

.checkout-body .checkout-layout > :last-child {
    padding-right: var(--co-inner-x);
}

.checkout-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-top: 0;
    margin-bottom: 1.15rem;
    padding: 0 var(--co-inner-x);
}

.checkout-title {
    margin: 0 0 0.2rem;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.checkout-subtitle {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
}

.checkout-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #047857;
    background: #ecfdf5;
    border-radius: 999px;
}

.checkout-secure-badge i {
    font-size: 0.875rem;
}

.checkout-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 1.35rem;
    padding: 0.85rem 1rem;
    background: var(--th-surface);
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.checkout-progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
}

.checkout-progress-num {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 800;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
}

.checkout-progress-step.is-active {
    color: #0f4c81;
}

.checkout-progress-step.is-active .checkout-progress-num {
    background: var(--th-primary);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 116, 194, 0.35);
}

.checkout-progress-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-progress-line {
    flex: 0 0 2rem;
    height: 2px;
    margin: 0 0.35rem;
    background: linear-gradient(90deg, var(--th-primary) 0%, #e2e8f0 100%);
    border-radius: 1px;
}

.checkout-main {
    background: var(--th-surface);
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    padding: 1rem var(--co-inner-x) 1.15rem;
}

.checkout-section {
    padding: 0.85rem 0;
}

.checkout-section:first-child {
    padding-top: 0.35rem;
}

.checkout-section .checkout-note {
    margin-left: 0;
    margin-right: 0;
}

.checkout-section-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.checkout-section-num {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: var(--th-primary);
    border-radius: 8px;
}

.checkout-section-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.015em;
}

.checkout-divider {
    margin: 0;
    border: none;
    border-top: 1px solid var(--co-line);
    opacity: 1;
}

.checkout-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.checkout-input {
    padding: 0.55rem 0.875rem;
    border-color: #dde3ea;
    border-radius: var(--co-radius-sm);
    font-size: 0.875rem;
    line-height: 1.4;
    min-height: 2.625rem;
    background: #fff;
}

.checkout-input.form-select {
    padding-right: 2.25rem;
}

.checkout-input::placeholder {
    color: #94a3b8;
}

.checkout-input:focus {
    border-color: var(--th-primary);
    box-shadow: 0 0 0 3px var(--th-focus-ring);
}

.checkout .select2-container--bootstrap-5 {
    width: 100% !important;
}

.checkout .select2-container--bootstrap-5 .select2-selection--single {
    display: flex;
    align-items: center;
    height: 2.625rem;
    min-height: 2.625rem;
    padding: 0 2.25rem 0 0.875rem;
    border-color: #dde3ea;
    border-radius: var(--co-radius-sm);
    font-size: 0.875rem;
}

.checkout .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.checkout .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--th-primary);
    box-shadow: 0 0 0 3px var(--th-focus-ring);
}

.checkout .select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding: 0;
    margin: 0;
    line-height: 1.4;
    color: #0f172a;
}

.checkout .select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #94a3b8;
}

.checkout .select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    position: absolute;
    top: 0;
    right: 0.65rem;
    width: 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout .select2-container--bootstrap-5.select2-container--disabled .select2-selection {
    background: #f8fafc;
    opacity: 1;
}

.checkout-billing-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.checkout-billing-panel {
    display: none;
}

.checkout-billing-panel.is-active {
    display: block;
    margin-bottom: 1rem;
}

.checkout-row-identity {
    margin-bottom: 1rem;
}

.checkout-row-location {
    margin-bottom: 0;
}

.checkout-row-street {
    margin-top: 0;
}

.checkout-marketing-optin {
    margin-top: 0.65rem;
}

.checkout-marketing-label {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    cursor: pointer;
}

.checkout-marketing-checkbox {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin: 0.1rem 0 0;
    accent-color: var(--th-primary);
    cursor: pointer;
}

.checkout-marketing-text {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
}

.checkout-label-opt {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.checkout-choice--compact .checkout-choice-body--compact {
    min-height: 0;
    padding: 0.5rem 0.65rem;
    gap: 0.5rem;
}

.checkout-choice--compact .checkout-choice-icon.checkout-choice-icon--sm {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1rem;
    border-radius: 8px;
    background: var(--th-emag-blue-soft);
    color: var(--th-primary);
}

.checkout-choice-icon--sm {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
    border-radius: 8px;
}

.checkout-delivery-grid,
.checkout-payment-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0;
}

.checkout-choice--stacked input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.checkout-choice-body--stacked {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 4.75rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-choice--stacked.is-selected .checkout-choice-body--stacked {
    border-color: var(--th-primary);
    box-shadow: 0 0 0 1px rgba(0, 116, 194, 0.12);
    background: #fff;
}

.checkout-choice-radio {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-choice--stacked.is-selected .checkout-choice-radio {
    border-color: var(--th-primary);
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 10px var(--th-primary);
}

.checkout-choice-icon--stacked {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--th-primary);
    background: var(--th-emag-blue-soft);
    border-radius: 8px;
}

.checkout-payment-grid .checkout-choice-icon.checkout-choice-icon--stacked {
    width: 3rem;
    height: 3rem;
    padding: 0.25rem;
    font-size: 1.625rem;
    line-height: 1;
    color: var(--th-primary);
    background: var(--th-emag-blue-soft);
    border-radius: 8px;
    border: none;
}

.checkout-payment-grid .checkout-choice-text {
    flex: 1;
    min-width: 0;
}

.checkout-delivery-grid .checkout-choice-text {
    flex: 1;
    min-width: 0;
}

.checkout-delivery-grid .checkout-choice-text strong,
.checkout-delivery-grid .checkout-choice-text small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checkout-choice-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0.25rem;
    border-radius: 8px;
    background: var(--th-emag-blue-soft);
    border: none;
}

.checkout-choice-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.checkout-choice--stacked .checkout-choice-text strong {
    font-size: 0.875rem;
    font-weight: 700;
}

.checkout-choice--stacked .checkout-choice-text small {
    font-size: 0.75rem;
    color: #64748b;
}

.checkout-choice-extra {
    flex-shrink: 0;
    margin-left: auto;
    text-align: right;
}

.checkout-choice-extra--price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.checkout-choice-extra--price.checkout-free {
    color: #059669;
}

.checkout-payment-brands {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.checkout-payment-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.4rem;
    font-size: 0.5625rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    border-radius: 3px;
    white-space: nowrap;
}

.checkout-payment-brand--visa {
    color: #1a1f71;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.checkout-payment-brand--mc {
    color: #fff;
    background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%);
}

.checkout-choice {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.checkout-choice input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.checkout-choice-body {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    min-height: 0;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid var(--co-line);
    border-radius: var(--co-radius-sm);
    background: #fff;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.checkout-choice.is-selected .checkout-choice-body {
    border-color: var(--th-primary);
    background: linear-gradient(180deg, #fff 0%, var(--th-emag-blue-soft) 100%);
    box-shadow: 0 0 0 1px rgba(0, 116, 194, 0.15);
}

.checkout-choice-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.875rem;
    color: var(--th-primary);
    background: var(--co-muted);
    border-radius: 14px;
}

.checkout-choice-text {
    flex: 1;
    min-width: 0;
}

.checkout-choice-text strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.checkout-choice-text small {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.checkout-choice-price {
    font-size: 0.8125rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.checkout-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.75rem;
    color: #475569;
    background: var(--co-muted);
    border-radius: var(--co-radius-sm);
}

.checkout-note i {
    color: var(--th-success);
    font-size: 0.9375rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.checkout-payment-info {
    margin-top: 0.85rem;
}

.checkout-payment-info-panel {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.55rem 0.8rem;
    min-height: 2.25rem;
    font-size: 0.75rem;
    line-height: 1;
    color: #475569;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: var(--co-radius-sm);
}

.checkout-payment-info-panel[hidden] {
    display: none !important;
}

.checkout-payment-info-panel i {
    color: var(--th-primary);
    font-size: 0.9375rem;
    line-height: 1;
    flex-shrink: 0;
}

.checkout-payment-info-panel p {
    margin: 0;
    flex: 1;
    min-width: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-summary {
    --co-summary-x: var(--co-inner-x);
    position: sticky;
    top: var(--th-masthead-sticky-top);
    display: flex;
    flex-direction: column;
    background: var(--th-surface);
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
    overflow: hidden;
}

.checkout-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem var(--co-summary-x) 0.65rem;
    border-bottom: 1px solid var(--co-line);
}

.checkout-summary-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.checkout-summary-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0369a1;
    background: var(--th-emag-blue-soft);
    border-radius: 999px;
    white-space: nowrap;
}

.checkout-summary-pad {
    padding: 0 var(--co-summary-x) 0.75rem;
}

.checkout-summary-lines-wrap,
.checkout-summary-foot {
    margin-left: calc(-1 * var(--co-summary-x));
    margin-right: calc(-1 * var(--co-summary-x));
    padding-left: var(--co-summary-x);
    padding-right: var(--co-summary-x);
}

.checkout-summary-lines-wrap {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    background: #fafbfc;
}

.checkout-lines {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.checkout-line-card {
    padding: 0.65rem;
    background: #fff;
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius-sm);
}

.checkout-line-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.checkout-line-img {
    flex-shrink: 0;
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--co-muted);
    border: 1px solid var(--co-line);
}

.checkout-line-img img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
}

.checkout-line-main {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 64px;
    min-height: 64px;
    max-height: 64px;
}

.checkout-line-stack {
    display: grid;
    grid-template-rows: auto 1fr auto;
    flex: 1;
    min-width: 0;
    height: 100%;
}

.checkout-line-name {
    display: block;
    grid-row: 1;
    align-self: start;
    padding-right: 1.5rem;
    overflow: hidden;
    min-width: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.checkout-line-name:hover {
    color: var(--th-primary);
}

.checkout-line-sku {
    display: block;
    grid-row: 2;
    align-self: center;
    padding-right: 1.5rem;
    margin: 0;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-line-foot {
    grid-row: 3;
    align-self: end;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.checkout-line-qty {
    flex-shrink: 0;
    display: inline-flex;
    border-radius: 6px;
    overflow: hidden;
    background: var(--co-muted);
    border: 1px solid var(--co-line);
}

.checkout-qty-btn {
    width: 1.65rem;
    height: 1.65rem;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 0.8125rem;
    cursor: pointer;
}

.checkout-qty-btn:hover {
    background: #e2e8f0;
}

.checkout-qty-input {
    width: 2rem;
    height: 1.65rem;
    border: none;
    border-left: 1px solid var(--co-line);
    border-right: 1px solid var(--co-line);
    background: #fff;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    -moz-appearance: textfield;
}

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

.checkout-line-total {
    flex-shrink: 0;
    margin-left: auto;
    text-align: right;
    font-size: 0.875rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    line-height: 1.2;
}

.checkout-line-remove {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}

.checkout-line-remove:hover {
    color: var(--th-emag-red);
    background: var(--th-emag-red-soft);
}

.checkout-summary-foot {
    padding-top: 0.65rem;
    padding-bottom: 0;
    border-top: 1px solid var(--co-line);
    background: #fff;
}

.checkout-coupon {
    margin: 0 0 0.65rem;
}

.checkout-coupon-label {
    display: block;
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.checkout-coupon-row {
    display: flex;
    gap: 0.4rem;
    align-items: stretch;
}

.checkout-coupon-input {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--co-radius-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-coupon-input::placeholder {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: #94a3b8;
}

.checkout-coupon-input:focus {
    outline: none;
    border-color: var(--th-primary);
    box-shadow: 0 0 0 3px rgba(0, 116, 194, 0.12);
    background: #fff;
}

.checkout-coupon-btn {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--th-primary);
    background: #fff;
    border: 1px solid var(--th-primary);
    border-radius: var(--co-radius-sm);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.checkout-coupon-btn:hover {
    color: #fff;
    background: var(--th-primary);
}

.checkout-coupon-feedback {
    margin: 0.35rem 0 0;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.35;
}

.checkout-coupon-feedback.is-success {
    color: #059669;
}

.checkout-coupon-feedback.is-error {
    color: #dc2626;
}

.checkout-totals-row--discount dt {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.checkout-coupon-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.125rem;
    height: 1.125rem;
    padding: 0;
    font-size: 0.5rem;
    color: #94a3b8;
    background: #f1f5f9;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.checkout-coupon-remove:hover {
    color: #dc2626;
    background: #fee2e2;
}

.checkout-discount-value {
    color: #059669 !important;
}

.checkout-totals {
    margin: 0 0 0.5rem;
}

.checkout-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.25rem 0;
    font-size: 0.8125rem;
}

.checkout-totals-row dt {
    margin: 0;
    font-weight: 500;
    color: #64748b;
}

.checkout-totals-row dd {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
}

.checkout-shipping-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.65rem;
    padding: 0.4rem 0;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #0369a1;
    background: transparent;
    border-radius: 0;
    line-height: 1.3;
}

.checkout-shipping-hint i {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--th-emag-blue-soft);
}

.checkout-totals-grand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin: 0 0 0.75rem;
    padding: 0.75rem;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8fafc 0%, var(--th-emag-blue-soft) 100%);
    border: 1px solid #d4e8f7;
    border-radius: var(--co-radius-sm);
}

.checkout-totals-grand span {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
}

.checkout-totals-grand strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.checkout-free {
    color: #059669;
    font-weight: 800;
}

.checkout-choice-price.checkout-free {
    color: #059669;
}

.checkout-summary .checkout-submit-btn {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
}

.checkout-submit-btn {
    display: flex;
    width: 100%;
    margin: 0 0 0.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.875rem;
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    border: none;
    border-radius: var(--co-radius-sm);
    background: linear-gradient(180deg, var(--th-emag-blue-bright) 0%, var(--th-primary) 100%);
    box-shadow: 0 4px 14px rgba(0, 116, 194, 0.32);
    transition: box-shadow 0.2s, transform 0.15s;
}

.checkout-submit-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 116, 194, 0.38);
}

.checkout-legal {
    margin: 0 0 0.75rem;
    padding: 0;
    font-size: 0.6875rem;
    line-height: 1.5;
    color: #64748b;
    text-align: center;
}

.checkout-legal a {
    color: #475569;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2px;
    transition: color 0.15s, text-decoration-color 0.15s;
}

.checkout-legal a:hover {
    color: var(--th-primary);
    text-decoration-color: var(--th-primary);
}

.checkout-empty-card {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--th-surface);
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
}

.checkout-empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--th-primary);
    background: var(--th-emag-blue-soft);
    border-radius: 50%;
}

.checkout-empty-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.checkout-empty-card p {
    color: #64748b;
    margin-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
    .checkout-summary {
        position: static;
    }

    .checkout-progress-label {
        display: none;
    }

    .checkout-progress-line {
        flex-basis: 1rem;
    }

    .checkout-billing-type-grid {
        grid-template-columns: 1fr;
    }
}

/* Checkout — success */
.checkout-success-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1rem 0 0.25rem;
}

.checkout-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
}

.checkout-success-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.checkout-success-lead {
    margin: 0;
    max-width: 38rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: #64748b;
}

.checkout-success-lead strong {
    color: #0f172a;
}

.checkout-success-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.checkout-success-meta-item {
    padding: 0.75rem 0.85rem;
    background: var(--co-muted);
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius-sm);
}

.checkout-success-meta-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.checkout-success-meta-value {
    display: block;
    font-size: 0.9375rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.checkout-success-meta-value--total {
    color: var(--th-primary);
}

.checkout-success-layout {
    margin-left: 0;
    margin-right: 0;
}

.checkout-success-card {
    padding: 1rem var(--co-inner-x);
    background: #fff;
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius);
    box-shadow: var(--co-shadow);
}

.checkout-success-card + .checkout-success-card,
.checkout-success-steps {
    margin-top: 1rem;
}

.checkout-success-card-title {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
}

.checkout-success-card-title--spaced {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--co-line);
}

.checkout-success-lines {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checkout-success-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--co-line);
}

.checkout-success-line:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.checkout-success-line:first-child {
    padding-top: 0;
}

.checkout-success-line-img {
    flex-shrink: 0;
    display: block;
    width: 56px;
    height: 56px;
    border-radius: var(--co-radius-sm);
    overflow: hidden;
    border: 1px solid var(--co-line);
    background: #fff;
}

.checkout-success-line-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.checkout-success-line-body {
    flex: 1;
    min-width: 0;
}

.checkout-success-line-name {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    line-height: 1.35;
}

.checkout-success-line-name:hover {
    color: var(--th-primary);
}

.checkout-success-line-meta {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #94a3b8;
}

.checkout-success-line-price {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 800;
    color: #0f172a;
}

.checkout-success-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.checkout-success-timeline li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.checkout-success-step-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--th-primary);
    background: var(--th-emag-blue-soft);
    border-radius: 8px;
}

.checkout-success-timeline strong {
    display: block;
    margin-bottom: 0.1rem;
    font-size: 0.8125rem;
    color: #0f172a;
}

.checkout-success-timeline p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #64748b;
}

.checkout-success-details {
    margin: 0;
}

.checkout-success-details > div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 0.35rem 0.75rem;
    padding: 0.4rem 0;
    font-size: 0.8125rem;
    border-bottom: 1px solid var(--co-line);
}

.checkout-success-details > div:last-child {
    border-bottom: none;
}

.checkout-success-details dt {
    margin: 0;
    font-weight: 600;
    color: #94a3b8;
}

.checkout-success-details dd {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
}

.checkout-success-summary .checkout-totals {
    margin-bottom: 0.5rem;
}

.checkout-success-grand {
    margin-bottom: 1rem;
}

.checkout-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkout-success-btn-secondary {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #475569;
    background: #fff;
    border: 1px solid var(--co-line);
    border-radius: var(--co-radius-sm);
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.checkout-success-btn-secondary:hover {
    color: var(--th-primary);
    border-color: var(--th-primary);
    background: var(--th-emag-blue-soft);
}

@media (max-width: 767.98px) {
    .checkout-success-meta {
        grid-template-columns: 1fr;
    }

    .checkout-success-details > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}



   Category listing page
   ========================================================================== */

.category-page {
    padding: 1.25rem 0 3.5rem;
    background: var(--th-bg);
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    min-height: 2rem;
    margin-bottom: 1.25rem;
    padding: 0;
}

.category-breadcrumb .breadcrumb {
    --bs-breadcrumb-padding-y: 0;
    --bs-breadcrumb-margin-bottom: 0;
    --bs-breadcrumb-item-padding-x: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 2rem;
    font-size: 0.875rem;
    line-height: 1;
    background: transparent;
    padding: 0;
    margin: 0;
}

.category-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.category-breadcrumb .breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
}

.category-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    float: none !important;
    display: flex;
    align-items: center;
    align-self: center;
    height: 2rem;
    padding: 0 0.4rem;
    margin: 0;
    line-height: 1;
}

.category-breadcrumb .breadcrumb-item a {
    display: inline-flex;
    align-items: center;
    height: 2rem;
    line-height: 1;
}

.category-breadcrumb .breadcrumb-item.active {
    display: flex;
    align-items: center;
    height: 2rem;
    line-height: 1;
}

.category-breadcrumb .breadcrumb-item a {
    color: var(--th-primary);
    text-decoration: none;
}

.category-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

.category-breadcrumb .breadcrumb-item.active {
    color: var(--th-text-muted);
}

.category-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.75rem;
    background: var(--th-surface);
    border: 1px solid var(--th-border-card);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.category-header--deals {
    border-color: var(--th-emag-red-border);
    background: linear-gradient(135deg, var(--th-surface) 0%, var(--th-emag-red-soft) 100%);
}

.category-header-media {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--th-surface-muted);
    border: 1px solid var(--th-border-card);
}

.category-header-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--th-text);
}

.category-header--deals .category-title {
    color: var(--th-emag-red);
}

.category-desc {
    font-size: 0.9375rem;
    color: var(--th-text-secondary);
    margin-bottom: 0.5rem;
    max-width: 52rem;
    line-height: 1.5;
}

.category-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-text-muted);
    margin: 0;
}

.category-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.category-toolbar-label {
    font-size: 0.875rem;
    color: var(--th-text-muted);
    white-space: nowrap;
}

.category-sort {
    max-width: 200px;
    border-color: var(--th-border);
}

.category-products {
    margin-bottom: 1rem;
}

.category-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--th-surface);
    border: 1px dashed var(--th-border);
    border-radius: 12px;
}

.category-empty-icon {
    font-size: 2.5rem;
    color: var(--th-text-light);
    margin-bottom: 1rem;
}

.category-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.category-empty-text {
    color: var(--th-text-muted);
    max-width: 28rem;
    margin: 0 auto 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.55;
}

/* Category layout + filters sidebar */
.category-layout {
    align-items: flex-start;
}

.category-sidebar {
    position: sticky;
    top: 1rem;
}

.category-filters-form {
    background: var(--th-surface);
    border: 1px solid var(--th-border-card);
    border-radius: 12px;
    padding: 1rem 1rem 0.5rem;
}

.category-filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--th-border-muted);
}

.category-filters-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--th-text);
}

.category-filters-reset {
    color: var(--th-primary);
    text-decoration: none;
    padding: 0;
    font-weight: 600;
}

.category-filters-reset:hover {
    color: var(--th-primary-dark);
}

.category-filters-active {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.category-filters-active-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--th-text-muted);
}

.category-filter-chip {
    border: 1px solid var(--th-primary);
    background: var(--th-emag-blue-hover-bg);
    color: var(--th-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.category-filter-chip:hover {
    background: var(--th-emag-blue-soft);
}

.filter-group {
    border-bottom: 1px solid var(--th-border-muted);
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--th-text);
    text-align: left;
    cursor: pointer;
}

.filter-group-toggle .bi-chevron-down {
    transition: transform 0.2s;
    color: var(--th-text-muted);
    font-size: 0.8rem;
}

.filter-group.is-open .filter-group-toggle .bi-chevron-down {
    transform: rotate(180deg);
}

.filter-group-body {
    display: none;
    padding-bottom: 0.85rem;
}

.filter-group.is-open .filter-group-body {
    display: block;
}

.filter-check-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.3rem 0;
    cursor: pointer;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.filter-check input {
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--th-primary);
}

.filter-check-label {
    flex: 1;
    color: var(--th-text);
}

.filter-check-count {
    color: var(--th-text-light);
    white-space: nowrap;
}

.filter-price-inputs {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

.filter-price-inputs > div {
    flex: 1;
}

.filter-price-label {
    display: block;
    font-size: 0.75rem;
    color: var(--th-text-muted);
    margin-bottom: 0.2rem;
}

.filter-price-sep {
    color: var(--th-text-light);
    padding-bottom: 0.45rem;
}

.filter-price-range {
    accent-color: var(--th-primary);
}

.category-filters-apply {
    margin: 0.75rem 0 0.5rem;
    font-weight: 700;
}

.category-toolbar {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.category-filters-toggle {
    font-weight: 600;
}

.category-toolbar-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.category-toolbar-results {
    font-size: 0.8125rem;
    color: var(--th-text-muted);
    width: 100%;
}

@media (min-width: 992px) {
    .category-toolbar-results {
        width: auto;
        margin-left: 0.5rem;
    }
}

.category-no-results {
    text-align: center;
    padding: 2.5rem 1rem;
    background: var(--th-surface);
    border: 1px dashed var(--th-border);
    border-radius: 12px;
}

.category-no-results-icon {
    font-size: 2rem;
    color: var(--th-text-light);
    display: block;
    margin-bottom: 0.75rem;
}

.category-filters-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1040;
}

body.category-filters-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .category-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        width: min(320px, 90vw);
        max-width: 100%;
        padding: 1rem;
        background: var(--th-bg);
        overflow-y: auto;
        transform: translateX(-110%);
        transition: transform 0.25s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    }

    .category-sidebar.is-open {
        transform: translateX(0);
    }

    .category-filters-form {
        max-height: none;
    }

    .category-toolbar-sort {
        margin-left: 0;
        flex: 1;
        min-width: 180px;
    }
}
