/*general*/
* {
    margin: 0;
    padding: 0;
    border: none;
}

:root {
    --baseColor: #000;
    --baseTextColor: #fff;
    --baseHoverColor: #909999;
}

nav, footer {
    background-color: var(--baseColor);
    color: var(--baseTextColor);
}

.title-info {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    position: relative;
    padding-bottom: .5rem;
    margin: 5px 0 5px 0;
}

.title-info::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 50%;        
    height: 3px;        
    background: var(--baseColor);
}

.alert {
    display: none;
    text-align: center;
}

/* home and addProduct */
.div-products-show {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 10px;
    margin: 5px 0 5px 0;
}

.form-search {
    width: 90%;
    margin: 0 auto;
}

/* buttons */
.btn-standard, .btn-alert {
    width: 100%;
    background-color: var(--baseColor);;
    color: var(--baseTextColor);
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.5s;
    margin: 5px 0 5px 0;
}

.btn-standard:hover {
    background-color: #fff;
    color: #000;
}

.btn-alert {
    background-color: #A52A2A;
}

.btn-alert:hover {
   background-color: #FF4500;
}

/*navbar*/
.navbar-brand {
    position: relative;
}

#logo {
    width: 40px;
}

#olhaquantota-title {
    color: var(--baseTextColor);
    position: absolute;
    font-size: 30px;
    left: 50px;
}

.navbar-nav {
    justify-content: flex-end;
    width: 100%;
}

#link-add, #link-dashboard, #link-logout, #link-login {
    color: var(--baseTextColor);
    font-size: 18px;
    margin-right: 10px;
}

#link-dashboard {
    font-weight: bold;
}

#link-add:hover, #link-dashboard:hover , #link-logout:hover , #link-login:hover {
    color: var(--baseHoverColor);
} 

/*--- home ---*/

/*section hero*/
#home-section-hero {
    display: flex;
    background-position: center;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: var(--baseColor);
    margin-bottom: 25px;
}

#home-section-hero > div {
    width: 90%;
    margin: auto;
    overflow: hidden;
    padding: 20px 0;
}

#home-section-hero > div > h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

#home-section-hero > div > p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

.div-product {
    width: 280px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.div-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(21, 80, 80, 0.2);
}

.img-products {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    overflow: hidden;
}

.img-products img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover; 
}

.product-info {
    padding: 20px;
    text-align: left;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    height: 45px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--baseColor);
    margin-bottom: 4px;
}

.product-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

/*--- about ---*/
#about-section > .title-info {
    margin: 25px auto;
}

#about-section div {
    width: 80%;
    margin: 0 auto;
}

#div-about-img {
    display: flex;
    gap: 25px;
}

#div-about-img > img {
    width: 50%;
}

/*--- access ---*/
#login-container, #register-container {
    margin: 25px auto;
}

#login-container h2, #register-container h2{
    text-align: center;
}

/*--- addProduct ---*/
#div-my-products-add {
    max-height: 75vh;
    overflow: auto;
}

#options-products-status {
    display: flex;
    gap: 20px;
    margin: 0 auto;
    padding: 2px;
}

#options-products-status form button{
    border: none;
    font-size: 1.2rem;
    background-color: transparent;
    transition: .5s;
}

#options-products-status form:nth-child(1) button {
   color: var(--baseColor);
}

#options-products-status form:nth-child(2) button {
   color: #5e5c61;
}

#product-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 200px;
    overflow-y: auto;
}

.observation {
    display: none;
    color: #666;
    font-size: 20px;
    margin-top: 5px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#product-amount:focus + .observation {
  display: block;
  color: var(--baseColor);
}

/*--- modal ---*/
#modal-product-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--baseColor);
    text-align: left;
    margin: 0;
}

.img-container-modal {
    background-color: #f8f9fa;
    border-radius: 8px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.price-badge {
    background-color: #3a3a3a3e;
    padding: 10px 15px;
    border-radius: 8px;
    display: inline-block;
}

.price-badge .label {
    font-size: 0.9rem;
    color: #555;
    display: block;
}
.price-badge .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--baseColor);
}

.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.detail-item h6 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 2px;
}

.detail-item p {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.store-info-box {
    background-color: #fbfbfb;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--baseColor);
}

.store-info-box p {
    margin-bottom: 5px; 
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #111;
  color: #fff;
  padding: 15px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
  display: none;
  z-index: 9999;
}

.cookie-content {
  max-width: 1100px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.cookie-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  max-width: 700px;
}

.cookie-content a {
  color: #4da6ff;
  text-decoration: none;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.cookie-buttons button {
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
}

#accept-cookies {
  background: #28a745;
  color: white;
}

#reject-cookies {
  background: #444;
  color: white;
}

/*--- cookie ---*/
.cookie-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.cookie-box {
  background: #fff;
  color: #333;
  padding: 25px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: fadeIn 0.3s ease;
}

.cookie-box h3 {
  margin-top: 0;
}

.cookie-box p {
  font-size: 14px;
  line-height: 1.5;
}

.cookie-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.cookie-actions button {
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

#accept-cookies {
  background: #000;
  color: white;
}

#reject-cookies {
  background: #ccc;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*--- footer ---*/
footer {
    width: 100%;
    text-align: center;
    align-items: center;
    padding: 12px 0 0 0;
}

@media (max-width: 576px) {
    /*--- home ---*/
    .div-products-show {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .div-product {
        min-width: 300px;
    }

    /*--- about ---*/
    #div-about-img {
        flex-direction: column;
    }

    #div-about-img > img {
        margin: 0 auto;
    }
}