:root{
  --bg:#0b0c10;
  --card: rgba(255,255,255,.06);
  --card2: #191A1E;
  --text:#f4f4f5;
  --muted: rgba(244,244,245,.72);
  --stroke: rgba(255,255,255,.10);
  --accent:#ff4da6;
  --accent2:#a855f7;
  --accent-gradient: linear-gradient(135deg, rgba(255,77,166,.95), rgba(168,85,247,.65));
  --radius:18px;
  --max: 1080px;
}

*{ box-sizing:border-box; }
html,body{ margin:0 !important; padding:0; background:var(--bg); color:var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; }
img{ max-width:100%; display:block; }
a{ color:inherit; }

body::-webkit-scrollbar{
  display: none;
}

html, body{
  scroll-behavior: smooth;
}

.demoGlow {
  position: fixed;
  top: 90px;
  left: 14px;
  z-index: 100000;
  max-width: 200px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(244,244,245,.72);
  background: rgba(255,77,166,.10);
  border: 1px solid rgba(255,77,166,.22);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  transition: opacity .6s ease, visibility .6s ease;
}

.demoBar--hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.demoGlow a {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.demoGlow a:hover {
  color: var(--accent);
}

.container{ width:min(var(--max), calc(100% - 32px)); margin:0 auto; }
.section{ padding:16px 0; }
.sectionHead{ display:flex; flex-direction:column; gap:10px; margin-bottom:18px; }
.muted{ color:var(--muted); }

.badge{
  display:inline-flex; padding:8px 12px; border-radius:999px;
  background:rgba(255,255,255,.06); border:1px solid var(--accent2);
  width:fit-content; font-weight:700; font-size:14px;
}

.pillRow{ display:flex; flex-wrap:wrap; gap:10px; margin:14px 0 18px; }
.pill{
  padding:8px 12px; border-radius:999px;
  background:rgba(255,255,255,.06); border:1px solid var(--accent2);
  font-size:13px;
}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px; border-radius:14px; font-weight:800; text-decoration:none;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(135deg, rgba(255,77,166,.95), rgba(168,85,247,.65));
  cursor: pointer;
}
.btn.ghost{
  background:rgba(255,255,255,.06);
  cursor: pointer;
}

.services-btn{
  width: 50% !important;
  transform: translateX(100%);

}

.ctaRow{ display:flex; gap:12px; flex-wrap:wrap; }

/* NAV */
.siteHeader{
  position:sticky; top:0; z-index:50;
  background: rgba(10,12,18,.72);
  backdrop-filter: blur(14px);
  border-bottom:1px solid rgba(255,255,255,.06);
  padding:12px 16px;
  display:flex; align-items:center; justify-content:space-between;
  /* top:-50px ; */
}
.brand{ font-weight:900; text-decoration:none; letter-spacing:.4px; }
.navLinks{ display:none; gap:16px; }
.navLinks a{ text-decoration:none; color:var(--muted); font-weight:700; }
.navLinks a:hover{ color:var(--text); }

.navDashboard{
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,77,166,.35);
  background: rgba(255,77,166,.08);
  font-size: 13px !important;
}
.navDashboard:hover{
  background: rgba(255,77,166,.16);
}

/* HERO */
.hero{ padding:42px 0 36px; }
.heroGrid{ display:grid; gap:16px; }
.heroCopy h1{ font-size: clamp(30px, 5vw, 44px); line-height:1.05; margin:10px 0; }
.lead{ font-size:16px; line-height:1.55; color:var(--muted); margin:0; }
.heroMedia{ display:grid; gap:12px; }
.heroImgWrap{
  border-radius: 22px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
}
.heroImgWrap img{ width:100%; height:260px; object-fit:cover; }
.heroCard{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  padding:14px;
}

/* GRID */
.grid3{ display:grid; gap:14px; grid-template-columns:1fr; }
@media (min-width: 760px){
  .grid3{ grid-template-columns: repeat(3, 1fr); }
  .heroGrid{ grid-template-columns: 1.1fr .9fr; align-items:start; }
  .navLinks{ display:flex; }
}

/* SERVICES card */
.card{
  border-radius: 18px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  height: 200px;
  padding:16px;
  position: relative;
}
.card h3{ margin:0 0 6px; }
.card .muted{ margin:0; }

/* PHOTO */
.photo{
  border-radius: 18px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.photo img{ width:100%; height:240px; object-fit:cover; }

/* CONTATTI / FORM */

.contactGrid{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  align-items: stretch;
}

.contactCard{
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  padding: 16px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.contactCard:hover{
  transform: translateY(-2px);
  border-color: rgba(255,77,166,.35);
  box-shadow: 0 18px 40px rgba(0,0,0,.22);
}

.contactBtns{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.hours{
  margin-top: 14px;
}

label{
  display: block;
  margin: 12px 0 7px;
  color: rgba(255,255,255,.86);
  font-size: 13.5px;
  font-weight: 700;
}

input,
select,
textarea,
.customSelectBtn{
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 12px;
  outline: none;
  font: inherit;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

input:focus,
select:focus,
textarea:focus,
.customSelectBtn:focus,
.customSelectBtn.select-open{
  border-color: var(--accent2);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 3px rgba(168,85,247,.16);
}

textarea{
  min-height: 120px;
  resize: vertical;
}

.hp,
.altro{
  display: none !important;
}

.formMessage{
  margin-top: 10px;
  font-weight: 700;
}

.formMessage.success{
  color: #22c55e;
}

.formMessage.error{
  color: #ef4444;
}

.status{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin-top: 14px;
}

#sendBtn{
  border: 1px solid rgba(255,255,255,.12);
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--accent-gradient);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

#sendBtn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(168,85,247,.35);
}

.spinner{
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.28);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: none;
}

@keyframes spin{
  to{ transform: rotate(360deg); }
}

@media (max-width: 920px){
  .contactGrid{
    grid-template-columns: 1fr;
  }
}

.demoNotice{
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.demoNotice a{
  color: var(--accent2);
  font-weight: 600;
}

#sendBtn:disabled{
  opacity: .45;
  cursor: not-allowed;
}

/* FAQ */
.faq{ display:grid; gap:10px; }
.faqItem{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  border-radius: 18px;
  width: 280px;
  overflow:hidden;
}
.faqQ{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  color:var(--text);
  padding:14px 14px;
  font-weight:900;
  display:flex;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
}
.faqA{
  max-height:0;
  overflow:hidden;
  transition: max-height 0.1s cubic-bezier(.08,.08,.71,.7), padding 0.1s cubic-bezier(.08,.08,.71,.7); 
  padding: 0 14px;
  will-change: grid-template-rows;
}
.faqItem.open .faqA{
  max-height: 220px;
  padding: 0 14px 14px;
}

.faqA-inner p { margin: 0; }


/* FOOTER */
.footer{ padding:28px 0; border-top:1px solid rgba(255,255,255,.06); }
.footerGrid{ display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; }

/* REVEAL (leggero) */
.Reveal{ opacity:0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.Reveal.show{ opacity:1; transform: translateY(0); }
.RevealChild{ opacity:0; transform: translateY(10px); filter: blur(10px); transition: opacity .55s ease, transform .55s ease, filter .55s ease; }
.RevealChild.showChild{ opacity:1; transform: translateY(0); filter: blur(0); }

/* HERO mini slider */
.heroSlider{
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  position: relative;
}

.heroSlides{
  position: relative;
  width: 100%;
  height: 260px; /* mobile */
}

.heroSlide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 0;
  transform: scale(1.02);
  transition: opacity .6s ease, transform .6s ease;
  pointer-events: none;
}

.heroSlide.is-active{
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.heroDots{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.25);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.dot.is-active{
  background: rgba(255,255,255,.85);
  transform: scale(1.1);
}

@media (min-width: 760px){
  .heroSlides{ height: 340px; } /* desktop */
}

/* NAV MOBILE */

.nav{
  position: relative;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.nav-toggle,
.nav-toggle-wrap,
.container-toggle,
.mobile-menu{
  display: none;
}

.nav-toggle{
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.container-toggle{
  cursor: pointer;
}

.bar1,
.bar2,
.bar3{
  width: 30px;
  height: 3px;
  margin: 6px 0;
  border-radius: 999px;
  background: var(--text);
  transition: transform .28s ease, opacity .2s ease;
}

.change .bar1{ transform: translateY(9px) rotate(-45deg); }
.change .bar2{ opacity: 0; }
.change .bar3{ transform: translateY(-9px) rotate(45deg); }

@media (max-width: 860px){
  .navLinks{
    display: none !important;
  }

  .nav-toggle,
  .nav-toggle-wrap{
    display: inline-flex;
  }

  .container-toggle{
    display: block;
  }

  .mobile-menu{
    position: fixed;
    top: 60px;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    min-height: calc(100vh - 60px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: transform .32s ease, opacity .2s ease;
  }

  .menu-open .mobile-menu{
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .mobile-menu__panel{
    width: min(76%, 360px);
    height: fit-content;
    margin: 12px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(17,17,17,.72);
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-menu a{
    padding: 13px 12px;
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    font-family: inherit;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    transition: background .2s ease, transform .2s ease, color .2s ease;
  }

  .mobile-menu a:hover{
    color: var(--accent);
    background: rgba(255,77,166,.10);
    transform: translateY(-1px);
  }

  .mobile-menu a:active{
    transform: scale(.98);
  }

  .cart-wrap{
    margin: 0 20px;
    display: flex;
  }

  section{
    padding: 16px 0 !important;
  }
}

/* carrello */

.cart-box{
  position: relative;
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  height: 230px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 20px;
}

.cart-scroll{
  height: 100%;
  overflow-y: auto;
  padding: 20px; 
}

.cart-scroll::-webkit-scrollbar{
  width: 6px;
}

.cart-scroll::-webkit-scrollbar-thumb{
  background-color: var(--stroke);
  border-radius: 10px;
}

.cart-wrap{
  position: relative;
}

.cart-wrap i{
  anchor-name: --cart;
  color: var(--text)
}

.cart-wrap span{
  color:var(--text);
  font-size: 0.7rem;
  position: absolute;
  display: flex;
  justify-content: center;
  align-content: center;
  background: red;
  border-radius: 15px;
  height: 15px;
  width: fit-content;
  padding:0 2px;
  position-anchor: --cart;
  position-area: end;
  margin:inset;
  top: calc(anchor(top) - 0.5rem);
  right: calc(anchor(right) - 0.5rem);
}

.cart-title{
  display: flex;
  align-items: center;
  gap:1.5rem;
}

.btnCart-clenear{
  color:red;
  font-weight: bold;
  background: var(--card);
  border: 1px solid var(--stroke);
  padding: 5px 10px;
  border-radius: 99px;
}

.cart-head{
  margin-bottom:10px;
}

.cart-container{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.cart-row{
  position: relative;
  background: var(--card);
  border: 1px solid var(--stroke);
  height: fit-content;
  width: 100%;
  padding: 15px;
  border-radius: var(--radius);
  display: flex;
  
}

.row-title{
  font-weight: bold;
  width: fit-content;
  display: grid;
  gap:5px;
}

.row-title p{
  margin: 0;
}

.cart-qty{
  display: grid;
  grid-template-columns: 1fr;
  position: absolute;
  right: 15px;
  bottom:15px;
}

.btn-ls{
  width: 20px;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  color:var(--muted);
  border-radius: 5px;
}

.btn-ls i{
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-ps i{
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}


.qty-txt{
  background: transparent;
  border: none;
}

.btn-ps{
  width: 20px;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  color:var(--muted);
  border-radius: 5px;
}

.btn-rm{
  background: transparent;
  border:none;
}

.btn-rm i{
  color:red;
  
  position: absolute;

  font-size: 1rem;
  right: 10px;
  top:10px;

}

.card-cart{
  position: relative;
}
.card-cart button{
  position: absolute;
  left:16px;
  bottom:16px;
  color:var(--text);
  box-shadow: 0 5px 10px #000;
  transition: all 100ms ease-in-out;
}

.card-cart button:active{
  filter:brightness(0.8);
  box-shadow: none;
}


#dec-confirm {
  position: absolute; 
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); 
  backdrop-filter: blur(3px);    
  
  display: flex;
  align-items: center;    
  justify-content: center;
  
  z-index: 99999;
}

#dec-confirm:empty { 
  display: none; 
}

.cardDec {
  width: 80%;
  height: fit-content;
  background: #111;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  
  /* animazione d'entrata */
  animation: modalIn 0.3s ease-out;
  text-align: center;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.cardDec button{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  color: var(--text);
  padding: 5px 10px;
  font-weight: bold;
}

.btnDec-confirm{
  color: red !important;
}

/* toast */

.toast{
  position: fixed;
  top:100px;
  right: 20px;
  background: var(--card2);
  border:1px solid var(--stroke);
  color: var(--text);
  font-weight: bold;
  padding: 12px 16px;
  border-radius: 8px;
  opacity: 0;
  transform: translatex(10px);
  transition: .3s;
  z-index: 9999;
  box-shadow: 0 15px 15px #000;
}

.toast.show{
  opacity: 1;
  transform: translateY(0);
}

.toast.success { color: #22c55e; }
.toast.error { color: #ef4444; }

/* checkout */

.checkout{
  position: sticky;
  inset: 0;
  background: #0b0c10a8;
  backdrop-filter: blur(10px);
  display: none;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.checkout.open{display: flex;}
.checkout__panel{
  background: #2d2d2d;
  /* height: 80%; */
  width: 70%;
  margin: 10% auto;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  /* position: absolute; */
}

.checkout__panel button{
  background: var(--stroke);
  color: var(--text);
  margin: 0 5px;
  padding: 5px 10px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  font-weight: bold;
  box-shadow: 0 5px 10px #000;
}

.cancelBtn{
  color: red !important;
}

.confirmBtn{
  color: green !important;
}

.checkout__panel button:active{
  box-shadow: none;
}

.btn-checkout{
  margin: 20px 0 10px 0;
}

/* calendario */

/* Contenitore principale del calendario */
.flatpickr-calendar {
    background: var(--bg) !important;
    border: 1px solid var(--stroke) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5) !important;
    border-radius: 15px;
}

/* Colore del giorno selezionato */
.flatpickr-day.selected {
    background: var(--accent2) !important;
    border-color: var(--stroke) !important;
    color: white !important;
}

/* Colore al passaggio del mouse sui giorni */
.flatpickr-day:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Intestazione (Mese e Anno) */
.flatpickr-current-month, .flatpickr-month {
    color: white !important;
    fill: white !important;
}


.flatpickr-month{
  background: var(--accent2) !important;
  border-radius: 15px 15px 0 0;
  border:1px solid var(--stroke);
}

.flatpickr-current-month .flatpickr-monthDropdown-months{
  background-color: var(--accent2) !important;
}

.flatpickr-weekdays{
  background: var(--accent2) !important;
}

.flatpickr-weekday{
  background: var(--accent2) !important;
}

/* Colore delle freccette e dei numeri dell'orario */
.flatpickr-time input, 
.flatpickr-time .flatpickr-am-pm, 
.flatpickr-time .numInputWrapper span svg {
    color: white !important;
    fill: white !important;
}

/* Colore quando passi sopra le freccette */
.flatpickr-time .numInputWrapper span:hover {
    background: var(--accent2) !important;
}

/* Separatore (i due punti : tra ore e minuti) */
.flatpickr-time .flatpickr-time-separator {
    color: white !important;
}

.flatpickr-time input.flatpickr-hour:focus{
  background: var(--card) !important;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.flatpickr-time input.flatpickr-minute:focus{
  background: var(--card) !important;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.flatpickr-time input.flatpickr-hour:hover{
  background: var(--card) !important;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.flatpickr-time input.flatpickr-minute:hover{
  background: var(--card) !important;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.data-icons{
  position: absolute; right:10px; top: 12px;
  font-size: 1.2rem !important;
  color: var(--accent2) !important;
}

/* CUSTOM SELECT / DATE INPUT */

.select-wrap{
  position: relative;
}

.customSelectBtn{
  position: relative;
  text-align: left;
  cursor: pointer;
  padding-right: 44px;
}

.customSelectValue{
  color: var(--muted);
}

.customSelectArrow{
  position: absolute;
  right: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  transition: transform .22s ease;
  background: url("./assets/arrow-right.svg") center / 14px 14px no-repeat;
  opacity: .9;
}

.select-open .customSelectArrow{
  transform: translateY(-50%) rotate(-90deg);
}

.customSelectList{
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 9999;
  margin: 0;
  padding: 10px;
  list-style: none;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(11,12,16,.94);
  box-shadow: 0 18px 45px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.select-open + .customSelectList{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.customSelectList li{
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.04);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.customSelectList li:last-child{
  margin-bottom: 0;
}

.customSelectList li:hover{
  transform: translateY(-1px);
  border-color: rgba(168,85,247,.45);
  background: rgba(168,85,247,.12);
}

.flatpickr-input.is-active{
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px rgba(168,85,247,.16);
}

.FaqHead h2{
margin:10px 0 0 0;
}

.FaqHead p{
  margin: 0 0 10px 0;
}

.FaqHead{
  gap:0;
  margin:0;
}

/* PRODOTTI / CARD */

.product-card{
  position: relative;
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.product-desc{
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.product-meta{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
}

.product-footer{
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.price-wrap{
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-old{
  color: rgba(244,244,245,.55);
  font-size: .9rem;
  text-decoration: line-through;
}

.discount-badge{
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #ff3b3b;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.stock{
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(5px);
  color: #4caf50;
  font-weight: 800;
}

.out-of-stock{
  color: #ef4444;
}

.rating-wrap{
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-wrap .material-icons{
  color: gold;
  font-size: 1rem;
}

.rating{
  color: var(--muted);
}

.btn-secondary{
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.btn-add{
  width: 100%;
  color: var(--text);
  font-weight: 800;
}

/* PRODOTTI / FILTRI */

.filters-wrap{
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 10px;
}

.filters{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.filters.hidden,
.sort-wrap.hidden{
  display: none;
}

.filters-wrapper{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 5px;
}

.filters-cats,
.sort-wrap{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-filters,
.sort-filters{
  color: var(--text);
  font-weight: 800;
}

.sort-filters{
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  background: var(--accent-gradient);
}

.filter-btn{
  color: var(--text);
  white-space: nowrap;
  opacity: 1;
  transform: translateY(0);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.filters.animate-in .filter-btn{
  opacity: 0;
  transform: translateY(6px);
  animation: filterFade .25s ease forwards;
}

.sort-wrap.open .sort-btn{
  opacity: 0;
  transform: translateY(8px);
  animation: filterFade .28s ease forwards;
}

.sort-wrap.open .sort-btn:nth-child(1){ animation-delay: 0ms; }
.sort-wrap.open .sort-btn:nth-child(2){ animation-delay: 70ms; }
.sort-wrap.open .sort-btn:nth-child(3){ animation-delay: 140ms; }
.sort-wrap.open .sort-btn:nth-child(4){ animation-delay: 210ms; }
.sort-wrap.open .sort-btn:nth-child(5){ animation-delay: 280ms; }

@keyframes filterFade{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

.arrow{
  transition: transform .3s ease;
}

.arrow.rotate{
  transform: rotate(180deg);
}

.filter-btn.active,
.sort-btn.active{
  background: var(--accent-gradient);
  box-shadow: 0 0 6px var(--accent);
}

.search-wrap{
  display: flex;
}

.product-search{
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  outline: none;
}

.product-search::placeholder{
  color:var(--muted);
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  
  height: 16px; 
  width: 16px;  
  
  background-image: url('./assets/close.svg');
  
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain; 
  
  cursor: pointer;
  
  margin-right: 8px;
}


.error-state h3{
  color: #ef4444;
}

.pagination{
  margin-top:18px;
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.page-btn.active{
  outline: 2px solid var(--accent);
  scale: 1.1;
}

.page-btn:disabled{
  opacity: 0.4;
}

.page-btn{
  height: 40px;
  width: 40px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: scale 0.3s ease-in-out;
}

.page-arrow{
  height: 30px;
  width: 30px;
}

.page-btn:hover{
  scale: 1.1;
}

.skeleton-card{
  pointer-events: none;
}

.skeleton{
  border-radius: 12px;
  background: linear-gradient(
  90deg,
  rgba(255,255,255,0.06) 25%,
  rgba(255,255,255,0.12) 50%,
  rgba(255,255,255,0.06) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.2s infinite linear;
}

.skeleton-img{
  width: 100%;
  height: 180px;
  margin-bottom:14px;
}

.skeleton-title{
  width: 70%;
  height: 22px;
  margin-bottom: 10px;
}

.skeleton-text{
  width: 100%;
  height: 16px;
  margin-bottom: 10px;
}

.skeleton-meta{
  width: 50%;
  height: 16px;
  margin-bottom: 16px;
}

.skeleton-btn{
  width: 120px;
  height: 40px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100%{
    background-position: -200% 0;
  }
}

.search-highlight{
  background: rgba(168, 85, 247, .25);
  color: var(--text);
  border-radius: 4px;
  font-weight: 600;
  border-bottom: 2px solid #a855f7;
}

/* ADMIN / EDIT MODE */

.admin-panel{
  margin:40px 0;
  padding:20px;
  border:1px solid var(--text);
}

.admin-image-upload{
  border: 1px dashed var(--stroke);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.03);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.admin-image-upload.drag-over{
  border-color: var(--accent2);
  background: rgba(168,85,247,.08);
  transform: scale(1.01);
}

.admin-image-preview-wrap{
  margin-top: 12px;
}

.admin-image-preview{
  width: 100%;
  max-width: 220px;
  height: 160px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}

.hidden{
  display: none !important;
}

.admin-table{
  width:100%;
  border-collapse:collapse;
  margin-top:10px;
}

.admin-table th,
.admin-table td{
  padding:6px;
  border-bottom:1px solid #ddd;
  text-align:left;
  font-size:0.85rem;
}

.admin-table button{
  padding:4px 8px;
  font-size:0.75rem;
}

.editable-field{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-edit-icon{
  font-size: 16px !important;
  color: var(--accent2) !important;
  opacity: .9;
}

#toggle-admin-mode{
  width: fit-content;
}

.inline-editor{
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--accent2);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  outline: none;
}

textarea.inline-editor{
  min-height: 90px;
  resize: vertical;
}

.product-image-wrap{
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 220px;
}

.product-image-wrap img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.editable-image{
  cursor: pointer;
}

.image-edit-icon{
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,.45);
  border-radius: 999px;
  padding: 6px;
  color: #fff;
}

.inline-image-editor{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-upload{
  min-height: 120px;
}

.inline-image-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-mode .product-card h3,
.admin-mode .product-card .product-desc,
.admin-mode .product-card .inline-editor{
  display: block;
  width: 100%;
}

.admin-mode .product-card .product-desc{
  margin-top: 8px;
}

.admin-mode .product-card textarea.inline-editor{
  display: block;
  width: 100%;
  min-height: 90px;
  margin-top: 8px;
}

.admin-mode .product-meta .inline-editor{
  max-width: 120px;
}

.admin-mode .stock.editable-field,
.admin-mode .rating.editable-field{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-mode .product-meta > *{
  min-width: 0;
}

.image-edit-icon{
  position: absolute;
  top: 10px;
  left: 10px;
  right: auto;
}

.stock-inline-wrap{
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  border-radius: 10px;
}

.admin-discount-btn{
  margin-top: 8px;
}

.discount-modal-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  border-radius: 18px;
}

.discount-modal{
  width: min(92%, 320px);
  background: var(--card2);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.discount-input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
  color: var(--text);
}

.discount-actions{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.discount-clear-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: #ff3b3b;
  color: #fff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.discount-clear-btn .material-icons{
  font-size: 16px;
}

.admin-mode .product-card{
  outline: 1px dashed rgba(255,255,255,.15);
}

.admin-mode .admin-edit-icon{
  opacity: .9;
}

.admin-mode .admin-discount-btn{
  font-size: 12px;
  padding: 6px 10px;
}

/* ADMIN LOGIN */

.admin-auth-page{
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(168,85,247,.18), transparent 34%),
    linear-gradient(180deg, #0b1020 0%, #070b16 100%);
}

.admin-auth-card{
  width: min(100%, 400px);
  min-width: 0;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.045);
  box-shadow: 0 24px 60px rgba(0,0,0,.38);
  backdrop-filter: blur(12px);
}

.admin-auth-head{
  margin-bottom: 24px;
}

.admin-auth-badge{
  display: inline-flex;
  width: fit-content;
  margin: 0 0 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(168,85,247,.14);
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 800;
}

.admin-auth-head h1{
  margin: 0 0 8px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.1;
}

.admin-auth-subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.admin-auth-form{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-auth-form label{
  color: rgba(255,255,255,.88);
  font-size: 14px;
  font-weight: 800;
}

.admin-auth-form input{
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.05);
  color: var(--text);
  outline: none;
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.admin-auth-form input::placeholder{
  color: rgba(255,255,255,.36);
}

.admin-auth-form input:focus{
  border-color: var(--accent2);
  background: rgba(255,255,255,.07);
  box-shadow: 0 0 0 4px rgba(168,85,247,.14);
}

.admin-auth-btn{
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  justify-content: center;
}

.loader-txt{
  margin: 0;
}

.loader{
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: adminSpin .8s linear infinite;
}

@keyframes adminSpin{
  to{ transform: rotate(360deg); }
}

.admin-auth-message{
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 640px){
  .admin-auth-page{
    padding: 18px;
  }

  .admin-auth-card{
    padding: 22px 18px !important;
    border-radius: 20px;
  }

  .admin-auth-head h1{
    font-size: 26px;
  }
}

.admin-dashboard-content > *{
  max-width: 1400px;
}
 
.admin-dashboard-page{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  background:
    radial-gradient(circle at top, rgba(168,85,247,.16), transparent 30%),
    linear-gradient(180deg, #0b1020 0%, #070b16 100%);
}

.admin-sidebar{
  border-right: 1px solid rgba(255, 255, 255, .08);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(255, 255, 255, .03);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
  align-self: start;

}

.admin-dashboard-content{
  min-width: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap:22px;
}

.admin-sidebar-brand h2{
  margin: 8px 0 0;
  color: var(--text);
}

.admin-sidebar-badge{
  display: inline-flex;
  padding:  6px 10px;
  border-radius: 999px;
  background: rgba(168, 85, 247, .14);
  color: #d8b4fe;
  font-size: 12px;
  font-weight: 600;
}

.admin-sidebar-nav{
  display: flex;
  flex-direction: column;
  gap:8px;
  padding-bottom: 10px;
}

.admin-nav-link{
  text-decoration: none;
  color: rgba(255, 255, 255, .72);
  padding: 10px 12px;
  border-radius: 12px;
  transition: background .2s ease, color .2s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active{
  background: rgba(255,255,255,.06);
}

.admin-logout-btn,
.admin-glow-btn{
  margin-top: auto;
  width: 100% !important;
  justify-content: center;
}

.admin-section-card{
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
}

.admin-section-head{
  margin-bottom: 16px;
}

.admin-section-head h2{
  margin: 0 0 6px;
  color: var(--text);
}

.admin-section-subtitle,
.admin-page-subtitle{
  margin:0;
  color: rgba(255,255,255,.7);
}

.admin-page-badge{
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246,.14);
  color:#93c5fd;
  font-size: 12px;
  font-weight: 600;
}

.admin-dashboard-head h1{
  margin: 0 0  18px;
  color: var(--text);
}

.admin-table-wrap{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--muted) rgba(255, 255, 255, 0.04);
}

.admin-products-table{
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-products-table th,
.admin-products-table td{
  padding: 12px 10px;
  border-bottom: 1px solid rgba(168,85,247,.08);
  text-align: left;
  vertical-align: top;
}

.admin-products-table th{
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.admin-products-table td{
  color: var(--text)
}

.admin-products-table td:nth-child(2) input{
  min-width: 180px;
}

.admin-products-table td:nth-child(3) input{
  min-width: 180px;
}

.admin-products-table td:nth-child(8) input{
  min-width: 140px;
}

.admin-products-table td:last-child{
  white-space: nowrap;
}

.admin-products-table input{
  width: 100%;
  min-width: 120px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.admin-products-form{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-form-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-form-grid input,
.admin-form-grid textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.admin-form-grid textarea{
  min-height: 100px;
  resize: vertical;
}

.admin-products-message{
  min-height: 22px;
  margin-bottom: 14px;
  font-size: 14px;
  color: green;
}

.admin-action-btn{
  min-width: 88px;
  justify-content: center;
}

.admin-delete-btn{
  color: red
}

.btn-wrap{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap:20px;
}

@media (max-width: 960px) {
  .admin-dashboard-page{
    grid-template-columns: 1fr;
  }
  .admin-sidebar{
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 18px 14px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: auto;
    transform: translateY(0);
    transition: transform .28s ease;
  }

  .admin-sidebar.is-hidden{
  transform: translateY(calc(-100% - 8px));
  }

  .admin-section-card{
    scroll-margin-top: 120px;
  }

  .admin-sidebar-brand h2{
    font-size: 28px;
  }

  .admin-sidebar-nav{
    padding-bottom: 5px;
    gap: 6px;
  }

  .admin-nav-link{
    padding: 8px 10px;
    font-size: 14px;
  }

  .admin-logout-btn{
    padding: 10px 14px;
  }
  .admin-dashboard-content{
    padding: 18px 14px !important;
  }
  .admin-sidebar-nav{
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-nav-link{
    width: fit-content;
  }
  .admin-logout-btn{
    margin-top: 10px;
    width: fit-content;
  }
  .admin-section-card{
    padding: 16px !important;
    border-radius: 18px;
  }
  .admin-dashboard-head h1{
    font-size: 34px;
    line-height: 1.1;
  }
  .admin-form-grid{
    grid-template-columns: 1fr;
  }
  .admin-products-table{
    min-width: 760px;
  }
}


.admin-form-submit{
  width: fit-content;
  min-width: 180px;
}


.admin-products-topbar{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
  gap:20px;
}

.admin-products-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.admin-product-card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 40px rgba(0,0,0,.20);
  position: relative;
}

.admin-product-card img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.admin-product-card input,
.admin-product-card textarea{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  color: #fff;
}

.admin-product-card textarea{
  min-height: 90px;
  resize: vertical;
}

.admin-card-row{
  display: flex;
  gap: 10px;
}

.admin-card-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-card-actions .btn,
.admin-card-actions .btn-secondary{
  flex: 1;
  justify-content: center;
}

.admin-card-delete{
  color: #f87171;
}


.admin-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-field label{
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.admin-field.discount-wrap,
.admin-field.rating-wrap{
  width: 35%;
}

.admin-toast{
  position: fixed;
  transform: translateY(20px);
  top: 0;
  right: 20px;
  z-index: 2000;
  min-width: 220px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15,23,42,.95);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  font-size: 14px;
  font-weight: 600;
  opacity: 1;
  animation: toastPopover .3s ease-in-out;
}

@keyframes toastPopover {
  0%{opacity: 0; transform: translateY(-100%);}
  100%{opacity: 1; transform: translateY(20px);}
}

.admin-toast.success{
  border-color: rgba(134,239,172,.35);
  color: green;
}

.admin-toast.error{
  border-color: rgba(248,113,113,.35);
  color: red;
}

.delete-modal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.delete-modal.hidden{
  display: none;
}

.delete-modal-content{
  background: rgba(15,23,42,.95);
  border-radius: 18px;
  padding: 22px;
  width: 100%;
  max-width: 360px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 25px 60px rgba(0,0,0,.45);
  text-align: center;
}

.delete-modal-actions{
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

body.modal-open{
  overflow: hidden;
}

.delete-modal-actions button{
  flex: 1;
}

.admin-delete-confirm-btn{
  background: #ef4444;
  color: #fff;
}

.admin-product-image-preview{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}

.admin-product-card input[type="file"]{
  padding: 10px 0;
  border: none;
  background: transparent;
}

.hidden-file-input{
  display: none;
}

.admin-upload-btn,
.btn-add-img-text{
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #fff;
  cursor: pointer;
  transition: .2s;
  position: absolute;
  left: 18px;
  right: 18px;
  top: 60px;
  display: flex;
}

.btn-add-img-text{
  font-size: 0.8rem;
  width: fit-content;
  background: #191a1e5e;
  backdrop-filter: blur(2px);
  z-index: 51;
  padding: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  box-shadow: 0 0 10px black;
  
}

.admin-upload-btn{
  z-index: 50;
  height: 220px;
}

.admin-upload-btn:hover{
  background: rgba(255,255,255,.08);
}

.admin-file-name{
  font-size: 12px;
  opacity: .7;
}

.undo-redo-txt {
  position: absolute;
  opacity: 0.7;
  display: none;
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--muted);
  pointer-events: none;
  position-anchor: --undo-redo-anchor;
  bottom: calc(anchor(top) + 10px);
  right: calc(anchor(right) + 100%);
  background: var(--card);
  padding: 5px;
  border: 1px solid var(--stroke);
  border-radius: .5rem .5rem 0 .5rem;
}

.undo-redo-wrap{
  position: relative;

}

.undoBtn,
.redoBtn{
  anchor-name: --undo-redo-anchor;
}

.undoBtn:hover + .undo-redo-txt,
.redoBtn:hover + .undo-redo-txt {
  display: block;
}

.admin-card-cancel{
  color: #f87171;
}

.admin-hero-card textarea[data-hero-field="title"]{
  min-height: 110px;
}

.admin-hero-card textarea[data-hero-field="subtitle"]{
  min-height: 90px;
}

.admin-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.admin-field.full {
  grid-column: 1 / -1;
}

.admin-pill-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.admin-field input,
.admin-field textarea {
  width: 100%;
}

.admin-card-row {
  display: contents;
}

.admin-card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .admin-card-grid {
    grid-template-columns: 1fr;
  }

  .admin-pill-row {
    grid-template-columns: 1fr;
  }
}

.admin-pill-list{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-pill-item{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.admin-pill-input{
  width: 100%;
}

.admin-add-pill-btn{
  width: fit-content;
}

.admin-pill-delete-btn{
  position: relative;
  color: #f87171;
  anchor-name: --del-btn;
  transform: translateY(8px);
}

.admin-slide-list{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-slide-item{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.03);
}

.admin-slide-preview{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}

.admin-slide-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button:disabled{
  opacity: 0.4;
  pointer-events: none;
  cursor: not-allowed;
}


.admin-slide-upload-wrap{
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

.admin-slide-preview{
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.admin-slide-overlay-btn{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
  
}

.admin-slide-overlay-label{
  font-size: 0.8rem;
  width: fit-content;
  backdrop-filter: blur(2px);
  z-index: 51;
  padding: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  box-shadow: 0 0 10px black;

  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #fff;
  text-shadow: 0 0 5px #000;
  cursor: pointer;
  transition: .2s;
  position: absolute;
  display: flex;
  top: 0 !important;
  left: 0 !important;
}

.admin-slide-actions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-product-upload-wrap{
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
}

.admin-product-image-preview{
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.admin-product-overlay-btn{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.admin-product-overlay-label{
  font-size: 0.8rem;
  width: fit-content;
  backdrop-filter: blur(2px);
  z-index: 51;
  padding: 8px !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  box-shadow: 0 0 10px black;

  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: #fff;
  text-shadow: 0 0 5px #000;
  cursor: pointer;
  transition: .2s;
  position: absolute;
  display: flex;
  top: 0 !important;
  left: 0 !important;
}

.admin-pill-del-txt{
  position: absolute;
  opacity: 0;
  position-anchor: --del-btn;
  font-size: .7rem;
  bottom: anchor(top) !important; 
  left: anchor(right) !important;
  background: var(--card);
  padding: 5px 10px;
  border: 1px solid var(--stroke);
  border-radius: 1em 1em 1em 0;
  color: var(--muted);

}

.admin-pill-delete-btn:disabled{
  pointer-events: auto;
  cursor: not-allowed;
}

.admin-pill-delete-btn:disabled:hover + .admin-pill-del-txt {
  opacity: 0.7;
  transform: translateX(0);
}

.service-card{
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-image-wrap{
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.service-image{
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.demo-mode .admin-dashboard-page::before{
  content: "Modalita demo: puoi esplorare la dashboard, ma le modifiche non vengono salvate.";
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 3000;
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 620px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(168,85,247,.18);
  border: 1px solid rgba(168,85,247,.35);
  color: var(--text);
  text-align: center;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.demo-mode #logout{
  display: none;
}