:root {
    --bg-color: #FDFBF7; /* Crema */
    --primary: #DA4116;  /* Arancio Bruciato */
    --text: #1A1A1A;
    --border-color: #1A1A1A;
    --radius: 12px;
    --shadow: 4px 4px 0px #1A1A1A;
    --font-main: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background-color: var(--bg-color); color: var(--text); line-height: 1.6; }

/* Layout */
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 20px 0; }
header { border-bottom: 2px solid var(--border-color); padding: 1rem 0; background: #fff; position: sticky; top:0; z-index: 100; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-transform: uppercase; text-decoration: none; }
nav a { color: var(--text); text-decoration: none; font-weight: 600; margin-left: 15px; }

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
}
.btn:active { box-shadow: 1px 1px 0px var(--border-color); transform: translate(3px, 3px); }
.btn-small { padding: 5px 10px; font-size: 0.9rem; }
.btn-outline { background: transparent; color: var(--text); }

/* Hero */
.hero { text-align: center; padding: 60px 20px; background: #fff; border-bottom: 2px solid var(--border-color); margin-bottom: 30px; }
.hero h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 10px; color: var(--text); }
.hero p { font-size: 1.1rem; margin-bottom: 20px; opacity: 0.8; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.card-img { width: 100%; height: 200px; object-fit: cover; background: #eee; }
.card-body { padding: 20px; }
.tag-price {
    background: #FFD700; border: 2px solid var(--border-color);
    padding: 3px 8px; font-size: 0.8rem; font-weight: bold; border-radius: 6px; display: inline-block; margin-bottom: 10px;
}
.card h3 { margin-bottom: 5px; }
.card p { font-size: 0.9rem; color: #555; }

/* Filters */
.filters { background: #fff; border: 2px solid var(--border-color); padding: 15px; border-radius: var(--radius); margin-bottom: 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.filters input, .filters select { padding: 10px; border: 2px solid var(--border-color); border-radius: 8px; font-family: inherit; }

/* Forms */
.auth-box { max-width: 400px; margin: 40px auto; padding: 30px; background: #fff; border: 2px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 2px solid var(--border-color); border-radius: 8px; }

/* Alerts */
.alert { padding: 10px; border: 2px solid var(--border-color); margin-bottom: 20px; border-radius: 8px; font-weight: bold; }
.alert-success { background: #D4EDDA; color: #155724; }
.alert-error { background: #F8D7DA; color: #721C24; }

/* Comments */
.comment { border-bottom: 1px solid #ccc; padding: 15px 0; }
.rating { color: var(--primary); font-weight: bold; }

/* Footer */
footer { text-align: center; padding: 20px; margin-top: 50px; border-top: 2px solid var(--border-color); background: #fff; }

@media (max-width: 768px) {
    .nav-flex { flex-direction: column; gap: 10px; }
    .hero h1 { font-size: 2rem; }
    .filters { flex-direction: column; }
}

/* ===== Tegami Ribelli – Home app-like (mobile-first) ===== */
:root{
  --bg: #f7eedf;
  --card: #ffffff;
  --ink: #171717;
  --muted: #5b5b5b;
  --accent: #d64527;
  --accent2: #ff7a3d;
  --stroke: rgba(0,0,0,.10);
  --shadow: 0 10px 24px rgba(0,0,0,.08);
  --radius: 18px;
}

body.tr{
  margin:0;
  font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.tr-topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(247,238,223,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stroke);
}

.tr-brand{
  display:flex;
  align-items:center;
  gap: 10px;
  text-decoration:none;
  color: inherit;
  min-width: 0;
}
.tr-mark{
  width: 40px; height: 40px;
  display:grid; place-items:center;
  border-radius: 12px;
  background: var(--accent);
  color:#fff;
  font-weight: 800;
  letter-spacing: .5px;
  box-shadow: 0 10px 18px rgba(214,69,39,.25);
}
.tr-brandtext{display:flex; flex-direction:column; line-height:1.05; min-width:0;}
.tr-brandname{font-weight:800; font-size: 16px;}
.tr-brandtag{font-size:12px; color: var(--muted); font-weight:600;}

.tr-nav{display:flex; gap: 10px; align-items:center;}
.tr-navlink{
  text-decoration:none;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 999px;
}
.tr-navlink--cta{
  background: #fff;
  border: 1px solid var(--stroke);
}

.tr-shell{
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 16px 28px;
}

.tr-hero{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 18px 0 10px;
}
.tr-hero__panel{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.tr-h1{
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.5px;
}
.tr-sub{
  margin: 0 0 14px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.tr-actions{display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 12px;}
.tr-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration:none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
}
.tr-btn--primary{
  background: var(--accent);
  color:#fff;
  box-shadow: 0 12px 20px rgba(214,69,39,.22);
}
.tr-btn--ghost{
  background: rgba(255,255,255,.55);
  color: var(--ink);
  border-color: var(--stroke);
}
.tr-btn--outline{
  background: transparent;
  color: var(--ink);
  border-color: var(--stroke);
}
.tr-btn--small{
  padding: 10px 12px;
  font-size: 13px;
}

.tr-chips{display:flex; gap:10px; flex-wrap:wrap;}
.tr-chip{
  text-decoration:none;
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--stroke);
}

.tr-label{display:block; font-weight: 800; margin-bottom: 8px;}
.tr-searchrow{display:flex; gap:10px;}
.tr-input{
  flex:1;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #fff;
  font-weight: 600;
}
.tr-help{margin: 10px 0 0; color: var(--muted); font-size: 12px; font-weight: 600;}

.tr-section{margin-top: 18px;}
.tr-section__head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  margin: 18px 0 10px;
}
.tr-h2{margin:0; font-size: 20px; font-weight: 800;}
.tr-link{font-weight: 800; color: var(--accent); text-decoration:none;}

.tr-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tr-card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.tr-card__media{
  position: relative;
  display:block;
  height: 170px;
  background: #eee;
}
.tr-card__media img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.tr-badge{
  position:absolute;
  left: 12px;
  top: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.
