/*========================================
=            Import Bootstrap 5          =
========================================*/
@import url("https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css");

/*========================================
=            CSS Variables               =
========================================*/
:root {
  --brand-purple:    #722872;
  --brand-light:     #f9f9f9;
  --brand-green:     #27ae60;
  --promo-red:       #e74c3c;
  --promo-background:#ffe5e5;
  --text-dark:       #333333;
  --white:           #ffffff;
  --gray-light:      #f2f2f2;
  --gray:            #dddddd;
  --gray-dark:       #555555;
  --yellow-star:     #f1c40f;
  --highlight-purple:#4B0082;
  --disabled-gray:   #eee;
  --disabled-text:   #888;
  --select-border:   #6a0dad;
  --footer-hover:    #f9c95c;
  --footer-icon:     #f2c94c;
  --btn-purple:      #6f42c1;
  --btn-purple-hover:#5936a0;
  --success-bg:      #e8f9f1;
  --success-border:  #198754;
  --success-text:    #146c43;
  --logo-size:       120px;
}

/*========================================
=             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 {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

#menuBody {
  position: relative;
}

#free-delivery-banner + .row {
  margin-top: 60px;
}

.modal {
  z-index: 1200 !important;
}

/*========================================
=         Banner + Logo Section          =
========================================*/
.banner {
  background-color: var(--brand-purple);
  padding: 2rem 1rem;
  text-align: center;
}

.banner .logo {
  width: var(--logo-size);
  height: var(--logo-size);
  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;
}

@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: var(--promo-background);
  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: var(--yellow-star);
  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 var(--gray);
}

.btn-purple {
  background-color: var(--btn-purple);
  color: var(--white);
  font-weight: bold;
}

.btn-purple:hover {
  background-color: var(--btn-purple-hover);
}

/*========================================
=         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: var(--highlight-purple);
  text-align: center;
  pointer-events: none;
  animation: fadeSlide 0.8s ease-in-out both;
}

@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 var(--highlight-purple);
  background-color: #f9f9ff;
  font-weight: 500;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.cidade-modern:disabled {
  background-color: var(--disabled-gray);
  color: var(--disabled-text);
  opacity: 0.8;
}

.cidade-modern:focus {
  outline: none;
  box-shadow: 0 0 0 0.15rem rgba(75, 0, 130, 0.25);
  border-color: var(--select-border);
}

/*========================================
=        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: var(--footer-icon);
}

footer a {
  color: var(--white);
}

footer a:hover {
  color: var(--footer-hover);
  text-decoration: none;
}

#banner {
  padding-bottom: calc(var(--logo-size) / 2 + 1rem);
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.social-rating {
  margin-top: calc(var(--logo-size) / 2 + 0.75rem);
  position: relative;
  z-index: 1;
}

#logo-img {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  width: var(--logo-size);
  height: var(--logo-size);
  object-fit: cover;
  border: 4px solid var(--white);
  border-radius: 50%;
  z-index: 2;
}

#banner .banner-overlay {
  inset: 0;
}


@keyframes pulse-green {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .2; transform: scale(.8); }
}

/* classe utilitária */
.blink-dot {
  animation: pulse-green 1.2s ease-in-out infinite;
}
