/* =========================================================
   AGENDI THEME — Associazione
   Palette: navy profondo + accenti caldi (cream/amber)
   Font: Plus Jakarta Sans
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --ag-blue:        #1e3a8a;
    --ag-blue-dark:   #172554;
    --ag-blue-deep:   #0f1e4d;
    --ag-blue-soft:   #eef2ff;
    --ag-blue-mid:    #3b5bd9;
    --ag-blue-tint:   #f6f8ff;

    --ag-cream:       #fdf8f0;
    --ag-cream-2:     #fbf2e2;
    --ag-amber:       #d49a4a;
    --ag-amber-soft:  #f4e3c5;
    --ag-terracotta:  #c97b5a;

    --ag-bg:          #ffffff;
    --ag-surface:     #ffffff;
    --ag-surface-2:   #fafbfd;
    --ag-text:        #0f172a;
    --ag-text-soft:   #475569;
    --ag-muted:       #94a3b8;
    --ag-border:      #e6e9f2;
    --ag-border-2:    #eef0f6;

    --ag-success:     #16a34a;
    --ag-danger:      #dc2626;
    --ag-warning:     #d97706;
    --ag-info:        #0284c7;

    --ag-shadow-sm:   0 1px 2px rgba(15, 30, 77, .04), 0 1px 3px rgba(15, 30, 77, .04);
    --ag-shadow:      0 4px 14px -2px rgba(15, 30, 77, .08), 0 2px 6px rgba(15, 30, 77, .04);
    --ag-shadow-lg:   0 24px 60px -20px rgba(15, 30, 77, .18), 0 8px 18px -8px rgba(15, 30, 77, .08);

    --ag-radius-sm:   8px;
    --ag-radius:      14px;
    --ag-radius-lg:   22px;
    --ag-radius-pill: 999px;

    --ag-ease:        cubic-bezier(.2, .8, .2, 1);
}

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

html, body {
    background: var(--ag-bg);
    color: var(--ag-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-image:
        radial-gradient(circle at 92% -10%, rgba(212, 154, 74, .07), transparent 38%),
        radial-gradient(circle at -5% 110%, rgba(30, 58, 138, .05), transparent 40%);
    background-attachment: fixed;
    min-height: 100vh;
}

::selection { background: var(--ag-blue); color: #fff; }

a {
    color: var(--ag-blue);
    text-decoration: none;
    transition: color .2s var(--ag-ease);
}
a:hover { color: var(--ag-blue-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: var(--ag-text);
    letter-spacing: -0.02em;
}
h1 { font-weight: 800; letter-spacing: -0.035em; }

.text-muted { color: var(--ag-text-soft) !important; }
.bg-light, .bg-body-tertiary { background: var(--ag-surface-2) !important; }

/* ---------- Container ---------- */
.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
@media (min-width: 992px) {
    .container, .container-lg, .container-md, .container-sm, .container-xl { max-width: 1180px; }
}

/* ---------- Topbar / Navbar ---------- */
.ag-topbar {
    background: var(--ag-blue-deep);
    color: rgba(255,255,255,.82);
    font-size: .85rem;
    padding: .55rem 0;
    letter-spacing: .01em;
}
.ag-topbar a { color: rgba(255,255,255,.82); }
.ag-topbar a:hover { color: #fff; }
.ag-topbar .ag-dot {
    display: inline-block; width: 4px; height: 4px;
    background: rgba(255,255,255,.35); border-radius: 50%;
    margin: 0 .65rem; vertical-align: middle;
}

.ag-navbar {
    background: #fff;
    border-bottom: 1px solid var(--ag-border-2);
    padding: .65rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: saturate(180%) blur(10px);
    background: rgba(255,255,255,.92);
}
.ag-navbar .navbar-brand {
    display: flex; align-items: center; gap: .75rem;
    font-weight: 800; font-size: 1.25rem;
    color: var(--ag-blue-dark);
    letter-spacing: -0.02em;
    padding-top: 0;
    padding-bottom: 0;
    margin-right: .65rem;
}
.ag-navbar .navbar-brand img,
.ag-navbar .navbar-brand svg { height: 78px; width: auto; }
.ag-navbar .navbar-brand .ag-brand-sub {
    display: block;
    font-size: .68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--ag-amber);
    margin-top: 2px;
}

.ag-navbar .nav-link {
    color: var(--ag-text);
    font-weight: 500;
    padding: .55rem 1rem !important;
    border-radius: var(--ag-radius-pill);
    transition: all .2s var(--ag-ease);
    position: relative;
}
.ag-navbar .nav-link:hover { color: var(--ag-blue); background: var(--ag-blue-soft); }
.ag-navbar .nav-link.active {
    color: var(--ag-blue);
    background: var(--ag-blue-soft);
}

.ag-navbar .dropdown-menu {
    border: 1px solid var(--ag-border);
    border-radius: var(--ag-radius);
    box-shadow: var(--ag-shadow-lg);
    padding: .5rem;
    margin-top: .5rem !important;
}
.ag-navbar .dropdown-item {
    border-radius: var(--ag-radius-sm);
    padding: .55rem .85rem;
    font-weight: 500;
    transition: background .15s var(--ag-ease);
}
.ag-navbar .dropdown-item:hover { background: var(--ag-blue-soft); color: var(--ag-blue); }

.ag-navbar .ag-icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--ag-radius-pill);
    color: var(--ag-text);
    background: transparent;
    border: 1px solid transparent;
    transition: all .2s var(--ag-ease);
    position: relative;
}
.ag-navbar .ag-icon-btn:hover {
    background: var(--ag-blue-soft);
    color: var(--ag-blue);
}
.ag-navbar .ag-icon-btn .ag-badge {
    position: absolute; top: 6px; right: 6px;
    background: var(--ag-amber);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    height: 18px; min-width: 18px;
    border-radius: 9px;
    padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* ---------- Buttons ---------- */
.btn {
    font-weight: 600;
    border-radius: var(--ag-radius-pill);
    padding: .65rem 1.4rem;
    transition: all .2s var(--ag-ease);
    letter-spacing: -0.005em;
    border-width: 1.5px;
}
.btn:focus, .btn:focus-visible { box-shadow: 0 0 0 4px rgba(30, 58, 138, .15) !important; }

.btn-primary, .btn-ag-primary {
    background: var(--ag-blue);
    border-color: var(--ag-blue);
    color: #fff;
}
.btn-primary:hover, .btn-ag-primary:hover {
    background: var(--ag-blue-dark);
    border-color: var(--ag-blue-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -6px rgba(30, 58, 138, .35);
}

.btn-outline-primary {
    border-color: var(--ag-blue);
    color: var(--ag-blue);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--ag-blue);
    border-color: var(--ag-blue);
    color: #fff;
}

.btn-ag-amber {
    background: var(--ag-amber);
    border-color: var(--ag-amber);
    color: #fff;
}
.btn-ag-amber:hover {
    background: #b8842f;
    border-color: #b8842f;
    color: #fff;
    transform: translateY(-1px);
}

.btn-light, .btn-ag-soft {
    background: var(--ag-blue-soft);
    border-color: var(--ag-blue-soft);
    color: var(--ag-blue);
}
.btn-light:hover, .btn-ag-soft:hover {
    background: #dbe3ff;
    border-color: #dbe3ff;
    color: var(--ag-blue-dark);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--ag-text);
}
.btn-ghost:hover { background: var(--ag-surface-2); color: var(--ag-blue); }

.btn-lg { padding: .9rem 1.8rem; font-size: 1.05rem; }
.btn-sm { padding: .4rem .9rem; font-size: .85rem; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: var(--ag-radius);
    border: 1.5px solid var(--ag-border);
    padding: .75rem 1rem;
    font-size: .95rem;
    background: #fff;
    transition: all .2s var(--ag-ease);
}
.form-control:focus, .form-select:focus {
    border-color: var(--ag-blue);
    box-shadow: 0 0 0 4px rgba(30, 58, 138, .12);
}
.form-control::placeholder { color: var(--ag-muted); }
.form-label {
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .4rem;
    color: var(--ag-text);
}
.form-text { color: var(--ag-text-soft); }
.form-check-input:checked { background-color: var(--ag-blue); border-color: var(--ag-blue); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(30, 58, 138, .12); border-color: var(--ag-blue); }

.input-group-text {
    background: var(--ag-blue-soft);
    border: 1.5px solid var(--ag-border);
    color: var(--ag-blue);
    border-radius: var(--ag-radius);
}

/* ---------- Cards ---------- */
.card, .ag-card {
    border: 1px solid var(--ag-border-2);
    border-radius: var(--ag-radius-lg);
    background: var(--ag-surface);
    box-shadow: var(--ag-shadow-sm);
    transition: all .25s var(--ag-ease);
}
.card-body, .ag-card-body { padding: 1.6rem; }
.card-title { font-weight: 700; }

.ag-card-elevated { box-shadow: var(--ag-shadow); }
.ag-card-elevated:hover {
    transform: translateY(-3px);
    box-shadow: var(--ag-shadow-lg);
    border-color: var(--ag-blue-soft);
}

/* ---------- Product card ---------- */
.ag-product {
    border: 1px solid var(--ag-border-2);
    border-radius: var(--ag-radius-lg);
    overflow: hidden;
    background: #fff;
    transition: all .3s var(--ag-ease);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.ag-product:hover {
    transform: translateY(-4px);
    box-shadow: var(--ag-shadow-lg);
    border-color: var(--ag-blue-soft);
}
.ag-product-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--ag-surface-2);
}
.ag-product-media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s var(--ag-ease);
}
.ag-product:hover .ag-product-media img { transform: scale(1.05); }
.ag-product-tag {
    position: absolute; top: 14px; left: 14px;
    background: rgba(255,255,255,.95);
    color: var(--ag-blue-dark);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: .35rem .7rem;
    border-radius: var(--ag-radius-pill);
    backdrop-filter: blur(4px);
}
.ag-product-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.ag-product-code { font-size: .72rem; color: var(--ag-muted); text-transform: uppercase; letter-spacing: .14em; font-weight: 600; }
.ag-product-title { font-size: 1.05rem; font-weight: 700; margin: .35rem 0 .5rem; line-height: 1.35; color: var(--ag-text); }
.ag-product-title a { color: inherit; }
.ag-product-title a:hover { color: var(--ag-blue); }
.ag-product-desc { color: var(--ag-text-soft); font-size: .9rem; flex: 1; }
.ag-product-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--ag-border);
}
.ag-product-price { font-size: 1.25rem; font-weight: 800; color: var(--ag-blue-dark); }
.ag-product-price small { font-size: .68rem; font-weight: 600; color: var(--ag-muted); letter-spacing: .08em; text-transform: uppercase; display: block; margin-bottom: -2px; }

/* ---------- Hero ---------- */
.ag-hero {
    background: linear-gradient(135deg, var(--ag-blue-deep) 0%, var(--ag-blue) 60%, #2a4cbf 100%);
    color: #fff;
    padding: 5rem 0 6rem;
    border-radius: 0 0 36px 36px;
    margin-bottom: 4rem;
    position: relative;
    overflow: hidden;
}
.ag-hero-carousel {
    padding: 0;
}
.ag-hero-carousel .carousel,
.ag-hero-carousel .carousel-inner,
.ag-hero-carousel .carousel-item {
    min-height: clamp(480px, 52vw, 680px);
}
.ag-hero-carousel .ag-hero-slide {
    position: relative;
    min-height: clamp(480px, 52vw, 680px);
    padding: 5rem 0 6rem;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.ag-hero-carousel .ag-hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        radial-gradient(circle at 88% 18%, rgba(212, 154, 74, .28), transparent 36%),
        radial-gradient(circle at 8% 92%, rgba(255,255,255,.10), transparent 40%);
    pointer-events: none;
}
.ag-hero-carousel .ag-hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .6;
    mix-blend-mode: overlay;
    pointer-events: none;
}
.ag-hero-slide--1 {
    background-color: var(--ag-blue-deep);
    background-image:
        linear-gradient(135deg, rgba(15, 30, 77, .84) 0%, rgba(30, 58, 138, .78) 60%, rgba(42, 76, 191, .72) 100%),
        var(--ag-hero-bg-image, linear-gradient(135deg, var(--ag-blue-deep) 0%, var(--ag-blue) 60%, #2a4cbf 100%));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.ag-hero-slide--2 {
    background-color: #172554;
    background-image:
        linear-gradient(135deg, rgba(23, 37, 84, .84) 0%, rgba(30, 64, 175, .78) 55%, rgba(37, 99, 235, .72) 100%),
        var(--ag-hero-bg-image, linear-gradient(135deg, #172554 0%, #1e40af 55%, #2563eb 100%));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.ag-hero-slide--3 {
    background-color: #0f1e4d;
    background-image:
        linear-gradient(135deg, rgba(15, 30, 77, .84) 0%, rgba(30, 58, 138, .78) 50%, rgba(29, 78, 216, .72) 100%),
        var(--ag-hero-bg-image, linear-gradient(135deg, #0f1e4d 0%, #1e3a8a 50%, #1d4ed8 100%));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.ag-hero-carousel .container { position: relative; z-index: 2; }
.ag-hero-indicators {
    margin-bottom: 1.25rem;
    gap: .35rem;
}
.ag-hero-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.35);
    opacity: 1;
    transition: transform .25s var(--ag-ease), background .25s var(--ag-ease);
}
.ag-hero-indicators .active {
    background: var(--ag-amber);
    transform: scale(1.15);
}
.ag-hero-control {
    width: auto;
    opacity: 1;
    z-index: 3;
}
.ag-hero-control-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff;
    backdrop-filter: blur(6px);
    transition: background .2s var(--ag-ease), transform .2s var(--ag-ease);
}
.ag-hero-control:hover .ag-hero-control-icon,
.ag-hero-control:focus .ag-hero-control-icon {
    background: rgba(255,255,255,.24);
    transform: scale(1.05);
}
.ag-hero-carousel .carousel-control-prev { left: 1rem; }
.ag-hero-carousel .carousel-control-next { right: 1rem; }
@media (min-width: 992px) {
    .ag-hero-carousel .carousel-control-prev { left: 1.75rem; }
    .ag-hero-carousel .carousel-control-next { right: 1.75rem; }
}
@media (max-width: 575.98px) {
    .ag-hero-carousel .ag-hero-slide { padding: 3.5rem 0 4.5rem; }
    .ag-hero-carousel .carousel-control-prev,
    .ag-hero-carousel .carousel-control-next { display: none; }
}
.ag-hero:not(.ag-hero-carousel)::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 88% 18%, rgba(212, 154, 74, .28), transparent 36%),
        radial-gradient(circle at 8% 92%, rgba(255,255,255,.10), transparent 40%);
    pointer-events: none;
}
.ag-hero:not(.ag-hero-carousel)::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: .6;
    mix-blend-mode: overlay;
    pointer-events: none;
}
.ag-hero:not(.ag-hero-carousel) > .container { position: relative; z-index: 2; }
.ag-hero-eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    background: rgba(255,255,255,.12);
    padding: .45rem 1rem;
    border-radius: var(--ag-radius-pill);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.18);
}
.ag-hero-eyebrow .ag-dot-warm {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--ag-amber);
    box-shadow: 0 0 0 4px rgba(212, 154, 74, .35);
}
.ag-hero h1 {
    color: #fff;
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    line-height: 1.05;
    margin: 1.25rem 0 1.25rem;
    font-weight: 800;
}
.ag-hero h1 .ag-accent { color: var(--ag-amber-soft); font-style: italic; font-weight: 600; }
.ag-hero p.lead {
    color: rgba(255,255,255,.85);
    font-size: 1.15rem;
    max-width: 580px;
    margin-bottom: 2rem;
}
.ag-hero-stats {
    display: flex; gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,.15);
}
.ag-hero-stat .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ag-amber-soft);
    letter-spacing: -0.02em;
    line-height: 1;
}
.ag-hero-stat .lbl {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: rgba(255,255,255,.7);
    margin-top: .35rem;
    display: block;
}

/* ---------- Section heading ---------- */
.ag-section { padding: 4rem 0; }
.ag-section-head { margin-bottom: 2.5rem; }
.ag-section-eyebrow {
    color: var(--ag-amber);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    display: inline-flex; align-items: center; gap: .6rem;
    margin-bottom: .8rem;
}
.ag-section-eyebrow::before {
    content: ''; width: 24px; height: 2px;
    background: var(--ag-amber);
    border-radius: 2px;
}
.ag-section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin-bottom: .6rem; font-weight: 800; }
.ag-section-sub { color: var(--ag-text-soft); font-size: 1.05rem; max-width: 640px; }

/* ---------- Badges ---------- */
.badge {
    font-weight: 600;
    padding: .4em .75em;
    border-radius: var(--ag-radius-pill);
    letter-spacing: .02em;
}
.bg-primary { background: var(--ag-blue) !important; }
.bg-info, .bg-info.text-dark { background: #dbeafe !important; color: var(--ag-blue-dark) !important; }
.bg-warning, .bg-warning.text-dark { background: var(--ag-amber-soft) !important; color: #7a4a06 !important; }
.bg-success { background: #d1fae5 !important; color: #065f46 !important; }
.bg-danger { background: #fee2e2 !important; color: #991b1b !important; }
.bg-dark { background: #1e293b !important; }
.bg-indigo { background: #4f46e5 !important; color: #fff !important; }

/* ---------- Alerts ---------- */
.alert {
    border: 1px solid transparent;
    border-radius: var(--ag-radius);
    padding: 1rem 1.2rem;
    font-weight: 500;
}
.alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warning { background: #fffbeb; border-color: var(--ag-amber-soft); color: #92400e; }
.alert-info    { background: var(--ag-blue-tint); border-color: #c7d2fe; color: var(--ag-blue-dark); }

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: transparent;
    color: var(--ag-text);
    border-color: var(--ag-border-2);
}
.table > thead {
    background: var(--ag-blue-tint);
    color: var(--ag-text);
}
.table > thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: var(--ag-blue-dark);
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--ag-border);
}
.table > tbody > tr > td {
    padding: 1rem 1.1rem;
    vertical-align: middle;
    border-color: var(--ag-border-2);
}
.table-hover > tbody > tr:hover { background: var(--ag-blue-tint); }

/* ---------- Page header (page.php) ---------- */
.ag-page-header {
    background: linear-gradient(160deg, var(--ag-blue-tint) 0%, var(--ag-cream) 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--ag-border-2);
    position: relative;
}
.ag-page-header h1 { margin-bottom: .75rem; }
.ag-breadcrumb {
    font-size: .85rem;
    color: var(--ag-text-soft);
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap;
}
.ag-breadcrumb a { color: var(--ag-blue); }
.ag-breadcrumb .sep { color: var(--ag-muted); }

/* Cover image */
.ag-cover {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: var(--ag-radius-lg);
    margin-bottom: 2.5rem;
    box-shadow: var(--ag-shadow);
}

.ag-prose {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--ag-text);
    max-width: 740px;
}
.ag-prose h2 { font-size: 1.7rem; margin: 2.5rem 0 1rem; }
.ag-prose h3 { font-size: 1.35rem; margin: 2rem 0 .8rem; }
.ag-prose p { margin-bottom: 1.2rem; color: var(--ag-text-soft); }
.ag-prose a { font-weight: 600; border-bottom: 1px solid currentColor; }
.ag-prose ul, .ag-prose ol { margin-bottom: 1.4rem; padding-left: 1.4rem; color: var(--ag-text-soft); }
.ag-prose li { margin-bottom: .4rem; }
.ag-prose blockquote {
    border-left: 3px solid var(--ag-amber);
    padding: .5rem 0 .5rem 1.4rem;
    margin: 1.6rem 0;
    color: var(--ag-text);
    font-style: italic;
    font-size: 1.1rem;
}
.ag-prose img { max-width: 100%; height: auto; border-radius: var(--ag-radius); margin: 1.4rem 0; }

/* ---------- Auth pages (login / register) ---------- */
.ag-auth {
    min-height: calc(100vh - 80px);
    display: flex;
    background: linear-gradient(135deg, var(--ag-blue-tint) 0%, #fff 50%, var(--ag-cream) 100%);
}
.ag-auth-panel {
    flex: 0 0 45%;
    background: linear-gradient(160deg, var(--ag-blue-deep), var(--ag-blue) 80%);
    color: #fff;
    padding: 4rem 3.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ag-auth-panel::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 110%, rgba(212, 154, 74, .35), transparent 50%);
}
.ag-auth-panel > * { position: relative; z-index: 2; }
.ag-auth-panel h2 { color: #fff; font-size: 2.2rem; line-height: 1.15; margin-bottom: 1rem; }
.ag-auth-panel .ag-accent { color: var(--ag-amber-soft); font-style: italic; font-weight: 500; }
.ag-auth-panel p { color: rgba(255,255,255,.8); max-width: 380px; }
.ag-auth-quote {
    border-left: 3px solid var(--ag-amber);
    padding-left: 1.2rem;
    color: rgba(255,255,255,.9);
    font-style: italic;
    max-width: 380px;
}
.ag-auth-quote cite {
    display: block; font-style: normal; font-weight: 600;
    color: var(--ag-amber-soft);
    margin-top: .7rem;
    font-size: .85rem;
}
.ag-auth-form-wrap {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 3rem 2rem;
}
.ag-auth-form {
    width: 100%;
    max-width: 440px;
}
.ag-auth-form h1 { font-size: 2rem; margin-bottom: .4rem; }
.ag-auth-form .lead { color: var(--ag-text-soft); margin-bottom: 2rem; }
.ag-auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
    font-size: .8rem;
    color: var(--ag-muted);
    text-transform: uppercase;
    letter-spacing: .15em;
}
.ag-auth-divider::before {
    content: '';
    position: absolute; top: 50%; left: 0; right: 0;
    height: 1px; background: var(--ag-border);
    z-index: -1;
}
.ag-auth-divider span { background: #fff; padding: 0 1rem; }

@media (max-width: 991px) {
    .ag-auth { flex-direction: column; min-height: auto; }
    .ag-auth-panel { flex: 0 0 auto; padding: 3rem 1.5rem; }
}

/* ---------- Cart ---------- */
.ag-cart-item {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 1.2rem;
    padding: 1.4rem;
    border: 1px solid var(--ag-border-2);
    border-radius: var(--ag-radius);
    margin-bottom: .8rem;
    align-items: center;
    background: #fff;
    transition: all .2s var(--ag-ease);
}
.ag-cart-item:hover { border-color: var(--ag-blue-soft); box-shadow: var(--ag-shadow-sm); }
.ag-cart-item img {
    width: 90px; height: 90px; object-fit: cover;
    border-radius: var(--ag-radius);
    background: var(--ag-surface-2);
}
.ag-cart-item-title { font-weight: 700; margin-bottom: .25rem; }
.ag-qty {
    display: inline-flex; align-items: center;
    border: 1.5px solid var(--ag-border);
    border-radius: var(--ag-radius-pill);
    overflow: hidden;
    background: #fff;
}
.ag-qty button {
    width: 34px; height: 34px;
    border: 0; background: transparent;
    font-size: 1rem; font-weight: 600;
    color: var(--ag-text);
    cursor: pointer;
    transition: background .15s var(--ag-ease);
}
.ag-qty button:hover { background: var(--ag-blue-soft); color: var(--ag-blue); }
.ag-qty input {
    width: 44px; height: 34px;
    text-align: center;
    border: 0;
    background: transparent;
    font-weight: 600;
    color: var(--ag-text);
}
.ag-qty input:focus { outline: none; }

.ag-summary {
    position: sticky; top: 100px;
    background: var(--ag-cream);
    border: 1px solid var(--ag-amber-soft);
    border-radius: var(--ag-radius-lg);
    padding: 1.8rem;
}
.ag-summary h3 { font-size: 1.1rem; margin-bottom: 1.2rem; }
.ag-summary-row {
    display: flex; justify-content: space-between;
    padding: .5rem 0;
    font-size: .95rem;
    color: var(--ag-text-soft);
}
.ag-summary-total {
    display: flex; justify-content: space-between;
    padding-top: 1rem;
    margin-top: .8rem;
    border-top: 1px dashed var(--ag-amber);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ag-blue-dark);
}

/* ---------- Checkout steps ---------- */
.ag-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 720px;
    margin: 0 auto 3rem;
    padding: 0 1rem;
    gap: 1rem;
}
.ag-step {
    flex: 1;
    display: flex; align-items: center; gap: .8rem;
    color: var(--ag-muted);
    font-weight: 600;
    font-size: .9rem;
    position: relative;
}
.ag-step-num {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--ag-surface-2);
    color: var(--ag-muted);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    border: 2px solid var(--ag-border);
    transition: all .25s var(--ag-ease);
    flex-shrink: 0;
}
.ag-step.is-active .ag-step-num {
    background: var(--ag-blue);
    color: #fff;
    border-color: var(--ag-blue);
    box-shadow: 0 0 0 6px var(--ag-blue-soft);
}
.ag-step.is-done .ag-step-num {
    background: var(--ag-blue);
    color: #fff;
    border-color: var(--ag-blue);
}
.ag-step.is-active, .ag-step.is-done { color: var(--ag-text); }
.ag-step::after {
    content: '';
    flex: 1; height: 2px;
    background: var(--ag-border);
    margin-left: .5rem;
    border-radius: 2px;
}
.ag-step:last-child::after { display: none; }
.ag-step.is-done::after { background: var(--ag-blue); }

/* ---------- Dashboard ---------- */
.ag-dash-hero {
    background: linear-gradient(135deg, var(--ag-blue-deep), var(--ag-blue) 70%);
    color: #fff;
    padding: 3rem 2.5rem;
    border-radius: var(--ag-radius-lg);
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}
.ag-dash-hero::before {
    content: '';
    position: absolute; right: -40px; top: -40px;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 154, 74, .35), transparent 70%);
}
.ag-dash-hero h1 { color: #fff; font-size: 2rem; margin-bottom: .35rem; }
.ag-dash-hero p { color: rgba(255,255,255,.8); margin: 0; }

.ag-stat {
    background: #fff;
    border: 1px solid var(--ag-border-2);
    border-radius: var(--ag-radius-lg);
    padding: 1.6rem;
    transition: all .25s var(--ag-ease);
    height: 100%;
}
.ag-stat:hover {
    border-color: var(--ag-blue-soft);
    box-shadow: var(--ag-shadow);
    transform: translateY(-2px);
}
.ag-stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--ag-radius);
    background: var(--ag-blue-soft);
    color: var(--ag-blue);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.ag-stat-icon.warm { background: var(--ag-amber-soft); color: #7a4a06; }
.ag-stat-val { font-size: 1.85rem; font-weight: 800; color: var(--ag-blue-dark); letter-spacing: -0.02em; line-height: 1; }
.ag-stat-lbl { color: var(--ag-text-soft); font-size: .9rem; margin-top: .35rem; }

/* ---------- Sidebar account ---------- */
.ag-side-nav {
    background: #fff;
    border: 1px solid var(--ag-border-2);
    border-radius: var(--ag-radius-lg);
    padding: .8rem;
    position: sticky;
    top: 100px;
}
.ag-side-nav a {
    display: flex; align-items: center; gap: .8rem;
    padding: .75rem 1rem;
    border-radius: var(--ag-radius);
    color: var(--ag-text);
    font-weight: 500;
    transition: all .2s var(--ag-ease);
}
.ag-side-nav a i { width: 18px; text-align: center; color: var(--ag-muted); }
.ag-side-nav a:hover { background: var(--ag-blue-tint); color: var(--ag-blue); }
.ag-side-nav a:hover i { color: var(--ag-blue); }
.ag-side-nav a.active {
    background: var(--ag-blue);
    color: #fff;
}
.ag-side-nav a.active i { color: #fff; }

/* ---------- Empty state ---------- */
.ag-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    background: var(--ag-surface-2);
    border-radius: var(--ag-radius-lg);
    border: 1px dashed var(--ag-border);
}
.ag-empty .ag-empty-icon {
    width: 80px; height: 80px;
    margin: 0 auto 1.4rem;
    border-radius: 50%;
    background: var(--ag-blue-soft);
    color: var(--ag-blue);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2rem;
}
.ag-empty h3 { margin-bottom: .5rem; }
.ag-empty p { color: var(--ag-text-soft); margin-bottom: 1.5rem; }

/* ---------- Footer ---------- */
.ag-footer {
    background: var(--ag-blue-deep);
    color: rgba(255,255,255,.7);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
    position: relative;
    overflow: hidden;
}
.ag-footer::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ag-amber), transparent);
}
.ag-footer h5 {
    color: #fff;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 1.2rem;
    font-weight: 700;
}
.ag-footer a { color: rgba(255,255,255,.7); transition: color .15s var(--ag-ease); }
.ag-footer a:hover { color: var(--ag-amber-soft); }
.ag-footer ul { list-style: none; padding: 0; }
.ag-footer ul li { margin-bottom: .55rem; font-size: .92rem; }
.ag-footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.ag-footer-brand img, .ag-footer-brand svg { height: 44px; width: auto; }
.ag-footer-brand .ag-brand-name { color: #fff; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.ag-footer-tag { color: rgba(255,255,255,.6); max-width: 320px; line-height: 1.6; font-size: .92rem; }
.ag-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    margin-top: 3rem;
    display: flex; justify-content: space-between; align-items: center;
    font-size: .85rem;
    color: rgba(255,255,255,.55);
    flex-wrap: wrap; gap: 1rem;
}
.ag-social {
    display: flex; gap: .6rem;
}
.ag-social a {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    transition: all .2s var(--ag-ease);
}
.ag-social a:hover {
    background: var(--ag-amber);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Cookie consent (solo tecnici) ---------- */
.ag-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1080;
    padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 30, 77, .97);
    color: rgba(255, 255, 255, .92);
    border-top: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 -12px 40px rgba(15, 30, 77, .25);
    backdrop-filter: blur(8px);
    transform: translateY(110%);
    opacity: 0;
    transition: transform .45s var(--ag-ease), opacity .45s var(--ag-ease);
}
.ag-cookie-banner.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.ag-cookie-banner__inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.ag-cookie-banner__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(212, 154, 74, .18);
    color: var(--ag-amber-soft);
    font-size: 1.15rem;
}
.ag-cookie-banner__body { flex: 1; min-width: 0; }
.ag-cookie-banner__title {
    font-weight: 700;
    font-size: .95rem;
    margin-bottom: .35rem;
    color: #fff;
}
.ag-cookie-banner__text {
    font-size: .84rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .82);
}
.ag-cookie-banner__text--sub {
    margin-top: .45rem;
    font-size: .8rem;
    color: rgba(255, 255, 255, .68);
}
.ag-cookie-banner__links {
    margin-top: .65rem;
    font-size: .82rem;
}
.ag-cookie-banner__links a {
    color: var(--ag-amber-soft);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ag-cookie-banner__links a:hover { color: #fff; }
.ag-cookie-banner__actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-top: .15rem;
}
@media (max-width: 767.98px) {
    .ag-cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .ag-cookie-banner__actions {
        padding-top: 0;
    }
    .ag-cookie-banner__actions .btn {
        width: 100%;
    }
}

/* ---------- Animations ---------- */
@keyframes ag-fade-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ag-fade-up { animation: ag-fade-up .6s var(--ag-ease) both; }
.ag-delay-1 { animation-delay: .08s; }
.ag-delay-2 { animation-delay: .16s; }
.ag-delay-3 { animation-delay: .24s; }
.ag-delay-4 { animation-delay: .32s; }

/* ---------- Utilities ---------- */
.ag-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ag-border), transparent);
    margin: 2rem 0;
}
.ag-chip {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .85rem;
    background: var(--ag-blue-soft);
    color: var(--ag-blue);
    font-size: .8rem;
    font-weight: 600;
    border-radius: var(--ag-radius-pill);
}
.ag-chip.warm { background: var(--ag-amber-soft); color: #7a4a06; }
.text-warm { color: var(--ag-amber) !important; }
.bg-cream { background: var(--ag-cream) !important; }

/* ---------- Cart icon dropdown override ---------- */
.cart-dropdown, .ag-navbar .dropdown-menu.cart-menu {
    min-width: 320px;
}
