:root {
    --green-dark:   #1e4d0a;
    --green-mid:    #2e7010;
    --green-bright: #4a9e18;
    --green-light:  #6abf2e;
    --green-btn-from: #72c832;
    --green-btn-to:   #2a6a08;
    --white: #ffffff;
    --bg: #f7f9f5;
    --text: #1a1a1a;
}

/* ─── Reset / Base ─────────────────────────── */
* { box-sizing: border-box; }
body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
}

/* ─── Navigācija ────────────────────────────── */
.navbar-magda {
    background: var(--green-dark);
    padding: .7rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.navbar-magda .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.navbar-magda .cart-btn {
    white-space: nowrap;
    flex-shrink: 0;
}
.navbar-magda .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
}
.navbar-magda .brand img {
    height: 48px;
    width: auto;
}
.navbar-magda .brand-text {
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: .02em;
    line-height: 1.15;
    text-shadow: 1px 1px 3px rgba(0,0,0,.4);
    font-style: italic;
}

.navbar-magda .nav-links {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    align-items: center;
}
.navbar-magda .nav-links a {
    color: #d4efb0;
    text-decoration: none;
    font-size: .88rem;
    padding: .3rem .7rem;
    border-radius: 4px;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.navbar-magda .nav-links a:hover,
.navbar-magda .nav-links a.active {
    background: var(--green-mid);
    color: #fff;
}
.navbar-magda .nav-links a.nav-akcija {
    color: #ff4444;
    font-weight: 700;
}
.navbar-magda .nav-links a.nav-akcija:hover,
.navbar-magda .nav-links a.nav-akcija.active {
    background: #c0242d;
    color: #fff;
}
.navbar-magda .cart-btn {
    background: var(--green-btn-to);
    color: #fff !important;
    border: 1px solid var(--green-light);
    font-weight: bold;
    padding: .35rem .9rem !important;
}
.navbar-magda .cart-btn:hover {
    background: var(--green-bright) !important;
}

/* ─── Hero ──────────────────────────────────── */
.hero-magda {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, var(--green-bright) 100%);
    color: #fff;
    padding: 1.5rem 0 1.2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-magda::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-logo {
    display: block;
    margin: 0 auto .9rem;
    width: 260px;
    height: auto;
    position: relative;
    z-index: 1;
}
.hero-magda p {
    font-size: .82rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    position: relative;
    margin-bottom: 1.1rem;
    z-index: 1;
}
.hero-btn {
    display: inline-block;
    background: transparent;
    color: #fff !important;
    font-weight: 600;
    font-size: .88rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .65rem 1.8rem;
    border-radius: 3px;
    border: 1.5px solid rgba(106,191,46,.6);
    text-decoration: none;
    transition: background .2s, border-color .2s;
    position: relative;
    z-index: 1;
}
.hero-btn:hover {
    background: rgba(106,191,46,.12);
    border-color: #6abf2e;
}

/* ─── Kategoriju kartes ─────────────────────── */
.cat-section {
    padding: 2.5rem 0;
}
.cat-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--green-dark);
    margin-bottom: 1.2rem;
    padding-bottom: .4rem;
    border-bottom: 3px solid var(--green-bright);
    display: inline-block;
}
.cat-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: var(--text);
    display: block;
    height: 100%;
}
.cat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(46,112,16,.2);
    color: var(--text);
}
.cat-card-img {
    height: 140px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-bright));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}
.cat-card-body {
    padding: 1rem;
}
.cat-card-body h5 {
    font-weight: 800;
    color: var(--green-dark);
    margin-bottom: .25rem;
    font-size: 1rem;
}
.cat-card-body p {
    font-size: .82rem;
    color: #666;
    margin: 0;
}

/* ─── Zaļā poga ─────────────────────────────── */
.btn-magda {
    background: linear-gradient(180deg, var(--green-btn-from), var(--green-btn-to));
    color: #fff !important;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    padding: .45rem 1.1rem;
    font-size: .9rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,.2);
    transition: filter .15s, transform .1s;
}
.btn-magda:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.btn-magda-outline {
    background: transparent;
    color: var(--green-dark) !important;
    border: 2px solid var(--green-mid);
    font-weight: bold;
    border-radius: 6px;
    padding: .4rem 1rem;
    font-size: .9rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.btn-magda-outline:hover {
    background: var(--green-mid);
    color: #fff !important;
}

/* ─── Produktu karte ─────────────────────────── */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46,112,16,.15);
}
.product-card > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    min-height: 55px;
    max-height: 55px;
    background: #fff;
    overflow: hidden;
}
.product-card img {
    max-height: 40px !important;
    max-width: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}
.product-card .no-img {
    height: 55px;
    width: 100%;
    background: linear-gradient(135deg, #e8f5e0, #c8eaa8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--green-mid);
}
.product-card .card-body {
    padding: .6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card .cat-badge {
    font-size: .72rem;
    color: var(--green-mid);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .3rem;
}
.product-card h6 {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: .4rem;
    flex: 1;
}
.product-card h6 a {
    color: var(--text);
    text-decoration: none;
}
.product-card h6 a:hover { color: var(--green-dark); }
.product-card .price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--green-dark);
}
.product-card .price small { font-weight: 400; color: #888; font-size: .78rem; }

/* ─── Sidebar kategorijas ───────────────────── */
.cat-sidebar .list-group-item {
    border: none;
    border-radius: 6px !important;
    margin-bottom: 3px;
    font-size: .9rem;
    padding: .45rem .8rem;
    color: var(--green-dark);
    font-weight: 500;
    transition: background .12s;
}
.cat-sidebar .list-group-item:hover {
    background: #e4f5d0;
}
.cat-sidebar .list-group-item.sidebar-akcija {
    color: #c0242d;
    font-weight: 700;
}
.cat-sidebar .list-group-item.sidebar-akcija:hover {
    background: #fde8e8;
}
.cat-sidebar .list-group-item.sidebar-akcija.active {
    background: #c0242d;
    color: #fff;
}
.cat-sidebar .list-group-item.active {
    background: var(--green-mid);
    color: #fff;
}
.cat-sidebar h6 {
    color: var(--green-dark);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .5rem;
}

/* ─── Groza badge ───────────────────────────── */
.cart-badge {
    font-size: .65rem;
    top: -4px;
    right: -6px;
    background: #e63946 !important;
}

/* ─── Footer ────────────────────────────────── */
.footer-magda {
    background: var(--green-dark);
    color: #b8d89a;
    padding: 2.5rem 0 1.5rem;
    margin-top: 4rem;
}
.footer-magda h6 {
    color: #fff;
    font-weight: 800;
    margin-bottom: .8rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.footer-magda p, .footer-magda a {
    font-size: .85rem;
    color: #b8d89a;
    text-decoration: none;
    line-height: 1.7;
}
.footer-magda a:hover { color: #fff; }
.footer-magda .footer-bottom {
    border-top: 1px solid #2e6010;
    margin-top: 1.5rem;
    padding-top: 1rem;
    text-align: center;
    font-size: .8rem;
    color: #7aaa50;
}

/* ─── Akcijas produktu karte ────────────────── */
.product-card {
    position: relative;
}
.product-card.is-promo {
    border: 2px solid #e63946;
    box-shadow: 0 2px 12px rgba(230,57,70,.18);
}
.product-card.is-promo:hover {
    box-shadow: 0 8px 24px rgba(230,57,70,.28);
}
.badge-akcija {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e63946;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    padding: .18rem .55rem;
    border-radius: 4px;
    letter-spacing: .06em;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* ─── Kategoriju kartes — ikonas ────────────── */
.cat-card-img {
    position: relative;
    overflow: hidden;
}
.cat-card-img svg {
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.22));
}
.cat-card-img.bg-durvju    { background: linear-gradient(145deg, #1a4a08 0%, #3a8a18 100%); }
.cat-card-img.bg-grid      { background: linear-gradient(145deg, #0e3d1a 0%, #2e7d3e 100%); }
.cat-card-img.bg-profil    { background: linear-gradient(145deg, #1e4d2a 0%, #4a9e38 100%); }
.cat-card-img.bg-taisn     { background: linear-gradient(145deg, #2a5010 0%, #5aaa1e 100%); }
.cat-card-img.bg-apal      { background: linear-gradient(145deg, #3d2a10 0%, #8a6030 100%); }
.cat-card-img.bg-vieng     { background: linear-gradient(145deg, #103040 0%, #206880 100%); }
.cat-card-img.bg-citas     { background: linear-gradient(145deg, #2a2a40 0%, #4a4a88 100%); }
.cat-card-img.bg-akcija    { background: linear-gradient(145deg, #8a1a1a 0%, #e04040 100%); }
.cat-card--akcija {
    border: 2px solid #e63946;
    box-shadow: 0 2px 12px rgba(230,57,70,.18);
}
.cat-card--akcija:hover {
    box-shadow: 0 8px 28px rgba(230,57,70,.32) !important;
}
.cat-card--akcija .cat-card-body h5 {
    color: #c0242d;
}
.cat-card-img.bg-default   { background: linear-gradient(135deg, var(--green-dark), var(--green-bright)); }

/* ─── Info josla ────────────────────────────── */
.topbar-info {
    background: var(--green-mid);
    color: #d4efb0;
    font-size: .8rem;
    padding: .3rem 0;
    text-align: center;
}
.topbar-info a { color: #d4efb0; }
