/* =========================================================================
   ENSTA SHOP — Modern Public Site
   Cairo font + purple theme matching the mobile app.
   ========================================================================= */

:root {
    /* Baderx brand purple. */
    --ensta-primary: #7B5FE0;
    --ensta-primary-dark: #5A45B5;
    --ensta-primary-soft: #EFEAFF;
    --ensta-accent: #FFC847;
    --ensta-success: #2ECC71;
    --ensta-danger: #E74C3C;
    --ensta-bg: #FAFAFC;
    --ensta-surface: #FFFFFF;
    --ensta-text: #1F1F2E;
    --ensta-text-muted: #6B6B80;
    --ensta-divider: #ECECF1;
    --ensta-shadow-sm: 0 2px 8px rgba(95, 87, 161, 0.06);
    --ensta-shadow-md: 0 8px 24px rgba(95, 87, 161, 0.10);
    --ensta-shadow-lg: 0 20px 50px rgba(95, 87, 161, 0.18);
    --ensta-radius-sm: 12px;
    --ensta-radius-md: 18px;
    --ensta-radius-lg: 28px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    background: var(--ensta-bg);
    color: var(--ensta-text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ensta-primary); }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }

.container-ensta {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Top notice bar ─────────────────────────────────────────────────────── */
.ensta-topbar {
    background: linear-gradient(90deg, var(--ensta-primary), var(--ensta-primary-dark));
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
    text-align: center;
}
.ensta-topbar a { color: #FFD978; font-weight: 700; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.ensta-header {
    background: var(--ensta-surface);
    box-shadow: var(--ensta-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}
.ensta-header > .container-ensta { position: relative; }
.ensta-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 0;
    flex-wrap: wrap;
}
.ensta-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--ensta-primary);
}
.ensta-logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--ensta-primary), #8478D6);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
}
.ensta-search {
    flex: 1;
    position: relative;
    max-width: 560px;
}
.ensta-search input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--ensta-divider);
    border-radius: 999px;
    padding: 0 50px;
    background: #F4F4F8;
    font-family: inherit;
    font-size: 14px;
    transition: all .2s;
    outline: none;
}
.ensta-search input:focus {
    border-color: var(--ensta-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(95, 87, 161, 0.10);
}
.ensta-search-icon {
    position: absolute;
    inset-inline-start: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ensta-text-muted);
}
.ensta-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-inline-start: auto;
}
.ensta-nav a {
    font-weight: 600;
    font-size: 14px;
    color: var(--ensta-text);
}
.ensta-nav a:hover { color: var(--ensta-primary); }
.ensta-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    display: grid;
    place-items: center;
    border: none;
    transition: all .15s;
    position: relative;
}
.ensta-icon-btn:hover { background: var(--ensta-primary); color: #fff; }
.ensta-icon-btn .badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    background: var(--ensta-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.ensta-hero {
    padding: 32px 0;
}
.ensta-hero-inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) {
    .ensta-hero-inner { grid-template-columns: 1fr; }
}
.ensta-hero-main {
    border-radius: var(--ensta-radius-lg);
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--ensta-primary), #8478D6);
    aspect-ratio: 21 / 9;
    box-shadow: var(--ensta-shadow-md);
}
.ensta-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
}
.ensta-slide.active { opacity: 1; }
.ensta-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ensta-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to inline-end, rgba(0,0,0,0.45) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 36px;
    color: #fff;
}
.ensta-slide-overlay h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.ensta-slide-dots {
    position: absolute;
    bottom: 18px;
    inset-inline-end: 24px;
    display: flex;
    gap: 8px;
    z-index: 5;
}
.ensta-slide-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    transition: all .2s;
}
.ensta-slide-dots button.active {
    width: 26px;
    background: #fff;
}

.ensta-hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}
.ensta-hero-card {
    border-radius: var(--ensta-radius-md);
    padding: 28px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--ensta-shadow-sm);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    min-height: 150px;
}
.ensta-hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(95,87,161,.85), rgba(95,87,161,.65));
}
.ensta-hero-card-1 { background-image: linear-gradient(135deg, #FFC847, #FF9C47); }
.ensta-hero-card-1::after { background: linear-gradient(135deg, rgba(255,200,71,.0), rgba(255,156,71,.2)); }
.ensta-hero-card-2 { background-image: linear-gradient(135deg, #5F57A1, #8478D6); }
.ensta-hero-card-2::after { background: linear-gradient(135deg, rgba(0,0,0,0), rgba(0,0,0,.15)); }
.ensta-hero-card > * { position: relative; z-index: 1; }
.ensta-hero-card .label { font-size: 12px; font-weight: 600; letter-spacing: .5px; opacity: .9; }
.ensta-hero-card .title { font-size: 22px; font-weight: 800; margin: 6px 0 14px; line-height: 1.3; }
.ensta-hero-card .cta {
    align-self: flex-start;
    padding: 8px 18px;
    background: rgba(255,255,255,.95);
    color: var(--ensta-primary);
    font-weight: 800;
    font-size: 13px;
    border-radius: 999px;
}

/* ── Section header ─────────────────────────────────────────────────────── */
.ensta-section { padding: 56px 0; }
.ensta-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}
.ensta-section-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
}
.ensta-section-title small {
    display: block;
    font-size: 14px;
    color: var(--ensta-text-muted);
    font-weight: 500;
    margin-top: 4px;
}
.ensta-link-more {
    font-weight: 700;
    color: var(--ensta-primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Categories ─────────────────────────────────────────────────────────── */
.ensta-categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) { .ensta-categories { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px) { .ensta-categories { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .ensta-categories { grid-template-columns: repeat(2, 1fr); } }

.ensta-category {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 22px 14px;
    text-align: center;
    box-shadow: var(--ensta-shadow-sm);
    transition: all .2s;
    border: 1px solid transparent;
    display: block;
}
.ensta-category:hover {
    transform: translateY(-4px);
    box-shadow: var(--ensta-shadow-md);
    border-color: var(--ensta-primary-soft);
    color: var(--ensta-primary);
}
.ensta-category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--ensta-primary-soft);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.ensta-category-icon img { width: 38px; height: 38px; object-fit: contain; }
.ensta-category-name { font-weight: 700; font-size: 14px; margin: 0; }
.ensta-category-count { font-size: 12px; color: var(--ensta-text-muted); margin-top: 4px; }

/* ── Product cards ──────────────────────────────────────────────────────── */
.ensta-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
@media (max-width: 1100px) { .ensta-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .ensta-products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ensta-products { grid-template-columns: 1fr; } }

.ensta-product {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    overflow: hidden;
    box-shadow: var(--ensta-shadow-sm);
    transition: all .25s;
    display: flex;
    flex-direction: column;
}
.ensta-product:hover { transform: translateY(-6px); box-shadow: var(--ensta-shadow-lg); }

.ensta-product-image {
    position: relative;
    aspect-ratio: 1;
    background: #F4F4F8;
    overflow: hidden;
}
.ensta-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.ensta-product:hover .ensta-product-image img { transform: scale(1.06); }
.ensta-product-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--ensta-danger);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.ensta-product-fav {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--ensta-danger);
    box-shadow: var(--ensta-shadow-sm);
}
.ensta-product-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.ensta-product-shop { font-size: 12px; color: var(--ensta-text-muted); margin-bottom: 4px; }
.ensta-product-title {
    font-weight: 700;
    font-size: 14px;
    margin: 0;
    color: var(--ensta-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    min-height: 42px;
}
.ensta-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    color: var(--ensta-accent);
    font-size: 13px;
    font-weight: 700;
}
.ensta-product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 12px;
}
.ensta-product-price .new {
    font-size: 18px;
    font-weight: 800;
    color: var(--ensta-primary);
}
.ensta-product-price .old {
    font-size: 13px;
    color: var(--ensta-text-muted);
    text-decoration: line-through;
}
.ensta-product-cta {
    margin-top: 14px;
    height: 40px;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    border: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
    transition: all .15s;
}
.ensta-product-cta:hover { background: var(--ensta-primary); color: #fff; }

/* ── Promo strip ────────────────────────────────────────────────────────── */
.ensta-promo {
    border-radius: var(--ensta-radius-lg);
    background: linear-gradient(135deg, var(--ensta-primary) 0%, #8478D6 70%, #B0A6FF 100%);
    padding: 50px;
    color: #fff;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.ensta-promo::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    inset-inline-end: -80px;
    top: -80px;
}
.ensta-promo::after {
    content: "";
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    inset-inline-start: -50px;
    bottom: -50px;
}
.ensta-promo > * { position: relative; }
.ensta-promo h2 { font-size: 32px; font-weight: 900; margin: 0 0 10px; line-height: 1.3; }
.ensta-promo p { font-size: 16px; opacity: .9; margin-bottom: 24px; }
.ensta-promo .ensta-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #fff;
    color: var(--ensta-primary);
    border-radius: 999px;
    font-weight: 800;
}
.ensta-promo-img {
    text-align: center;
    transform: rotate(-6deg);
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.3));
}
.ensta-promo-img img { max-height: 240px; margin: 0 auto; }
@media (max-width: 800px) {
    .ensta-promo { grid-template-columns: 1fr; padding: 32px; }
    .ensta-promo-img { display: none; }
}

/* ── Shops grid ─────────────────────────────────────────────────────────── */
.ensta-shops {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
@media (max-width: 1100px) { .ensta-shops { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .ensta-shops { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .ensta-shops { grid-template-columns: 1fr; } }

.ensta-shop {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 22px;
    box-shadow: var(--ensta-shadow-sm);
    transition: all .2s;
    text-align: center;
}
.ensta-shop:hover { transform: translateY(-4px); box-shadow: var(--ensta-shadow-md); }
.ensta-shop-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--ensta-primary-soft);
    overflow: hidden;
}
.ensta-shop-img img { width: 100%; height: 100%; object-fit: cover; }
.ensta-shop-name { font-weight: 800; font-size: 16px; margin: 0; }
.ensta-shop-desc {
    font-size: 13px;
    color: var(--ensta-text-muted);
    margin: 6px 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}
.ensta-shop-meta {
    display: flex;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--ensta-divider);
    font-size: 13px;
    color: var(--ensta-text-muted);
}
.ensta-shop-meta strong { color: var(--ensta-text); }
.ensta-shop-meta .stars { color: var(--ensta-accent); font-weight: 800; }

/* ── Why choose us ──────────────────────────────────────────────────────── */
.ensta-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 800px) { .ensta-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .ensta-features { grid-template-columns: 1fr; } }

.ensta-feature {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--ensta-shadow-sm);
}
.ensta-feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    display: grid;
    place-items: center;
    font-size: 28px;
}
.ensta-feature h4 { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.ensta-feature p { color: var(--ensta-text-muted); font-size: 13px; margin: 0; line-height: 1.7; }

/* ── App download CTA ───────────────────────────────────────────────────── */
.ensta-app-cta {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-lg);
    padding: 50px;
    box-shadow: var(--ensta-shadow-sm);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}
@media (max-width: 800px) {
    .ensta-app-cta { grid-template-columns: 1fr; padding: 32px; text-align: center; }
}
.ensta-app-cta h2 { font-size: 28px; font-weight: 900; margin: 0 0 14px; }
.ensta-app-cta p { color: var(--ensta-text-muted); font-size: 15px; margin: 0 0 24px; }
.ensta-app-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 800px) { .ensta-app-buttons { justify-content: center; } }
.ensta-app-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--ensta-text);
    color: #fff;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 13px;
}
.ensta-app-button small { font-size: 11px; opacity: .8; font-weight: 500; display: block; }
.ensta-app-cta-img { text-align: center; }
.ensta-app-cta-img img { max-height: 320px; margin: 0 auto; filter: drop-shadow(0 30px 60px rgba(95,87,161,.3)); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ensta-footer {
    background: #1F1F2E;
    color: #C0C0D0;
    padding: 56px 0 0;
    margin-top: 60px;
}
.ensta-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 800px) {
    .ensta-footer-grid { grid-template-columns: 1fr 1fr; }
}
.ensta-footer h5 {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 18px;
}
.ensta-footer ul { list-style: none; padding: 0; margin: 0; }
.ensta-footer ul li { margin-bottom: 10px; font-size: 14px; }
.ensta-footer ul li a:hover { color: var(--ensta-accent); }
.ensta-footer-about p {
    font-size: 13px;
    line-height: 1.8;
    margin: 0 0 18px;
}
.ensta-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.ensta-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    color: #fff;
    display: grid;
    place-items: center;
    transition: all .15s;
}
.ensta-social a:hover { background: var(--ensta-primary); color: #fff; }
.ensta-footer-bottom {
    padding: 22px 0;
    text-align: center;
    font-size: 13px;
    color: #8C8CA8;
}

/* ── Helpers ────────────────────────────────────────────────────────────── */
.ensta-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--ensta-text-muted);
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
}
.ensta-empty h3 { color: var(--ensta-text); margin: 16px 0 6px; }

/* ── Breadcrumb ─────────────────────────────────────────────────────────── */
.ensta-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--ensta-text-muted);
    margin-bottom: 18px;
}
.ensta-breadcrumb a { color: var(--ensta-primary); font-weight: 600; }
.ensta-breadcrumb span { color: var(--ensta-text); font-weight: 700; }
.ensta-breadcrumb i { font-size: 10px; opacity: .6; }

/* ── Toolbar (search + sort) ────────────────────────────────────────────── */
.ensta-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.ensta-toolbar input[type=text],
.ensta-toolbar select {
    height: 42px;
    border: 1px solid var(--ensta-divider);
    border-radius: 999px;
    padding: 0 18px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    min-width: 160px;
}
.ensta-toolbar select { padding-inline-end: 38px; cursor: pointer; }
.ensta-toolbar input:focus, .ensta-toolbar select:focus {
    border-color: var(--ensta-primary);
    box-shadow: 0 0 0 3px rgba(123,95,224,.12);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.ensta-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    background: var(--ensta-primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.ensta-btn-primary:hover { background: var(--ensta-primary-dark); transform: translateY(-1px); color: #fff; }
.ensta-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    background: transparent;
    color: var(--ensta-primary);
    border: 1.5px solid var(--ensta-primary);
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.ensta-btn-outline:hover { background: var(--ensta-primary-soft); }

/* ── Pagination ────────────────────────────────────────────────────────── */
.ensta-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.ensta-pagination a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--ensta-surface);
    color: var(--ensta-text);
    display: grid;
    place-items: center;
    font-weight: 700;
    box-shadow: var(--ensta-shadow-sm);
    transition: all .15s;
}
.ensta-pagination a:hover { background: var(--ensta-primary-soft); color: var(--ensta-primary); }
.ensta-pagination a.active { background: var(--ensta-primary); color: #fff; }

/* ── Products listing layout (with side categories) ─────────────────────── */
.ensta-pl-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
}
@media (max-width: 800px) { .ensta-pl-grid { grid-template-columns: 1fr; } }
.ensta-pl-sidebar {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 22px;
    box-shadow: var(--ensta-shadow-sm);
    height: fit-content;
    position: sticky;
    top: 90px;
}
.ensta-pl-sidebar h4 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.ensta-cat-list { list-style: none; padding: 0; margin: 0; }
.ensta-cat-list li { margin-bottom: 4px; }
.ensta-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    color: var(--ensta-text);
    transition: all .15s;
}
.ensta-cat-list a:hover { background: var(--ensta-primary-soft); color: var(--ensta-primary); }
.ensta-cat-list a.active { background: var(--ensta-primary); color: #fff; }
.ensta-cat-list .count { font-size: 12px; opacity: .7; }

/* ── Product detail page ────────────────────────────────────────────────── */
.ensta-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-lg);
    padding: 28px;
    box-shadow: var(--ensta-shadow-sm);
}
@media (max-width: 900px) { .ensta-product-detail { grid-template-columns: 1fr; padding: 18px; } }

.ensta-gallery-main {
    aspect-ratio: 1;
    border-radius: var(--ensta-radius-md);
    overflow: hidden;
    background: #F4F4F8;
}
.ensta-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.ensta-gallery-thumbs {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.ensta-thumb {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    background: #F4F4F8;
    padding: 0;
    cursor: pointer;
    transition: all .15s;
}
.ensta-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ensta-thumb:hover { border-color: var(--ensta-primary-soft); }
.ensta-thumb.active { border-color: var(--ensta-primary); }

.ensta-pdp-info > * { margin-bottom: 18px; }
.ensta-shop-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.ensta-shop-pill img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.ensta-pdp-title { font-size: 28px; font-weight: 900; margin: 0; line-height: 1.3; }
.ensta-pdp-rating { display: flex; align-items: center; gap: 6px; color: var(--ensta-accent); font-weight: 700; }
.ensta-pdp-rating strong { color: var(--ensta-text); margin-inline-start: 4px; }
.ensta-pdp-rating span { color: var(--ensta-text-muted); font-weight: 500; font-size: 13px; }

.ensta-pdp-price-row {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--ensta-primary-soft);
    border-radius: var(--ensta-radius-md);
}
.ensta-pdp-price-row .new { font-size: 28px; font-weight: 900; color: var(--ensta-primary); }
.ensta-pdp-price-row .old { color: var(--ensta-text-muted); text-decoration: line-through; font-size: 16px; }
.ensta-pdp-price-row .save {
    background: var(--ensta-success);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    margin-inline-start: auto;
}

.ensta-pdp-section h4 { font-size: 14px; font-weight: 800; margin: 0 0 10px; }

.ensta-color-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.ensta-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--ensta-divider);
    cursor: pointer;
    transition: all .15s;
}
.ensta-swatch.active { box-shadow: 0 0 0 2px var(--ensta-primary); transform: scale(1.1); }

.ensta-size-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ensta-size-pill {
    min-width: 50px;
    height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1.5px solid var(--ensta-divider);
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    transition: all .15s;
}
.ensta-size-pill:hover { border-color: var(--ensta-primary); }
.ensta-size-pill.active { background: var(--ensta-primary); color: #fff; border-color: var(--ensta-primary); }

.ensta-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: #F4F4F8;
    border-radius: 999px;
    padding: 4px;
}
.ensta-qty .qty-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--ensta-primary);
    font-weight: 800;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--ensta-shadow-sm);
}
.ensta-qty input {
    width: 60px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    -moz-appearance: textfield;
    appearance: textfield;
}
.ensta-qty input::-webkit-outer-spin-button,
.ensta-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ensta-stock { margin-inline-start: 12px; font-size: 13px; color: var(--ensta-text-muted); }

.ensta-pdp-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.ensta-pdp-desc {
    color: var(--ensta-text-muted);
    line-height: 1.9;
    margin: 0;
    white-space: pre-wrap;
}

/* ── Reviews ────────────────────────────────────────────────────────────── */
.ensta-reviews { display: grid; gap: 14px; }
.ensta-review {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 18px 20px;
    box-shadow: var(--ensta-shadow-sm);
}
.ensta-review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.ensta-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    font-weight: 800;
    display: grid;
    place-items: center;
}
.ensta-review-head strong { display: block; }
.ensta-review-head small { color: var(--ensta-text-muted); font-size: 12px; }
.ensta-review-stars { margin-inline-start: auto; color: var(--ensta-accent); }
.ensta-review p { margin: 0; color: var(--ensta-text-muted); line-height: 1.7; }

/* ── Store cover ────────────────────────────────────────────────────────── */
.ensta-store-cover {
    background-color: var(--ensta-primary);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 64px 0;
}
.ensta-store-cover-inner { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ensta-store-avatar {
    width: 120px; height: 120px;
    border-radius: 28px;
    background: rgba(255,255,255,.95);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--ensta-primary);
    font-size: 48px;
    box-shadow: var(--ensta-shadow-md);
}
.ensta-store-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ensta-store-cover h1 { margin: 0 0 6px; font-size: 32px; font-weight: 900; }
.ensta-store-cover p { margin: 0 0 12px; opacity: .9; max-width: 600px; }
.ensta-store-meta { display: flex; gap: 22px; font-size: 14px; }

/* ── Static page ───────────────────────────────────────────────────────── */
.ensta-static-body {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 32px;
    box-shadow: var(--ensta-shadow-sm);
    line-height: 2;
    color: var(--ensta-text);
}
.ensta-static-body h2, .ensta-static-body h3 { color: var(--ensta-primary); }

/* ── Contact cards ─────────────────────────────────────────────────────── */
.ensta-contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
@media (max-width: 800px) { .ensta-contact-grid { grid-template-columns: repeat(2, 1fr); } }
.ensta-contact-card {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 28px 22px;
    text-align: center;
    box-shadow: var(--ensta-shadow-sm);
    transition: all .2s;
}
.ensta-contact-card:hover { transform: translateY(-4px); box-shadow: var(--ensta-shadow-md); }
.ensta-contact-icon {
    width: 60px; height: 60px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    display: grid;
    place-items: center;
    font-size: 24px;
}
.ensta-contact-card h4 { margin: 0 0 4px; font-size: 16px; font-weight: 800; color: var(--ensta-text); }
.ensta-contact-card p { margin: 0; color: var(--ensta-text-muted); font-size: 13px; }

/* ── Toast notification (replaces ugly browser alerts) ──────────────────── */
.ensta-toast-host {
    position: fixed;
    z-index: 9999;
    /* Sit below the sticky header (≈80px) so toasts never cover the navbar
       icons. With pointer-events: none on the host the empty area never
       blocks clicks anyway, but visible toasts had auto pointer-events and
       were intercepting clicks on the icons sitting beneath them. */
    top: 96px;
    inset-inline-end: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    pointer-events: none;
}
.ensta-toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(31, 31, 46, 0.14), 0 4px 10px rgba(31, 31, 46, 0.06);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-inline-start: 4px solid var(--ensta-primary);
    animation: ensta-toast-in .25s ease-out;
}
.ensta-toast.success { border-color: var(--ensta-success); }
.ensta-toast.error   { border-color: var(--ensta-danger); }
.ensta-toast.info    { border-color: var(--ensta-primary); }
.ensta-toast .ico {
    width: 36px; height: 36px;
    flex: 0 0 auto;
    border-radius: 50%;
    display: grid; place-items: center;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
}
.ensta-toast.success .ico { background: rgba(46,204,113,.15); color: var(--ensta-success); }
.ensta-toast.error   .ico { background: rgba(231,76,60,.15); color: var(--ensta-danger); }
.ensta-toast .body { flex: 1; }
.ensta-toast .body strong { display: block; margin-bottom: 2px; font-size: 14px; }
.ensta-toast .body span { color: var(--ensta-text-muted); font-size: 13px; }
.ensta-toast .close {
    background: transparent;
    border: none;
    color: var(--ensta-text-muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px;
}
@keyframes ensta-toast-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ensta-toast.leaving {
    animation: ensta-toast-out .2s ease-in forwards;
}
@keyframes ensta-toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateX(20px); }
}
.ensta-toast .body .action {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ensta-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s ease;
}
.ensta-toast .body .action:hover { background: var(--ensta-primary-dark, #4a4683); }

/* ── Polish: smooth scroll, page fade-in, accessible focus rings ─────────── */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body { animation: ensta-page-in .35s ease-out both; }
@keyframes ensta-page-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
    outline: 2px solid var(--ensta-primary);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ── Mobile burger button + nav drawer ───────────────────────────────────── */
.ensta-burger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    margin-inline-start: auto;
    transition: background .15s;
}
.ensta-burger:hover { background: var(--ensta-primary); }
.ensta-burger:hover span { background: #fff; }
.ensta-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .25s ease, opacity .15s ease;
}
.ensta-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ensta-burger.is-open span:nth-child(2) { opacity: 0; }
.ensta-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .ensta-burger { display: inline-flex; }
    .ensta-search { order: 99; flex: 1 1 100%; max-width: none; margin-top: 12px; }
    .ensta-nav {
        position: absolute;
        top: 100%;
        inset-inline-start: 0;
        inset-inline-end: 0;
        background: var(--ensta-surface);
        border-top: 1px solid var(--ensta-divider);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 16px 16px;
        box-shadow: var(--ensta-shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease, padding .3s ease;
    }
    .ensta-nav.is-open {
        max-height: 600px;
        padding: 16px;
    }
    .ensta-nav > a {
        padding: 14px 8px;
        border-bottom: 1px solid var(--ensta-divider);
    }
    .ensta-nav > a:last-child { border-bottom: none; }
    .ensta-nav .ensta-icon-btn,
    .ensta-nav .ensta-user-pill,
    .ensta-nav .ensta-lang-btn {
        align-self: flex-start;
        margin-top: 6px;
    }
    body.ensta-nav-open { overflow: hidden; }
}

/* ── Wishlist count badge on header heart ────────────────────────────────── */
.ensta-fav-link { position: relative; }
.ensta-fav-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ensta-danger, #e74c3c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.ensta-fav-badge.pop { animation: ensta-badge-pop .45s cubic-bezier(.34,1.56,.64,1); }

/* ── Floating "back to top" button ───────────────────────────────────────── */
.ensta-to-top {
    position: fixed;
    bottom: 28px;
    inset-inline-end: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--ensta-primary);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(95, 87, 161, 0.35);
    z-index: 9000;
    display: grid;
    place-items: center;
    transition: transform .2s ease, background .15s ease, opacity .2s ease;
    opacity: 0.95;
}
.ensta-to-top:hover { background: var(--ensta-primary-dark, #4a4683); transform: translateY(-2px); }
.ensta-to-top[hidden] {
    display: none;
}

/* ── Authenticated user pill in header ───────────────────────────────────── */
.ensta-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    height: 40px;
    border-radius: 999px;
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
    max-width: 180px;
}
.ensta-user-pill:hover { background: var(--ensta-primary); color: #fff; }
.ensta-user-pill .ensta-user-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
@media (max-width: 700px) {
    .ensta-user-pill .ensta-user-name { display: none; }
    .ensta-user-pill { padding: 0; width: 40px; justify-content: center; }
}

/* ── Language switcher pill ──────────────────────────────────────────────── */
.ensta-lang-btn .ensta-lang-label {
    font-weight: 800;
    font-size: 13px;
    letter-spacing: .5px;
    color: var(--ensta-primary);
}
.ensta-lang-btn:hover .ensta-lang-label { color: #fff; }

/* ── Cart icon badge in the header ───────────────────────────────────────── */
.ensta-cart-link { position: relative; }
.ensta-cart-badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ensta-danger, #e74c3c);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.ensta-cart-badge.pop { animation: ensta-badge-pop .45s cubic-bezier(.34,1.56,.64,1); }
@keyframes ensta-badge-pop {
    0%   { transform: scale(.4); }
    60%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ── Fly-to-cart dot (when an item is added) ─────────────────────────────── */
.ensta-fly-dot {
    position: fixed;
    z-index: 9998;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ensta-primary);
    box-shadow: 0 6px 16px rgba(95,87,161,.45);
    pointer-events: none;
    transition: transform .65s cubic-bezier(.5,.05,.3,1), opacity .65s ease-in;
    will-change: transform, opacity;
}

/* ── Order details — status timeline + info rows ─────────────────────────── */
.ensta-timeline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 18px 0 28px;
    padding: 16px 18px;
    background: var(--ensta-surface);
    border: 1px solid var(--ensta-divider);
    border-radius: var(--ensta-radius-md);
    overflow-x: auto;
}
.ensta-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ensta-timeline-step .ico {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--ensta-divider);
    color: var(--ensta-text-muted);
    display: grid;
    place-items: center;
    font-size: 16px;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}
.ensta-timeline-step.done .ico {
    background: var(--ensta-primary);
    color: #fff;
    transform: scale(1.06);
}
.ensta-timeline-step .lbl {
    font-size: 12px;
    font-weight: 700;
    color: var(--ensta-text-muted);
    white-space: nowrap;
}
.ensta-timeline-step.done .lbl { color: var(--ensta-primary); }
.ensta-timeline-bar {
    flex: 1;
    height: 3px;
    background: var(--ensta-divider);
    border-radius: 2px;
    min-width: 30px;
    transition: background .25s ease;
}
.ensta-timeline-bar.done { background: var(--ensta-primary); }

.ensta-info-rows { display: flex; flex-direction: column; gap: 10px; }
.ensta-info-row {
    display: flex;
    gap: 14px;
    padding: 12px 14px;
    background: #FAFAFC;
    border-radius: 10px;
}
.ensta-info-row .lbl {
    color: var(--ensta-text-muted);
    font-weight: 600;
    font-size: 13px;
    flex: 0 0 160px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ensta-info-row .val {
    flex: 1;
    color: var(--ensta-text);
    font-weight: 600;
    font-size: 14px;
}

.ensta-order-foot {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--ensta-divider);
    display: flex;
    justify-content: flex-end;
}
.ensta-order-link {
    color: var(--ensta-primary);
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ── Tabs (used on Favorites page) ───────────────────────────────────────── */
.ensta-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--ensta-divider);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.ensta-tab {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--ensta-text-muted);
    padding: 12px 18px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color .15s ease, border-color .15s ease;
}
.ensta-tab:hover { color: var(--ensta-primary); }
.ensta-tab.active {
    color: var(--ensta-primary);
    border-bottom-color: var(--ensta-primary);
}
.ensta-tab-count {
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 22px;
    text-align: center;
}
.ensta-tab.active .ensta-tab-count { background: var(--ensta-primary); color: #fff; }
.ensta-tab-panel { display: none; }
.ensta-tab-panel.active { display: block; }

/* ── Wishlist heart pill on Store details cover ──────────────────────────── */
.ensta-store-fav-pill {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ensta-primary);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    transition: transform .15s ease, background .15s ease;
}
.ensta-store-fav-pill:hover { transform: scale(1.04); background: #fff; }
.ensta-store-fav-pill.is-loading > i { animation: ensta-spin .7s linear infinite; }

/* ── Wishlist heart — solid + red when favorited ─────────────────────────── */
.ensta-product-fav .fa-heart.is-fav,
.ensta-product-fav .fa-solid.fa-heart {
    color: var(--ensta-danger, #e74c3c);
    animation: ensta-pop .35s ease;
}

/* ── Add-to-cart button states (loading / success) ───────────────────────── */
.ensta-btn-primary.is-loading,
.ensta-product-cta.is-loading {
    opacity: .7;
    cursor: progress;
    position: relative;
}
.ensta-btn-primary.is-loading > i,
.ensta-product-cta.is-loading > i {
    animation: ensta-spin .7s linear infinite;
}
.ensta-btn-primary.is-success,
.ensta-product-cta.is-success {
    background: var(--ensta-success, #2ecc71) !important;
    transform: scale(.97);
    transition: transform .2s ease;
}
.ensta-btn-primary.is-success > i,
.ensta-product-cta.is-success > i {
    animation: ensta-pop .4s ease;
}
@keyframes ensta-spin { to { transform: rotate(360deg); } }
@keyframes ensta-pop {
    0%   { transform: scale(.5); }
    60%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* ── Compact product card (used on Store/Products listings) ─────────────── */
.ensta-product.compact .ensta-product-body { padding: 10px 12px 12px; }
.ensta-product.compact .ensta-product-title { font-size: 13px; min-height: 36px; -webkit-line-clamp: 2; }
.ensta-product.compact .ensta-product-shop { font-size: 11px; margin-bottom: 2px; }
.ensta-product.compact .ensta-product-rating { font-size: 12px; margin-top: 6px; }
.ensta-product.compact .ensta-product-price .new { font-size: 16px; }
.ensta-product.compact .ensta-product-price .old { font-size: 12px; }
.ensta-product.compact .ensta-product-cta { height: 36px; font-size: 12px; margin-top: 10px; }

/* ── Wishlist heart on product cards ────────────────────────────────────── */
.ensta-product .ensta-product-fav.active,
.ensta-shop .ensta-shop-fav.active { color: var(--ensta-danger); }
.ensta-shop { position: relative; }
.ensta-shop-fav {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--ensta-danger);
    box-shadow: var(--ensta-shadow-sm);
    cursor: pointer;
}

/* ── Auth card (Register / Login) ───────────────────────────────────────── */
.ensta-auth-card {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-lg);
    padding: 40px;
    box-shadow: var(--ensta-shadow-md);
}
.ensta-auth-card h1 { font-size: 26px; font-weight: 900; margin: 0 0 6px; }
.ensta-auth-card > p { color: var(--ensta-text-muted); margin: 0 0 24px; }
.ensta-validation { color: var(--ensta-danger); font-size: 13px; }
.ensta-validation ul { margin: 0; padding-inline-start: 18px; }
.ensta-field {
    display: block;
    margin-bottom: 14px;
}
.ensta-field span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ensta-text);
    margin-bottom: 6px;
}
.ensta-field input {
    width: 100%;
    height: 46px;
    padding: 0 16px;
    border: 1.5px solid var(--ensta-divider);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: all .15s;
}
.ensta-field input:focus {
    border-color: var(--ensta-primary);
    box-shadow: 0 0 0 3px rgba(123,95,224,.12);
}
.ensta-auth-foot { text-align: center; margin-top: 18px; color: var(--ensta-text-muted); }
.ensta-auth-foot a { color: var(--ensta-primary); font-weight: 700; }

/* ── Flash messages (TempData) ──────────────────────────────────────────── */
.ensta-flash {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 14px;
}
.ensta-flash.success { background: #E6F6EC; color: #128C4A; }
.ensta-flash.info    { background: var(--ensta-primary-soft); color: var(--ensta-primary); }
.ensta-flash.error   { background: #FCE9E9; color: var(--ensta-danger); }

/* ── Cart layout ────────────────────────────────────────────────────────── */
.ensta-cart-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}
@media (max-width: 900px) { .ensta-cart-grid { grid-template-columns: 1fr; } }

.ensta-cart-items { display: flex; flex-direction: column; gap: 14px; }
.ensta-cart-item {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    box-shadow: var(--ensta-shadow-sm);
    padding: 14px;
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 14px;
    align-items: center;
}
.ensta-cart-img {
    width: 90px; height: 90px;
    border-radius: 12px;
    overflow: hidden;
    background: #F4F4F8;
}
.ensta-cart-img img { width: 100%; height: 100%; object-fit: cover; }
.ensta-cart-title {
    display: block;
    font-weight: 800;
    color: var(--ensta-text);
    margin-bottom: 4px;
}
.ensta-cart-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--ensta-text-muted);
    margin-bottom: 8px;
}
.ensta-cart-meta .price { color: var(--ensta-primary); font-weight: 700; }
.ensta-cart-qty {
    display: inline-flex;
    align-items: center;
    background: #F4F4F8;
    border-radius: 999px;
    padding: 3px;
}
.ensta-cart-qty button {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--ensta-primary);
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--ensta-shadow-sm);
}
.ensta-cart-qty button[disabled] { opacity: .4; cursor: not-allowed; }
.ensta-cart-qty span {
    min-width: 32px;
    text-align: center;
    font-weight: 800;
}
.ensta-cart-actions { text-align: end; }
.ensta-cart-actions strong { display: block; color: var(--ensta-primary); font-weight: 800; margin-bottom: 6px; }
.ensta-cart-remove {
    background: transparent;
    border: none;
    color: var(--ensta-danger);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
}

.ensta-cart-summary {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 22px;
    box-shadow: var(--ensta-shadow-sm);
    height: fit-content;
    position: sticky;
    top: 90px;
}
.ensta-cart-summary h4 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.ensta-cart-summary .row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--ensta-divider);
    font-size: 13px;
}
.ensta-cart-summary .row.total {
    border-bottom: none;
    padding-top: 14px;
    font-size: 16px;
    color: var(--ensta-primary);
}
.ensta-cart-summary .row.total strong { font-size: 22px; font-weight: 900; }

/* ── My Orders ──────────────────────────────────────────────────────────── */
.ensta-orders-list { display: flex; flex-direction: column; gap: 12px; }
.ensta-order-card {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-md);
    padding: 18px 22px;
    box-shadow: var(--ensta-shadow-sm);
}
.ensta-order-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--ensta-divider);
    padding-bottom: 12px;
    margin-bottom: 12px;
}
.ensta-order-head strong { display: block; font-weight: 800; }
.ensta-order-head small { color: var(--ensta-text-muted); font-size: 12px; }
.ensta-status {
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}
.ensta-status.warn    { background: #FFF3DC; color: #B0791C; }
.ensta-status.info    { background: var(--ensta-primary-soft); color: var(--ensta-primary); }
.ensta-status.success { background: #E6F6EC; color: #128C4A; }
.ensta-status.danger  { background: #FCE9E9; color: var(--ensta-danger); }
.ensta-status.muted   { background: #F1F1F4; color: var(--ensta-text-muted); }
.ensta-order-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ensta-text-muted);
    font-size: 14px;
}
.ensta-order-body strong { color: var(--ensta-primary); font-size: 18px; font-weight: 900; }

/* ── Profile ────────────────────────────────────────────────────────────── */
.ensta-profile-card {
    background: var(--ensta-surface);
    border-radius: var(--ensta-radius-lg);
    padding: 36px 28px;
    text-align: center;
    box-shadow: var(--ensta-shadow-md);
}
.ensta-profile-avatar {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ensta-primary), #8478D6);
    color: #fff;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    font-size: 40px;
    font-weight: 800;
    overflow: hidden;
}
.ensta-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ensta-profile-card h2 { margin: 0 0 4px; font-weight: 900; }
.ensta-profile-card p { margin: 0; color: var(--ensta-text-muted); }
.ensta-profile-actions {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 600px) { .ensta-profile-actions { grid-template-columns: repeat(2, 1fr); } }
.ensta-profile-tile {
    background: var(--ensta-primary-soft);
    color: var(--ensta-primary);
    border-radius: var(--ensta-radius-md);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    transition: all .15s;
}
.ensta-profile-tile:hover { background: var(--ensta-primary); color: #fff; }
.ensta-profile-tile i { font-size: 22px; }

