/* Tiny count badge on the heart + cart icons. */
.ps-icon-circle { position: relative; }
.ps-icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #c0392b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-sizing: border-box;
}

/* Favorited heart = red, filled. Applied via .ps-fav-on class set by JS. */
.ps-product-fav.ps-fav-on { color: #dc2626; }
.ps-product-fav.ps-fav-on:hover { color: #b91c1c; opacity: 1; }
.ps-product-fav.ps-fav-on svg path { fill: currentColor; }

/* === Mini-cart popover (header) === */
.ps-cart-pop {
    position: fixed;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(14, 31, 61, .22);
    z-index: 9999;
    display: none;
    overflow: hidden;
    font-family: var(--ps-font, 'Inter', sans-serif);
    padding: 12px;
}
.ps-cart-pop.ps-open { display: block; }
.ps-cart-pop-head {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    padding: 6px 0 10px;
    border-bottom: 1px solid #f0f1f3;
    margin-bottom: 4px;
}
.ps-cart-pop-body { max-height: 60vh; overflow-y: auto; }
.ps-cart-pop-empty {
    padding: 30px 10px; text-align: center;
    color: #9ca3af; font-size: 13px;
}
.ps-cart-pop-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 32px 80px 22px;
    gap: 10px;
    align-items: center;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f1f3;
}
.ps-cart-pop-row:last-child { border-bottom: 0; }
.ps-cart-pop-img {
    width: 48px; height: 48px;
    border-radius: 6px; overflow: hidden;
    background: #f5f7fa; position: relative;
}
.ps-cart-pop-img img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.ps-cart-pop-name {
    font-size: 12px; line-height: 1.3;
    color: #4a5562; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.ps-cart-pop-name:hover { color: #0d91d3; }
.ps-cart-pop-qty {
    text-align: center; color: #6b7785;
    font-size: 12px; font-weight: 500;
}
.ps-cart-pop-price {
    text-align: right; color: #0d91d3;
    font-weight: 700; font-size: 13px; white-space: nowrap;
}
.ps-cart-pop-x {
    width: 22px; height: 22px;
    border-radius: 4px; background: transparent;
    color: #cbd5e0; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; line-height: 1; padding: 0;
    transition: all .12s ease;
}
.ps-cart-pop-x:hover { background: #f3f4f6; color: #dc2626; }

.ps-cart-pop-total {
    border-top: 1px solid #e5e7eb; margin-top: 4px;
}
.ps-cart-pop-total-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 4px 6px;
    font-size: 13px; color: #4a5562;
}
.ps-cart-pop-total-row strong { color: #1a1a1a; font-weight: 600; }
.ps-cart-pop-total-row span {
    color: #0d91d3; font-weight: 700; font-size: 15px;
}
/* CTA buttons styled to MATCH the product card "Adauga in Cos" button:
   blue body + dark-navy badge on the left with the signature semicircle curve.
   Only the icon inside the badge changes between cart vs favorites. */
.ps-cart-pop-cta {
    position: relative;
    display: block;
    width: 100%;
    height: 40px;
    margin-top: 8px;
    padding: 0 0 0 46px;
    background: #0d91d3;
    color: #fff !important;
    border: 0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    line-height: 40px;
    overflow: hidden;
    cursor: pointer;
}
.ps-cart-pop-cta:hover { filter: brightness(.92); color: #fff !important; text-decoration: none; }
.ps-cart-pop-cta-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 40px;
    background: #0e1f3d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 37% 100% !important;
}
.ps-cart-pop-cta-icon svg { width: 26px; height: 26px; fill: #fff; display: block; }
/* Favorites variant: a touch larger AND outline (fill:none + white stroke)
   so it reads as "view favorites" rather than "you favorited this". */
.ps-fav-pop .ps-cart-pop-cta-icon svg {
    width: 26px;
    height: 26px;
    fill: none !important;
    stroke: #fff;
}

/* === Toast notifications === */
.ps-toast-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.ps-toast {
    background: #1a2a44;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-family: var(--ps-font, 'Inter', sans-serif);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(14, 31, 61, .35);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .25s ease, transform .25s ease;
    pointer-events: auto;
    max-width: 320px;
}
.ps-toast.ps-toast-show {
    opacity: 1;
    transform: translateY(0);
}
.ps-toast-success { background: #16a34a; }
.ps-toast-error   { background: #dc2626; }
.ps-toast-info    { background: #1a2a44; }

/* === Product detail page: quantity stepper + Add-to-cart =================
   Layout: stepper on its own row (label + pill on the right), full-width
   "Adauga in Cos" button below. Tactile + clean, no plain-input look. */
.ps-buy-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

/* Row: "Cantitate" label left, stepper pill right. */
.ps-buy-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ps-buy-qty-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7785;
    letter-spacing: .01em;
}

/* The pill itself — borderless, soft shadow, navy text. */
.ps-buy-qty {
    display: inline-flex;
    align-items: stretch;
    height: 44px;
    background: #fff;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px #e5e8ed,
        0 1px 2px rgba(14, 31, 61, .04),
        0 2px 6px rgba(14, 31, 61, .04);
    overflow: hidden;
    user-select: none;
}
.ps-buy-qty-btn {
    width: 40px;
    border: 0;
    background: transparent;
    color: #1a2a44;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .12s ease, color .12s ease;
}
.ps-buy-qty-btn svg { width: 16px; height: 16px; display: block; }
.ps-buy-qty-btn:hover { background: #f4f7fb; color: #0d91d3; }
.ps-buy-qty-btn:active { background: #e8eef5; }
.ps-buy-qty-btn:focus-visible { outline: 2px solid #0d91d3; outline-offset: -2px; }
.ps-buy-qty-input {
    width: 52px;
    border: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #1a2a44;
    font-family: inherit;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
}
.ps-buy-qty-input::-webkit-outer-spin-button,
.ps-buy-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ps-buy-qty-input:focus { outline: none; }

/* Big cart button — full width, taller (48px) for primary-action presence,
   subtle lift on hover. Inherits the navy-badge + blue-body from .ps-product-add. */
.ps-buy-stack .ps-product-add {
    width: 100%;
    height: 48px;
    margin-top: 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    box-shadow: 0 2px 8px rgba(13, 145, 211, .25);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.ps-buy-stack .ps-product-add:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 145, 211, .35);
}
.ps-buy-stack .ps-product-add:active { transform: translateY(0); }
.ps-buy-stack .ps-product-add-badge {
    height: 48px;
    width: 54px;
    border-bottom-right-radius: 37% 100% !important;
}
.ps-buy-stack .ps-product-add-badge svg { width: 24px; height: 24px; }
.ps-buy-stack .ps-product-add-label { line-height: 48px; }

/* The PDP "Adauga la Favorite" button uses .ps-product-fav so the global JS
   handler in widgets.js triggers it — but .ps-product-fav also carries the
   "small absolute-positioned heart icon" styles from homepage.css (position
   absolute, 38×38, top:10/right:10). That dragged the PDP button to the top
   of the buy-box. This rule restores normal flow for the PDP variant. */
.ps-fav-btn.ps-product-fav {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    z-index: auto !important;
}

/* Defensive: kill the legacy floating Oty FAB button site-wide. It used to
   live in multiple page templates; if a cached page or new template re-adds
   it, this rule still hides it. */
.ps-oty-fab { display: none !important; }

/* === Oty card with the BTA izi logo (sidebar AI assistant) === */
/* Override the original circular illu to host the rectangular pill logo. */
.ps-oty-card-illu.ps-oty-card-illu-img {
    width: auto;
    height: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.ps-oty-card-illu.ps-oty-card-illu-img img {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* === BTA "oti" badge in main nav (after Blog) ===
   Rendered as background-image on the <a>, not via <img>, so it CAN'T be
   suppressed by .ps-menu a styles or any image filter middleware. The <img>
   inside stays for SEO/screen-readers but is visually hidden. */
.ps-menu-izi {
    display: inline-block !important;
    width: 70px;
    height: 40px;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background-color: transparent;
    background-image: url("/legacy-theme/img/izi-beta.svg");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    font-size: 0;
    line-height: 0;
    color: transparent;
    text-decoration: none;
    transition: transform .15s ease, filter .15s ease;
    flex-shrink: 0;
}
.ps-menu-izi:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    border: 0 !important; /* kill the hover border from .ps-menu a:hover */
}
.ps-menu-izi img {
    /* Keep in DOM for a11y/alt text, but don't render — link uses bg-image. */
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* === Account popover (hover on "Contul meu") === */
.ps-account-pop { padding: 14px 14px 12px; }
.ps-account-greet {
    font-size: 15px;
    font-weight: 600;
    color: var(--ps-primary, #395374);
    padding: 4px 4px 12px;
    border-bottom: 1px solid #f0f1f3;
    margin-bottom: 8px;
}
.ps-account-guest-msg {
    font-size: 12px;
    color: #6b7785;
    padding: 0 4px 10px;
    line-height: 1.45;
}
.ps-account-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ps-account-list li { margin: 0; padding: 0; }
.ps-account-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    color: var(--ps-secondary, #454545);
    text-decoration: none;
    font-size: 13px;
    border-radius: 6px;
    transition: background .1s ease, color .1s ease;
}
.ps-account-list a:hover {
    background: #f4f5f7;
    color: var(--ps-accent, #0d91d3);
    text-decoration: none;
}
.ps-account-ic {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .1s ease;
}
.ps-account-ic svg {
    width: 18px;
    height: 18px;
    display: block;
}
.ps-account-list a:hover .ps-account-ic { color: var(--ps-accent, #0d91d3); }
.ps-account-divider {
    height: 1px;
    background: #f0f1f3;
    margin: 8px 4px;
}
.ps-account-logout {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 8px;
    color: #c0392b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
}
.ps-account-logout:hover { background: #fef2f2; color: #c0392b; text-decoration: none; }
.ps-account-logout .ps-account-ic { color: #c0392b; }
.ps-account-secondary {
    display: block;
    text-align: center;
    padding: 8px;
    margin-top: 6px;
    font-size: 13px;
    color: var(--ps-accent, #0d91d3);
    text-decoration: none;
    border-radius: 6px;
}
.ps-account-secondary:hover { background: #f0f7fc; color: var(--ps-accent-dark, #0a7eb8); text-decoration: none; }

/* === Mega-menu panel (hover on left sidebar category) === */
.ps-mega-panel {
    position: fixed;
    background: #fff;
    border: 1px solid var(--ps-border, #e5e5e5);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(14, 31, 61, .18);
    z-index: 9998;
    padding: 18px 22px;
    display: none;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    font-family: var(--ps-font, 'Inter', sans-serif);
}
.ps-mega-panel.ps-open { display: block; }
.ps-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 20px 28px;
}
@media (min-width: 1400px) {
    .ps-mega-grid { grid-template-columns: repeat(5, minmax(180px, 1fr)); }
}
@media (max-width: 1100px) {
    .ps-mega-grid { grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 16px 20px; }
}
.ps-mega-col { min-width: 0; }
.ps-mega-head {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #0e1f3d;
    text-decoration: none;
    margin-bottom: 8px;
    line-height: 1.3;
    border-bottom: 1px solid #f0f1f3;
    padding-bottom: 6px;
}
.ps-mega-head:hover {
    color: var(--ps-accent, #0d91d3);
    text-decoration: none;
}
.ps-mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.ps-mega-list li { margin: 0; padding: 0; }
.ps-mega-list a {
    display: block;
    font-size: 13px;
    color: var(--ps-secondary, #454545);
    text-decoration: none;
    padding: 3px 0;
    line-height: 1.35;
}
.ps-mega-list a:hover {
    color: var(--ps-accent, #0d91d3);
    text-decoration: none;
}
