:root {
    --bg: #eef8f1;
    --bg-2: #f8fcf9;
    --card: rgba(255, 255, 255, 0.92);
    --text: #0b2f22;
    --muted: #628074;
    --line: #d2eadc;

    --primary: #137a4b;
    --primary-dark: #0b4f33;
    --primary-soft: #e5f5ec;

    --accent: #58b368;
    --accent-dark: #2f7d46;
    --gold: #c6a15b;

    --danger: #b91c1c;
    --success: #137a4b;

    --shadow: 0 18px 45px rgba(19, 122, 75, 0.12);
    --shadow-soft: 0 8px 22px rgba(19, 122, 75, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(88, 179, 104, .18), transparent 26%),
        radial-gradient(circle at 85% 15%, rgba(19, 122, 75, .13), transparent 24%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
}

a {
    color: inherit;
    text-decoration: none;
}

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 14px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 900;
    font-size: 24px;
    color: var(--primary-dark);
    letter-spacing: -0.04em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: "✦";
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: var(--shadow-soft);
}

.nav {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 14px;
    color: #21463a;
}

.nav a {
    padding: 9px 10px;
    border-radius: 12px;
}

.nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(19, 122, 75, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.08);
    box-shadow: 0 16px 32px rgba(19, 122, 75, .28);
}

.btn.secondary {
    background: #ffffff;
    color: var(--primary-dark);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
}

.container {
    max-width: 1220px;
    margin: 0 auto;
    padding: 42px 20px;
}

.hero {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    gap: 30px;
    align-items: center;
    min-height: 560px;
}

.hero > div:first-child {
    padding: 18px 0;
}

.card {
    background: var(--card);
    border: 1px solid rgba(210, 234, 220, .9);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: rgba(88, 179, 104, .55);
}

h1 {
    font-size: clamp(38px, 5vw, 68px);
    line-height: .96;
    margin: 0 0 18px;
    letter-spacing: -0.06em;
    color: #073421;
}

h2 {
    font-size: 30px;
    margin: 0 0 16px;
    letter-spacing: -0.04em;
}

h3 {
    margin: 0 0 10px;
    letter-spacing: -0.025em;
}

p {
    line-height: 1.65;
}

.muted {
    color: var(--muted);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.input,
textarea,
select {
    width: 100%;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    margin-bottom: 13px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 179, 104, .13);
}

.sidebar-layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(88, 179, 104, .12), transparent 25%),
        linear-gradient(180deg, #f8fcf9, #eef8f1);
}

.sidebar {
    background:
        radial-gradient(circle at 40% 0%, rgba(88, 179, 104, .26), transparent 28%),
        linear-gradient(180deg, #083321, #0a4a31);
    color: #fff;
    padding: 24px;
    box-shadow: 12px 0 40px rgba(8, 51, 33, .18);
}

.sidebar h2 {
    font-size: 25px;
    margin-bottom: 8px;
}

.sidebar p {
    color: rgba(255,255,255,.72);
    margin-bottom: 22px;
}

.sidebar a {
    display: block;
    padding: 13px 14px;
    border-radius: 16px;
    margin-bottom: 9px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,.08);
    transition: .18s ease;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.16);
    transform: translateX(2px);
}

.main {
    padding: 30px;
}

.chat-box {
    height: 460px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,250,246,.96));
}

.msg {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #eef8f3;
    border: 1px solid #d9eee3;
}

.msg.mine {
    background: #dff3ea;
}

img {
    border-radius: 18px;
}

.card img {
    box-shadow: var(--shadow-soft);
}

.badge,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border: 1px solid var(--line);
}

.product-price {
    display: inline-flex;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fff8e7, #f3e5bd);
    color: #6f531d;
    font-weight: 900;
}

@media (max-width: 900px) {
    .header {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .nav {
        flex-wrap: wrap;
    }

    .hero,
    .grid,
    .sidebar-layout {
        grid-template-columns: 1fr !important;
    }

    .main {
        padding: 18px;
    }

    .sidebar {
        min-height: auto;
    }
}

/* === GLOBAL FONT SCALE FIX (50%) === */

html {
    font-size: 50%;
}

/* recalibrare tipografie */
body {
    font-size: 1.6rem;
}

h1 {
    font-size: 3.2rem !important;
}

h2 {
    font-size: 2.4rem !important;
}

h3 {
    font-size: 1.8rem !important;
}

.nav,
.sidebar,
p,
.muted {
    font-size: 1.4rem !important;
}

.btn {
    font-size: 1.4rem !important;
    padding: 1rem 1.6rem !important;
}

.input,
textarea,
select {
    font-size: 1.4rem !important;
    padding: 1.2rem !important;
}

/* chat */
.msg {
    font-size: 1.4rem !important;
}

/* produse */
.card h3 {
    font-size: 1.8rem !important;
}

.product-price {
    font-size: 1.6rem !important;
}

/* sidebar */
.sidebar h2 {
    font-size: 2rem !important;
}

/* responsive fix */
@media (max-width: 900px) {
    html {
        font-size: 48%;
    }
}

/* === MED TKR COMPACT MAXIMUM UI === */

html {
    font-size: 46%;
}

body {
    font-size: 1.45rem;
}

.header {
    padding: 8px 18px !important;
}

.logo {
    font-size: 1.9rem !important;
}

.logo::before {
    width: 26px !important;
    height: 26px !important;
    border-radius: 8px !important;
}

.nav {
    gap: 6px !important;
    font-size: 1.25rem !important;
}

.nav a {
    padding: 6px 8px !important;
}

.container {
    padding: 18px 14px !important;
}

.hero {
    min-height: auto !important;
    gap: 16px !important;
}

h1 {
    font-size: 2.7rem !important;
    line-height: 1.05 !important;
    margin-bottom: 10px !important;
}

h2 {
    font-size: 2rem !important;
    margin-bottom: 10px !important;
}

h3 {
    font-size: 1.55rem !important;
    margin-bottom: 6px !important;
}

p {
    line-height: 1.45 !important;
    margin-top: 6px !important;
    margin-bottom: 8px !important;
}

.card {
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 8px 20px rgba(19, 122, 75, 0.08) !important;
}

.grid {
    gap: 10px !important;
}

.btn {
    font-size: 1.25rem !important;
    padding: 8px 13px !important;
}

.input,
textarea,
select {
    font-size: 1.25rem !important;
    padding: 9px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 8px !important;
}

.sidebar-layout {
    grid-template-columns: 210px 1fr !important;
}

.sidebar {
    padding: 14px !important;
}

.sidebar h2 {
    font-size: 1.75rem !important;
}

.sidebar p {
    font-size: 1.2rem !important;
    margin-bottom: 12px !important;
}

.sidebar a {
    padding: 8px 10px !important;
    border-radius: 10px !important;
    margin-bottom: 6px !important;
    font-size: 1.25rem !important;
}

.main {
    padding: 16px !important;
}

.chat-box {
    height: 360px !important;
    border-radius: 14px !important;
    padding: 10px !important;
}

.msg {
    font-size: 1.25rem !important;
    padding: 9px !important;
    border-radius: 12px !important;
    margin-bottom: 7px !important;
}

.card img {
    height: 130px !important;
    border-radius: 12px !important;
}

.product-price,
.badge,
.pill {
    font-size: 1.15rem !important;
    padding: 5px 8px !important;
}

@media (max-width: 900px) {
    html {
        font-size: 45%;
    }

    .header {
        padding: 8px 12px !important;
    }

    .main {
        padding: 12px !important;
    }

    .sidebar {
        padding: 12px !important;
    }
}

/* === PRODUCT IMAGE PERFECT SQUARE + ZOOM === */

.product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: #f4faf6;
}

/* imagine produs */
.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;       /* crop corect */
    object-position: center; /* focus centru */
    transition: transform 0.4s ease;
}

/* zoom hover */
.product-image-wrapper:hover img {
    transform: scale(1.15);
}

/* overlay subtil premium */
.product-image-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0) 60%,
        rgba(0,0,0,0.12)
    );
    pointer-events: none;
}

/* optional shadow premium */
.product-image-wrapper {
    box-shadow: 0 10px 25px rgba(19, 122, 75, 0.08);
}


/* === FIX FINAL PRODUCT IMAGE SQUARE + FULL FIT + ZOOM === */

.product-image-wrapper {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
    border: 1px solid #d9eee3 !important;
}

.product-image-wrapper img,
.card .product-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: transform 0.35s ease !important;
    background: #ffffff !important;
}

.product-image-wrapper:hover img {
    transform: scale(1.12) !important;
}

/* anulează regula veche care micșora toate imaginile din card */
.card img:not(.product-image-wrapper img) {
    height: auto;
}


/* === PRODUCT IMAGE COMPACT + CLICK ZOOM LIGHTBOX === */

.product-image-wrapper {
    width: 50% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin: 0 auto 10px auto !important;
    overflow: hidden !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid #d9eee3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: zoom-in !important;
}

.product-image-wrapper img,
.card .product-image-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transition: transform 0.25s ease !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.product-image-wrapper:hover img {
    transform: scale(1.08) !important;
}

.med-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(4, 34, 22, 0.86);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.med-lightbox.active {
    display: flex;
}

.med-lightbox img {
    max-width: 88vw;
    max-height: 88vh;
    object-fit: contain;
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.35);
    cursor: zoom-out;
}


/* === NOTIFICATIONS PREMIUM COMPACT === */
.notifications-panel {
    margin-bottom: 12px;
}

.notifications-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notifications-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #b91c1c;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.15rem;
}
