*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:Arial, Helvetica, sans-serif;
  background:#f8f4ef;
  color:#2f1f17;
}

/* HEADER */

.top-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 40px;
  background:white;
  box-shadow:0 2px 10px rgba(0,0,0,.08);
  gap:20px;
}

.logo h1{
  font-size:38px;
}

.logo p{
  letter-spacing:8px;
  text-transform:uppercase;
  font-size:12px;
}

.menu{
  display:flex;
  gap:18px;
  align-items:center;
}

.menu button{
  border:none;
  background:none;
  cursor:pointer;
  font-size:16px;
  font-weight:bold;
  color:#000;
}

.user-area{
  display:flex;
  align-items:center;
  gap:25px;
}

.cart-btn{
  display:flex;
  align-items:center;
  gap:8px;
  background:none !important;
  border:none !important;
  cursor:pointer;
  font-size:22px !important;
  color:#5b3821 !important;
  font-weight:bold;
  padding:0 !important;
}

.cart-btn span{
  background:#5b3821;
  color:white;
  border-radius:50%;
  min-width:22px;
  height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
}

#user-email{
  font-weight:600;
}

#logout-btn{
  background:#5b3821;
  color:white;
  border:none;
  padding:8px 15px;
  border-radius:5px;
  cursor:pointer;
}

/* PÁGINAS */

.pagina{
  display:none;
}

.pagina.ativa{
  display:block;
}

/* HERO */

.hero{
  min-height:500px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:40px;
  background:
    linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.7)),
    url("https://images.unsplash.com/photo-1618220179428-22790b461013?auto=format&fit=crop&w=1600&q=80");
  background-size:cover;
  background-position:center;
}

.hero h2{
  font-size:56px;
  max-width:800px;
}

.hero p{
  margin-top:20px;
  max-width:600px;
  font-size:20px;
  line-height:1.6;
}

.btn{
  margin-top:30px;
  padding:15px 25px;
  border:none;
  background:#5b3821;
  color:white;
  cursor:pointer;
  border-radius:6px;
}

.home-intro{
  max-width:760px;
  margin:0 auto;
  padding:90px 24px 50px;
  text-align:center;
}

.eyebrow{
  display:block;
  margin-bottom:12px;
  color:#9a6b46;
  font-size:13px;
  font-weight:bold;
  letter-spacing:3px;
  text-transform:uppercase;
}

.home-intro h2,
.home-cta h2{
  margin:0;
  font-size:38px;
  line-height:1.2;
}

.home-intro p{
  margin-top:20px;
  color:#6d5a4d;
  font-size:18px;
  line-height:1.8;
}

.home-highlights{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:24px;
  max-width:1200px;
  margin:0 auto;
  padding:0 40px 90px;
}

.highlight-card{
  overflow:hidden;
  background:white;
  border-radius:14px;
  box-shadow:0 12px 35px rgba(47,31,23,.09);
  transition:transform .25s ease, box-shadow .25s ease;
}

.highlight-card:hover{
  transform:translateY(-7px);
  box-shadow:0 18px 45px rgba(47,31,23,.14);
}

.highlight-card img{
  width:100%;
  height:260px;
  object-fit:cover;
}

.highlight-card div{
  padding:25px;
}

.highlight-card span{
  color:#b28a68;
  font-size:13px;
  font-weight:bold;
  letter-spacing:2px;
}

.highlight-card h3{
  margin:10px 0;
  font-size:22px;
}

.highlight-card p{
  color:#6d5a4d;
  line-height:1.6;
}

.home-cta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:40px;
  max-width:1120px;
  margin:0 auto 90px;
  padding:55px 60px;
  border-radius:16px;
  background:#e9ddd0;
}

.home-cta div{
  max-width:700px;
}

.home-cta .btn{
  flex-shrink:0;
  margin-top:0;
  font-size:16px;
}

/* TÍTULOS */

h2{
  text-align:center;
  margin-top:40px;
}

.intro{
  text-align:center;
  margin-top:10px;
}

.shop-options{
  display:flex;
  justify-content:center;
  gap:18px;
  margin:30px auto 0;
  padding:0 20px;
}

.shop-option{
  display:flex;
  flex-direction:column;
  min-width:260px;
  padding:18px 24px;
  border:1px solid #dfd0c2;
  border-radius:10px;
  background:#fffaf5;
  text-align:center;
  color:inherit;
  font:inherit;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.shop-option:hover,
.shop-option.ativo{
  border-color:#6a3c24;
  background:#6a3c24;
  color:white;
  transform:translateY(-2px);
}

.shop-option span{
  margin-top:5px;
  color:#796557;
  font-size:14px;
}

.shop-option:hover span,
.shop-option.ativo span{
  color:#f6e8dc;
}

.clear-filter{
  display:block;
  margin:12px auto 0;
  border:0;
  background:transparent;
  color:#6a3c24;
  font:inherit;
  text-decoration:underline;
  cursor:pointer;
}

.clear-filter[hidden]{
  display:none;
}

.empty-products{
  grid-column:1 / -1;
  padding:35px 20px;
  text-align:center;
}

.content-page{
  max-width:760px;
  min-height:400px;
  margin:0 auto;
  padding:40px 24px;
  text-align:center;
}

.content-page h2{
  margin-top:0;
  margin-bottom:24px;
}

.content-page p{
  margin:12px 0;
  font-size:18px;
  line-height:1.7;
}

/* PRODUTOS */

.products{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 280px));
  justify-content:center;
  gap:25px;
  padding:40px;
}

.product{
  background:white;
  border:2px solid transparent;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(0,0,0,.1);
  transition:border-color .2s ease, box-shadow .2s ease;
}

.product.selecionado{
  border-color:#79945d;
  box-shadow:0 8px 24px rgba(77,105,54,.2);
}

.product img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
}

.product-image-button{
  position:relative;
  display:block;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:0 !important;
  overflow:hidden;
}

.product-image-button span{
  position:absolute;
  right:12px;
  bottom:12px;
  padding:7px 10px;
  border-radius:20px;
  background:rgba(47,31,23,.82);
  color:white;
  font-size:12px;
}

.product .details-button{
  margin-bottom:0;
  border:1px solid #5b3821;
  background:white;
  color:#5b3821;
}

.product h3{
  margin:15px;
}

.product p{
  margin:0 15px;
}

.product strong{
  display:block;
  margin:15px;
}

.product-status{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin:0 15px 5px;
  font-size:13px;
}

.stock-label{
  color:#50713b !important;
}

.cart-quantity{
  display:none;
  color:#5b3821;
  font-weight:bold;
}

.product.selecionado .cart-quantity{
  display:inline;
}

.product button{
  width:calc(100% - 30px);
  margin:15px;
  padding:12px;
  border:none;
  background:#5b3821;
  color:white;
  cursor:pointer;
  border-radius:6px;
}

.product button:disabled,
.product-modal-info button:disabled{
  cursor:not-allowed;
  background:#aaa;
  opacity:.75;
}

/* CARRINHO */

.cart-list{
  max-width:900px;
  margin:40px auto;
  background:white;
  padding:20px;
  border-radius:10px;
}

.cart-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:15px 0;
  border-bottom:1px solid #ddd;
}

.cart-item div{
  display:flex;
  align-items:center;
  gap:15px;
}

.cart-item button{
  padding:8px 12px;
  border:none;
  border-radius:5px;
  background:#5b3821;
  color:white;
  cursor:pointer;
}

.cart-total{
  text-align:center;
  margin-bottom:50px;
}

/* LOGIN */

.auth-container{
  max-width:1000px;
  margin:40px auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:25px;
}

.auth-box{
  background:white;
  padding:25px;
  border-radius:10px;
}

.auth-box h3{
  margin-bottom:20px;
}

.auth-box input{
  width:100%;
  padding:12px;
  margin-bottom:12px;
}

.auth-box button{
  width:100%;
  padding:12px;
  background:#5b3821;
  color:white;
  border:none;
  border-radius:6px;
  cursor:pointer;
}

/* PERFIL */

.profile-box{
  overflow:hidden;
  max-width:960px;
  margin:32px auto 70px;
  background:white;
  padding:0;
  border:1px solid #eadfd6;
  border-radius:18px;
  box-shadow:0 16px 45px rgba(61,38,24,.1);
}

.account-page-title{
  margin-top:54px;
  color:#342218;
  font-size:32px;
}

.profile-card-header{
  display:flex;
  align-items:center;
  gap:20px;
  padding:30px 36px;
  border-bottom:1px solid #eadfd6;
  background:linear-gradient(120deg, #fffaf6, #f3e5da);
}

.profile-avatar{
  display:flex;
  align-items:center;
  justify-content:center;
  width:68px;
  height:68px;
  flex:none;
  border-radius:50%;
  background:#6a3c24;
  color:white;
  box-shadow:0 8px 18px rgba(90,53,32,.2);
}

.profile-avatar svg{
  width:34px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
}

.profile-card-header .eyebrow{
  margin-bottom:5px;
}

.profile-card-header h3{
  margin:0 0 5px;
  color:#342218;
  font-size:25px;
}

.profile-card-header p{
  margin:0;
  color:#766256;
  font-size:14px;
}

.profile-section-title{
  padding:28px 36px 18px;
}

.profile-section-title h4{
  margin:0 0 6px;
  color:#342218;
  font-size:18px;
}

.profile-section-title p{
  margin:0;
  color:#806d61;
  font-size:14px;
}

.profile-form-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  padding:0 36px 32px;
}

.profile-form-grid label{
  display:grid;
  gap:8px;
  color:#4b372b;
  font-size:13px;
  font-weight:700;
}

.profile-box input{
  width:100%;
  padding:13px 14px;
  margin:0;
  border:1px solid #ddd1c8;
  border-radius:9px;
  background:#fffdfb;
  font-size:15px;
  transition:border-color .2s, box-shadow .2s, background .2s;
}

.profile-box input:focus{
  outline:none;
  border-color:#9a6b46;
  background:white;
  box-shadow:0 0 0 3px rgba(154,107,70,.12);
}

.profile-field-wide{
  grid-column:1 / -1;
}

.profile-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:22px 36px;
  border-top:1px solid #eadfd6;
  background:#fcf8f5;
}

.profile-actions span{
  color:#88756a;
  font-size:13px;
}

.profile-box button{
  width:auto;
  min-width:200px;
  padding:13px 22px;
  border:none;
  border-radius:9px;
  background:#5b3821;
  color:white;
  cursor:pointer;
  font-size:16px;
  font-weight:bold;
}

.profile-box button:hover{
  background:#774b30;
  transform:translateY(-1px);
}

/* ADMINISTRAÇÃO */

.admin-page{
  max-width:1000px;
  margin:0 auto;
  padding:50px 24px 80px;
}

.admin-page > .eyebrow{
  text-align:center;
}

.admin-page > h2{
  margin-top:0;
}

.admin-form{
  display:grid;
  gap:18px;
  max-width:720px;
  margin:35px auto 55px;
  padding:28px;
  border-radius:12px;
  background:white;
  box-shadow:0 8px 28px rgba(47,31,23,.09);
}

.admin-form label{
  display:grid;
  gap:8px;
  font-weight:bold;
}

.admin-form input,
.admin-form textarea,
.admin-form select{
  width:100%;
  padding:12px;
  border:1px solid #d8cec7;
  border-radius:6px;
  font:inherit;
}

.admin-form small{
  color:#796557;
  font-weight:normal;
}

.admin-form-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.admin-actions{
  display:flex;
  gap:12px;
}

.admin-actions button,
.admin-product-item button{
  padding:11px 16px;
  border:none;
  border-radius:6px;
  background:#5b3821;
  color:white;
  cursor:pointer;
}

.admin-actions .secondary-button{
  border:1px solid #5b3821;
  background:white;
  color:#5b3821;
}

.admin-products-list{
  display:grid;
  gap:12px;
}

.admin-products-list h3{
  margin-bottom:8px;
}

.admin-product-item{
  display:grid;
  grid-template-columns:70px 1fr auto auto;
  align-items:center;
  gap:16px;
  padding:12px;
  border-radius:9px;
  background:white;
}

.admin-product-item img{
  width:70px;
  aspect-ratio:1 / 1;
  border-radius:7px;
  object-fit:cover;
}

.admin-product-item div{
  display:grid;
  gap:5px;
}

.admin-product-item span{
  color:#796557;
  font-size:14px;
}

.admin-product-item .danger-button{
  background:#9c3e37;
}

/* FOOTER */

footer{
  margin-top:50px;
  background:#2f1f17;
  color:white;
  text-align:center;
  padding:40px;
}

/* RESPONSIVO */

@media(max-width:768px){

  .top-header{
    flex-direction:column;
    justify-content:center;
    text-align:center;
    padding:20px;
  }

  .menu{
    flex-wrap:wrap;
    justify-content:center;
  }

  .user-area{
    justify-content:center;
    flex-wrap:wrap;
    gap:18px;
  }

  .hero h2{
    font-size:34px;
  }

  .hero p{
    font-size:16px;
  }

  .home-intro{
    padding-top:65px;
  }

  .home-intro h2,
  .home-cta h2{
    font-size:30px;
  }

  .home-highlights{
    grid-template-columns:1fr;
    padding:0 20px 65px;
  }

  .home-cta{
    flex-direction:column;
    align-items:flex-start;
    margin:0 20px 65px;
    padding:38px 28px;
  }

  .auth-container{
    grid-template-columns:1fr;
  }

  .admin-form-row{
    grid-template-columns:1fr;
  }

  .admin-product-item{
    grid-template-columns:55px 1fr;
  }

  .admin-product-item img{
    width:55px;
  }

  .shop-options{
    flex-direction:column;
  }

  .shop-option{
    min-width:0;
  }

  .profile-box{
    margin:25px 16px 50px;
    border-radius:14px;
  }

  .profile-card-header,
  .profile-section-title,
  .profile-form-grid,
  .profile-actions{
    padding-left:20px;
    padding-right:20px;
  }

  .profile-form-grid{
    grid-template-columns:1fr;
  }

  .profile-field-wide{
    grid-column:auto;
  }

  .profile-actions{
    flex-direction:column;
    align-items:stretch;
  }

  .profile-box button{
    width:100%;
  }

}

@media (orientation:landscape) and (max-height:600px){

  .hero{
    min-height:auto;
    padding:40px;
  }

  .hero h2{
    font-size:32px;
  }

}

.profile-menu{
  position:relative;
}

.profile-btn{
  display:flex;
  align-items:center;
  gap:8px;
  justify-content:center;
  min-width:40px;
  height:40px;
  background:white;
  color:#171717;
  border:1.5px solid #171717;
  padding:7px;
  border-radius:50%;
  cursor:pointer;
  font-weight:bold;
}

.profile-btn:hover{
  background:#f5eee8;
}

.profile-icon{
  width:24px;
  height:24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.6;
  stroke-linecap:round;
}

.profile-name{
  display:none;
}

.profile-btn.authenticated{
  width:auto;
  max-width:220px;
  padding:7px 12px;
  border-radius:22px;
}

.profile-btn.authenticated .profile-name{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.profile-dropdown{
  display:none;
  position:absolute;
  right:0;
  top:52px;
  min-width:265px;
  padding:10px;
  border:1px solid #eadfd6;
  border-radius:16px;
  background:rgba(255,255,255,.98);
  box-shadow:0 18px 45px rgba(58,36,23,.18);
  backdrop-filter:blur(12px);
  z-index:100;
}

.profile-dropdown::before{
  content:"";
  position:absolute;
  top:-7px;
  right:15px;
  width:12px;
  height:12px;
  border-top:1px solid #eadfd6;
  border-left:1px solid #eadfd6;
  background:white;
  transform:rotate(45deg);
}

.profile-dropdown button{
  width:100%;
  background:transparent;
  border:none;
  color:#2e211a;
  text-align:left;
  padding:11px;
  cursor:pointer;
  font-size:14px;
}

.profile-dropdown button:hover{
  background:#f7efe9;
  border-radius:10px;
}

.profile-dropdown.ativo{
  display:block;
  animation:profileMenuIn .18s ease-out;
}

@keyframes profileMenuIn{
  from{opacity:0; transform:translateY(-7px) scale(.98)}
  to{opacity:1; transform:translateY(0) scale(1)}
}

.profile-dropdown-title{
  padding:7px 11px 10px;
  color:#9a6b46;
  font-size:11px;
  font-weight:800;
  letter-spacing:1.6px;
  text-transform:uppercase;
}

.profile-dropdown .profile-menu-item{
  display:flex;
  align-items:center;
  gap:12px;
}

.profile-menu-item > span:last-child{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.profile-menu-item strong{
  font-size:14px;
}

.profile-menu-item small{
  color:#8a776b;
  font-size:11px;
}

.menu-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:35px;
  height:35px;
  flex:none;
  border-radius:10px;
  background:#f1e4da;
  color:#6a3c24;
}

.menu-icon svg{
  width:19px;
  height:19px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.profile-menu-separator{
  height:1px;
  margin:7px 5px;
  background:#eee5df;
}

.logout-menu-item{
  color:#9b3a32 !important;
}

.logout-menu-item .menu-icon{
  background:#faeae7;
  color:#9b3a32;
}

.modal{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  align-items:center;
  justify-content:center;
  z-index:999;
}

.modal.ativo{
  display:flex;
}

.modal-box{
  width:90%;
  max-width:430px;
  background:white;
  padding:35px;
  border-radius:12px;
  box-shadow:0 15px 40px rgba(0,0,0,.3);
  position:relative;
}

.modal-box h2{
  margin-top:0;
  margin-bottom:25px;
}

.modal-box input{
  width:100%;
  padding:14px;
  margin-bottom:14px;
  border:1px solid #ddd;
  border-radius:6px;
}

.modal-box button:not(.fechar){
  width:100%;
  padding:14px;
  border:none;
  background:#5b3821;
  color:white;
  border-radius:6px;
  cursor:pointer;
  font-weight:bold;
}

.account-modal-box{
  max-width:440px;
  padding:38px 34px 32px;
  text-align:center;
  border-radius:16px;
}

.account-modal-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:54px;
  height:54px;
  margin:0 auto 12px;
  border:1.5px solid #5b3821;
  border-radius:50%;
  color:#5b3821;
}

.account-modal-icon svg{
  width:30px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.5;
  stroke-linecap:round;
}

.account-modal-box h2{
  margin-bottom:8px;
}

.account-modal-intro{
  margin:0 0 24px;
  color:#6f625a;
  line-height:1.5;
}

.account-divider{
  display:flex;
  align-items:center;
  gap:12px;
  margin:16px 0;
  color:#998d85;
  font-size:13px;
  text-transform:uppercase;
}

.account-divider::before,
.account-divider::after{
  content:"";
  flex:1;
  height:1px;
  background:#e1dad5;
}

.modal-box .account-secondary-button{
  border:1px solid #5b3821 !important;
  background:white !important;
  color:#5b3821 !important;
}

.modal-box .google-login-button{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:11px;
  margin-bottom:0;
  border:1px solid #cfc7c2 !important;
  background:white !important;
  color:#24201e !important;
}

.google-login-button:hover{
  background:#faf7f5 !important;
  border-color:#95847a !important;
}

.google-login-button svg{
  width:22px;
  height:22px;
  flex:none;
}

.product-modal-box{
  display:grid;
  grid-template-columns:minmax(0, 1.2fr) minmax(260px, .8fr);
  gap:32px;
  width:92%;
  max-width:900px;
}

.gallery-main-image{
  display:block;
  width:100%;
  aspect-ratio:1 / 1;
  border-radius:10px;
  object-fit:cover;
}

.gallery-thumbnails{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.gallery-thumbnail{
  width:72px !important;
  padding:0 !important;
  border:2px solid transparent !important;
  border-radius:7px !important;
  overflow:hidden;
  background:none !important;
}

.gallery-thumbnail.ativo{
  border-color:#5b3821 !important;
}

.gallery-thumbnail img{
  display:block;
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
}

.product-modal-info{
  display:flex;
  flex-direction:column;
  justify-content:center;
}

.product-modal-info h2{
  margin:0 0 18px;
  text-align:left;
}

.product-modal-info p{
  margin-bottom:20px;
  color:#6d5a4d;
  line-height:1.7;
}

.product-modal-info strong{
  margin-bottom:22px;
  font-size:24px;
}

@media(max-width:700px){
  .product-modal-box{
    grid-template-columns:1fr;
    max-height:90vh;
    overflow-y:auto;
  }
}

.fechar{
  position:absolute;
  top:12px;
  right:15px;
  border:none;
  background:none;
  font-size:26px;
  cursor:pointer;
}
