/*
Theme Name: Ladrilar
Description: Tema desenvolvido para o site da Ladrilar
Author: EndyBrasil
Author URI: http://www.endybrasil.com/
Template: mendel
Version: 1.0.0
*/

/* =Theme customization starts here
-------------------------------------------------------------- */
.hentry.category-linhas-exclusivas .post_featured,
#grid-carousel .esg-pagination,
.single-post #header-banner,
.tax-tk_artist #header-banner {
  display: none !important;
}
.single-post .top_panel.with_bg_image,
.tax-tk_artist #header-banner .top_panel.with_bg_image {
  background: none;
  min-height: 0;
}
#grid-carousel {
  margin-bottom: 30px;
}
.sc_item_title.sc_item_title_style_Alternative:after,
.sc_blogger_default .sc_blogger_item .sc_blogger_item_title:before,
.scheme_dark .sc_icons.sc_align_left .sc_icons_icon {
  background-color: #dfccb0 !important;
}
body .vc_row-has-fill .sc_layouts_menu_nav > li.current-menu-item > a,
body .scheme_dark.footer_wrap a:hover,
body .footer_wrap .scheme_dark.vc_row a:hover,
body .scheme_dark .footer_wrap .socials_wrap .social_item:hover .social_icon,
body .scheme_dark.footer_wrap .socials_wrap .social_item:hover .social_icon {
  color: #fff !important;
}
.woocommerce .sidebar_inner > .widget:first-child,
.woocommerce .shop_mode_thumbs ul.products li.product .post_item,
.woocommerce-page .shop_mode_thumbs ul.products li.product .post_item {
  border-color: #dfccb0;
}
body .scheme_default .widget_product_tag_cloud a:hover,
body .scheme_default .widget_tag_cloud a:hover,
body .scheme_default .mendel_shop_mode_buttons a,
body .scheme_default .woocommerce-result-count {
  color: #474644 !important;
}
body .scheme_default .mendel_shop_mode_buttons a:hover {
  color: #dfccb0 !important;
}

/* = WPCF7
-------------------------------------------------------------- */
.wpcf7-form {
  position: relative;
}
div.wpcf7 .ajax-loader {
  background-image: url(assets/images/icons/loading-white-bg.gif);
}
body span.wpcf7-not-valid-tip {
  text-transform: uppercase;
  font-size: 10px;
  color: #d57c69;
}
body div.wpcf7-response-output {
  margin: 0;
  padding: 0.5em 1em;
  text-align: center;
  font-size: 12px;
}
body div.wpcf7-response-output.wpcf7-validation-errors {
  border: 1px solid #ffff96;
  background: #ffffd6;
}
body div.wpcf7-response-output.wpcf7-mail-sent-ok {
  border: 1px solid #d6ff96;
  background: #e8ffdf;
}
body div.wpcf7 .wpcf7-not-valid,
.footer_wrap #newsletter-column .wpcf7-text.wpcf7-not-valid,
.footer_wrap #newsletter-column .wpcf7-email.wpcf7-not-valid {
  border-color: #ff7451;
}

/* = HEADER
-------------------------------------------------------------- */
#ldl-header-top {
  background-size: 1920px auto !important;
  background-position: 50% 50% !important;
}
#ldl-header-top .search_wrap .search_submit {
  transition: background-color 0.2s linear;
  background-color: #474644;
  padding: 0.8rem 1rem;
}
#ldl-header-top .search_wrap .search_submit:hover {
  background-color: #31302e;
}
#ldl-header-top .search_wrap .search_submit::before {
  color: #dfccb0 !important;
}

/* = FOOTER
-------------------------------------------------------------- */
#footer-chamada strong {
  font-size: 1.4em;
  line-height: 1;
}
#footer-address p {
  font-size: 1.2em;
}
#footer-menu #menu-footer-menu li {
  display: block;
  font-size: 0.8em;
  margin-left: auto;
  margin-right: auto;
}
.footer_wrap #newsletter-column .wpcf7-text,
.footer_wrap #newsletter-column .wpcf7-email {
  box-sizing: border-box;
  border-color: #292725;
  height: 48px;
  line-height: 48px;
  padding-top: 0;
  padding-bottom: 0;
}
#newsletter-column span.wpcf7-not-valid-tip,
#newsletter-column div.wpcf7-response-output {
  display: none !important;
}
#newsletter-column div.wpcf7 .ajax-loader {
  background-image: url(assets/images/icons/loading-grey-bg.gif);
  position: absolute;
  top: 50%;
  margin-top: -8px;
}
#newsletter-column .wpcf7-form p {
  margin: 0;
}
#newsletter-column .wpcf7-form-control-wrap.your-email {
  box-sizing: border-box;
  display: inline-block;
  width: 65%;
  padding-right: 3px;
  vertical-align: middle;
}
#newsletter-column .wpcf7-form-control.wpcf7-submit {
  width: 35%;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  box-sizing: border-box;
  height: 48px;
  vertical-align: middle;
  color: #474644;
  letter-spacing: 0.03em;
  font-size: 11px;
}
/* = SIDEBAR
-------------------------------------------------------------- */
.woocommerce .sidebar_inner .widget_text {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.woocommerce .sidebar_inner .widget_text p,
.woocommerce .sidebar_inner .widget_text p.link-cimento-queimado {
  margin-bottom: 0;
}
.woocommerce .sidebar_inner .widget_text p.link-cimento-queimado {
  margin-top: 1rem;
}
.woocommerce .sidebar_inner .widget_text a:link,
.woocommerce .sidebar_inner .widget_text a:visited,
.woocommerce .sidebar_inner .widget_text p.link-hexagonal a:link,
.woocommerce .sidebar_inner .widget_text p.link-hexagonal a:visited {
  color: #2b2b2b;
  transition: none;
}
.woocommerce .sidebar_inner .widget_text .link-pronta-entrega a:link,
.woocommerce .sidebar_inner .widget_text .link-pronta-entrega a:visited {
  font-weight: bold;
}
.woocommerce .sidebar_inner .widget_text a:hover,
.woocommerce .sidebar_inner .widget_text a:active,
.woocommerce .sidebar_inner .widget_text p.link-hexagonal a:hover,
.woocommerce .sidebar_inner .widget_text p.link-hexagonal a:active {
  color: #dfccb0;
  font-weight: bold;
}
.woocommerce .sidebar_inner .widget_text a:hover:before,
.woocommerce .sidebar_inner .widget_text p.link-hexagonal a:hover:before {
  content: '\E911';
  font-family: fontello;
  font-weight: 400 !important;
  margin-right: 7px;
}

/* = SIMULADOR - SEÇÃO DE FAIXA
-------------------------------------------------------------- */
/* Select de faixa dentro da seção */
.faixa-select-area {
  margin-top: 15px;
}

#select-faixa {
  width: 100%;
  padding: 10px;
  border: 2px solid #007cba;
  border-radius: 4px;
  font-size: 14px;
  background: white;
  box-sizing: border-box;
}

#select-faixa:focus {
  outline: none;
  border-color: #005a87;
  box-shadow: 0 0 5px rgba(0, 124, 186, 0.3);
}

.woocommerce .sidebar_inner .current-cat > a {
  font-weight: bold !important;
  color: #111 !important;
}
.woocommerce .sidebar_inner .current-cat > a:before {
  content: '\E911';
  font-family: fontello;
  font-weight: 400 !important;
  margin-right: 7px;
}

/* = TPL PAGE CARROSSEL/TEXT
-------------------------------------------------------------- */
.page-template-tpl-basic-page #header-banner {
  display: none;
}
.page-template-tpl-basic-page.scheme_default
  .color_style_link2
  .sc_item_subtitle {
  color: #3c3c3c;
}
.page-template-tpl-basic-page .post_header {
  margin-bottom: 3.5em;
}
.page-template-tpl-basic-page #grid-carousel {
  margin-bottom: 6rem;
}
.cartext-page {
  background-color: #f9f9f9;
  padding: 2rem 3rem 2.6rem;
}

/* = SINGLE POST/LINHA EXCLUSIVA
-------------------------------------------------------------- */

.artist-card {
  overflow: hidden;
  margin: 40px 0 20px;
  padding-top: 20px;
  border-top: 1px solid #e4dcca;
}
.artist-card .artist-image-column {
  position: relative;
  float: left;
  width: 20%;
}
.artist-card .artist-info-column {
  position: relative;
  float: left;
  width: 80%;
}

.artist-card .artist-image {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
}
.artist-card .artist-image img {
  width: 100%;
  height: auto;
}
.artist-card .artist-info {
  padding-left: 20px;
}
.artist-card .artist-name {
  margin-top: 0;
}
.artist-card .artist-description {
  color: #818181;
}

/* = SINGLE TERM/ARTIST
-------------------------------------------------------------- */
.tax-tk_artist .post-featured {
  margin: 0 auto 30px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
}
.tax-tk_artist .post-featured img {
  width: 100%;
  height: auto;
}
.tax-tk_artist .post_content {
  line-height: 1.5;
  padding-top: 3rem !important;
}

#artist-posts {
  padding: 0 3rem 1.6rem;
}

#artist-posts h6 {
  margin-top: 0;
  text-align: right;
  padding-bottom: 7px;
  border-bottom: 6px solid #ebebeb;
}
#artist-posts img {
  max-width: 100%;
  height: auto;
}
.artist-post {
  margin-bottom: 30px;
}
.artist-post .artist-post-title {
  margin: 0 auto;
  text-align: center;
  line-height: 1.2;
  font-size: 14px;
  background: #fff;
  padding: 15px 10px;
}

/* = SINGLE PRODUCT
-------------------------------------------------------------- */
.single-product .related {
  clear: both;
  float: none;
  width: 100%;
}
.single-product .product_meta .product_id {
  display: none;
}
.single-product.woocommerce div.product .product_title {
  display: block;
  font-size: 16px;
  text-transform: uppercase;
  margin: 0 0 0.5em;
  line-height: 1.5;
}
.single-product.woocommerce div.product .product_title:after,
.sc_action_item .sc_action_item_title:after {
  content: '';
  display: block;
  height: 6px;
  max-width: 40px;
  background-color: #dfccb0;
  margin: 15px 0 0 0;
}
.sc_action_item .sc_action_item_title:after {
  margin: 15px auto 0;
}
.single-product.woocommerce .product_meta span {
  color: #dfccb0;
}

.related.products .product_tags,
.widget_product_categories .cat-item-224 {
  display: none;
}
.btn-customizar-wrap {
  margin-top: 20px;
}

/* = HOME
-------------------------------------------------------------- */
.scheme_default.sc_blogger_modern .sc_blogger_item {
  background: #f1f1f1;
  padding: 0;
}
.scheme_default.sc_blogger_modern .sc_blogger_item:hover {
  box-shadow: none;
}
#section-home-products .sc_blogger_item,
#section-home-products .sc_blogger_item:hover {
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}
#section-home-img-vid .coluna-esquerda {
  position: relative;
  z-index: 10;
}
#section-home-img-vid .coluna-direita {
  position: relative;
  z-index: 1;
}

.ares .tp-bullet-title,
.rev_slider_wrapper .tp-bullet-title {
  display: none !important;
}

/* = CATALOGO
-------------------------------------------------------------- */
.woocommerce-ordering {
  display: none;
}
body .scheme_default .woocommerce-result-count {
  font-weight: normal;
}
.woocommerce ul.products li.product .woocommerce-loop-category__title,
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h3 {
  font-family: 'Source Sans Pro';
  font-size: 0.9em;
}
/* = PRONTA ENTREGA
-------------------------------------------------------------- */
#lista-pronta-entrega .vc_grid-item {
  padding: 0 2em 2em 0;
  box-sizing: border-box;
}
#lista-pronta-entrega .vc_grid-item > .vc_grid-item-mini {
  border: 1px solid #dfccb0;
  background-color: #ffffff;
}
#lista-pronta-entrega .vc_gitem-animated-block {
  padding: 3.5rem 2.5rem 0;
}
#lista-pronta-entrega .vc_gitem-animated-block .vc_gitem-zone {
  background-size: contain;
}
#lista-pronta-entrega .vc_gitem-animated-block ~ .vc_gitem-zone {
  background: none !important;
  text-align: center;
  padding: 1.75em 1.5em;
}
#lista-pronta-entrega
  .vc_gitem-animated-block
  ~ .vc_gitem-zone
  .vc_gitem_row
  .vc_gitem-col {
  padding: 0;
}
#lista-pronta-entrega .vc_grid-item .vc_gitem-post-data-source-post_title,
#lista-pronta-entrega .vc_grid-item .vc_gitem-post-data-source-post_title h4,
#lista-pronta-entrega .vc_grid-item .vc_gitem-post-data-source-post_excerpt,
#lista-pronta-entrega .vc_grid-item .vc_gitem-post-data-source-post_excerpt p {
  margin-bottom: 0;
}
#lista-pronta-entrega .vc_grid-item .vc_gitem-post-data-source-post_title h4 {
  text-align: center !important;
}
#lista-pronta-entrega .vc_grid-item .vc_gitem-post-data-source-post_excerpt {
  margin-top: 15px;
}
#lista-pronta-entrega .vc_grid-item .vc_btn3-container {
  display: none;
}

.pp_pic_holder .pp_content .pp_expand {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden;
}
/* = SIMULADOR
-------------------------------------------------------------- */
#simulador {
  max-width: 96%;
  margin: 0 auto;
  box-sizing: border-box;
}
#simulador *,
#simulador *:before,
#simulador *:after {
  box-sizing: inherit;
}
#simulador #customizar,
#simulador #visualizar {
  padding-bottom: 50px;
  margin-bottom: 40px;
  border-bottom: 1px solid #e5e5e5;
}
#select-area {
  max-width: 400px;
  margin: 0 auto 40px;
  border: 1px solid #ddd;
}
#select_ladrilho_chosen {
  text-align: left;
}
.chosen-container-single .chosen-single {
  padding: 10px;
  height: 50px;
  line-height: 30px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  background-clip: padding-box;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.chosen-container-single .chosen-single:hover {
  color: #444;
  border-color: #aaa;
}
.chosen-container-single .chosen-single div b {
  background-position: 0 15px;
}
.chose-image-list {
  width: 24px;
  max-height: 24px;
  margin: 0 10px 0 0;
}

/* Estilos para o select da faixa */
#faixa-select-area {
  max-width: 400px;
  margin: 20px auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
}

#select_faixa_chosen {
  text-align: left;
}

#faixa-select-area .chosen-container-single .chosen-single {
  padding: 10px;
  height: 50px;
  line-height: 30px;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  background-clip: padding-box;
  -webkit-box-shadow: none;
  box-shadow: none;
}

#faixa-select-area .chosen-container-single .chosen-single:hover {
  color: #444;
  border-color: #aaa;
}

#faixa-select-area .chosen-container-single .chosen-single div b {
  background-position: 0 15px;
}

#faixa-select-area .chose-image-list {
  width: 24px;
  max-height: 24px;
  margin: 0 10px 0 0;
}
#ladrilho {
  position: relative;
  border: 1px solid #ddd;
  background: #fff;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  width: 100%;
  /* padding-bottom: 50%;
  padding-top: 50%; */
  margin: 0 auto;
}
#ladrilho .product-title {
  font-size: 12px;
  font-weight: normal;
  margin: 0.5em 0;
}
.sim-loaded #ladrilho {
  border: 0;
  background-image: none;
  padding: 0;
}
.sim-loading #ladrilho {
  background-image: url('assets/images/icons/loading-white-bg.gif');
}

/* = SIMULADOR - NOVA ESTRUTURA WIREFRAME
-------------------------------------------------------------- */

/* Introdução à Simulação */
#intro-simulacao {
  text-align: center;
  padding: 40px 0;
  background-color: #f9f9f9;
}

.titulo-simulador {
  font-size: 2.5em;
  color: #474644;
  margin-bottom: 30px;
  font-weight: bold;
}

#passo-a-passo h2 {
  font-size: 1.5em;
  color: #dfccb0;
  margin-bottom: 20px;
  font-weight: bold;
}

.passos-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.passo {
  text-align: center;
  max-width: 200px;
}

.passo .numero {
  display: inline-block;
  width: 40px;
  height: 40px;
  background-color: #dfccb0;
  color: #fff;
  border-radius: 50%;
  line-height: 40px;
  font-weight: bold;
  margin-bottom: 10px;
}

.passo p {
  font-size: 14px;
  color: #474644;
  line-height: 1.4;
}

/* Seleção de Formato */
#selecionar-formato {
  padding: 40px 0;
  text-align: center;
}

.instrucoes-formato,
.instrucoes-modelo {
  margin: 0 0 30px 0;
  color: #666;
  font-size: 1em;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

#selecionar-formato h3 {
  font-size: 1.8em;
  color: #474644;
  margin-bottom: 30px;
  font-weight: bold;
}

.formatos-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.formato-opcao {
  cursor: pointer;
  text-align: center;
  padding: 20px;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
  width: 160px;
  height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.formato-opcao:hover {
  border-color: #dfccb0;
  background-color: #f9f9f9;
}

.formato-opcao.selecionado {
  border-color: #dfccb0;
  background-color: #dfccb0;
  color: #fff;
}

.formato-opcao.selecionado span {
  color: #fff;
}

.formato-opcao.selecionado .formato-visual {
  border-color: #fff;
}

.formato-visual {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
  border: 2px solid #474644;
}

.area-options {
  display: flex;
  align-items: flex-start;
}

.area-cores-ladrilho {
  position: sticky;
  top: 120px;
  z-index: 5;
  transition: opacity 0.2s ease;
}

.area-cores-ladrilho.sticky-stop {
  position: relative;
  top: auto;
}

.formato-visual.quadrado {
  /* Mantém formato quadrado */
}

.formato-visual.hexagonal {
  transform: rotate(45deg);
  border-radius: 10px;
}

.formato-visual.tozeto {
  position: relative;
  background: none;
  border: none;
}

.formato-visual.tozeto::before {
  content: '';
  position: absolute;
  top: 30%;
  left: 0;
  width: 34px;
  height: 34px;
  border: 2px solid #474644;
  border-radius: 2px;
}

.formato-visual.tozeto::after {
  content: '';
  position: absolute;
  top: 30%;
  right: 0;
  width: 34px;
  height: 34px;
  border: 2px solid #474644;
  border-radius: 2px;
  background: transparent;
  /* box-shadow:
    0 32px 0 0 transparent,
    0 32px 0 2px #474644,
    -32px 32px 0 0 transparent,
    -32px 32px 0 2px #474644; */
}

.formato-visual.faixas {
  position: relative;
  border: none;
  background: none;
  background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2060%2060%27%20fill%3D%27none%27%20stroke%3D%27%23474644%27%20stroke-width%3D%271.6%27%20stroke-linejoin%3D%27round%27%3E%3Crect%20x%3D%274%27%20y%3D%274%27%20width%3D%2724%27%20height%3D%2724%27/%3E%3Crect%20x%3D%2732%27%20y%3D%274%27%20width%3D%2724%27%20height%3D%2724%27/%3E%3Crect%20x%3D%274%27%20y%3D%2732%27%20width%3D%2724%27%20height%3D%2724%27/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 110%;
}

.formato-visual.faixas::before,
.formato-visual.faixas::after {
  content: none;
}

.formato-opcao span {
  font-weight: bold;
  color: #474644;
}

/* Escolha do Modelo */
#escolher-modelo {
  padding: 40px 0;
  text-align: center;
}

.btn-escolher-modelo {
  background-color: #dfccb0;
  color: #fff;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-escolher-modelo:hover {
  background-color: #c9b89a;
}

.modelo-selecionado {
  margin-top: 30px;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
}

.modelo-selecionado h4 {
  color: #474644;
  margin-bottom: 15px;
}

.modelo-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modelo-acoes {
  display: flex;
  gap: 10px;
}

.btn-descartar,
.btn-salvar {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  height: 40px;
}

.btn-salvar {
  background-color: #5cb85c;
  color: #fff;
}

#link-visualizar-salvos {
  color: #dfccb0;
  text-decoration: none;
  font-weight: bold;
}

#link-visualizar-salvos:hover {
  text-decoration: underline;
}

/* Adicionar Faixa */
#adicionar-faixa {
  padding: 30px 0;
  /* border-top: 1px solid #e5e5e5; */
}

.formato-quadrado-only {
  display: none;
}

.formato-quadrado .formato-quadrado-only {
  display: block;
}

.faixa-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #f9f9f9;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.faixa-header:hover {
  border-color: #dfccb0;
  background-color: #f5f5f5;
}

.faixa-info h4 {
  margin: 0 0 5px 0;
  color: #474644;
  font-size: 1.2em;
}

.faixa-explicacao {
  margin: 0;
  color: #666;
  font-size: 0.9em;
  line-height: 1.4;
}

.toggle-icon {
  font-size: 20px;
  font-weight: bold;
  color: #dfccb0;
  transition: transform 0.3s ease;
}

.faixa-header.aberto .toggle-icon {
  transform: rotate(45deg);
}

.faixa-content {
  padding: 25px;
  border: 2px solid #ddd;
  border-top: none;
  border-radius: 0 0 8px 8px;
  background-color: #fafafa;
}

.faixa-instrucoes {
  margin-bottom: 20px;
}

.faixa-instrucoes p {
  margin: 0;
  color: #555;
  font-size: 0.95em;
  line-height: 1.5;
}

.btn-escolher-faixa {
  background-color: #dfccb0;
  color: #fff;
  border: none;
  padding: 15px 30px;
  font-size: 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.btn-escolher-faixa:hover {
  background-color: #c9b89a;
}

.faixa-selecionada {
  margin-top: 25px;
  padding: 20px;
  border: 1px solid #dfccb0;
  border-radius: 8px;
  background-color: #fff;
}

.faixa-selecionada h5 {
  margin: 0 0 10px 0;
  color: #474644;
  font-size: 1em;
}

/* Cores Disponíveis */
#cores-disponiveis {
  padding: 40px 0;
}

#cores-disponiveis h3 {
  font-size: 1.8em;
  color: #474644;
  margin-bottom: 30px;
  font-weight: bold;
  text-align: center;
}

/* Monte seu tapete */
#monte-tapete {
  padding: 40px 0;
  text-align: center;
}

#monte-tapete h3 {
  font-size: 1.8em;
  color: #474644;
  margin-bottom: 20px;
  font-weight: bold;
}

.instrucoes-tapete {
  margin-bottom: 30px;
}

.instrucoes-tapete p {
  color: #666;
  font-style: italic;
}

.opcoes-ambiente {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.opcao-ambiente {
  background-color: #474644;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.opcao-ambiente:hover,
.opcao-ambiente.ativo {
  background-color: #dfccb0;
}

.opcao-ambiente.disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.opcao-ambiente.disabled:hover {
  background-color: #474644;
}

/* Visualização 3D */
.btn-ver-3d {
  background-color: #dfccb0;
  color: #fff;
  border: none;
  padding: 15px 30px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 15px;
}

.btn-ver-3d:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

.explicacao-3d {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

/* Opções para Salvar */
#opcoes-salvar {
  padding: 40px 0;
  text-align: center;
}

.botoes-salvar {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-salvar-pdf,
.btn-salvar-ladrilho,
.btn-salvar-customizados {
  background-color: #474644;
  color: #fff;
  border: none;
  padding: 15px 25px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-salvar-pdf:hover,
.btn-salvar-ladrilho:hover,
.btn-salvar-customizados:hover {
  background-color: #dfccb0;
}

.btn-salvar-pdf:disabled,
.btn-salvar-ladrilho:disabled,
.btn-salvar-customizados:disabled,
.btn-salvar-pdf.disabled,
.btn-salvar-ladrilho.disabled,
.btn-salvar-customizados.disabled {
  background-color: #9b9a98 !important;
  cursor: not-allowed;
  opacity: 0.6 !important;
}

/* Ladrilhos Salvos */
#ladrilhos-salvos {
  padding: 40px 0;
}

#ladrilhos-salvos h3 {
  font-size: 1.8em;
  color: #474644;
  margin-bottom: 30px;
  font-weight: bold;
  text-align: center;
}

.thumbnails-salvos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  padding: 20px;
}

.thumbnail-salvo {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.thumbnail-salvo:hover {
  border-color: #dfccb0;
}

.thumbnail-salvo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Estilos para o grid completo do tapete na simulação 3D */
.grid-completo-tapete {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.grid-completo-tapete .grid-row {
  display: flex;
  flex: 1;
}

.grid-completo-tapete .grid-cell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.grid-completo-tapete .tile-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-completo-tapete .tile-content svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Classe para identificar quando o grid completo está ativo */
.grid-completo-ativo {
  background: transparent !important;
}

.grid-completo-ativo .wrap-grade {
  width: 100%;
  height: 100%;
}

/* Responsividade */
@media (max-width: 768px) {
  #simulador .passos-container,
  #simulador .formatos-container {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0 2px 8px;
  }

  .modelo-info {
    flex-direction: column;
    gap: 15px;
  }

  .opcoes-ambiente,
  .botoes-salvar {
    flex-direction: column;
    align-items: center;
  }

  .thumbnails-salvos {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* IE FIX */
.no-supports #ladrilho #svg,
.no-supports .grade .tile-col > .holder {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 100%;
}
.no-supports #ladrilho #svg svg,
.no-supports .grade .tile-col > .holder svg {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

#ladrilho svg {
  cursor: crosshair;
}

/* Garantir que botões do carousel não sejam afetados pelo cursor crosshair */
.colecao-carousel-wrapper .carousel-arrow,
.colecao-carousel-wrapper .carousel-dot {
  cursor: pointer !important;
}
#svg-holder {
  overflow: hidden;
  transform-origin: center center;
}

/* Garantir que miniaturas possam ser rotacionadas */
.miniatura-preview #svg-holder {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#svg-holder.has-corner .svg {
  /* width: 50%; */
  float: left;
}
#btn-salvar-ladrilho {
  margin-top: 20px;
}

.paleta {
  overflow: hidden;
  list-style: none;
  margin: 0;
  padding: 0;
}
#paleta {
  padding: 0 0 0 0;
}
.paleta li {
  display: block;
  padding: 0 5px 5px 0;
  width: 16.66%;
  float: left;
}
#paleta li {
  padding: 0 10px 0 0;
}
.paleta .swatch {
  display: block;
  width: 100%;
  cursor: pointer;
  transition: all 0.3s ease-out;
}
.paleta .selected .swatch {
  -webkit-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
  box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.paleta p {
  margin: 0;
  padding: 2px;
  font-size: 10px;
  line-height: 1.2;
}
#cores-utilizadas .swatch {
  border: 1px solid #ddd;
}

#preview-options {
  border-top: 5px solid #dfccb0;
  border-bottom: 5px solid #dfccb0;
  padding: 15px;
}
#preview-options form {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
#preview-options form p {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
#preview-options form label {
  display: inline-block;
  min-width: auto;
  margin-right: 0;
  font-weight: 600;
}
#preview-options form input[type='number'] {
  padding: 5px 8px;
  line-height: 1.2;
  width: 60px;
  border: 1px solid #ddd;
  border-radius: 3px;
}
#preview-options .p-submit {
  margin-left: auto;
}
#preview-options .p-submit input[type='submit'] {
  padding: 8px 16px;
  background: #dfccb0;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 600;
}
#option-borders {
  display: inline;
}
#visualizar .area-options {
  padding-left: 20px;
}

/* = NOVA INTERFACE DE SELEÇÃO DE MODELOS
-------------------------------------------------------------- */

/* Container principal da visualização */
.visualizar-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Área clicável inicial */
.area-clicavel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  border: 2px dashed #dfccb0;
  border-radius: 8px;
  background-color: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 40px 20px;
  margin-top: 20px;
}

.area-clicavel:hover {
  border-color: #c5b299;
  background-color: #f5f5f5;
  transform: translateY(-2px);
}

.icone-adicionar {
  margin-bottom: 15px;
}

.icone-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #dfccb0;
  color: white;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.area-clicavel:hover .icone-plus {
  background-color: #c5b299;
  transform: scale(1.1);
}

.texto-clicavel {
  font-size: 16px;
  color: #474644;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

/* Container do preview */
.preview-container {
  position: relative;
}
.preview-container .hexagonal {
  max-height: 600px;
  overflow: hidden;
}
.preview-container .hexagonal .mask {
  width: 0 !important;
}
.preview-container .hexagonal .wrap-grade {
  position: relative;
  left: 0px;
  top: 70px;
  transform: scale(1.5);
}
.area-preview #btn-visualizar-salvos-container {
  margin-top: 40px;
  text-align: center;
}
/* Controles do modelo */
.modelo-controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.nome-modelo {
  font-weight: 600;
  color: #474644;
  font-size: 16px;
}

.botoes-controle {
  display: flex;
  gap: 10px;
}

.btn-descartar,
.btn-salvar {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-salvar {
  border: none;
}

.btn-descartar {
  background-color: transparent;
  color: #e74c3c;
  border: 2px solid #e74c3c;
}

.btn-descartar:hover {
  background-color: #e74c3c;
  color: white;
}

.btn-salvar {
  background-color: #27ae60;
  color: white;
}

.btn-salvar:hover {
  background-color: #229954;
}

/* Opções de visualização compactas */
.opcoes-visualizacao {
  margin-bottom: 30px;
}

.opcoes-linha {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.opcao-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.opcao-item label {
  font-weight: 600;
  color: #474644;
  margin: 0;
}

.opcao-item input[type='number'] {
  width: 60px;
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
  font-size: 14px;
}

.btn-visualizar {
  padding: 8px 16px;
  background-color: #dfccb0;
  color: #474644;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-visualizar:hover {
  background-color: #c5b299;
}

/* Dialog fullscreen */
.dialog-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  overflow-y: auto;
  display: none;
}

/* Prevenir scroll quando dialog estiver aberto */
body.dialog-aberto {
  overflow: hidden;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  background-color: white;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 10000;
}

.dialog-header h3 {
  margin: 0;
  font-size: 24px;
  color: #474644;
  font-weight: bold;
}

.btn-fechar {
  background: none;
  border: none;
  font-size: 30px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.btn-fechar:hover {
  background-color: #f5f5f5;
  color: #666;
}

.dialog-content {
  padding: 30px;
  background-color: white;
  min-height: calc(100vh - 80px);
}

/* Grid de modelos */
.grid-modelos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.modelo-item {
  background-color: white;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modelo-item:hover {
  border-color: #dfccb0;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(223, 204, 176, 0.2);
}

.modelo-item img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 10px;
}

.modelo-item h4 {
  margin: 0;
  font-size: 14px;
  color: #474644;
  font-weight: 500;
  line-height: 1.3;
}

/* Controles do modelo */
.modelo-controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding: 10px;
  border-top: 1px solid #e5e5e5;
}
.d-none {
  display: none !important;
}
.nome-modelo {
  font-weight: bold;
  color: #474644;
  font-size: 16px;
}

.botoes-controle {
  display: flex;
  gap: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
  .visualizar-container {
    flex-direction: column;
    gap: 20px;
  }

  .opcoes-linha {
    justify-content: center;
  }

  .grid-modelos {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
  }

  .modelo-controles {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .dialog-content {
    padding: 20px;
  }

  .dialog-header {
    padding: 15px 20px;
  }
}
#preview-options .paleta p {
  display: none;
}
.grade {
  overflow: hidden;
  background: #fff;
}
.grade .item {
  overflow: visible;
  float: left;
}
.grade .item.default span {
  display: block;
  width: 100%;
  padding: 50% 0;
  border: 1px solid #e5e5e5;
}
.grade .item svg {
  display: block;
}
.grade .tile-row {
  position: relative;
  clear: both !important;
  float: none !important;
  width: 100% !important;
}
.miniatura-svg .grade .tile-row {
  position: relative;
  clear: both !important;
  float: none !important;
  width: 85% !important;
}

/* preview com faixa e corners */
.grade .holder {
  position: relative;
}
.grade .holder svg {
  position: relative;
  z-index: 1;
}
.grade.has-corner .first-row .last-col.corner-tile .holder {
  -webkit-transform: rotate(90deg) !important;
  -ms-transform: rotate(90deg) !important;
  transform: rotate(90deg) !important;
}
.grade.has-corner .last-row .last-col.corner-tile .holder {
  -webkit-transform: rotate(180deg) !important;
  -ms-transform: rotate(180deg) !important;
  transform: rotate(180deg) !important;
}
.grade.has-corner .last-row .first-col.corner-tile .holder {
  -webkit-transform: rotate(-90deg) !important;
  -ms-transform: rotate(-90deg) !important;
  transform: rotate(-90deg) !important;
}
.grade.faixa .empty-tile .holder svg {
  visibility: hidden;
}
.grade.faixa .last-col .holder {
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}
.grade.faixa .first-col .holder {
  -webkit-transform: rotate(-90deg);
  -ms-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
.grade.faixa .last-row .holder {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}
.grade.faixa .first-row .holder {
  -webkit-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
}

.grade.hexagonal .tile-row {
  overflow: hidden;
}

.grade.hexagonal .mask {
  position: absolute;
  z-index: 10;
  display: block;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100%;
  background: #fff;
}
.grade.hexagonal[data-cols='10'] .mask {
  width: 5%;
}
.grade.hexagonal[data-cols='9'] .mask {
  width: 5.555%;
}
.grade.hexagonal[data-cols='8'] .mask {
  width: 6.25%;
}
.grade.hexagonal[data-cols='7'] .mask {
  width: 7.143%;
}
.grade.hexagonal[data-cols='6'] .mask {
  width: 8.333%;
}
.grade.hexagonal[data-cols='5'] .mask {
  width: 10%;
}
.grade.hexagonal[data-cols='4'] .mask {
  width: 12.5%;
}
.grade.hexagonal[data-cols='3'] .mask {
  width: 16.666%;
}
.grade.hexagonal[data-cols='2'] .mask {
  width: 25%;
}
.grade.hexagonal[data-cols='1'] .mask {
  width: 50%;
}

/* FLORAO */
.grade.florao .tile-row:nth-child(odd) .tile-col:nth-child(odd) {
  -webkit-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
}
.grade.florao .tile-row:nth-child(odd) .tile-col:nth-child(even) {
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}
.grade.florao .tile-row:nth-child(even) .tile-col:nth-child(odd) {
  -webkit-transform: rotate(-90deg);
  -ms-transform: rotate(-90deg);
  transform: rotate(-90deg);
}
.grade.florao .tile-row:nth-child(even) .tile-col:nth-child(even) {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

/* FLORAO ESPELHADO */
.grade.florao.florao-espelhado
  .tile-row:nth-child(odd)
  .tile-col:nth-child(odd) {
  -webkit-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
}
.grade.florao.florao-espelhado
  .tile-row:nth-child(odd)
  .tile-col:nth-child(even) {
  -webkit-transform: rotate(0deg) scaleX(-1);
  -ms-transform: rotate(0deg) scaleX(-1);
  transform: rotate(0deg) scaleX(-1);
}
.grade.florao.florao-espelhado
  .tile-row:nth-child(even)
  .tile-col:nth-child(odd) {
  -webkit-transform: rotate(0deg) scaleY(-1);
  -ms-transform: rotate(0deg) scaleY(-1);
  transform: rotate(0deg) scaleY(-1);
}
.grade.florao.florao-espelhado
  .tile-row:nth-child(even)
  .tile-col:nth-child(even) {
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}

/* = 3d
-------------------------------------------------------------- */
#simulador3d {
  margin-bottom: 80px;
}
#ladrilar-3d {
  margin-top: 30px;
}
#ladrilar-3d.opening .title-3d span {
  padding-right: 50px;
  background: url(assets/images/icons/loading-white-bg.gif) no-repeat 100% 50%;
  background-size: 14px auto;
}
#ladrilar-3d ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
#ladrilar-3d li {
  display: inline-block;
  margin: 0 2px 2px 0;
}
#ladrilar-3d.disabled button,
#ladrilar-3d.disabled button:hover {
  background-color: #dfccb0;
  color: #fff;
  opacity: 0.4;
  cursor: default;
}
#ladrilar-3d.opening button,
#ladrilar-3d.opening button:hover {
  cursor: progress;
}
.fancybox-close-small {
  width: 25px;
  height: 25px;
  padding: 0;
}

#ladrilar-3d-display .pt {
  position: absolute;
  z-index: 10;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  margin-top: -15px;
  border-radius: 15px;
  background-color: #f00;
  cursor: pointer;
}

#ladrilar-3d-display {
}
#ladrilar-3d-display .ladrilar-3d__holder {
  position: relative;
  overflow: hidden;
  background: url(assets/images/icons/loading-white-bg.gif) no-repeat 50% 50%;
  min-height: 200px;
}
#ladrilar-3d-display.loaded .ladrilar-3d__holder {
  background: none;
  min-height: 0;
}
#ladrilar-3d-display .ladrilar-3d__image {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s linear 0;
}
#ladrilar-3d-display .ladrilar-3d__image img {
  display: block;
  /* max-height: 85vh; */
}
#ladrilar-3d-display .ladrilar-3d__ladrilhos {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.2s linear 0.2s;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#ladrilar-3d-display .ladrilar-3d__ladrilhos .grade {
  position: relative;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  width: 100%;
  height: 100%;
}
#ladrilar-3d-display.loaded .ladrilar-3d__image,
#ladrilar-3d-display.loaded .ladrilar-3d__ladrilhos {
  opacity: 1;
}
#ladrilar-3d-display.tipo-parede .ladrilar-3d__ladrilhos {
  top: 2.2%;
}

@media screen and (max-width: 700px), screen and (max-height: 600px) {
  #ladrilar-3d-display .ladrilar-3d__ladrilhos .grade .holder {
    transform: scale(1.05);
  }
}
/* = CONTATO
-------------------------------------------------------------- */
.scheme_default
  #col-form-contato
  form.wpcf7-form
  input[type='submit']#submit_form_contato.sc_button_hover_slide_left {
  color: #dfccb0 !important;
  background: #353231 !important;
}
.scheme_default
  #col-form-contato
  form.wpcf7-form
  input[type='submit']#submit_form_contato.sc_button_hover_slide_left:hover {
  color: #dfccb0 !important;
  background: #111 !important;
}
.scheme_dark .sc_icons.sc_align_left .sc_icons_icon {
  border: 1px solid #fff;
}
#col-form-contato div.wpcf7 .ajax-loader {
  background-image: url(assets/images/icons/loading-beige-bg.gif);
}

/* ================ SISTEMA DE MINIATURAS ================ */
#miniaturas-salvas {
  padding: 20px;
  background: #f8f8f8;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

#miniaturas-salvas h3 {
  margin: 0 0 20px 0;
  color: #474644;
  font-size: 1.2em;
  text-align: center;
}

.miniaturas-container {
  max-width: 1200px;
  margin: 0 auto;
}

.miniaturas-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 10px 0;
}

.miniaturas-grid::-webkit-scrollbar {
  height: 8px;
}

.miniaturas-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.miniaturas-grid::-webkit-scrollbar-thumb {
  background: #dfccb0;
  border-radius: 4px;
}

.miniaturas-grid::-webkit-scrollbar-thumb:hover {
  background: #c9b896;
}

.miniatura-slot {
  flex-shrink: 0;
  width: 200px;
  height: 260px;
  border: 2px solid #dfccb0;
  border-radius: 8px;
  background: #fff;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.miniatura-slot:hover {
  border-color: #c9b89a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.miniatura-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
  font-size: 0.9em;
  background: #f9f9f9;
}

.miniatura-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.miniatura-preview {
  flex: 1;
  padding: 0px;
  overflow: visible;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.miniatura-preview .wrap-grade {
  position: relative;
  left: 0;
  top: 0;
  transform: scale(1.8);
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animação de rotação da miniatura */
.miniatura-preview .wrap-grade.rotating {
  animation: pulse-rotate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Override transition during animation */
  transition: none !important;
}

@keyframes pulse-rotate {
  0% {
    transform: scale(var(--anim-scale, 1.8)) rotate(var(--rotation-start, 0deg));
  }
  50% {
    transform: scale(var(--anim-scale-mid, 1.85))
      rotate(var(--rotation-mid, 45deg));
  }
  100% {
    transform: scale(var(--anim-scale, 1.8)) rotate(var(--rotation-end, 90deg));
  }
}

.miniatura-svg {
  width: 100%;
  height: 100%; /* Aumentado 40%: 140 * 1.4 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: #fff;
  border: 1px solid #f0f0f0;
  /* Garantir que a rotação não afete o container */
  transform-origin: center center;
}

/* Garantir que a grade dentro do miniatura-svg possa ser rotacionada corretamente */
.miniatura-svg > .grade {
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Preservar cores e estrutura original */
.miniatura-svg * {
  color: inherit;
  fill: inherit;
}

.miniatura-svg svg {
  display: block;
}

.miniatura-svg svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* 🔧 CSS específico para alinhamento hexagonal nas miniaturas */
.miniatura-svg .grade.hexagonal {
  position: relative;
  overflow: visible;
}

.miniatura-svg .grade.hexagonal .tile-row {
  position: relative;
  overflow: visible;
}

.miniatura-svg .grade.hexagonal .mask {
  position: absolute;
  z-index: 10;
  display: block;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100%;
  background: #fff;
}

/* Máscaras hexagonais específicas para miniaturas */
.miniatura-svg .grade.hexagonal[data-cols='10'] .mask {
  width: 5%;
}
.miniatura-svg .grade.hexagonal[data-cols='9'] .mask {
  width: 5.555%;
}
.miniatura-svg .grade.hexagonal[data-cols='8'] .mask {
  width: 6.25%;
}
.miniatura-svg .grade.hexagonal[data-cols='7'] .mask {
  width: 7.143%;
}
.miniatura-svg .grade.hexagonal[data-cols='6'] .mask {
  width: 8.333%;
}
.miniatura-svg .grade.hexagonal[data-cols='5'] .mask {
  width: 10%;
}
.miniatura-svg .grade.hexagonal[data-cols='4'] .mask {
  width: 12.5%;
}
.miniatura-svg .grade.hexagonal[data-cols='3'] .mask {
  width: 16.666%;
}
.miniatura-svg .grade.hexagonal[data-cols='2'] .mask {
  width: 25%;
}
.miniatura-svg .grade.hexagonal[data-cols='1'] .mask {
  width: 50%;
}

/* 🔧 ESTILOS ESPECÍFICOS PARA FORMATOS NAS MINIATURAS */

/* Miniatura Hexagonal */
.miniatura-svg .grade.hexagonal {
  position: relative;
  overflow: hidden;
}

.miniatura-svg .grade.hexagonal .tile-row {
  overflow: hidden;
}

.miniatura-svg .grade.hexagonal .mask {
  position: absolute;
  z-index: 10;
  display: block;
  top: 0;
  bottom: 0;
  right: 0;
  height: 100%;
  background: inherit;
}

/* Máscaras hexagonais para miniaturas */
.miniatura-svg .grade.hexagonal[data-cols='10'] .mask {
  width: 5%;
}
.miniatura-svg .grade.hexagonal[data-cols='9'] .mask {
  width: 5.555%;
}
.miniatura-svg .grade.hexagonal[data-cols='8'] .mask {
  width: 6.25%;
}
.miniatura-svg .grade.hexagonal[data-cols='7'] .mask {
  width: 7.143%;
}
.miniatura-svg .grade.hexagonal[data-cols='6'] .mask {
  width: 8.333%;
}
.miniatura-svg .grade.hexagonal[data-cols='5'] .mask {
  width: 10%;
}
.miniatura-svg .grade.hexagonal[data-cols='4'] .mask {
  width: 12.5%;
}
.miniatura-svg .grade.hexagonal[data-cols='3'] .mask {
  width: 16.666%;
}
.miniatura-svg .grade.hexagonal[data-cols='2'] .mask {
  width: 25%;
}
.miniatura-svg .grade.hexagonal[data-cols='1'] .mask {
  width: 50%;
}

/* Miniatura Florão */
.miniatura-svg .grade.florao .tile-row:nth-child(odd) .tile-col:nth-child(odd) {
  transform: rotate(0deg);
}
.miniatura-svg
  .grade.florao
  .tile-row:nth-child(odd)
  .tile-col:nth-child(even) {
  transform: rotate(90deg);
}
.miniatura-svg
  .grade.florao
  .tile-row:nth-child(even)
  .tile-col:nth-child(odd) {
  transform: rotate(-90deg);
}
.miniatura-svg
  .grade.florao
  .tile-row:nth-child(even)
  .tile-col:nth-child(even) {
  transform: rotate(180deg);
}

/* Miniatura Florão Espelhado */
.miniatura-svg
  .grade.florao.florao-espelhado
  .tile-row:nth-child(odd)
  .tile-col:nth-child(odd) {
  transform: rotate(0deg);
}
.miniatura-svg
  .grade.florao.florao-espelhado
  .tile-row:nth-child(odd)
  .tile-col:nth-child(even) {
  transform: rotate(0deg) scaleX(-1);
}
.miniatura-svg
  .grade.florao.florao-espelhado
  .tile-row:nth-child(even)

/* 🔧 BOTÃO VISUALIZAR LADRILHOS SALVOS */
.btn-visualizar-salvos-container {
  text-align: center;
  margin: 60px 0;
  padding: 15px;
}
#btn-visualizar-salvos-clickable-container {
  margin-top: 40px;
  text-align: center;
}

.btn-visualizar-salvos {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-visualizar-salvos:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.btn-visualizar-salvos:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}
.tile-col:nth-child(odd) {
  transform: rotate(0deg) scaleY(-1);
}
.miniatura-svg
  .grade.florao.florao-espelhado
  .tile-row:nth-child(even)
  .tile-col:nth-child(even) {
  transform: rotate(180deg);
}

/* Miniatura Has Corner */
.miniatura-svg .grade.has-corner .first-row .last-col.corner-tile .holder {
  transform: rotate(90deg) !important;
}
.miniatura-svg .grade.has-corner .last-row .last-col.corner-tile .holder {
  transform: rotate(180deg) !important;
}
.miniatura-svg .grade.has-corner .last-row .first-col.corner-tile .holder {
  transform: rotate(-90deg) !important;
}

/* Preservar layout da grade nas miniaturas */
.miniatura-svg .tile-row {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
}

.miniatura-svg .tile-col {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1 !important;
  border: 0 solid rgba(0, 0, 0, 0.1) !important;
}

.miniatura-svg .tile-col svg {
  width: 100%;
  height: auto;
  max-width: 32px; /* Aumentado 32%: 20 * 1.4 */
  max-height: 32px; /* Aumentado 40%: 20 * 1.4 */
}

/* Ajustar tamanho dos ladrilhos na miniatura */
.miniatura-svg .grade {
  transform: scale(
    0.8
  ); /* Aumentado de 0.6 para 0.8 para melhor visibilidade */
  transform-origin: center;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: inherit; /* Herdar cor de fundo */
  border-radius: 5px;
  padding: 10px 0;
}

/* Melhorar visibilidade da grade na miniatura */
.miniatura-svg .tile-row .tile-col {
  min-width: 21px; /* Aumentado 40%: 15 * 1.4 */
  min-height: 21px; /* Aumentado 40%: 15 * 1.4 */
}

.miniatura-svg .tile-row .tile-col svg {
  min-width: 17px; /* Aumentado 40%: 12 * 1.4 */
  min-height: 17px; /* Aumentado 40%: 12 * 1.4 */
}

.miniatura-titulo {
  font-size: 0.75em;
  color: #666;
  text-align: center;
  padding: 5px;
  background: #f5f5f5;
  border-top: 1px solid #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.miniatura-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

/* Estilo base para todos os botões de ação */
.btn-girar-miniatura,
.btn-editar-miniatura,
.btn-excluir-miniatura {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 0 !important;
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Botão de girar */
.btn-girar-miniatura {
  background: #2196f3;
  color: white;
}

.btn-girar-miniatura:hover {
  background: #1976d2;
  transform: scale(1.1);
}

.btn-girar-miniatura svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* Botão de editar */
.btn-editar-miniatura {
  background: #4caf50;
  color: white;
}

.btn-editar-miniatura:before {
  content: '✎';
  font-size: 14px;
  color: white;
  font-weight: bold;
}

.btn-editar-miniatura:hover {
  background: #45a049;
  transform: scale(1.1);
}

/* Botão de excluir */
.btn-excluir-miniatura {
  background: #f44336;
  color: white;
}

.btn-excluir-miniatura:before {
  content: '×';
  font-size: 16px;
  color: white;
  font-weight: bold;
}

.btn-excluir-miniatura:hover {
  background: #da190b;
  transform: scale(1.1);
}

/* Miniatura selecionada */
.miniatura-content.selected {
  box-shadow: 0 0 0 3px #2196f3;
  border-radius: 6px;
  animation: pulse-select 0.5s ease-out;
}

/* Animação de pulso ao selecionar */
@keyframes pulse-select {
  0% {
    box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.3);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 1);
    transform: scale(1);
  }
}

/* Responsividade para miniaturas */
@media screen and (max-width: 1024px) {
  .miniaturas-grid {
    gap: 10px;
  }

  .miniatura-slot {
    width: 180px;
    height: 240px;
  }

  .miniatura-preview .wrap-grade {
    transform: scale(1.5);
  }
}

@media screen and (max-width: 768px) {
  .miniaturas-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .miniatura-slot {
    width: 160px;
    height: 210px;
    max-width: 48vw;
  }

  .miniatura-preview .wrap-grade {
    transform: scale(1.3);
  }

  /* Tapete responsivo em mobile */
  .tapete-grid,
  .wrap-hexagono {
    max-width: 95vw;
    width: 95vw;
    height: 95vw;
  }

  .wrap-hexagono {
    transform: scale(1);
    margin-top: 0;
  }
}

@media screen and (max-width: 480px) {
  .miniaturas-grid {
    gap: 8px;
  }

  .miniatura-slot {
    width: 140px;
    height: 190px;
    max-width: 45vw;
  }

  .miniatura-preview .wrap-grade {
    transform: scale(1.1);
  }

  #miniaturas-salvas {
    margin: 20px 10px;
    padding: 15px;
  }

  .tapete-grid,
  .wrap-hexagono {
    max-width: 92vw;
    width: 92vw;
    height: 92vw;
  }
}

/****************** MEDIA Q *********************/
@media screen and (max-width: 959px) {
  #endybrasil.wpb_single_image.vc_align_right {
    text-align: center !important;
  }
}

@media screen and (max-width: 768px) {
  #paleta,
  #visualizar .area-options {
    padding: 40px 0 0;
  }
  #paleta li {
    width: 20%;
  }
  .wpb_single_image wpb_content_element.vc_align_right {
    text-align: center;
  }
  #row-timeline .coluna-esquerda,
  #row-timeline .coluna-direita,
  #section-home-img-vid .coluna-esquerda,
  #section-home-img-vid .coluna-direita,
  #post-75 #col-form-contato,
  #post-75 .contact-info {
    margin: 0 0 30px 0 !important;
  }

  .sc_blogger_modern .sc_blogger_item .sc_blogger_item_content {
    padding: 0 15px 15px 15px;
  }
}

.image-container {
  display: inline-block;
  position: relative;
  width: 20%;
  margin-left: 0;
}

.download-thumb {
  width: 110px;
}

.download-title {
  text-align: left;
  margin-right: 50px;
  font-family: 'Open Sans';
  font-size: 11px;
  font-weight: 600;
}

.button-container {
  width: 97%;
  text-align: center;
  margin-left: -8px;
  text-align: justify;
  -ms-text-justify: distribute-all-lines;
  text-justify: distribute-all-lines;
}

.download-text {
  font-family: 'Open Sans';
  font-size: 12px;
}

.download-button {
  width: 27%;
  background-color: white;
  color: #2b2b2b !important;
  border: 2px solid #3c3c3c;
  text-align: center;
  padding: 10px;
  margin: 0 10px;
  display: inline-block;
  font-family: 'Open Sans';
  font-size: 14px;
  font-weight: 600;
}

.container-download {
  margin-left: 100px;
}

.download-button:hover {
  background-color: #dfccb0;
}

@media screen and (max-width: 768px) {
  .download-button {
    width: 97%;
    display: block;
    margin: 10px 10px;
  }
  .image-container {
    width: 40%;
    margin-left: -16px;
    padding-left: 4px;
  }

  .button-container {
    width: 100%;
    margin-left: -22px;
  }

  .container-download {
    margin-left: 0;
  }

  .image-mob-left {
    margin-left: -15px;
  }

  .image-mob-right {
    margin-left: 67px;
  }

  .download-thumb {
    width: 120px;
  }

  .download-title {
    width: 100%;
  }
}

@media screen and (max-width: 600px) {
  #paleta li {
    width: 25%;
  }
}
@media screen and (max-width: 480px) {
  #paleta li {
    width: 33.33%;
  }
}

/* = Toast Notifications
-------------------------------------------------------------- */
.toast-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10000;
  min-width: 300px;
  max-width: 500px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  border-left: 4px solid #007cba;
}

.toast-notification.toast-show {
  transform: translateX(0);
  opacity: 1;
}

.toast-notification.toast-success {
  border-left-color: #46b450;
}

.toast-notification.toast-error {
  border-left-color: #dc3232;
}

.toast-notification.toast-warning {
  border-left-color: #ffb900;
}

.toast-icon {
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: #46b450;
}

.toast-error .toast-icon {
  color: #dc3232;
}

.toast-warning .toast-icon {
  color: #ffb900;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.4;
  color: #333;
}

.toast-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.toast-close:hover {
  background-color: #f0f0f0;
  color: #333;
}

/* = SEÇÃO DE REJUNTE
-------------------------------------------------------------- */
.rejunte-section {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.rejunte-section h4 {
  color: #474644;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px 0;
  text-transform: uppercase;
}

.rejunte-explicacao {
  color: #666;
  font-size: 14px;
  margin: 0 0 15px 0;
  line-height: 1.4;
}

.rejunte-cores {
  text-align: center;
}

#paleta-rejunte {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 15px 0;
  padding: 0;
  list-style: none;
}

#paleta-rejunte li {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#paleta-rejunte li:hover {
  transform: scale(1.05);
}

#paleta-rejunte li.selected {
  transform: scale(1.1);
}

#paleta-rejunte .swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: block;
  margin-bottom: 5px;
  transition: all 0.2s ease;
}

#paleta-rejunte li.selected .swatch {
  border-color: #dfccb0;
  box-shadow:
    0 0 0 2px #dfccb0,
    0 2px 8px rgba(0, 0, 0, 0.2);
}

#paleta-rejunte p {
  font-size: 11px;
  color: #666;
  margin: 0;
  text-align: center;
  font-weight: 600;
}

.obs-cores {
  font-size: 12px;
  color: #999;
  font-style: italic;
  margin: 0;
}

@media screen and (max-width: 768px) {
  .rejunte-section {
    margin: 15px 0;
    padding: 15px;
  }

  #paleta-rejunte {
    gap: 8px;
  }

  #paleta-rejunte .swatch {
    width: 35px;
    height: 35px;
  }
}

@media screen and (max-width: 480px) {
  #paleta-rejunte .swatch {
    width: 30px;
    height: 30px;
  }

  #paleta-rejunte p {
    font-size: 10px;
  }
}

/* = SIMULADOR 3D INLINE
-------------------------------------------------------------- */
#simulador-3d-inline {
  display: none;
  margin: 30px 0;
}

.simulador-3d-content {
  position: relative;
  min-height: 400px;
  background: #f8f8f8;
}

#simulador-3d-inline .ladrilar-3d-display-inline {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin: 0;
  box-shadow: none;
}

#simulador-3d-inline .ladrilar-3d__holder {
  position: relative;
  overflow: hidden;
  background: url(assets/images/icons/loading-white-bg.gif) no-repeat 50% 50%;
  min-height: 400px;
  border-radius: 8px;
}

#simulador-3d-inline .ladrilar-3d__holder.loaded {
  background: none;
  min-height: 0;
}

#simulador-3d-inline .ladrilar-3d__image {
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#simulador-3d-inline .ladrilar-3d__image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.simulador-3d-container {
  max-width: 60%;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

#simulador-3d-inline .ladrilar-3d__ladrilhos {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease 0.2s;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

#simulador-3d-inline .ladrilar-3d__ladrilhos .grade {
  position: relative;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  width: 100%;
  height: 100%;
}

#simulador-3d-inline .loaded .ladrilar-3d__image,
#simulador-3d-inline .loaded .ladrilar-3d__ladrilhos {
  opacity: 1;
}

#simulador-3d-inline .tipo-parede .ladrilar-3d__ladrilhos {
  top: 2.2%;
}

.fechar-simulador-3d {
  position: absolute !important;
  top: 15px !important;
  right: 15px !important;
  z-index: 1000 !important;
  background: rgba(0, 0, 0, 0.8) !important;
  color: white !important;
  border: none !important;
  padding: 10px 15px !important;
}

/* Spinner CSS para loading do PDF */
.pdf-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #474744;
  border-radius: 50%;
  animation: pdf-spin 1s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes pdf-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#btn-salvar-pdf.loading,
#btn-salvar-ladrilho.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Estilos para loading do botão PDF e Ladrilho */
.btn-salvar-pdf.loading,
.btn-salvar-ladrilho.loading,
.btn-salvar-tapete.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-salvar-pdf.loading i.fa-spinner,
.btn-salvar-ladrilho.loading i.fa-spinner,
.btn-salvar-tapete.loading i.fa-spinner {
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.fechar-simulador-3d:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: scale(1.05) !important;
}

@media screen and (max-width: 768px) {
  #simulador-3d-inline {
    margin: 20px 0;
    border-radius: 8px;
  }

  .simulador-3d-content {
    min-height: 300px;
  }

  #simulador-3d-inline .ladrilar-3d__holder {
    min-height: 300px;
  }

  #simulador-3d-inline .ladrilar-3d__image img {
    max-height: 50vh;
  }

  .fechar-simulador-3d {
    top: 10px !important;
    right: 10px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
}

@media screen and (max-width: 480px) {
  #simulador-3d-inline {
    margin: 15px 0;
    border-radius: 6px;
  }

  .simulador-3d-content {
    min-height: 250px;
  }

  #simulador-3d-inline .ladrilar-3d__holder {
    min-height: 250px;
  }

  #simulador-3d-inline .ladrilar-3d__image img {
    max-height: 40vh;
  }
}

/* ===== INTERFACE CUSTOMIZAÇÃO LADRILHO ===== */
#customizar-ladrilho {
  padding-bottom: 50px;
  margin-bottom: 40px;
  border-bottom: 1px solid #e5e5e5;
}

/* Container principal da visualização - igual ao tapete */
#customizar-ladrilho .visualizar-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* Área clicável inicial - igual ao tapete */
#area-clicavel-ladrilho {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 500px;
  border: 2px dashed #dfccb0;
  border-radius: 8px;
  background-color: #fafafa;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 40px 20px;
  margin-top: 20px;
}

#area-clicavel-ladrilho:hover {
  border-color: #c5b299;
  background-color: #f5f5f5;
  transform: translateY(-2px);
}

#area-clicavel-ladrilho .icone-adicionar {
  margin-bottom: 15px;
}

#area-clicavel-ladrilho .icone-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #dfccb0;
  color: white;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  transition: all 0.3s ease;
}

#area-clicavel-ladrilho:hover .icone-plus {
  background-color: #c5b299;
  transform: scale(1.1);
}

#area-clicavel-ladrilho .texto-clicavel {
  font-size: 16px;
  color: #474644;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

/* Container do preview - igual ao tapete */
#ladrilho-container {
  position: relative;
}

#ladrilho-container-2 {
  position: relative;
}

#ladrilho-container .grade {
  flex-direction: column;
}
#ladrilho-container .grade #svg-holder {
  width: 100%;
  height: auto;
}
/* Área do ladrilho customizável */
.ladrilho-area {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
  position: relative;
}

#customizar-ladrilho .ladrilho-area #ladrilho {
  width: 100%;
  height: auto;
  min-height: 200px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  /* Override do CSS original que causa conflito */
  padding-bottom: 10px !important;
  padding-top: 10px !important;
  position: static !important;
}

.ladrilho-area #ladrilho svg,
#ladrilho.grade svg {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

/* Garantir que o elemento #ladrilho com classe .grade exiba o SVG corretamente */
#ladrilho.grade {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  width: 100%;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
}

/* Cursor de pincel para área de pintura */
.paintable-area circle,
.paintable-area path,
.paintable-area rect,
.paintable-area ellipse,
.paintable-area polygon,
.paintable-area polyline {
  cursor:
    url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" style=\"fill: rgba(71, 71, 68, 1);\"><path d=\"M13.707 2.293a1 1 0 0 0-1.414 0l-6 6a1 1 0 0 0 0 1.414l3 3a1 1 0 0 0 1.414 0l6-6a1 1 0 0 0 0-1.414l-3-3zM12 7.586L8.414 11l-1-1L11 6.414 12 7.414v.172zM17 14H7v2h10v-2zm0 4H7v2h10v-2z\"/></svg>')
      12 12,
    pointer;
}

.paintable-area circle:hover,
.paintable-area path:hover,
.paintable-area rect:hover,
.paintable-area ellipse:hover,
.paintable-area polygon:hover,
.paintable-area polyline:hover {
  opacity: 0.8;
  filter: brightness(1.1);
}

/* Título do modelo acima da imagem */
.titulo-modelo-container {
  margin-bottom: 15px;
  text-align: center;
}

.titulo-modelo {
  font-weight: 600;
  color: #474644;
  font-size: 18px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 2px solid #dfccb0;
  display: inline-block;
  min-width: 200px;
}

/* Controles do modelo - apenas botões agora */
#customizar-ladrilho .modelo-controles {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

#customizar-ladrilho .botoes-controle {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-direction: row;
  align-items: baseline;
}

#customizar-ladrilho .btn-descartar,
#customizar-ladrilho .btn-salvar {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
}

#customizar-ladrilho .btn-salvar {
  border: none;
}

#customizar-ladrilho .btn-salvar {
  background-color: #27ae60;
  color: white;
  font-weight: bold;
}

#customizar-ladrilho .btn-salvar:hover {
  background-color: #229954;
}

/* Botão visualizar salvos - igual ao tapete */
#customizar-ladrilho .area-preview #btn-visualizar-salvos-container {
  margin-top: 40px;
  text-align: center;
}

/* Área de cores do ladrilho */
.area-cores-ladrilho h6 {
  color: #474744;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.area-cores-ladrilho .paleta {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.area-cores-ladrilho .paleta li {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid transparent;
}

.area-cores-ladrilho .paleta li:hover {
  background: rgba(223, 204, 176, 0.1);
  transform: translateY(-2px);
}

.area-cores-ladrilho .paleta li.selected {
  border-color: #dfccb0;
  background: rgba(223, 204, 176, 0.2);
}

.area-cores-ladrilho .paleta .swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.area-cores-ladrilho .paleta .swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.area-cores-ladrilho .paleta p {
  font-size: 11px;
  color: #666;
  text-align: center;
  margin: 0;
  font-weight: 500;
}

.area-cores-ladrilho .obs-cores {
  font-size: 12px;
  color: #8a7355;
  font-style: italic;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* Dialog para seleção de modelos de ladrilho - usando estilos padrão */

/* Responsividade */
@media (max-width: 768px) {
  .customizar-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 15px;
  }

  #area-clicavel-ladrilho,
  .ladrilho-container {
    width: 100%;
    max-width: 350px;
  }

  .area-cores-ladrilho .paleta {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
  }
}

/* Cursor de pincel adicional para elementos SVG do ladrilho */
#ladrilho.grade circle,
#ladrilho.grade path,
#ladrilho.grade rect,
#ladrilho.grade ellipse,
#ladrilho.grade polygon,
#ladrilho.grade polyline {
  cursor:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="fill: rgba(71, 71, 68, 1);"><path d="M13.707 2.293a1 1 0 0 0-1.414 0l-6 6a1 1 0 0 0 0 1.414l3 3a1 1 0 0 0 1.414 0l6-6a1 1 0 0 0 0-1.414l-3-3zM12 7.586L8.414 11l-1-1L11 6.414 12 7.414v.172zM17 14H7v2h10v-2zm0 4H7v2h10v-2z"/></svg>')
      12 12,
    pointer;
}

#ladrilho.grade circle:hover,
#ladrilho.grade path:hover,
#ladrilho.grade rect:hover,
#ladrilho.grade ellipse:hover,
#ladrilho.grade polygon:hover,
#ladrilho.grade polyline:hover {
  opacity: 0.8;
  filter: brightness(1.1);
}

/* Melhorias nos cards de cor */
.area-cores-ladrilho .paleta li {
  padding: 8px !important;
  min-width: 0 !important;
  word-wrap: break-word !important;
  width: 100%;
}

.area-cores-ladrilho .paleta .swatch {
  flex-shrink: 0 !important;
}

.area-cores-ladrilho .paleta p {
  line-height: 1.2 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  max-width: 100% !important;
}

/* = BOTÃO FLUTUANTE PARA ITENS SALVOS
-------------------------------------------------------------- */
.floating-saved-button {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 9999;
  background: linear-gradient(135deg, #dfccb0 0%, #c9b896 100%);
  border-radius: 50px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  border: none;
  outline: none;
}

.floating-saved-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #c9b896 0%, #b8a785 100%);
}

.floating-button-content {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #474644;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.floating-button-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.floating-button-icon svg {
  width: 16px;
  height: 16px;
  color: #474644;
}

.floating-button-text {
  margin-right: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.floating-button-counter {
  background: #474644;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsividade do botão flutuante */
@media (max-width: 768px) {
  .floating-saved-button {
    bottom: 20px;
    left: 20px;
  }

  .floating-button-content {
    padding: 10px 16px;
    font-size: 13px;
  }

  .floating-button-text {
    margin-right: 8px;
  }

  .floating-button-counter {
    width: 20px;
    height: 20px;
    font-size: 11px;
    min-width: 20px;
  }
}

@media (max-width: 480px) {
  .floating-saved-button {
    bottom: 15px;
    left: 15px;
  }

  .floating-button-content {
    padding: 8px 12px;
    font-size: 12px;
  }

  .floating-button-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
  }

  .floating-button-icon svg {
    width: 14px;
    height: 14px;
  }
}

/* = MELHORIAS PARA PREVIEW DAS MINIATURAS
-------------------------------------------------------------- */
.miniatura-preview .ladrilho-preview-base64 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0px;
  border-radius: 6px;
  margin-bottom: 4px;
  max-width: 80%;
  margin-top: 4px;
}

.miniatura-preview .ladrilho-preview-base64 img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.miniatura-preview .ladrilho-preview-base64 img:hover {
  transform: scale(1.05);
  cursor: grab;
}

.miniatura-svg .preview-ladrilho {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
}

.miniatura-svg .preview-svg {
  max-width: 100%;
  margin-bottom: 8px;
}

.miniatura-svg .preview-svg svg {
  max-width: 100%;
  height: auto;
}

.miniatura-svg .preview-titulo {
  font-size: 11px;
  color: #666;
  text-align: center;
  font-weight: 500;
}

/* Melhorar layout geral das miniaturas */
.miniatura-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.miniatura-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8px;
}

.miniatura-titulo {
  font-size: 11px;
  color: #474644;
  text-align: center;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(223, 204, 176, 0.1);
  border-radius: 0 0 6px 6px;
  margin-top: auto;
}

/* = COMPONENTE CRIE SEU TAPETE
-------------------------------------------------------------- */
#crie-seu-tapete {
  padding: 30px 0;
  background: linear-gradient(135deg, #f8f6f3 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#crie-seu-tapete h3 {
  text-align: center;
  color: #474644;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.instrucoes-tapete {
  text-align: center;
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.instrucao-rapida {
  text-align: center;
  color: #555;
  font-size: 15px;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  background: #f8f5f0;
  padding: 12px 20px;
  border-radius: 8px;
  border-left: 4px solid #dfccb0;
}

.tapete-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Grid do tapete 6x6 */
.tapete-grid,
.wrap-hexagono {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 0px;
  max-width: 900px;
  margin: 0 auto;
  /* padding: 20px; */
  background: #ffffff;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
  /* border: 2px solid #f0f0f0; */
}
.wrap-hexagono {
  width: 900px;
  height: 900px;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  transform: scale(1.3);
  margin-top: 80px;
}

/* Células do grid */
.tapete-cell {
  aspect-ratio: 1;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
  background: #fafafa;
  border: 2px dashed #e0e0e0;
}

.tapete-cell:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border-color: #dfccb0;
}

.cell-content {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drop zone vazia */
.drop-zone {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.drop-text {
  font-size: 24px;
  color: #ccc;
  font-weight: 300;
  transition: all 0.3s ease;
}

/* Estados do drag and drop */
.tapete-cell.drag-over {
  border-color: #dfccb0;
  background: rgba(223, 204, 176, 0.1);
  transform: scale(1.05);
}

.tapete-cell.drag-over .drop-zone {
  background: linear-gradient(135deg, #dfccb0 0%, #c9b896 100%);
}

.tapete-cell.drag-over .drop-text {
  color: white;
  transform: scale(1.2);
}

/* Drag-over: células hexagonais com placeholder */
.tapete-cell.has-placeholder.drag-over .hex-placeholder polygon {
  fill: rgba(223, 204, 176, 0.2);
  stroke: #dfccb0;
  stroke-width: 1.5;
  transition: all 0.2s ease;
}

.tapete-cell.has-placeholder.drag-over .hex-placeholder text {
  fill: #c9b896;
  transition: fill 0.2s ease;
}

.tapete-cell.has-placeholder.drag-over .tile-content {
  opacity: 1;
  transform: scale(1.05);
}

/* Célula com ladrilho */
.tapete-cell.has-tile {
  border: none;
  background: white;
}

.tapete-cell.has-tile:hover {
  border-color: none;
  box-shadow: none;
}

/* Placeholder hexagonal - célula preenchida com placeholder aguardando ladrilho real */
/* Para quadrados */
.tapete-cell.has-placeholder {
  cursor: pointer;
}

.tapete-cell.has-placeholder .tile-content {
  cursor: pointer;
  opacity: 0.6;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.tapete-cell.has-placeholder:hover .tile-content {
  opacity: 0.8;
  transform: scale(1.02);
}

.tapete-cell.has-placeholder .hex-placeholder {
  width: 100%;
  height: 100%;
}

/* Placeholder específico para grid HEXAGONAL */
/* Faz o placeholder parecer uma célula vazia visualmente */
.tapete-grid.hexagonal .tapete-cell.has-placeholder {
  cursor: pointer;
}

.tapete-grid.hexagonal .tapete-cell.has-placeholder .tile-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.tapete-grid.hexagonal .tapete-cell.has-placeholder .hex-placeholder {
  width: 100%;
  height: 100%;
  opacity: 1;
  transform: scale(0.86);
}

.tapete-grid.hexagonal .tapete-cell.has-placeholder:hover .hex-placeholder {
  opacity: 0.7;
}

.tapete-cell::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 2px solid transparent;
  box-shadow: 0 0 0 0 rgba(71, 70, 68, 0);
  opacity: 0;
  pointer-events: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.tapete-cell.selected {
  border-color: #c8b18a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.tapete-cell.selected::after {
  border-color: rgba(200, 177, 138, 0.95);
  box-shadow: 0 0 0 6px rgba(200, 177, 138, 0.35);
  opacity: 1;
}

/* Conteúdo do ladrilho na célula */
.tile-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  cursor: -webkit-grab;
  transition: all 0.3s ease;
  position: relative;
}

.tile-content img,
.tile-content svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: all 0.3s ease;
}

.tapete-cell.has-tile .tile-content,
.tapete-cell.has-tile .cell-content {
  cursor: grab;
  cursor: -webkit-grab;
}

.tapete-cell.has-tile .tile-content.dragging {
  cursor: grabbing;
  cursor: -webkit-grabbing;
  opacity: 0.7;
  transform: scale(1.05);
  z-index: 5;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.tapete-cell.preview-active .tile-content {
  opacity: 0.35;
}

.tapete-cell.preview-active .drop-zone {
  opacity: 0;
}

.tile-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transform: scale(1.02);
  transition: opacity 0.2s ease;
}

.tile-preview-overlay img,
.tile-preview-overlay svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.tile-content:hover img,
.tile-content:hover svg {
  transform: scale(1.01);
}

/* Toolbar de edição flutuante */
.editing-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  transform: none;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 15px;
  display: none;
  gap: 10px;
  z-index: 10000;
  border: 2px solid #f0f0f0;
  pointer-events: none;
}

.editing-toolbar.is-visible {
  pointer-events: auto;
}

@keyframes toolbarFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.toolbar-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #f8f8f8;
  color: #474644;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.toolbar-btn:hover {
  background: #dfccb0;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:hover svg {
  color: white;
}

.toolbar-btn svg {
  color: white !important;
  stroke: white !important;
  fill: white !important;
  transition: color 0.3s ease;
}

.toolbar-btn svg path {
  stroke: white !important;
  fill: none !important;
}

.toolbar-btn svg line {
  stroke: white !important;
}

.toolbar-btn svg polyline {
  stroke: white !important;
  fill: none !important;
}

/* Força visibilidade dos ícones SVG */
.editing-toolbar .toolbar-btn svg,
.editing-toolbar .toolbar-btn svg *,
#editing-toolbar .toolbar-btn svg,
#editing-toolbar .toolbar-btn svg * {
  stroke: white !important;
  fill: none !important;
  color: white !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Específico para elementos path, line, polyline */
.editing-toolbar .toolbar-btn svg path,
#editing-toolbar .toolbar-btn svg path {
  stroke: white !important;
  fill: none !important;
}

.editing-toolbar .toolbar-btn svg line,
#editing-toolbar .toolbar-btn svg line {
  stroke: white !important;
}

.editing-toolbar .toolbar-btn svg polyline,
#editing-toolbar .toolbar-btn svg polyline {
  stroke: white !important;
  fill: none !important;
}

/* Sobrescrever estilos do FancyBox que podem estar conflitando */
.editing-toolbar .toolbar-btn svg,
#editing-toolbar .toolbar-btn svg {
  display: block !important;
  overflow: visible !important;
  position: relative !important;
  shape-rendering: auto !important;
  width: 20px !important;
  height: 20px !important;
}

/* Força visibilidade máxima dos ícones */
.editing-toolbar .toolbar-btn,
#editing-toolbar .toolbar-btn {
  background: rgba(0, 0, 0, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
}

.editing-toolbar .toolbar-btn:hover,
#editing-toolbar .toolbar-btn:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  border-color: white !important;
}

/* Garantir que o toolbar seja visível */
.editing-toolbar,
#editing-toolbar {
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.1) !important;
  border-radius: 8px !important;
  padding: 5px !important;
}

.toolbar-btn-danger {
  background: #ff6b6b;
  color: white;
}

.toolbar-btn-danger:hover {
  background: #ff5252;
  transform: translateY(-2px);
}

/* Transformações CSS para os ladrilhos */
.tile-rotate-90 {
  transform: rotate(90deg);
}

.tile-rotate-180 {
  transform: rotate(180deg);
}

.tile-rotate-270 {
  transform: rotate(270deg);
}

/* Rotações de 60 graus para ladrilhos hexagonais */
.tile-rotate-60 {
  transform: rotate(60deg);
}

.tile-rotate-120 {
  transform: rotate(120deg);
}

.tile-rotate-240 {
  transform: rotate(240deg);
}

.tile-rotate-300 {
  transform: rotate(300deg);
}

.tile-flip-horizontal {
  transform: scaleX(-1);
}

.tile-flip-vertical {
  transform: scaleY(-1);
}
/* Combinações de transformações */
.tile-rotate-90.tile-flip-horizontal {
  transform: rotate(90deg) scaleX(-1);
}

.tile-rotate-90.tile-flip-vertical {
  transform: rotate(90deg) scaleY(-1);
}

.tile-rotate-180.tile-flip-horizontal {
  transform: rotate(180deg) scaleX(-1);
}

.tile-rotate-180.tile-flip-vertical {
  transform: rotate(180deg) scaleY(-1);
}

.tile-rotate-270.tile-flip-horizontal {
  transform: rotate(270deg) scaleX(-1);
}

.tile-rotate-270.tile-flip-vertical {
  transform: rotate(270deg) scaleY(-1);
}

.tile-flip-horizontal.tile-flip-vertical {
  transform: scaleX(-1) scaleY(-1);
}

/* Combinações de rotações de 60 graus com flips */
.tile-rotate-60.tile-flip-horizontal {
  transform: rotate(60deg) scaleX(-1);
}

.tile-rotate-60.tile-flip-vertical {
  transform: rotate(60deg) scaleY(-1);
}

.tile-rotate-120.tile-flip-horizontal {
  transform: rotate(120deg) scaleX(-1);
}

.tile-rotate-120.tile-flip-vertical {
  transform: rotate(120deg) scaleY(-1);
}

.tile-rotate-240.tile-flip-horizontal {
  transform: rotate(240deg) scaleX(-1);
}

.tile-rotate-240.tile-flip-vertical {
  transform: rotate(240deg) scaleY(-1);
}

.tile-rotate-300.tile-flip-horizontal {
  transform: rotate(300deg) scaleX(-1);
}

.tile-rotate-300.tile-flip-vertical {
  transform: rotate(300deg) scaleY(-1);
}

.tile-rotate-60.tile-flip-horizontal.tile-flip-vertical {
  transform: rotate(60deg) scaleX(-1) scaleY(-1);
}

.tile-rotate-120.tile-flip-horizontal.tile-flip-vertical {
  transform: rotate(120deg) scaleX(-1) scaleY(-1);
}

.tile-rotate-240.tile-flip-horizontal.tile-flip-vertical {
  transform: rotate(240deg) scaleX(-1) scaleY(-1);
}

.tile-rotate-300.tile-flip-horizontal.tile-flip-vertical {
  transform: rotate(300deg) scaleX(-1) scaleY(-1);
}

/* = FORMULÁRIO DE ENVIO DE PROJETOS
-------------------------------------------------------------- */
#envio-projetos {
  background: #f8f9fa;
  padding: 40px 20px;
  margin-top: 40px;
  border-top: 3px solid #007cba;
}

.container-envio-projetos {
  max-width: 800px;
  margin: 0 auto;
}

#envio-projetos h3 {
  color: #333;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
  text-transform: uppercase;
}

.instrucoes-envio {
  text-align: center;
  color: #666;
  font-size: 16px;
  margin-bottom: 30px;
  line-height: 1.6;
}

.form-envio-projetos {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Grupos de projetos */
.projetos-container {
  margin-bottom: 30px;
}

.projeto-grupo {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fafbfc;
  transition: border-color 0.3s ease;
}

.projeto-grupo:hover {
  border-color: #007cba;
}

.projeto-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #dee2e6;
}

.projeto-header h4 {
  color: #007cba;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
}

.btn-remover-projeto {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-remover-projeto:hover {
  background: #c82333;
  transform: scale(1.1);
}

.projeto-campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .projeto-campos {
    grid-template-columns: 1fr;
  }
}

/* Campos do formulário */
.campo-arquivo,
.campo-area,
.campo-nome,
.campo-email,
.campo-telefone,
.campo-observacoes {
  display: flex;
  flex-direction: column;
}

.form-envio-projetos label {
  color: #333;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.form-envio-projetos input[type='file'],
.form-envio-projetos input[type='number'],
.form-envio-projetos input[type='text'],
.form-envio-projetos input[type='email'],
.form-envio-projetos input[type='tel'],
.form-envio-projetos textarea {
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  font-size: 14px;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.form-envio-projetos input:focus,
.form-envio-projetos textarea:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.campo-ajuda {
  color: #6c757d;
  font-size: 12px;
  margin-top: 5px;
  font-style: italic;
}

/* Botão adicionar projeto */
.adicionar-projeto-container {
  text-align: center;
  margin-bottom: 30px;
}

.btn-adicionar-projeto {
  background: #28a745;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-adicionar-projeto:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.tapete-actions {
  display: flex;
  justify-content: center;
  margin: 20px 0;
  padding: 0 15px;
  gap: 15px;
  flex-wrap: wrap;
}

.tapete-actions .btn-scroll-simulacao {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(135deg, #474744 0%, #2f2f2f 100%);
  color: #fff;
  border: none;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  box-shadow: 0 6px 16px rgba(71, 70, 68, 0.25);
}

.tapete-actions .btn-scroll-simulacao .btn-icon {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
}

.tapete-actions .btn-scroll-simulacao:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(71, 70, 68, 0.3);
}

.btn-descartar-tapete,
.btn-salvar-tapete {
  background-color: transparent;
  color: #474744;
  border: 2px solid #474744;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  min-width: 200px;
  box-shadow: none;
}

.btn-descartar-tapete:hover,
.btn-salvar-tapete:hover {
  background-color: transparent;
  color: #dfccb0;
  border-color: #dfccb0;
}

.btn-salvar-tapete:disabled,
.btn-salvar-tapete.disabled,
.btn-descartar-tapete:disabled,
.btn-descartar-tapete.disabled {
  background-color: transparent;
  color: #9b9a98;
  border-color: #9b9a98;
  cursor: not-allowed;
  opacity: 0.6;
}
/* Campos adicionais */
.campos-adicionais {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
  padding-top: 20px;
  border-top: 2px solid #e9ecef;
}

.campo-observacoes {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .campos-adicionais {
    grid-template-columns: 1fr;
  }
}

/* Botão de envio */
.envio-container {
  text-align: center;
}

.btn-enviar-projetos {
  background: #007cba;
  color: white;
  border: none;
  padding: 16px 32px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-transform: uppercase;
}

.btn-enviar-projetos:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.btn-enviar-projetos:active {
  transform: translateY(0);
}

/* Estados de loading */
.btn-enviar-projetos:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsividade */
@media (max-width: 768px) {
  #envio-projetos {
    padding: 30px 15px;
  }

  .form-envio-projetos {
    padding: 20px;
  }

  #envio-projetos h3 {
    font-size: 24px;
  }

  .projeto-campos {
    gap: 15px;
  }

  .campos-adicionais {
    gap: 15px;
  }
}

/* Miniaturas arrastáveis */
.miniatura-content.draggable {
  cursor: grab;
  transition: all 0.3s ease;
}

.miniatura-content.dragging {
  cursor: grabbing;
  opacity: 0.7;
  transform: scale(1.05);
  z-index: 1000;
}

/* Estilo para o preview visual durante drag */
#drag-preview {
  position: fixed;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.8;
  border: 2px solid #007cba;
  border-radius: 8px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#drag-preview img,
#drag-preview svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Usar contain para não cortar durante rotação */
  transform-origin: center center;
  /* Permitir override de transform via JS */
}

/* Wrapper para SVG com rotação */
#drag-preview .svg-rotated {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.2s ease-out;
}

#drag-preview .svg-rotated svg {
  max-width: 90%;
  max-height: 90%;
}

/* Rotação no drag preview */
#drag-preview .wrap-grade,
#drag-preview .grade {
  transform-origin: center center;
  transition: transform 0.2s ease-out;
}

#drag-preview img,
#drag-preview svg,
#drag-preview .wrap-grade,
#drag-preview .grade,
#drag-preview .svg-rotated {
  /* Garantir que rotação seja aplicável */
  will-change: transform;
}

/* Cursor em modo de colagem */
body.paste-mode {
  cursor: copy;
}

body.paste-mode .tapete-cell:not(.has-tile),
body.paste-mode .tapete-cell.has-placeholder,
body.paste-mode .tapete-grid.hexagonal .tapete-cell.has-placeholder {
  cursor: copy;
}

body.paste-mode .tapete-cell.has-placeholder .tile-content,
body.paste-mode .tapete-cell.has-placeholder .placeholder-tile,
body.paste-mode
  .tapete-grid.hexagonal
  .tapete-cell.has-placeholder
  .tile-content,
body.paste-mode
  .tapete-grid.hexagonal
  .tapete-cell.has-placeholder
  .placeholder-tile {
  cursor: copy;
}

/* Hover: células quadradas vazias */
body.paste-mode .tapete-cell:not(.has-tile):hover {
  border-color: #4caf50;
  background: rgba(76, 175, 80, 0.1);
}

/* Hover: células hexagonais com placeholder (especificidade alta para sobrescrever regras .tapete-grid.hexagonal) */
body.paste-mode
  .tapete-grid.hexagonal
  .tapete-cell.has-placeholder:hover
  .hex-placeholder {
  opacity: 1;
}

body.paste-mode
  .tapete-grid.hexagonal
  .tapete-cell.has-placeholder:hover
  .hex-placeholder
  polygon {
  fill: rgba(76, 175, 80, 0.15);
  stroke: #4caf50;
  stroke-width: 1.5;
  transition: all 0.2s ease;
}

body.paste-mode
  .tapete-grid.hexagonal
  .tapete-cell.has-placeholder:hover
  .hex-placeholder
  text {
  fill: #4caf50;
  transition: fill 0.2s ease;
}

body.paste-mode
  .tapete-grid.hexagonal
  .tapete-cell.has-placeholder:hover
  .tile-content {
  opacity: 1;
  transform: scale(1.05);
}

/* Responsividade */
@media (max-width: 768px) {
  .tapete-grid {
    max-width: 400px;
    gap: 6px;
    padding: 15px;
  }

  #crie-seu-tapete h3 {
    font-size: 24px;
  }

  .instrucoes-tapete {
    font-size: 14px;
    padding: 0 15px;
  }

  .editing-toolbar {
    padding: 12px;
    gap: 8px;
  }

  .toolbar-btn {
    width: 40px;
    height: 40px;
  }
}

/* Dispositivos móveis pequenos */
@media (max-width: 480px) {
  /* Simulador principal */
  #simulador {
    padding: 0 10px;
  }

  /* Introdução à simulação */
  #intro-simulacao {
    padding: 20px 10px;
  }

  #simulador .titulo-simulador {
    font-size: 1.8em;
    margin-bottom: 15px;
    text-align: center;
  }

  #simulador .passos-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #simulador .passo {
    max-width: none;
    min-width: 0;
    text-align: left;
    padding: 14px 14px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  }

  /* Seleção de formato */
  #simulador .formatos-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0;
  }

  #simulador .formato-opcao {
    padding: 14px 12px;
    min-width: 0;
    width: auto;
    max-width: none;
    height: auto;
    text-align: center;
  }

  /* Escolha do modelo */
  #simulador .modelo-selecionado {
    margin: 15px 10px;
    padding: 12px;
  }

  #simulador .modelo-acoes {
    flex-direction: column;
    gap: 10px;
  }

  #simulador .btn-descartar,
  #simulador .btn-salvar {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  /* Área de customização */
  #customizar-ladrilho {
    padding: 20px 10px;
  }

  #simulador #customizar-ladrilho .visualizar-container {
    flex-direction: column;
    gap: 15px;
  }

  #simulador .area-cores-ladrilho .paleta {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 4px 2px 10px;
  }

  #simulador .area-cores-ladrilho .paleta li {
    float: none;
    width: auto;
    padding: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  #simulador .area-cores-ladrilho .paleta p {
    display: none;
  }

  #simulador .tapete-fullview-wrapper {
    max-width: 100vw;
    overflow: hidden;
  }

  #simulador .tapete-fullview-container {
    max-width: 100vw;
    overflow: hidden;
  }

  #simulador .miniaturas-column {
    max-width: 100vw;
    overflow: hidden;
  }

  #simulador .miniaturas-grid-vertical {
    padding: 0 16px 8px;
    scroll-behavior: smooth;
  }

  #simulador .miniaturas-column .miniatura-slot {
    width: 96px;
    height: 105px;
    min-height: 96px;
    flex: 0 0 96px;
    min-width: 80px;
    aspect-ratio: auto;
  }

  #simulador .miniaturas-column .miniatura-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #simulador .miniaturas-column .miniatura-preview svg {
    width: 100%;
    height: 100%;
  }

  #simulador .miniaturas-column .miniatura-titulo {
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    line-height: 1.2;
    padding: 4px 8px;
  }

  #simulador #simulador-3d-inline .simulador-3d-container {
    width: 92vw;
    max-width: 92vw;
    min-width: 80%;
  }

  #simulador #simulador-3d-inline .ladrilar-3d__holder {
    min-height: 200px;
  }

  #area-clicavel-ladrilho {
    min-height: 250px;
    padding: 20px 10px;
    margin: 0;
  }

  .area-clicavel-texto {
    font-size: 14px;
  }

  /* Faixa */
  .faixa-content {
    padding: 15px 10px;
  }

  /* Cores disponíveis */
  #cores-disponiveis {
    padding: 20px 10px;
  }

  .cores-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
  }

  /* Monte seu tapete */
  #monte-tapete {
    padding: 20px 10px;
  }

  .opcoes-ambiente {
    flex-direction: column;
    gap: 8px;
    padding: 0 10px;
  }

  .opcao-ambiente {
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
    text-align: center;
  }

  /* Grid de tapete */
  .tapete-grid {
    max-width: 300px;
    gap: 4px;
    padding: 10px;
  }

  #crie-seu-tapete {
    margin-top: 0;
    padding: 0px 0 50px;
    background: #fff;
    box-shadow: none;
  }
  .tapete-container-inner {
    box-shadow: none;
  }
  ..miniaturas-column-title {
    font-size: 1.8rem;
  }
  .tapete-container {
    padding: 0 10px;
  }

  #crie-seu-tapete h3 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .instrucoes-tapete {
    font-size: 13px;
    margin-bottom: 20px;
  }

  /* Estilos para o botão de descartar tapete */
  .tapete-actions {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 0 10px;
  }

  .btn-descartar-tapete {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #474744;
    border: 2px solid #474744;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 220px;
    justify-content: center;
  }

  .btn-salvar-tapete {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 220px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: #474744;
    border: 2px solid #474744;
    transition: all 0.3s ease;
  }

  .btn-salvar-tapete:hover,
  .btn-descartar-tapete:hover {
    background: transparent;
    color: #dfccb0;
    border-color: #dfccb0;
  }

  .btn-descartar-tapete:active {
    transform: translateY(0);
  }

  .btn-descartar-tapete svg {
    width: 18px;
    height: 18px;
  }

  /* Toolbar de edição */
  .editing-toolbar {
    padding: 8px;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .toolbar-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  /* Thumbnails salvos */
  .thumbnails-salvos {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  /* Simulador 3D */
  #simulador-3d-inline {
    margin: 15px 10px;
  }

  .simulador-3d-content {
    min-height: 250px;
  }

  .grid-ladrilho-3d {
    max-width: 100%;
  }

  /* Ajustes para touch devices */
  .tapete-cell,
  .formato-opcao,
  .opcao-ambiente,
  .toolbar-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  /* Melhor espaçamento para toque */
  .tapete-cell {
    min-height: 50px;
  }

  .tapete-grid.hexagonal .tapete-cell {
    min-height: 45px;
  }

  /* Drag preview para mobile */
  #drag-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
  }
}

/* = ESTILOS PARA SIMULADOR 3D - GRID DE LADRILHOS
-------------------------------------------------------------- */
.grid-ladrilho-3d {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  background: transparent;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  border-spacing: 0;
  border-collapse: collapse;
}

.grid-linha {
  display: flex;
  flex: 1;
  width: 100%;
  height: auto;
  max-height: fit-content;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  border-spacing: 0;
}

.grid-celula {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
  margin: 0.2px 0.5px;
  padding: 0;
  width: calc(100% / var(--grid-columns, 5));
  height: 0;
  padding-bottom: calc(100% / var(--grid-columns, 5));
  line-height: 0;
  font-size: 0;
  box-sizing: border-box;
}

.tile-content-3d {
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.tile-content-3d svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  box-sizing: border-box;
}

/* Ajustes específicos para diferentes ambientes */
.simulador-3d-perspectiva-container {
  transform-style: preserve-3d;
  perspective: 1000px;
  perspective-origin: center center;
}

/* Regras específicas para cada ambiente */
.simulador-3d-perspectiva-container .grid-perspectiva {
  width: 100%;
  height: 100%;
  transform-origin: 0 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

/* Ambiente Sala */
.simulador-3d-perspectiva-container[data-ambiente='sala'] .grid-perspectiva {
  margin-top: -5%;
}

/* Ambiente Banheiro */
.simulador-3d-perspectiva-container[data-ambiente='banheiro']
  .grid-perspectiva {
  margin-top: -25%;
}

/* Ambiente Cozinha */
.simulador-3d-perspectiva-container[data-ambiente='cozinha'] .grid-perspectiva {
  margin-top: -25%;
}

/* Ambiente Parede */
.simulador-3d-perspectiva-container[data-ambiente='parede'] .grid-perspectiva {
  margin-top: 0%;
}

.grid-perspectiva .grid-ladrilho-3d {
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Garantir que os ladrilhos não tenham espaçamento extra */
.grid-celula[style*='margin'] {
  margin: 0 !important;
}

.grid-celula *,
.tile-content-3d *,
.tile-content-3d svg * {
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
}

@media (min-width: 360px) and (max-width: 480px) {
  #simulador .passos-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 374px) {
  #simulador .miniaturas-column .miniatura-slot {
    width: 120px;
    height: 120px;
    min-height: 120px;
    flex: 0 0 120px;
  }
}

/* Responsividade para o grid 3D */
@media (max-width: 768px) {
  .grid-ladrilho-3d {
    min-height: 200px;
  }

  .tile-content-3d svg {
    max-width: 100%;
    max-height: 100%;
  }
}

@media (max-width: 480px) {
  .grid-ladrilho-3d {
    min-height: 150px;
  }
}

/* = SUPORTE PARA FORMATO HEXAGONAL NO GRID DO TAPETE CUSTOMIZADO
-------------------------------------------------------------- */

/* Grid hexagonal - aplicar quando a classe 'hexagonal' está presente */
.tapete-grid.hexagonal {
  position: relative;
  overflow: hidden;
  /* Usar mesmo tamanho do tapete quadrado para consistência */
  max-width: 900px;
  width: 900px;
  height: 900px;
}

/* Células hexagonais - formato de 6 cantos com rotação e ângulos de 120 graus */
.tapete-grid.hexagonal .tapete-cell {
  position: relative;
  clip-path: polygon(
    25% 0%,
    75% 0%,
    100% 43.3%,
    75% 86.6%,
    25% 86.6%,
    0% 43.3%
  );
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  overflow: visible;
  margin-top: 2px;
  margin-bottom: 2px;
  margin-left: -10px;
  margin-right: -10px;
}

/* Celulas hexagonais com ladrilho */
.tapete-grid.hexagonal .tapete-cell.has-tile {
  position: relative;
  clip-path: none;
  background: none;
  border: none;
  overflow: visible;
  /* Margens simplificadas - o posicionamento principal e feito via JS */
  margin: 0;
  /* Scale removido para evitar conflitos com o encaixe calculado */
}

/* Células hexagonais selecionadas */
.tapete-grid.hexagonal .tapete-cell.selected {
  box-shadow: none;
  border-color: transparent;
  z-index: 10;
}

/* Ocultar borda retangular do ::after em células hexagonais */
.tapete-grid.hexagonal .tapete-cell.selected::after {
  display: none;
}

/* Borda hexagonal via drop-shadow que segue a forma real do SVG */
.tapete-grid.hexagonal .tapete-cell.selected .tile-content {
  filter: drop-shadow(0 0 3px rgba(200, 177, 138, 0.95))
    drop-shadow(0 0 7px rgba(200, 177, 138, 0.5));
  transition: filter 0.2s ease;
}

/* Conteúdo das células hexagonais */
.tapete-grid.hexagonal .tapete-cell .cell-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* overflow: hidden; */
  clip-path: inherit;
  /* transform: rotate(-30deg); */
}

/* Drop zone para células hexagonais vazias */
.tapete-grid.hexagonal .tapete-cell .drop-zone {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108, 117, 125, 0.1);
  border-radius: 0;
  clip-path: inherit;
}

/* Texto do drop zone hexagonal */
.tapete-grid.hexagonal .tapete-cell .drop-zone .drop-text {
  font-size: 24px;
  color: #6c757d;
  font-weight: bold;
}

/* Conteúdo do ladrilho em células hexagonais */
.tapete-grid.hexagonal .tapete-cell .tile-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* overflow: hidden; */
  clip-path: inherit;
}

/* SVGs em células hexagonais - contra-rotação para manter posição original */
.tapete-grid.hexagonal .tapete-cell .tile-content svg,
.tapete-grid.hexagonal .tapete-cell .tile-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  clip-path: inherit;
}

/* Hover effect para células hexagonais - removido conforme solicitado */

/* Ajustes para o encaixe hexagonal - posicionamento das linhas (6x6) */
.tapete-grid.hexagonal .tapete-cell[data-cell='7'],
.tapete-grid.hexagonal .tapete-cell[data-cell='8'],
.tapete-grid.hexagonal .tapete-cell[data-cell='9'],
.tapete-grid.hexagonal .tapete-cell[data-cell='10'],
.tapete-grid.hexagonal .tapete-cell[data-cell='11'],
.tapete-grid.hexagonal .tapete-cell[data-cell='12'] {
  /* Segunda linha - deslocamento aplicado via JavaScript */
}

.tapete-grid.hexagonal .tapete-cell[data-cell='19'],
.tapete-grid.hexagonal .tapete-cell[data-cell='20'],
.tapete-grid.hexagonal .tapete-cell[data-cell='21'],
.tapete-grid.hexagonal .tapete-cell[data-cell='22'],
.tapete-grid.hexagonal .tapete-cell[data-cell='23'],
.tapete-grid.hexagonal .tapete-cell[data-cell='24'] {
  /* Quarta linha - deslocamento aplicado via JavaScript */
}

.tapete-grid.hexagonal .tapete-cell[data-cell='31'],
.tapete-grid.hexagonal .tapete-cell[data-cell='32'],
.tapete-grid.hexagonal .tapete-cell[data-cell='33'],
.tapete-grid.hexagonal .tapete-cell[data-cell='34'],
.tapete-grid.hexagonal .tapete-cell[data-cell='35'],
.tapete-grid.hexagonal .tapete-cell[data-cell='36'] {
  /* Sexta linha - deslocamento aplicado via JavaScript */
}

/* Ajustes de posicionamento hexagonal agora sao feitos via JavaScript
   nas funcoes arruma_encaixe_hexagonal() e arruma_encaixe_hexagonal_simulador()
   usando as formulas do concorrente Mosaic del Sur:
   - ROW_OVERLAP_RATIO = 0.25 (sobreposicao vertical de 25%, encaixe de 75%)
   - COL_OFFSET_RATIO = 0.5 (offset horizontal de 50% para linhas pares)
*/

/* ===== RESPONSIVIDADE MÓVEL COMPLETA ===== */

/* Tablets e dispositivos médios */
@media (max-width: 768px) {
  /* Simulador principal */
  #simulador {
    max-width: 100%;
    padding: 0 15px;
  }

  /* Introdução à simulação */
  #intro-simulacao {
    padding: 30px 15px;
  }

  .titulo-simulador {
    font-size: 2em;
    margin-bottom: 20px;
  }

  .passos-container {
    gap: 20px;
  }

  .passo {
    max-width: 150px;
  }

  /* Seleção de formato */
  .formatos-container {
    gap: 20px;
    padding: 0 15px;
  }

  .formato-opcao {
    padding: 15px;
    min-width: 120px;
  }

  /* Escolha do modelo */
  .modelo-selecionado {
    margin: 20px 15px;
    padding: 15px;
  }

  .modelo-acoes {
    flex-direction: column;
    gap: 8px;
  }

  .btn-descartar,
  .btn-salvar {
    width: 100%;
  }

  /* Área de customização */
  #customizar-ladrilho .visualizar-container {
    flex-direction: column;
    gap: 20px;
  }

  #area-clicavel-ladrilho {
    min-height: 300px;
    padding: 30px 15px;
  }

  /* Faixa */
  .faixa-content {
    padding: 20px 15px;
  }

  /* Cores disponíveis */
  #cores-disponiveis {
    padding: 30px 15px;
  }

  /* Monte seu tapete */
  #monte-tapete {
    padding: 30px 15px;
  }

  .opcoes-ambiente {
    gap: 10px;
    padding: 0 15px;
  }

  .opcao-ambiente {
    padding: 10px 15px;
    font-size: 14px;
  }

  /* Grid hexagonal responsivo */
  .tapete-grid.hexagonal .tapete-cell {
    min-height: 60px;
  }

  .tapete-grid.hexagonal .tapete-cell .drop-zone .drop-text {
    font-size: 18px;
  }

  /* Thumbnails salvos */
  .thumbnails-salvos {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 15px;
  }

  /* Simulador 3D */
  #simulador-3d-inline {
    margin: 20px 15px;
  }

  .simulador-3d-content {
    min-height: 300px;
  }
}

@media (max-width: 480px) {
  /* Wrapper hexagonal - estrutura intermediária */
  .tapete-grid.hexagonal .wrap-hexagono {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 2px;
  }

  .tapete-grid.hexagonal .wrap-hexagono .tapete-cell {
    min-height: 50px;
    width: 100%;
    height: 100%;
  }

  .tapete-grid.hexagonal .wrap-hexagono .tapete-cell .drop-zone .drop-text {
    font-size: 16px;
  }

  /* Hover removido para hexagonal */

  /* ===== MELHORIAS ESPECÍFICAS PARA UI MÓVEL ===== */

  /* Botões e controles */
  button,
  .btn,
  input[type='button'],
  input[type='submit'] {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Selects e dropdowns */
  select,
  .chosen-container {
    min-height: 44px;
    font-size: 16px;
  }

  .chosen-container-single .chosen-single {
    height: 44px;
    line-height: 42px;
    font-size: 16px;
    padding: 0 12px;
  }

  .chosen-container-single .chosen-single div b {
    background-position: 50% 50%;
  }

  /* Inputs */
  input[type='text'],
  input[type='number'],
  input[type='email'],
  textarea {
    min-height: 44px;
    padding: 12px;
    font-size: 16px;
    border-radius: 6px;
  }

  /* Modais e dialogs */
  .dialog-overlay {
    padding: 20px;
  }

  .dialog-content {
    margin: 0;
  }

  .dialog-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
  }

  .dialog-header h3 {
    font-size: 20px;
  }
  .dialog-tabs {
    padding-bottom: 10px;
  }

  .btn-fechar {
    min-width: 44px;
    min-height: 44px;
    font-size: 24px;
  }

  /* Tooltips e popups */
  .tooltip,
  .popup {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 6px;
  }

  /* Floating buttons */
  .floating-saved-button {
    bottom: 20px;
    left: 20px;
    min-width: 44px;
    min-height: 44px;
  }

  /* Área de preview */
  #preview-options {
    padding: 15px;
  }

  #preview-options form {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  #preview-options form p {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #preview-options form input[type='number'] {
    width: 100%;
    max-width: 120px;
  }

  /* Melhorar visibilidade de estados ativos */
  .tapete-cell:active,
  .miniatura-item:active,
  .cor-opcao:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }

  /* Ajustar espaçamento para toque */
  .botoes-controle {
    gap: 15px;
    flex-wrap: wrap;
  }

  .botoes-controle button {
    flex: 1;
    min-width: 120px;
  }

  /* Otimizações específicas para touch */
  .area-clicavel,
  .tapete-cell,
  .miniatura-item,
  .cor-opcao,
  .opcao-formato,
  .opcao-modelo {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Aumentar área de toque para elementos pequenos */
  .btn-editar-miniatura,
  .btn-excluir-miniatura,
  .toggle-icon {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Ajustes para a toolbar de edição em modo hexagonal */
.tapete-grid.hexagonal + .editing-toolbar {
  margin-top: 40px;
}

/* = SUPORTE PARA FORMATO HEXAGONAL NO SIMULADOR 3D
-------------------------------------------------------------- */

/* Grid hexagonal 3D - estrutura específica */
.grid-ladrilho-3d.hexagonal {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  position: relative;
  background: transparent;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  overflow: visible;
}

/* Linhas do grid hexagonal 3D */
.grid-ladrilho-3d.hexagonal .tile-row {
  display: flex;
  width: 120%; /* Expandir largura para melhor cobertura */
  height: auto;
  gap: 0;
  margin: 0;
  padding: 0;
  line-height: 0;
  position: relative;
  margin-left: -10%; /* Centralizar o conteúdo expandido */
}

/* Posicionamento hexagonal 3D agora e calculado via JavaScript
   na funcao arruma_encaixe_hexagonal_simulador() usando as formulas
   do concorrente Mosaic del Sur. Os margin-bottom manuais foram removidos. */

/* Linhas pares - offset reduzido para melhor distribuição */
.grid-ladrilho-3d.hexagonal .tile-row:nth-child(even) {
  margin-left: -18px; /* Reduzir offset horizontal para melhor cobertura */
}

/* Primeira linha sem margin-top */
.grid-ladrilho-3d.hexagonal .tile-row:first-child {
  margin-top: 0;
}

/* Colunas do grid hexagonal 3D */
.grid-ladrilho-3d.hexagonal .tile-col {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: 50px;
}
.grid-ladrilho-3d.hexagonal .tile-row .tile-col:nth-child(odd) {
  top: 4px;
}

/* Holder para conteúdo hexagonal 3D */
.grid-ladrilho-3d.hexagonal .holder {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* Conteúdo dos ladrilhos hexagonais 3D */
.grid-ladrilho-3d.hexagonal .tile-content-3d {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  overflow: visible;
  box-sizing: border-box;
  z-index: 1;
}

/* SVGs hexagonais 3D */
.grid-ladrilho-3d.hexagonal .tile-content-3d svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  position: relative;
  margin: 0;
  padding: 0;
  border: none;
  outline: none;
  box-sizing: border-box;
  z-index: 2;
  opacity: 1;
  visibility: visible;
}

/* Garantir visibilidade dos elementos hexagonais 3D */
.grid-ladrilho-3d.hexagonal *,
.grid-ladrilho-3d.hexagonal .tile-content-3d *,
.grid-ladrilho-3d.hexagonal .tile-content-3d svg * {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Mask para grid hexagonal 3D */
.grid-ladrilho-3d.hexagonal .mask {
  display: none;
}

.shape-quadrado.has-corner .svg {
  width: 100%;
}
.faixa.has-corner .svg {
  width: 50% !important;
}
/* Estilos para tiles hexagonais */
.simulador-3d-perspectiva-container #hex-tile-0-0,
.simulador-3d-perspectiva-container #hex-tile-0-1,
.simulador-3d-perspectiva-container #hex-tile-0-2,
.simulador-3d-perspectiva-container #hex-tile-1-0,
.simulador-3d-perspectiva-container #hex-tile-1-1,
.simulador-3d-perspectiva-container #hex-tile-1-2,
.simulador-3d-perspectiva-container #hex-tile-2-0,
.simulador-3d-perspectiva-container #hex-tile-2-1,
.simulador-3d-perspectiva-container #hex-tile-2-2 {
  background-clip: padding-box !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  overflow: hidden;
  transform: scale(1.01);
}

/* Estilos para tiles quadrados */
.simulador-3d-perspectiva-container #quad-tile-0-0,
.simulador-3d-perspectiva-container #quad-tile-0-1,
.simulador-3d-perspectiva-container #quad-tile-0-2,
.simulador-3d-perspectiva-container #quad-tile-1-0,
.simulador-3d-perspectiva-container #quad-tile-1-1,
.simulador-3d-perspectiva-container #quad-tile-1-2,
.simulador-3d-perspectiva-container #quad-tile-2-0,
.simulador-3d-perspectiva-container #quad-tile-2-1,
.simulador-3d-perspectiva-container #quad-tile-2-2 {
  background-clip: padding-box !important;
  box-sizing: border-box !important;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
}

/* Estilos gerais para todos os tiles da matriz 3x3 */
.grid-tile-individual {
  background-clip: padding-box !important;
  box-sizing: border-box !important;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  overflow: hidden;
}

.simulador-3d-perspectiva-container #hex-tile-0-1 {
  margin-left: -11px !important;
  margin-top: 0px !important;
}
.simulador-3d-perspectiva-container #hex-tile-0-2 {
  margin-left: -22px !important
}
.simulador-3d-perspectiva-container #hex-tile-1-0 {
  margin-top: -22px !important;
  margin-left: 0.3px !important;
}
.simulador-3d-perspectiva-container #hex-tile-1-1 {
  margin-top: -22px !important;
  margin-left: -9.3px !important;
}
.simulador-3d-perspectiva-container #hex-tile-1-2 {
  margin-top: -22px !important;
  margin-left: -20.7px !important;
}
.simulador-3d-perspectiva-container #hex-tile-2-0 {
  margin-top: -44px !important;
  margin-left: 2px !important;
}
.simulador-3d-perspectiva-container #hex-tile-2-1 {
  margin-top: -44px !important;
  margin-left: -9px !important;
}
.simulador-3d-perspectiva-container #hex-tile-2-2 {
  margin-top: -44px !important;
  margin-left: -14px !important;
}

/* Estilos para abas do dialog de modelos */
.dialog-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 0px;
  padding-bottom: 0;
  background-color: #fff;
  padding-top: 20px;
  justify-content: center;
}

.dialog-tabs .tab-btn {
  background: transparent;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  position: relative;
}

.dialog-tabs .tab-btn:hover {
  color: #333;
  background-color: rgba(0, 0, 0, 0.02);
}

.dialog-tabs .tab-btn.active {
  color: #2c3e50;
  font-weight: 600;
  border-bottom-color: #3498db;
}

.dialog-tabs .tab-btn:focus {
  outline: none;
}

/* Badge para indicar quantidade de ladrilhos na coleção */
.badge-colecao {
  display: inline-block;
  background-color: #dfccb0;
  color: #474644;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(71, 70, 68, 0.1);
}

.modelo-item.colecao-item {
  position: relative;
  border-color: #dfccb0;
  background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
}

.modelo-item.colecao-item:hover {
  border-color: #c5b299;
  box-shadow: 0 6px 20px rgba(223, 204, 176, 0.25);
  transform: translateY(-4px);
}

.modelo-item.colecao-item::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 8px;
  height: 8px;
  background-color: #dfccb0;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(223, 204, 176, 0.3);
}

.modelo-item.colecao-item h4 {
  color: #474644;
  font-weight: 600;
  margin-bottom: 8px;
}

.modelo-item.colecao-item img {
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Carousel de coleção de ladrilhos */
.colecao-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-bottom: 40px;
}

.colecao-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
}

.colecao-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  min-height: 500px;
  cursor: grab;
  user-select: none;
}

.colecao-carousel:active {
  cursor: grabbing;
}

.ladrilho-colecao-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98) translateY(10px);
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.5s;
  padding: 20px;
  text-align: center;
  pointer-events: none;
}

.ladrilho-colecao-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.ladrilho-colecao-slide h5 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #474644;
  text-align: center;
}

/* Setas de navegação */
.carousel-arrow {
  background-color: #dfccb0;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer !important;
  transition: all 0.3s ease;
  color: #474644;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 0;
  line-height: 1;
  margin: 0 5px;
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.carousel-arrow:hover {
  background-color: #c5b299;
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.carousel-arrow:active {
  transform: scale(0.98);
}

.carousel-arrow svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  pointer-events: none;
}

.carousel-arrow *,
.carousel-arrow svg,
.carousel-arrow svg * {
  pointer-events: none !important;
  cursor: pointer !important;
}

.carousel-dot,
.carousel-dot * {
  pointer-events: auto;
  cursor: pointer !important;
}

.carousel-arrow:disabled {
  opacity: 0.4;
  cursor: not-allowed !important;
}

.carousel-arrow:disabled:hover {
  transform: none;
}

/* Dots de navegação */
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #dfccb0;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  outline: none;
  opacity: 0.5;
}

.carousel-dot:hover {
  background-color: rgba(223, 204, 176, 0.5);
  transform: scale(1.2);
  opacity: 0.7;
}

.carousel-dot.active {
  background-color: #dfccb0;
  border-color: #dfccb0;
  width: 14px;
  height: 14px;
  opacity: 1;
}

.ladrilho-svg-wrapper {
  background-color: white;
  padding: 25px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 450px;
  border: 1px solid #f0f0f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ladrilho-svg-wrapper svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

/* Responsividade do carousel */
@media (max-width: 768px) {
  .colecao-carousel-wrapper {
    max-width: 100%;
  }

  .colecao-carousel-container {
    gap: 10px;
  }

  .carousel-arrow {
    width: 35px;
    height: 35px;
    margin: 0 10px;
  }

  .carousel-arrow:hover,
  .carousel-arrow:focus {
    color: inherit !important;
  }

  .carousel-arrow svg {
    width: 18px;
    height: 18px;
  }

  .ladrilho-svg-wrapper {
    min-height: 350px;
    padding: 15px;
  }

  .colecao-carousel {
    min-height: 400px;
  }

  .ladrilho-colecao-slide {
    padding: 15px;
  }

  .ladrilho-colecao-slide h5 {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .carousel-arrow {
    width: 32px;
    height: 32px;
    margin: 0 5px;
  }

  .carousel-arrow svg {
    width: 16px;
    height: 16px;
  }

  .ladrilho-svg-wrapper {
    min-height: 280px;
  }

  .colecao-carousel {
    min-height: 320px;
  }
}

/* =====================================================
   SEÇÃO CRIE SEU TAPETE - FULLVIEW LAYOUT (DESIGN ENGINEERED v2)
   3-Column Layout: Miniatures (Grid) | Tapete (Hero) | Actions (Vertical)
   ===================================================== */

/* Wrapper principal - ocupa altura da viewport com margem mínima */
.tapete-fullview-wrapper {
  height: calc(
    100vh - 140px
  ); /* Ajuste de segurança para evitar corte inferior */
  min-height: 550px;
  max-height: 980px;
  display: flex;
  flex-direction: column;
  padding: 10px 12px; /* Padding reduzido */
  margin: 0 auto;
  max-width: 1800px; /* Permitir largura total em telas grandes */
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.08);
  /* Overflow: visible para permitir hexagonais, clip apenas bordas arredondadas */
  overflow: visible;
}

/* Quando tem grid hexagonal, ajustar container */
.tapete-fullview-wrapper:has(.tapete-grid.hexagonal) {
  overflow: visible;
}

/* Header Compacto */
.tapete-section-title {
  text-align: left;
  color: #1a1a1a;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 12px 0; /* Espaço para o negative margin funcionar bem */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.instrucao-rapida-fullview {
  font-size: 14px;
  font-style: italic;
  text-transform: none;
  font-weight: normal;
  line-height: 16px;
}

/* Container de 3 Colunas */
.tapete-fullview-container {
  flex: 1;
  display: grid;
  /* Left (Minis): 280px | Center (Tapete): Flex | Right (Actions): 70px */
  grid-template-columns: 280px 1fr 70px;
  gap: 16px;
  align-items: stretch;
  min-height: 0; /* Critical for grid child scrolling */
  /* height: 100%; REMOVIDO para evitar overflow (flex: 1 já cuida disso) */
  position: relative;
  margin-top: -10px; /* USER FEEDBACK: Subir colunas para aproveitar espaço */
  overflow: visible; /* Permitir overflow para grid hexagonal */
}

/* ===== COLUNA 1: MINIATURAS (SIDEBAR) ===== */
.miniaturas-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fbfbfb;
  border-radius: 8px;
  padding: 8px;
  border: 1px solid #eee;
  overflow: hidden;
  min-width: 0; /* Prevent overflow */
}

.miniaturas-column-title {
  text-align: center;
  color: #888;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

/* Grid de miniaturas (2 Colunas) */
.miniaturas-grid-vertical {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr; /* Duas colunas */
  grid-auto-rows: min-content; /* Altura baseada no conteúdo */
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding-right: 2px;
}

/* Slots de miniatura - mesma aparência, botões sempre visíveis */
.miniaturas-column .miniatura-slot {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  min-height: 165px;
  max-height: none;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: grab;
}

.miniaturas-column .miniatura-slot:hover {
  border-color: #dfccb0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.miniaturas-column .miniatura-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #ccc;
  font-size: 0.7rem;
  background: #fbfbfb;
  font-weight: 500;
}

.miniaturas-column .miniatura-content {
  height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.miniaturas-column .miniatura-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  overflow: hidden;
  min-height: 0;
  background: #fff;
}

.miniaturas-column .miniatura-preview .miniatura-svg {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.miniaturas-column .miniatura-preview .miniatura-titulo {
  flex-shrink: 0;
  font-size: 0.75em;
  padding: 0px 10px;
  margin: 0;
  color: #666;
  text-align: center;
  background: #ffffff;
  border-top: 1px solid #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.miniaturas-column .miniatura-preview .wrap-grade {
  transform: scale(0.65);
  transform-origin: center center;
}

/* Ações sempre visíveis (sem hover), mesma aparência que antes */
.miniaturas-column .miniatura-actions {
  flex-shrink: 0;
  display: flex;
  justify-content: space-evenly;
  gap: 1px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid #f0f0f0;
  padding-top: 5px;
}

.miniaturas-column .btn-girar-miniatura,
.miniaturas-column .btn-editar-miniatura,
.miniaturas-column .btn-excluir-miniatura {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  font-size: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #fff;
  border: 1px solid transparent;
}

.miniaturas-column .btn-girar-miniatura:hover,
.miniaturas-column .btn-editar-miniatura:hover,
.miniaturas-column .btn-excluir-miniatura:hover {
  background: #f0f0f0;
  color: #333;
}

/* ===== COLUNA 2: TAPETE (HERO) ===== */
.tapete-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  min-width: 0; /* Prevent grid blowout */
  position: relative;
  background: #fcfcfc;
  border-radius: 8px;
  border: 1px dashed #e0e0e0;
  padding: 8px;
  /* Permitir overflow para hexagonais */
  overflow: visible;
}

.tapete-container-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 555px;
  width: 625px;
  padding: 20px;
  position: relative;
  /* Permitir overflow para hexagonais */
  /* overflow: hidden; */
}

/* Grid do tapete - Maximizado (apenas para quadrado/tozeto/faixas) */
.tapete-column .tapete-grid:not(.hexagonal) {
  aspect-ratio: 1;
  height: 100%;
  max-height: 100%;
  width: auto;
  max-width: 100%;
  margin: 0 auto;

  background: #fff;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

/* =====================================================
   GRID HEXAGONAL NO FULLVIEW - LAYOUT COLMEIA

   Geometria do hexágono (ponta para cima):
   - Container: ~610px (aspect-ratio 1:1)
   - 7 colunas de hexágonos
   - Largura célula: (610 - 20px padding) / 7 ≈ 84px
   - Altura célula: 84 × 1.1547 ≈ 97px
   - Offset horizontal (linhas pares): 84 / 2 ≈ 42px
   - Sobreposição vertical: 97 × 0.25 ≈ 24px

   Grid: 7 colunas × 7 linhas = 49 células
   ===================================================== */

/* Container principal do grid hexagonal */
.tapete-column .tapete-grid.hexagonal {
  /* Dimensões - igual ao grid quadrado */
  aspect-ratio: 1 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 auto;

  /* Visual */
  background: #fff;
  box-shadow:
    0 10px 30px -5px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 8px;

  /* Flexbox para centralizar o wrapper */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* Conter o conteúdo */
  overflow: hidden !important;
  position: relative;
}

/* =====================================================
   WRAPPER HEXAGONAL - CONTAINER DAS LINHAS
   ===================================================== */

.tapete-column .tapete-grid.hexagonal .wrap-hexagono {
  /* Container flexbox vertical */
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;

  /* Ocupar todo o espaço disponível */
  width: 100% !important;
  height: 100% !important;

  /* Padding interno */
  margin: 10% 0 0 0 !important;
  padding: 10px !important;
  box-sizing: border-box !important;

  /* Visual */
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* =====================================================
   LINHAS HEXAGONAIS (hex-row)
   ===================================================== */

.tapete-column .tapete-grid.hexagonal .hex-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 140% !important;
  height: auto !important;
  position: relative !important;
  top: -2%;
  left: 3%;
}

/* LINHA 1 - Posição base (sem offset, sem margin-top) */
.tapete-column .tapete-grid.hexagonal .hex-row-1 {
  margin-top: 0 !important;
  margin-left: -1% !important;
}

/* LINHAS ÍMPARES (3, 5, 7) - Sem deslocamento horizontal */
.tapete-column .tapete-grid.hexagonal .hex-row-3,
.tapete-column .tapete-grid.hexagonal .hex-row-5,
.tapete-column .tapete-grid.hexagonal .hex-row-7 {
  margin-left: -0.84% !important;
}

/* LINHAS PARES (2, 4, 6, 8) - Deslocadas meio hexágono para direita
   Offset = ~5.5% (metade de 11.1%) */
.tapete-column .tapete-grid.hexagonal .hex-row-2,
.tapete-column .tapete-grid.hexagonal .hex-row-4,
.tapete-column .tapete-grid.hexagonal .hex-row-6,
.tapete-column .tapete-grid.hexagonal .hex-row-8 {
  margin-left: 5.5% !important;
}

/* TODAS AS LINHAS EXCETO A PRIMEIRA - Sobreposição vertical
   Reduzido para -3% para que o grid fique maior verticalmente */
.tapete-column .tapete-grid.hexagonal .hex-row-2,
.tapete-column .tapete-grid.hexagonal .hex-row-3,
.tapete-column .tapete-grid.hexagonal .hex-row-4,
.tapete-column .tapete-grid.hexagonal .hex-row-5,
.tapete-column .tapete-grid.hexagonal .hex-row-6,
.tapete-column .tapete-grid.hexagonal .hex-row-7,
.tapete-column .tapete-grid.hexagonal .hex-row-8 {
  margin-top: -6% !important;
}

/* =====================================================
   CÉLULAS HEXAGONAIS - Tamanho responsivo
   9 células por linha = 10.5% cada (com um pouco de espaço)
   Células maiores para preencher melhor o container
   ===================================================== */

.tapete-column .tapete-grid.hexagonal .tapete-cell {
  /* Limpar estilos base */
  clip-path: none !important;
  background: transparent !important;
  border: none !important;

  /* Tamanho maior: 10.5% da largura (células se sobrepõem horizontalmente) */
  width: 10.5% !important;
  aspect-ratio: 1 / 1.1547 !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  flex-shrink: 0 !important;
  flex-grow: 0 !important;

  /* Margem horizontal negativa para sobreposição lateral */
  margin: 0 -0.7% !important;
  padding: 0 !important;

  /* Posicionamento */
  position: relative !important;
  overflow: visible !important;
}

/* =====================================================
   CÉLULAS COM LADRILHO (has-tile)
   ===================================================== */

.tapete-column .tapete-grid.hexagonal .tapete-cell.has-tile {
  z-index: 2;
}

/* =====================================================
   CÉLULAS COM PLACEHOLDER
   ===================================================== */

.tapete-column .tapete-grid.hexagonal .tapete-cell.has-placeholder {
  opacity: 0.6;
  cursor: pointer;
}

.tapete-column .tapete-grid.hexagonal .tapete-cell.has-placeholder:hover {
  opacity: 0.9;
}

/* =====================================================
   CONTEÚDO DAS CÉLULAS HEXAGONAIS
   ===================================================== */

.tapete-column .tapete-grid.hexagonal .tapete-cell .cell-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: none !important;
}

.tapete-column .tapete-grid.hexagonal .tapete-cell .tile-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tapete-column .tapete-grid.hexagonal .tapete-cell .tile-content svg,
.tapete-column .tapete-grid.hexagonal .tapete-cell .tile-content img {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Drop-zone para células hexagonais vazias */
.tapete-column .tapete-grid.hexagonal .tapete-cell .drop-zone {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  clip-path: none !important;
}

.tapete-column .tapete-grid.hexagonal .tapete-cell .drop-zone .drop-text {
  display: none; /* Ocultar o + nas células hexagonais (terão placeholders) */
}

/* ===== COLUNA 3: AÇÕES (VERTICAL) ===== */
.actions-column {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.tapete-actions-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.btn-action-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  padding: 12px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all 0.2s ease;
  color: #666;
  cursor: pointer !important;
}

.btn-action-vertical:hover {
  background: #f5f5f5;
  color: #333;
  transform: translateY(-2px);
}

.btn-action-vertical.primary {
  background: #333;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action-vertical.primary:hover {
  background: #000;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-action-vertical .btn-icon svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.btn-action-vertical .btn-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Ocultar toolbar antiga se ainda existir no DOM */
.tapete-actions {
  display: none !important;
}

/* Toolbar de edição (que aparece ao clicar na célula) */
.editing-toolbar {
  background: #333;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.editing-toolbar .toolbar-btn {
  color: #fff;
  border-radius: 4px;
}

.editing-toolbar .toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ===== RESPONSIVIDADE ===== */

/* Desktops */
@media (max-width: 1440px) {
  .tapete-container-inner {
    height: 545px !important;
    width: 575px !important;
  }
  .tapete-column .tapete-grid.hexagonal .wrap-hexagono{
    transform: scale(1.35);
    margin: 20% 0 0 0 !important;
  }
}

/* Desktop - Notebooks */
@media (max-width: 1263px) {
  .tapete-container-inner {
    height: 390px !important;
    width: 425px !important;
  }
  .tapete-column .tapete-grid.hexagonal .wrap-hexagono{
    transform: scale(1.47);
    margin: 14% 0 0 0 !important;
    width: 90% !important;
    height: 90% !important;
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .tapete-fullview-wrapper {
    height: auto;
    min-height: 80vh;
    padding: 12px;
  }
  .tapete-container-inner {
    height: 400px !important;
    width: 425px !important;
  }
  .tapete-column .tapete-grid.hexagonal .wrap-hexagono{
    transform: scale(1.5);
    margin: 18% 0 0 0 !important;
    width: 90% !important;
    height: 90% !important;
  }
  .tapete-fullview-container {
    grid-template-columns: 200px 1fr 60px;
    gap: 12px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .miniaturas-column-title{
    font-size: 2rem;
  }
  .btn-action-vertical .btn-label{
    font-size: 1rem;
  }
  .miniatura-titulo, .miniatura-actions{
    display: none !important;
  }
  .tapete-fullview-wrapper {
    height: auto;
    max-height: none;
    padding: 8px;
  }

  .tapete-column .tapete-grid.hexagonal .wrap-hexagono{
    transform: scale(1.6);
    margin: 3% 0 0 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  .tapete-container-inner {
    height: 265px !important;
    width: 300px !important;
  }

  .tapete-fullview-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto; /* Stack vertical */
    gap: 12px;
  }

  /* Sidebar vira topbar */
  .miniaturas-column {
    height: auto;
    overflow-x: auto;
    width: 100%;
  }

  .miniaturas-grid-vertical {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 4px;
  }

  .miniaturas-column .miniatura-slot {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
    min-height: 0;
  }

  /* Actions vira bottom bar */
  .actions-column {
    flex-direction: row;
    height: auto;
    width: 100%;
  }

  .tapete-actions-vertical {
    flex-direction: row;
    justify-content: center;
  }

  .btn-action-vertical {
    width: auto;
    padding: 8px 16px;
    flex-direction: row;
    gap: 8px;
  }

  .btn-action-vertical .btn-icon svg {
    margin-bottom: 0;
    width: 18px;
    height: 18px;
  }
}

/* ===== SIMULADOR - REFINO MOBILE (equivalências desktop → mobile) ===== */

/* Touch targets mínimos 44px (WCAG), safe area para notch/home indicator */
@media (max-width: 768px) {
  /* Intro e passo-a-passo: mais compacto, ordem visual clara */
  #simulador #intro-simulacao {
    padding: 24px 16px;
  }

  #simulador .titulo-simulador {
    font-size: 1.65rem;
    line-height: 1.2;
    margin-bottom: 16px;
  }

  #simulador #passo-a-passo h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  #simulador .passos-container {
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 4px 2px 10px;
  }

  #simulador .passo {
    flex: 0 0 240px;
    max-width: none;
    min-width: 0;
    padding: 14px 14px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    scroll-snap-align: start;
  }

  #simulador .passo .numero {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 0.85rem;
  }

  #simulador .passo p {
    font-size: 12px;
  }

  /* Formato: opções com área de toque adequada */
  #simulador #selecionar-formato {
    padding: 24px 16px;
  }

  #simulador #selecionar-formato h3 {
    font-size: 1.35rem;
    margin-bottom: 20px;
  }

  #simulador .formatos-container {
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 4px 2px 10px;
  }

  #simulador .formato-opcao {
    min-width: 0;
    width: 148px;
    max-width: none;
    flex: 0 0 148px;
    padding: 14px 12px;
    min-height: 44px;
    border-radius: 10px;
    scroll-snap-align: start;
  }

  #simulador .formato-visual {
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
  }

  #simulador .formato-opcao span {
    font-size: 13px;
  }

  /* Customizar ladrilho: sem sticky na paleta, preview primeiro */
  #simulador #customizar-ladrilho .visualizar-container {
    flex-direction: column;
    gap: 24px;
  }

  #simulador .area-preview {
    order: 1;
    width: 100%;
  }

  #simulador .area-options {
    order: 2;
    width: 100%;
    display: block;
    min-width: 0;
  }

  #simulador .area-cores-ladrilho {
    position: relative;
    top: auto;
    padding: 0;
    min-width: 0;
  }

  #simulador .area-cores-ladrilho h6 {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  #simulador .area-cores-ladrilho .paleta {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 4px 2px 10px;
    width: 100%;
    max-width: 100%;
  }

  #simulador .area-cores-ladrilho .paleta .swatch {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  #simulador .area-cores-ladrilho .paleta li {
    min-height: 44px;
    padding: 0;
    float: none;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  #simulador .area-cores-ladrilho .paleta p {
    display: none;
  }

  #simulador .area-cores-ladrilho .obs-cores {
    font-size: 11px;
    margin-top: 8px;
  }

  #simulador .tapete-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  #simulador .instrucao-rapida-fullview {
    font-size: 12px;
    line-height: 1.25;
  }

  #simulador #area-clicavel-ladrilho {
    min-height: 280px;
    padding: 24px 16px;
    border-radius: 12px;
  }

  #simulador .area-clicavel .texto-clicavel {
    font-size: 14px;
  }

  /* Dialog fullscreen: 100% viewport, safe area, botão fechar maior */
  #simulador .dialog-fullscreen {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  #simulador .dialog-header {
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top));
  }

  #simulador .dialog-header h3 {
    font-size: 1.1rem;
  }

  #simulador .btn-fechar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    font-size: 28px;
  }

  #simulador .dialog-content {
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }

  #simulador .dialog-tabs .tab-btn {
    min-height: 44px;
    padding: 10px 20px;
  }

  #simulador .grid-modelos {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  #simulador .modelo-item {
    padding: 12px;
    min-height: 44px;
  }

  #simulador .modelo-item img {
    height: 120px;
  }

  #simulador .modelo-item h4 {
    font-size: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.2;
  }

  /* Toolbar de edição: posicionada via JS próxima à célula selecionada */
  .editing-toolbar {
    border-radius: 12px;
    padding: 8px 12px;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  .editing-toolbar .toolbar-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .editing-toolbar .toolbar-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Tapete: células com área de toque mínima */
  .tapete-cell {
    min-height: 52px;
  }

  .tapete-cell .drop-zone {
    font-size: 1.25rem;
  }

  /* Botão flutuante "Itens salvos": safe area */
  .floating-saved-button {
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: calc(20px + env(safe-area-inset-left));
  }

  /* Toast: não cobrir conteúdo em mobile */
  .toast-notification {
    left: 16px;
    right: 16px;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .titulo-simulador {
    font-size: 1.5rem;
  }

  .passos-container {
    gap: 12px;
  }

  .passo {
    max-width: 130px;
    min-width: 0;
  }

  .formato-opcao {
    width: calc(50% - 6px);
    max-width: none;
  }

  .tapete-grid,
  .wrap-hexagono {
    max-width: 92vw;
    width: 92vw;
    height: 92vw;
  }

  .miniaturas-column .miniatura-slot {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
  }

  .btn-action-vertical {
    padding: 10px 14px;
    font-size: 13px;
  }

  .floating-saved-button {
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: calc(16px + env(safe-area-inset-left));
  }

  .floating-button-text {
    font-size: 12px;
  }
}

@media (max-width: 479px) {
  .page_content_wrap .content_wrap,
  .content_container {
    width: 95% !important;
  }
  #simulador .passo .numero {
    font-size: 2rem;
    text-align: center;
  }
}
