/*========================================
=            Import Bootstrap 5          =
========================================*/
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css");

/*========================================
=            CSS Variables               =
========================================*/
:root {
  /* Brand colors */
  --brand-purple:    #722872;
  --brand-light:     #f9f9f9;
  --brand-green:     #27ae60;
  --promo-red:       #e74c3c;
  --text-dark:       #333333;

  /* Neutral colors */
  --white:           #ffffff;
  --gray-light:      #f2f2f2;
  --gray:            #dddddd;
  --gray-dark:       #555555;

  /* Shadows */
  --shadow-sm:       0 1px 4px rgba(0,0,0,0.05);
  --shadow-md:       0 2px 8px rgba(0,0,0,0.2);

   --logo-size: 120px;          /* use o mesmo tamanho que já definiu em #logo-img */
}

/*========================================
=             Base / Resets              =
========================================*/
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--brand-light);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

h3 {
  color: var(--brand-purple);
  margin: 0;
  padding: 0;
}

/*========================================
=               Layout                   =
========================================*/
/* Wrapper to centralize content */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Menu body relative positioning */
#menuBody {
  position: relative;
}

/* Adjust row below free-delivery banner */
#free-delivery-banner + .row {
  margin-top: 60px;
}

/*========================================
=          Modal Stacking Order          =
========================================*/
.modal {
  z-index: 1200 !important;
}

/*========================================
=         Banner + Logo Section          =
========================================*/
.banner {
  background-color: var(--brand-purple);
  padding: 2rem 1rem;
  text-align: center;
}

.banner .logo {
  width: 120px;
  height: 120px;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-md);
  margin: 0 auto;
}

/*========================================
=        Header & Meta Information       =
========================================*/
header {
  background-color: var(--white);
  padding: 1rem 0;
  margin-bottom: 0.5rem;
  text-align: center;
}

header h1 {
  color: var(--brand-purple);
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

.meta span {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

/*========================================
=            Navbar Customization         =
========================================*/
nav {
  background-color: var(--brand-purple);
}

nav .nav-link {
  color: var(--white);
  font-weight: 600;
}

nav .nav-link:hover {
  text-decoration: underline;
}

/*========================================
=       Sidebar Notifications Panel      =
========================================*/
.sidebar h2 {
  color: var(--brand-purple);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.notifs {
  background-color: var(--white);
  border: 1px solid var(--gray);
  border-radius: 6px;
  height: 300px;
  overflow: hidden;
  position: relative;
  padding: 0.5rem;
}

.notifs p {
  position: absolute;
  width: 100%;
  padding: 0.4rem 0.6rem;
  background-color: var(--gray-light);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  animation: slide 8s ease-in-out infinite;
}

/* Slide animation for notifications */
@keyframes slide {
  0%   { top: 100%; opacity: 0; }
  8%   { top: 75%; opacity: 1; }
  25%  { top: 50%; opacity: 1; }
  32%  { top: 25%; opacity: 0; }
  100% { top: -20%; opacity: 0; }
}

/*========================================
=             Promo Section               =
========================================*/
.promo {
  background-color: #ffe5e5;
  border: 2px solid var(--promo-red);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.promo h2 {
  color: var(--promo-red);
  font-size: 1.3rem;
  margin-bottom: 0.7rem;
}

.promo .boxes {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.promo .box {
  background-color: var(--promo-red);
  color: var(--white);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border-radius: 6px;
}

.promo button {
  background-color: var(--white);
  color: var(--brand-purple);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.promo button:hover {
  background-color: var(--gray-light);
}

/*========================================
=         Catalog / Grid Layout          =
========================================*/
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0 auto 2rem;
  max-width: 1100px;
}

.product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product img {
  width: 100%;
  object-fit: contain;
  padding: 1rem;
  background: var(--white);
}

.product .info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product .info button {
  margin-top: auto;
  width: 100%;
}

/*========================================
=            Reviews Section              =
========================================*/
#reviews {
  margin-bottom: 2rem;
}

.reviews-summary {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.reviews-summary .avg {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--brand-purple);
}

.reviews-summary .stars {
  color: #f1c40f;
  font-size: 1.2rem;
  margin: 0.3rem 0;
}

.reviews-summary .meta {
  font-size: 0.9rem;
  color: var(--gray-dark);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.review-item {
  background-color: var(--white);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem;
}

.review-text .name {
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--brand-purple);
}

.review-text .comment {
  font-size: 0.9rem;
  color: var(--text-dark);
}

.review-image img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

/*========================================
=              Buttons                   =
========================================*/
.btn-primary {
  background-color: var(--brand-purple);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--brand-light);
  color: var(--text-dark);
  border: 1px solid #cccccc;
}

.btn-purple {
  background-color: #6f42c1;
  color: var(--white);
  font-weight: bold;
}

.btn-purple:hover {
  background-color: #5936a0;
}

/*========================================
=         Product Card Overrides         =
========================================*/
.product-card {
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
}

.product-card .badge {
  white-space: normal !important;
  word-wrap: break-word;
  width: 100%;
}

.card-img-top {
  object-fit: cover;
}

@media (min-width: 768px) {
  .product-card .card-img-top {
    height: 280px;
  }
}

/*========================================
=       Utility & Text Helpers           =
========================================*/
.text-purple {
  color: var(--brand-purple) !important;
}

.spinner-border.text-purple {
  border-color: var(--brand-purple);
  border-right-color: transparent;
}

/*========================================
=           Select / Dropdown            =
========================================*/
.select-unstyled {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text-dark);
  pointer-events: none;
  appearance: none;
}

.select-unstyled.estado-highlight {
  font-size: 2rem;
  font-weight: 700;
  color: #4B0082;
  text-align: center;
  pointer-events: none;
  animation: fadeSlide 0.8s ease-in-out both;
}

/* Slide-fade for estado-highlight */
@keyframes fadeSlide {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/*========================================
=          “Cidade Modern” Button        =
========================================*/
.cidade-modern {
  min-width: 180px;
  max-width: 250px;
  border-radius: 10px;
  border: 2px solid #4B0082;
  background-color: #f9f9ff;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.cidade-modern:disabled {
  background-color: #eee;
  color: #888;
  opacity: 0.8;
}

.cidade-modern:focus {
  outline: none;
  box-shadow: 0 0 0 0.15rem rgba(75, 0, 130, 0.25);
  border-color: #6a0dad;
}

/*========================================
=        Select2 Field Adjustment        =
========================================*/
.select2-container .select2-search__field {
  width: 100% !important;
  box-sizing: border-box;
  padding: 6px 12px;
}

/*========================================
=           Responsividade               =
========================================*/
@media (max-width: 768px) {
  .main {
    flex-direction: column;
  }
  .sidebar {
    order: 2;
    margin-top: 1rem;
  }
}

/*========================================
=               Footer                   =
========================================*/
footer {
  background-color: var(--brand-purple);
  font-size: 0.9rem;
  color: var(--white);
  padding: 2rem 1rem;
}

footer h5 {
  margin-bottom: 1rem;
}

footer ul li {
  margin-bottom: 0.5rem;
}

footer ul li i,
footer p i {
  color: #f2c94c;
}

footer a {
  color: var(--white);
}

footer a:hover {
  color: #f9c95c;
  text-decoration: none;
}
#banner {
  padding-bottom: calc(var(--logo-size) / 2 + 1rem);
  position: relative;
  overflow: visible;
  background: url('/img/banner-frutas.jpg') center/cover no-repeat;

  /* ↓ Flexbox para alinhar todo o conteúdo embaixo ↓ */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* empurra o h1 e a social-rating para baixo */
  align-items: center;
  /* espaço interno embaixo: metade do logo + um gap extra */
}
/* NOVO: deixa espaço livre para o logo antes de começar o texto */
.social-rating {
  margin-top: calc(var(--logo-size) / 2 + 0.75rem);
  position: relative;          /* garante que fique acima do banner-overlay */
  z-index: 1;
}
/* Logo continua absoluto, “meio para fora” */
#logo-img {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 4px solid #fff;
  border-radius: 50%;
  z-index: 2;
}

/* Overlay e demais elementos continuam iguais */
#banner .banner-overlay { inset: 0; }
