/*
Theme Name: tastedelivery
Theme URI: https://example.com/
Author: Il tuo nome
Author URI: https://example.com/
Description: Tema WordPress personalizzato per tastedelivery.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tastedelivery
Tags: custom, delivery, food
*/

body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', Arial, sans-serif;
}

/* Badge carrello WooCommerce */
.td-cart-badge {
    position: absolute;
    top: 0.2rem;
    right: -0.5rem;
    background: #dc3545;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 50%;
    padding: 0.15em 0.5em;
    line-height: 1;
    min-width: 1.5em;
    text-align: center;
}

/* Immagini prodotti nello slider Swiper */
.product-swiper .card-img-top {
    height: 220px;
    object-fit: cover;
    border-radius: 1rem 1rem 0 0;
    background: #f8f9fa;
    width: 100%;
    display: block;
}
.product-swiper .card {
    border-radius: 1rem;
    overflow: hidden;
}

/* Stelle WooCommerce inline e senza testo */
.star-rating {
    display: inline-block !important;
    vertical-align: middle;
    margin-bottom: 0 !important;
}
.woocommerce .star-rating span,
.star-rating span {
    color: #ffc107 !important;
}
.woocommerce .star-rating,
.star-rating {
    font-size: 1.1em;
    margin-right: 0.25em;
}
.woocommerce .woocommerce-product-rating .woocommerce-review-link {
    display: none;
}
.woocommerce .star-rating + .screen-reader-text,
.star-rating + .screen-reader-text {
    display: none !important;
}
.woocommerce .star-rating:after,
.star-rating:after {
    display: none !important;
}

/* Immagini categorie Swiper */
.category-swiper .card-img-top {
    height: 170px;
    object-fit: cover;
    border-radius: 1rem 1rem 0 0;
    background: #f8f9fa;
    width: 100%;
    display: block;
}
.category-swiper .card {
    border-radius: 1rem;
    overflow: hidden;
}

/* Spinner AJAX prodotti */
#td-shop-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    min-height: 120px;
}
#td-shop-spinner.active {
    display: flex;
}
.td-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 0.3rem solid #eee;
    border-top: 0.3rem solid #ffc107;
    border-radius: 50%;
    animation: tdspin 0.8s linear infinite;
}
@keyframes tdspin {
    100% { transform: rotate(360deg); }
}

/* noUiSlider custom style */
#price-slider .noUi-connect {
    background: #ffc107;
}
#price-slider .noUi-handle {
    background: #fff;
    border: 2px solid #ffc107;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
#price-slider .noUi-handle:after, #price-slider .noUi-handle:before {
    display: none;
}
#price-slider .noUi-target {
    border-radius: 1rem;
    box-shadow: none;
    border: none;
    height: 8px;
}
#price-slider .noUi-base {
    border-radius: 1rem;
}
.input-group.input-group-sm .form-control {
    border-radius: 0.5rem !important;
}
.input-group.input-group-sm .input-group-text {
    border-radius: 0.5rem 0 0 0.5rem !important;
}
.collapse .form-check, .collapse .input-group {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Notifiche WooCommerce come alert Bootstrap */
/* .woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
    display: none !important;
} */
.woocommerce .alert {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
}

/* Card prodotto shop custom */
.product-card {
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}
.product-card:hover {
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.product-card .card-img-top {
    border-radius: 1rem 1rem 0 0;
    object-fit: cover;
    height: 220px;
    background: #f8f9fa;
}
.product-card .text-primary {
    color: #222 !important;
}
.product-card .fw-semibold {
    font-weight: 600 !important;
}
.product-card .text-dark {
    color: #222 !important;
}
.product-card .text-decoration-none {
    text-decoration: none !important;
}
.woocommerce ul.products, .woocommerce ul.products li {
    list-style: none !important;
    margin: 0;
    padding: 0;
} 

#price-slider .noUi-handle {
    background: #fff;
    border: 2px solid #ffc107;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: 100px !important;
    width: 25px !important;
    height: 25px !important;
}
.noUi-target {
    background: #FAFAFA;
    border-radius: 0px !important;
    border: none !important;
    box-shadow: none !important;
}
.btn-arancione {
    background-color: rgb(255 173 2) !important;
    border: rgb(255 173 2) !important;
    color: white;
}

.navbar-nav li:after,
.menu li:after,
.nav-item:after {
    content: none !important;
}

/* Blur-up lazyload effect */
.blur-up {
  filter: blur(12px);
  transition: filter 0.4s;
}
.blur-up.lazyloaded {
  filter: blur(0);
}

/* NProgress custom: barra sottile con gradiente verde-blu sopra header */
#nprogress {
  pointer-events: none;
}
#nprogress .bar {
  background: linear-gradient(90deg, #00e676 0%, #2979ff 100%);
  position: fixed;
  z-index: 12010;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  box-shadow: none;
}
#nprogress .peg {
  box-shadow: none;
}
#nprogress .spinner {
  display: none !important;
}
.woocommerce-account .woocommerce-MyAccount-content {
    float: unset !important;
      width: 100% !important;
}

/* Spinner centrale per pagine account */
.account-loader {
  display: none;
  position: fixed;
  z-index: 2100;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.7);
  justify-content: center;
  align-items: center;
}
.account-loader.active {
  display: flex;
}

/* Link neri senza sottolineatura nelle pagine account */
.woocommerce-account a {
  color: #222 !important;
  text-decoration: none !important;
}
.woocommerce-account a:hover, .woocommerce-account a:focus {
  color: #000 !important;
  text-decoration: underline;
}

/* Input WooCommerce checkout moderni */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    box-shadow: none;
    transition: border-color 0.2s;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus,
.woocommerce form .form-row textarea:focus {
    border-color: #2979ff;
    outline: none;
}
.woocommerce form .form-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: #222;
    font-size: 1rem;
    letter-spacing: 0.01em;
}
.woocommerce form .form-row .required {
    display: none !important;
}
.woocommerce form .form-row {
    margin-bottom: 1.25rem;
}

/* WooCommerce error, message, info come alert Bootstrap */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    display: block !important;
    list-style: none;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}
.woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.woocommerce-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.woocommerce-info {
    background: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}
.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    margin: 0;
    padding: 0;
}

/* Notifica coupon in order review: solo testo, stile moderno e discreto */
.woocommerce-info,
.alert-info {
    background: none !important;
    border: none !important;
    color: #444 !important;
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.97rem !important;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-weight: 400 !important;
    box-shadow: none !important;
    display: block !important;
}
.woocommerce-info a,
.alert-info a {
    color: #0d6efd !important; /* Bootstrap 5 primary */
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
.woocommerce-info a:hover,
.alert-info a:hover {
    color: #0056b3 !important;
    text-decoration: underline;
}

/* Sfondo grigio chiaro per la pagina checkout */
body.woocommerce-checkout {
    background: #f5f5f7 !important;
}

/* Notifiche errore WooCommerce: stile moderno, piatto e integrato */
.woocommerce-error,
.alert-danger {
    background: none !important;
    border: none !important;
    color: #d32f2f !important; /* Rosso moderno */
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
    font-size: 1rem !important;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    display: block !important;
    list-style: none !important;
}
.woocommerce-error a,
.alert-danger a {
    color: #0d6efd !important;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
.woocommerce-error a:hover,
.alert-danger a:hover {
    color: #0056b3 !important;
    text-decoration: underline;
}
.woocommerce-error li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Card centrale per errori WooCommerce */
.woocommerce-error,
.woocommerce .woocommerce-error,
.woocommerce .alert-danger {
    max-width: 480px;
    margin: 3rem auto 2rem auto !important;
    background: #fff !important;
    border-radius: 1.2rem !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    padding: 2rem 2.5rem !important;
    display: block !important;
    text-align: center;
    color: #d32f2f !important;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    border: none !important;
    position: relative;
}
.woocommerce-error::before,
.woocommerce .woocommerce-error::before,
.woocommerce .alert-danger::before {
    content: '';
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 0.5rem auto;
    background: url('data:image/svg+xml;utf8,<svg width=\"64\" height=\"64\" viewBox=\"0 0 64 64\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><circle cx=\"32\" cy=\"32\" r=\"30\" stroke=\"%23bfc3c9\" stroke-width=\"4\" fill=\"none\"/><circle cx=\"24\" cy=\"28\" r=\"3\" fill=\"%23bfc3c9\"/><circle cx=\"40\" cy=\"28\" r=\"3\" fill=\"%23bfc3c9\"/><path d=\"M24 44c2.667-2.667 10.667-2.667 13.334 0\" stroke=\"%23bfc3c9\" stroke-width=\"3\" stroke-linecap=\"round\"/></svg>') no-repeat center/contain;
}

.woocommerce-error a,
.woocommerce .woocommerce-error a,
.woocommerce .alert-danger a {
    color: #0d6efd !important;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.woocommerce-error a:hover,
.woocommerce .woocommerce-error a:hover,
.woocommerce .alert-danger a:hover {
    color: #0056b3 !important;
}

.woocommerce-error li {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline;
}

/* Pulsanti shipping method stile card */
.td-shipping-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 0.8rem;
    padding: 0.75rem 1.25rem;
    font-size: 1.08rem;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-right: 1rem;
    position: relative;
    min-width: 220px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.td-shipping-btn i {
    font-size: 1.3em;
    color: #888;
}
input[name="shipping_mode"]:checked + .td-shipping-btn {
    border-color: #ffc107;
    box-shadow: 0 2px 12px rgba(255,193,7,0.08);
    color: #222;
}
input[name="shipping_mode"]:checked + .td-shipping-btn:after {
    content: '\2714';
    color: #ffc107;
    font-size: 1.2em;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}
.td-shipping-btn:hover {
    border-color: #2979ff;
}

/* Errori inline sotto input come badge rossi piccoli */
 
.checkout-inline-error-message, .woocommerce-invalid .woocommerce-input-wrapper .woocommerce-error, .woocommerce form .form-row .woocommerce-error {
    display: inline-block !important;
    background: #dc3545 !important;
    color: #fff !important;
    font-size: 11px;
    font-family: 'Poppins', Arial, sans-serif !important;
    font-weight: 400;
    border-radius: 0.6em !important;
    padding: 0.22em 0.7em !important;
    margin: 0.88em 0 0.3em 0 !important;
    line-height: 1.2;
    box-shadow: none !important;
    border: none !important;
    vertical-align: middle;
}

.btn-white {
  background: #fff;
  color: #222;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}
.btn-white:focus, .btn-white:active {
  box-shadow: 0 0 0 2px #e5e7eb;
}

.logo-swiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 120px;
}
.logo-swiper img {
  max-height: 80px;
  max-width: 180px;
  object-fit: contain;
  filter: grayscale(0%);
}
.logo-swiper .swiper-button-next,
.logo-swiper .swiper-button-prev {
  color: #1976d2;
  top: 50%;
  width: 40px;
  height: 40px;
}
.logo-swiper .swiper-pagination-bullet-active {
  background: #1976d2;
}

/* Container dei metodi di pagamento: flex orizzontale */
#payment .wc_payment_methods,
.woocommerce-checkout #payment .wc_payment_methods {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 1rem;
  justify-content: flex-start;
  align-items: stretch;
  background: #fafbfc;
  border-radius: 1rem;
  padding: 1.2rem 1rem 1rem 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

/* Card più piccole e senza margine destro */
.td-payment-card {
  min-width: 160px;
  max-width: 200px;
  padding: 0.7rem 1.1rem;
  font-size: 1rem;
  margin: 0;
  border-radius: 0.7rem;
  box-shadow: none;
  background: #fff;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.td-payment-card i {
  font-size: 1.2em;
  color: #888;
}
.td-payment-card.active {
  background: #ffa500 !important;
  color: #000000 !important;
  border-color: #ffa500 !important;
}
.td-payment-card.active i {
  color: #fff !important;
}

.ul.wc_payment_methods.payment_methods.list-unstyled.mb-0{
    display: flex !important;
}
.wc_payment_method label{
    font-size: .8rem !important;
}

.td-shipping-alert {
  background: #f2fff6;
  color: #199c4b;
  border-radius: 0.8rem;
  padding: 1.1rem 1.5rem;
  font-size: 1.08rem;
  margin-bottom: 1.2rem;
  border: none;
}
.td-shipping-alert .bi {
  color: #199c4b;
  flex-shrink: 0;
}
.td-shipping-alert .fw-bold {
  color: #199c4b;
  font-weight: 600;
}

#td-order-loader {
  display: none;
  position: fixed;
  z-index: 12000;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(1px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
#td-order-loader .spinner-border {
  width: 3rem;
  height: 3rem;
}
#td-order-loader .fs-5 {
  color: #fff;
  margin-top: 1.5rem;
  font-weight: bold;
  text-shadow: 0 2px 8px #000;
}
button.navbar-toggler.me-2 {
    border: none !important;
}
button.navbar-toggler.me-2:focus {
    box-shadow: none !important;
}
button.navbar-toggler.me-2:active {
    box-shadow: none !important;
}
@media (max-width: 768px) { 
    aside{
        padding-left: 40px !important;
        padding-right: 40px !important;
    }
}


