:root {
  --crema: #f9e2ae;
  --marrone-chiaro: #732C07;
  --marrone-scuro: #4d1d04;
  --marrone-ombra: #1d0e06;
}
a {
  color: var(--crema);
  text-decoration: none;
  text-shadow: 1px 1px 1px #000;
  transition: color 300ms ease-in-out, text-shadow 300ms ease-in-out;
}
a:hover {
  color: #fff;
  text-shadow: 2px 2px 6px rgba(77, 29, 4, 0.5);
}


/* Desktop: sfondo fisso e pieno schermo */
body {
  background-image: url('/assets/img/sfondo.jpg');
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  font-family: 'PT Sans', sans-serif;
}

/* Mobile (≤576px): sfondo che scorre, così non viene rielaborato in bassa risoluzione */
@media (max-width: 576px) {
  body {
    background-attachment: scroll;  /* disabilita il fixed */
    background-size: cover;         /* o contain, come preferisci */
  }
}

/* NAVBAR */
.navbar-custom {
  background: linear-gradient(180deg, var(--marrone-chiaro) 0%, var(--marrone-scuro) 100%);
  padding: 0.5rem 0;
}

  /* Logo "Baobab Fioristi" */
  .navbar-custom .navbar-brand {
    color: var(--crema);
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  }

  /* Link del menu */
  .navbar-custom .nav-link {
    color: var(--crema);
    text-transform: uppercase;
    margin: 0 0.75rem;
    font-weight: bold;
    padding-right: 1rem;
    border-right: 2px solid var(--marrone-ombra);
    transition: all 0.3s ease;
  }

  .navbar-custom .nav-item:last-child .nav-link {
    border-right: none;
  }

  .navbar-custom .nav-link:hover {
    background: linear-gradient(90deg, var(--marrone-scuro), #3b1403);
    color: #fff2c4;
    border-radius: 4px;
    padding-left: 0.5rem;
  }

  /* Burger icon: crema */
  .navbar-toggler {
    border-color: var(--crema);
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23f9e2ae' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
  }

  /* Dropdown desktop */
  .navbar-custom .dropdown-menu {
    background-color: var(--marrone-scuro);
    border: none;
  }

  .navbar-custom .dropdown.show .dropdown-menu {
    background-color: var(--marrone-scuro);
  }

  .custom-dropdown {
    padding: 0.5rem 0;
    min-width: 200px;
  }

  .custom-dropdown .dropdown-item {
    color: var(--crema);
    font-weight: bold;
    text-transform: uppercase;
  }

  .custom-dropdown .dropdown-item:hover {
    background-color: #3b1403;
    color: #fff2c4;
  }

  /* Forza il colore crema sulla voce principale quando è attiva */
  .navbar-custom .dropdown-toggle {
    color: var(--crema) !important;
  }

  /* Anche durante hover o focus */
  .navbar-custom .dropdown-toggle:hover,
  .navbar-custom .dropdown-toggle:focus,
  .navbar-custom .dropdown.show .dropdown-toggle {
    color: var(--crema) !important;
  }

  /* Badge sopra a destra dell'icona carrello */
  .navbar-nav .nav-link .badge {
    top: 0;
    left: 100%;
    transform: translate(-50%, -50%);
  }
  @media (min-width: 992px) {
    /* Solo le voci del dropdown (sottomenu "Acquista Online") */
    .custom-dropdown .dropdown-item {
      padding-top: 0.75rem;
      padding-bottom: 0.75rem;
      margin-top: 0.25rem;
      margin-bottom: 0.25rem;
    }
  }

  /* OFF CANVAS */
  .offcanvas {
    background-color: var(--marrone-scuro);
  }

  .offcanvas .offcanvas-title {
    color: var(--crema);
    text-transform: uppercase;
    font-weight: bold;
  }

  .offcanvas .nav-link {
    color: var(--crema);
    text-transform: uppercase;
    font-weight: bold;
    margin: 1rem 0;
  }

  .offcanvas .nav-link:hover {
    color: #fff2c4;
  }

  /*   BTN-CLOSE */
  .btn-close {
    filter: invert(94%) sepia(18%) saturate(440%) hue-rotate(8deg) brightness(101%) contrast(95%);
  }



/*  BTN-ORDER */
.btn-order {
  color: var(--crema);
  text-shadow: none;
  background: linear-gradient(180deg, var(--marrone-chiaro) 0%, var(--marrone-scuro) 100%);
  border-radius: 4px;
  padding: 9px 15px;
  text-align: center;
  display: inline-block;
  border-right: 1px solid var(--marrone-ombra);
  border-left: 1px solid rgba(255,255,255,.2);
}
/*  TEXT-CREMA */
.text-crema {
  color: var(--crema);
}

/* HOME */
body#homepage .grid-item {
  padding-bottom:2rem;
  text-align: center;
}
body#homepage .grid-item strong, body#homepage .grid-item small{
  display: block;

  }
@media (max-width: 576px) {
  body#homepage #home-social img.img-fluid {
    max-height: 45px !important;
    height: auto;    
    width: auto;      
  }

}

/* CATEGORIE */
body#categorie .card {
  background-color: #000;
}

.list-group h6{ font-size:1.3rem; font-weight:bold; }
.list-group ul{ font-size:0.9rem; }

.list-group-item {
  background: #000;
  color: var(--crema);
}
.list-group-item *{
  color: var(--crema);
}

/* FOOTER */
footer a {
  text-decoration: none;
  color: #fae3af;
  text-shadow: 1px 1px 1px #000;
  transition: background-color 300ms ease,
              color 300ms ease,
              text-shadow 300ms ease;
  padding: 2px 4px;
  border-radius: 4px;
}

footer a:hover {
  background-color: #fae3af;
  color: #000;
  text-shadow: 1px 1px 1px #ccc;
}

footer .img-fluid {
  max-width: 100px;
}

/* HOME PAGE */
body#homepage .grid {
  margin-left: -1rem;
}

body#homepage .grid-sizer,
body#homepage .grid-item {
  float: left;
  padding-left: 1rem;
  box-sizing: border-box;
  /* default: 3 colonne (da 992px a 1199.98px) */
  width: 33.333%;
}

/* da XL in poi (>=1200px): 4 colonne */
@media (min-width: 1200px) {
  body#homepage .grid-sizer,
  body#homepage .grid-item {
    width: 25%;
  }
}

/* da LG in giù (<992px): 2 colonne */
@media (max-width: 991.98px) {
  body#homepage .grid-sizer,
  body#homepage .grid-item {
    width: 50%;
  }
}

/* da MD in giù (<768px): 1 colonna */
@media (max-width: 767.98px) {
  body#homepage .grid-sizer,
  body#homepage .grid-item {
    width: 100%;
  }
}

/* img responsive dentro gli item */
body#homepage .grid-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* CATEGORIA */
body#categoria .container h1{
  color: var(--crema);
    text-transform: uppercase;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
font-size: 1.5rem;
  margin: 1rem 0;
}
body#categoria .container p {
  color: var(--crema);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
  font-size: 1rem;

}
body#categoria .container .new-price-label, body#categoria .new-price{
  color: var(--crema);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}
body#categoria .container .new-price{
  font-size: 1.2em;

}

body#categoria .product-img {
  overflow: hidden;       /* nasconde le parti di immagine “fuori” dal contenitore */
  display: inline-block;  /* opzionale, per contenere dimensioni */
}

body#categoria .product-img img {
  display: block;                     /* rimuove eventuali spazi bianchi */
  width: 100%;                        /* mantiene responsività se usi .img-fluid */
  height: auto;
  transition: transform 0.4s ease;    /* anima lo zoom in maniera fluida */
  transform-origin: center center;    /* zoom dal centro */
}

body#categoria .product-img:hover img {
  transform: scale(1.2);              /* ingrandisce al 120% */
}


/* Solo su pagine con <body id="photogallery"> */
body#photogallery .masonry {
  column-count: 5;
  column-gap: 1rem;
}
body#photogallery .masonry-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
}

/* Card styling */
body#photogallery .masonry-item .card {
  border: none;
  border-radius: .5rem;
  overflow: hidden;
  transition: transform .2s;
}
body#photogallery .masonry-item .card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0,0,0,.2);
}
body#photogallery .masonry-item img {
  width: 100%;
  display: block;
}
body#photogallery .masonry-item .card-body {
  text-align: center;
  padding: .5rem;
  background: var(--crema);
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
  body#photogallery .masonry { column-count: 4; }
}
@media (max-width: 992px) {
  body#photogallery .masonry { column-count: 3; }
}
@media (max-width: 768px) {
  body#photogallery .masonry { column-count: 2; }
}
@media (max-width: 576px) {
  body#photogallery .masonry { column-count: 1; }
}

/* PRODOTTO */
body#prodotto .product-info{
  font-size: 16px;
}

body#prodotto .tabella-prezzi {
  table-layout: fixed !important;
  width: 100%;
}

body#prodotto .tabella-prezzi,
body#prodotto .tabella-prezzi tr,
body#prodotto .tabella-prezzi td {
  background-color: transparent !important;
}

body#prodotto  .btnAddToCart {
  display: inline-block;
  padding: 2px 5px;
  background-color: #444; /* grigio scuro */
  color: #fff;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 13px;
  border: 1px solid #222;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
  cursor: pointer;
}
body#prodotto  .prezzo-prodotto {
  font-weight: bold;
}

body#prodotto .btnAddToCart:hover {
  background-color: #333;
}

body#prodotto .spinnerQta {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

body#prodotto td.td-prezzo {
  width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body#prodotto span.label-prezzo {
display: block;
font-size: 11px;
}
body#prodotto td.td-qta {
  width: 115px;
}


/* CARRELLO */
body#carrello #cart,
body#carrello #cart-mobile {
  table-layout: fixed;
  width: 100%;
}

body#carrello #cart td,
body#carrello #cart-mobile td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body#carrello #cart .td-prodotto,
body#carrello #cart-mobile .td-prodotto {
  width: 40%;
}

body#carrello #cart .td-prezzo,
body#carrello #cart-mobile .td-prezzo {
  width: 20%;
}

body#carrello #cart .td-qta,
body#carrello #cart-mobile .td-qta {
  width: 20%;
}

body#carrello #cart .td-azioni,
body#carrello #cart-mobile .td-azioni {
  width: 20%;
}

/* 1. Rimuovi il bianco di sfondo da table, tr e td */
body#carrello 
  #cart,
body#carrello 
  #cart-mobile,
body#carrello 
  #cart tr,
body#carrello 
  #cart-mobile tr,
body#carrello 
  #cart td,
body#carrello 
  #cart-mobile td {
  background-color: transparent !important;
}

body#carrello .testoPrezzo {
font-weight: bold;
display: block;
}
body#carrello .btn.btn-outline-danger:not(:hover):not(:focus) {
  background-color: rgba(255, 255, 255, 0.3);
}
body#carrello .btn.btn-outline-danger,
body#carrello .btn.btn-outline-danger:hover,
body#carrello .btn.btn-outline-danger:focus {
  text-shadow: none !important;
}

body#carrello #cart-mobile {
  table-layout: fixed;  /* forza la larghezza delle colonne */
  width: 100%;
}

body#carrello #cart-mobile td:first-child {
  width: 80px;          /* qui scegli tu quanti px o % vuoi assegnare */
  overflow: hidden;
}

body#carrello #cart-mobile img.img-fluid {
  max-width: 100%;
  height: auto;         /* assicura che l’immagine rientri nella cella */
}
body#carrello .testoProdotto {
  /* permette il wrapping normale */
  white-space: normal !important;
  /* spezza parole troppo lunghe se necessario */
  overflow-wrap: break-word;
  word-break: break-word;
}
body#carrello #cart-mobile small {
display: block;}