html{
  -webkit-text-size-adjust:100%;
}

body{
  overflow-x:hidden;
}

.container,
.container-fluid{
  min-width:0;
}

.site-header{
  background:#f3f4f6;
  border-bottom:1px solid #e5e7eb;
  box-shadow:0 2px 10px rgba(15,23,42,.05);
}

.site-header-container{
  position:relative;
}

.site-logo-img{
  width:auto;
  height:100px;
  max-height:100px;
  object-fit:contain;
}

.site-search-form{
  gap:.5rem;
  padding:.18rem;
  background:#fff;
  border:1px solid #d6d9df;
  border-radius:14px;
  box-shadow:0 4px 12px rgba(15,23,42,.06);
}

.site-search-input{
  min-height:44px;
  border:0;
  border-radius:11px;
  box-shadow:none;
}

.site-search-input:focus{
  border-color:transparent;
  box-shadow:0 0 0 .2rem rgba(21,61,107,.15);
}

.site-search-btn{
  flex:0 0 auto;
  width:48px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  border-radius:11px;
  box-shadow:0 8px 18px rgba(7,24,44,.22);
}

.site-search-btn svg,
.site-icon-button svg{
  width:20px;
  height:20px;
  fill:currentColor;
}

.site-category-bar{
  background-color:#0d2f56;
}

.btn-primary,
.btn-dark{
  --bs-btn-color:#fff;
  --bs-btn-bg:#153d6b;
  --bs-btn-border-color:#153d6b;
  --bs-btn-hover-color:#fff;
  --bs-btn-hover-bg:#0d2f56;
  --bs-btn-hover-border-color:#0d2f56;
  --bs-btn-focus-shadow-rgb:21,61,107;
  --bs-btn-active-color:#fff;
  --bs-btn-active-bg:#0b2748;
  --bs-btn-active-border-color:#0b2748;
  --bs-btn-disabled-color:#fff;
  --bs-btn-disabled-bg:#6f86a0;
  --bs-btn-disabled-border-color:#6f86a0;
}

.btn-outline-dark{
  --bs-btn-color:#153d6b;
  --bs-btn-border-color:#153d6b;
  --bs-btn-hover-color:#fff;
  --bs-btn-hover-bg:#153d6b;
  --bs-btn-hover-border-color:#153d6b;
  --bs-btn-focus-shadow-rgb:21,61,107;
  --bs-btn-active-color:#fff;
  --bs-btn-active-bg:#0d2f56;
  --bs-btn-active-border-color:#0d2f56;
}

.btn{
  border-radius:8px;
  font-weight:700;
}

.site-icon-button,
.site-cart-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  color:#153d6b;
  background:#fff;
  border:1px solid #d6d9df;
  border-radius:14px;
  transition:background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.site-icon-button:hover,
.site-icon-button:focus-visible,
.site-cart-link:hover,
.site-cart-link:focus-visible{
  color:#0d2f56;
  background:#eef2f7;
  border-color:#b9c2cf;
  box-shadow:0 8px 18px rgba(15,23,42,.10);
  transform:translateY(-1px);
}

.site-icon-button:focus-visible,
.site-cart-link:focus-visible{
  outline:2px solid rgba(21,61,107,.55);
  outline-offset:3px;
}

.site-cart-link.is-active{
  background:#eef2f7;
}

.site-cart-icon{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  color:#153d6b;
  background:transparent;
  border:0;
  border-radius:inherit;
  flex:0 0 auto;
}

.site-cart-icon svg{
  width:21px;
  height:21px;
  fill:currentColor;
}

.site-cart-badge{
  position:absolute;
  top:-6px;
  right:-7px;
  min-width:18px;
  height:18px;
  padding:0 .3rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#7d8da1;
  border:2px solid #f3f4f6;
  border-radius:999px;
  font-size:.68rem;
  font-weight:800;
  line-height:1;
}

.site-cart-badge.is-active{
  background:#d62828;
}

.site-cart-badge.is-empty{
  background:#7d8da1;
  color:#fff;
}

.site-category-bar .container{
  min-height:46px;
  display:flex;
  align-items:center;
}

.site-category-bar-content{
  display:flex;
  align-items:center;
  gap:1.15rem;
}

.site-category-button{
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  border-radius:8px;
  padding:.65rem .85rem;
}

.site-category-button:hover,
.site-category-button:focus{
  background:rgba(255,255,255,.08);
}

.site-category-link{
  color:#fff;
  font-size:.9rem;
  font-weight:600;
  white-space:nowrap;
}

.site-category-link:hover,
.site-category-link:focus{
  color:#dbeafe;
}

.auth-separator{
  display:flex;
  align-items:center;
  gap:.75rem;
  color:#6b7280;
  font-size:.85rem;
  font-weight:700;
  margin:1rem 0;
}

.auth-separator::before,
.auth-separator::after{
  content:"";
  height:1px;
  background:#e5e7eb;
  flex:1;
}

.google-login-btn{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.6rem;
  min-height:46px;
  color:#1f2937;
  background:#fff;
  border:1px solid #dadce0;
  border-radius:8px;
  font-weight:800;
  box-shadow:0 1px 2px rgba(0,0,0,.04);
  transition:background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.google-login-btn:hover,
.google-login-btn:focus{
  color:#111827;
  background:#f8fafc;
  border-color:#cfd4dc;
  box-shadow:0 2px 6px rgba(60,64,67,.12);
}

.google-login-mark{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 22px;
}

.google-login-mark svg{
  width:100%;
  height:100%;
  display:block;
}

.account-google-btn{
  width:auto;
  min-height:38px;
  padding:.35rem .7rem;
}

.card,
.alert,
.form-control,
.form-select,
.btn{
  max-width:100%;
}

.card-body,
.card-header,
.card-footer,
.alert,
.breadcrumb,
.dropdown-menu,
.table,
.product-title,
.category-title,
.section-title,
.home-product-name,
.category-card-name,
.related-card-name,
.fw-semibold{
  overflow-wrap:anywhere;
}

.sticky-top{
  z-index:2;
}

.product-card,
.home-product-card,
.category-card,
.related-card{
  min-width:0;
}

.home-product-card .card-body,
.category-card .card-body,
.product-card .card-body,
.related-card .card-body{
  min-width:0;
  padding:1rem;
}

.home-product-price,
.category-card-price,
.related-card-price,
.product-price{
  overflow-wrap:normal;
  white-space:normal;
}

.pagination{
  flex-wrap:wrap;
  gap:.35rem;
}

.pagination .page-link{
  border-radius:8px;
}

.table{
  margin-bottom:0;
}

.table th,
.table td{
  vertical-align:middle;
}

@media (max-width: 991.98px){
  .site-header-container{
    padding-top:1rem !important;
    padding-bottom:1rem !important;
  }

  .site-logo-img{
    height:76px;
    max-height:76px;
  }

  .site-header-actions{
    margin-top:0;
    gap:.75rem;
    flex-wrap:wrap;
  }

  .site-category-bar .container{
    align-items:stretch;
  }

  .site-category-dropdown{
    flex:0 0 auto;
  }

  .site-category-button{
    justify-content:center;
  }

  .site-category-bar-content{
    width:100%;
    gap:.75rem;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
  }

  .site-category-bar-content.is-category-menu-open{
    overflow:visible;
  }

  .site-category-dropdown{
    position:static;
  }

  .site-category-menu.show{
    position:absolute !important;
    top:100% !important;
    left:.75rem !important;
    right:.75rem !important;
    transform:none !important;
    width:auto;
    z-index:1050;
  }

  .page-shell{
    padding-top:1rem;
    padding-bottom:1.25rem;
  }

  .sticky-top{
    position:static;
  }

  .product-gallery-card,
  .product-buy-card,
  .product-section-card,
  .category-hero,
  .brand-strip{
    border-radius:8px;
  }
}

@media (max-width: 767.98px){
  body{
    font-size:14px;
  }

  .container{
    padding-left:.85rem;
    padding-right:.85rem;
  }

  .site-logo-img{
    height:64px;
    max-height:64px;
  }

  .site-search-form{
    align-items:stretch;
  }

  .site-search-input{
    min-height:44px;
  }

  .site-search-btn{
    min-height:44px;
  }

  .site-category-bar{
    padding:.65rem 0;
  }

  .footer-main{
    margin-top:2rem;
  }

  .footer-main .container{
    padding-top:2rem !important;
    padding-bottom:2rem !important;
  }

  .section-header,
  .category-hero > .d-flex,
  #searchApp .d-flex.justify-content-between,
  #cartApp > .d-flex{
    align-items:flex-start !important;
    flex-direction:column;
  }

  .category-sort{
    min-width:0 !important;
    width:100%;
  }

  .product-main-image-box{
    min-height:280px !important;
  }

  .product-main-image{
    max-height:250px !important;
  }

  .product-buy-card{
    padding:1rem !important;
  }

  .product-buy-box{
    padding:.85rem !important;
  }

  .product-title{
    font-size:1.45rem !important;
  }

  .product-price{
    font-size:1.45rem !important;
  }

  .product-subtotal{
    align-items:flex-start !important;
    flex-direction:column;
    gap:.2rem;
  }

  .product-spec-table th,
  .product-spec-table td{
    display:block;
    width:100% !important;
    padding:.75rem .9rem !important;
  }

  .product-spec-table th{
    border-bottom:0;
  }

  .qty-control,
  .qty-inline{
    width:100%;
  }

  .qty-input,
  .qty-inline-input{
    flex:1 1 auto;
    min-width:0;
  }

  .qty-btn,
  .qty-inline-btn{
    flex:0 0 42px;
  }

  #cartApp .card-body .row > [class*="col-md-3"],
  #cartApp .card-body .row > [class*="col-md-2"]{
    width:100%;
  }

  #checkoutApp .d-flex.justify-content-between,
  #cartApp .card-body .d-flex.justify-content-between{
    gap:.75rem;
  }

  #checkoutApp .card,
  #cartApp .card,
  #searchApp .card,
  #categoryApp .card{
    border-radius:8px !important;
  }
}

@media (max-width: 575.98px){
  .site-search-form{
    gap:.4rem;
  }

  .site-search-input{
    font-size:.92rem;
  }

  .site-header-actions{
    justify-content:space-between !important;
    width:100%;
  }

  .dropdown-menu{
    max-width:calc(100vw - 1.7rem);
  }

  .benefit-card{
    align-items:flex-start;
    gap:.7rem;
    padding:.85rem !important;
  }

  .benefit-icon{
    width:38px !important;
    height:38px !important;
    border-radius:8px !important;
  }

  .home-product-card .card-body,
  .category-card .card-body,
  .product-card .card-body,
  .related-card .card-body{
    padding:.8rem;
  }

  .home-product-name,
  .category-card-name,
  #searchApp .fw-semibold,
  .related-card-name{
    min-height:0 !important;
    font-size:.9rem;
  }

  .home-product-price,
  .category-card-price,
  .related-card-price,
  #searchApp .h5{
    font-size:1rem !important;
  }

  .product-gallery-card .row{
    flex-direction:column-reverse;
  }

  .product-gallery-card .col-2,
  .product-gallery-card .col-10{
    width:100%;
    flex:0 0 auto;
  }

  .product-thumb-list{
    flex-direction:row !important;
    overflow-x:auto;
    padding-bottom:.25rem;
  }

  .product-thumb-btn{
    width:64px;
    flex:0 0 64px;
  }

  .product-main-image-box{
    min-height:230px !important;
  }

  .product-main-image{
    max-height:210px !important;
  }

  #cartApp .card-body .row{
    align-items:flex-start !important;
  }

  #cartApp .card-body .row > .col-3{
    width:30%;
  }

  #cartApp .card-body .row > .col-9{
    width:70%;
  }
}

@media (max-width: 420px){
  .page-shell .row > .col-6,
  #homeApp .row > .col-6,
  #categoryApp .row > .col-6,
  #searchApp .row > .col-6,
  #productApp .row > .col-6{
    width:100%;
    flex:0 0 100%;
  }

  .site-logo-img{
    height:56px;
    max-height:56px;
  }

  .site-icon-button,
  .site-cart-link{
    width:42px;
    height:42px;
  }

  .site-cart-icon{
    width:100%;
    height:100%;
  }

  .btn,
  .form-control,
  .form-select{
    font-size:.92rem;
  }

  .card-body{
    padding:.9rem;
  }
}

/* Painel administrativo: os ajustes abaixo ficam isolados nas telas de gestão.
   Em desktop, a estrutura e as dimensões originais são preservadas. */
@media (max-width: 767.98px){
  .admin-responsive-page > .bg-white{
    padding:.9rem !important;
    border-radius:10px !important;
  }

  .admin-responsive-page h1.h4{
    font-size:1.35rem;
    line-height:1.25;
  }

  .admin-responsive-page .d-flex.justify-content-between > .btn,
  .admin-responsive-page .admin-page-title > div:last-child,
  .admin-responsive-page .admin-page-title > div:last-child .btn{
    width:100%;
  }

  .admin-responsive-page .form-control,
  .admin-responsive-page .form-select{
    min-height:44px;
    font-size:16px;
  }

  .admin-responsive-page .btn{
    min-height:42px;
  }

  .admin-filter-bar,
  .admin-batch-actions,
  .admin-card-actions{
    align-items:stretch !important;
    flex-direction:column;
    width:100%;
  }

  .admin-filter-bar label,
  .admin-filter-bar .form-select,
  .admin-batch-actions .btn,
  .admin-card-actions .btn{
    width:100% !important;
  }

  .admin-filter-grid > [class*="col-"]{
    width:100%;
  }

  .admin-filter-grid .btn{
    width:100%;
    margin-top:.2rem;
  }

  .admin-scroll-tabs,
  .admin-frete-page .nav-tabs{
    flex-wrap:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:thin;
    padding-bottom:.2rem;
  }

  .admin-scroll-tabs .nav-item,
  .admin-frete-page .nav-tabs .nav-item{
    flex:0 0 auto;
  }

  .admin-scroll-tabs .nav-link,
  .admin-frete-page .nav-tabs .nav-link{
    min-height:42px;
    display:flex;
    align-items:center;
    white-space:nowrap;
  }

  .admin-queue-settings{
    align-items:stretch !important;
    gap:.6rem !important;
  }

  .admin-queue-settings .form-control,
  .admin-queue-settings .btn{
    width:100% !important;
  }

  .admin-queue-settings .ms-2{
    margin-left:0 !important;
  }

  .admin-card-table,
  .admin-card-table tbody{
    display:block;
    width:100%;
  }

  .admin-card-table thead{
    display:none;
  }

  .admin-card-table tbody > tr:not(.detalhes-pedido-row){
    display:block;
    margin:0 0 .85rem;
    overflow:hidden;
    background:#fff;
    border:1px solid #dbe2ea;
    border-radius:10px;
    box-shadow:0 1px 2px rgba(15,23,42,.04);
  }

  .admin-card-table tbody > tr:not(.detalhes-pedido-row) > td{
    display:grid;
    grid-template-columns:minmax(7.5rem, 42%) minmax(0, 1fr);
    gap:.75rem;
    align-items:start;
    padding:.7rem .8rem;
    border:0;
    border-bottom:1px solid #edf0f3;
    text-align:left !important;
  }

  .admin-card-table tbody > tr:not(.detalhes-pedido-row) > td:last-child{
    border-bottom:0;
  }

  .admin-card-table tbody > tr:not(.detalhes-pedido-row) > td::before{
    content:attr(data-label);
    color:#64748b;
    font-size:.78rem;
    font-weight:800;
    line-height:1.35;
  }

  .admin-card-table tbody > tr:not(.detalhes-pedido-row) > td[colspan]{
    display:block;
    text-align:center !important;
  }

  .admin-card-table tbody > tr:not(.detalhes-pedido-row) > td[colspan]::before{
    content:none;
  }

  .admin-card-table .admin-table-actions{
    align-items:center !important;
  }

  .admin-card-table .admin-table-actions > *{
    justify-self:end;
  }

  .admin-card-table .admin-table-actions .btn{
    min-height:40px;
  }

  .admin-frete-page .admin-card-table .admin-table-actions{
    display:flex !important;
    justify-content:flex-end;
  }

  .admin-frete-page .admin-card-table .admin-table-actions .btn{
    min-width:44px;
  }

  .admin-orders-table .dropdown-menu{
    max-width:calc(100vw - 2rem);
  }

  .admin-orders-table .detalhes-pedido-row[style*="block"]{
    display:block !important;
    margin:-.35rem 0 .85rem;
    border:1px solid #dbe2ea;
    border-top:0;
    border-radius:0 0 10px 10px;
  }

  .admin-orders-table .detalhes-pedido-row[style*="block"] > td{
    display:block;
    padding:.7rem !important;
    border:0;
  }

  .admin-orders-table .detalhes-pedido-row .d-flex{
    flex-direction:column;
  }

  .admin-orders-table .detalhes-pedido-row .btn{
    width:100%;
  }

  .admin-support-detail-page #chat-thread{
    max-height:50vh !important;
    padding:.4rem !important;
  }

  .admin-support-detail-page #chat-thread > div > div{
    max-width:100% !important;
  }

  .admin-settings-page section .d-flex.justify-content-between,
  .admin-settings-page section .d-flex.justify-content-between > div,
  .admin-settings-page section .d-flex.justify-content-between .btn{
    width:100%;
  }

  .admin-settings-page .row[style*="max-width"] > [class*="col-"]{
    width:100%;
  }

  .admin-settings-page .row[style*="max-width"] .btn,
  .admin-settings-page .border[style*="max-width"] > .btn,
  .admin-settings-page .border[style*="max-width"] > .mt-3 .btn{
    width:100%;
  }

  .admin-settings-page .border[style*="max-width"] .row > .col-1{
    width:100%;
  }

  .admin-settings-page .border[style*="max-width"] .row > .col-1 .btn{
    width:100%;
  }

  .admin-settings-page .ms-auto{
    width:100%;
    margin-left:0 !important;
  }

  .admin-settings-page .ms-auto .btn{
    flex:1 1 44%;
  }

  .modal-dialog{
    width:calc(100% - 1.5rem);
    max-width:none;
    margin:.75rem auto;
  }

  .modal-content{
    max-height:calc(100dvh - 1.5rem);
  }

  .modal-body{
    overflow-y:auto;
    -webkit-overflow-scrolling:touch;
  }

  .modal-footer{
    display:grid;
    grid-template-columns:1fr;
    gap:.5rem;
  }

  .modal-footer .btn{
    width:100%;
    min-height:44px;
    margin:0;
  }
}
