/**
* 2007-2026 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2026 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/

/* =========================================================
   FMM VISUAL SEARCH - COMPLETE STYLES
   Clean • Modern • Premium • Responsive
========================================================= */

.fmmss-wrap{
  --fmm-bg:#ffffff;
  --fmm-text:#232323;
  --fmm-muted:#7a7a7a;
  --fmm-border:#e5e5e5;
  --fmm-soft:#f7f7f7;
  --fmm-primary:#2fb5d2;
  --fmm-radius:10px;

  max-width:1240px;
  margin:0 auto;
  padding:30px 16px;
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--fmm-text);
}

.fmmss-wrap *{box-sizing:border-box}
.fmmss-wrap img{max-width:100%;display:block}
.fmmss-wrap a{text-decoration:none;color:inherit}

/* =========================================================
   HERO SECTION
========================================================= */

.fmmss-hero{
  background:linear-gradient(135deg,#f8fcff 0%,#ffffff 70%);
  border:1px solid var(--fmm-border);
  border-radius:var(--fmm-radius);
  box-shadow:0 6px 18px rgba(0,0,0,.04);
}

.fmmss-hero__inner{
  padding:40px 30px;
  text-align:center;
}

.fmmss-hero__title{
  font-size:26px;
  font-weight:700;
  margin-bottom:8px;
}

.fmmss-hero__hint{
  font-size:14px;
  color:var(--fmm-muted);
  margin-bottom:24px;
}

/* =========================================================
   UPLOAD AREA
========================================================= */

.fmmvs-upload-area{
  border:2px dashed #dbeaf0;
  border-radius:14px;
  padding:55px 30px;
  background:#ffffff;
  cursor:pointer;
  transition:all .25s ease;
}

.fmmvs-upload-area:hover{
  border-color:var(--fmm-primary);
  background:#f2fbfe;
  transform:translateY(-3px);
}

.fmmvs-upload-icon{
  font-size:44px;
  margin-bottom:14px;
  opacity:.85;
}

.fmmvs-upload-text{
  font-size:15px;
  font-weight:600;
}

.fmmvs-upload-sub{
  font-size:12px;
  margin-top:5px;
  color:var(--fmm-muted);
}

.fmmvs-preview{
  margin-top:25px;
  text-align:center;
}

.fmmvs-preview img{
  max-width:220px;
  border-radius:12px;
  border:1px solid var(--fmm-border);
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}

.fmmvs-submit-wrap{
  margin-top:22px;
}

.fmmvs-submit-wrap button{
  padding:12px 22px;
  border-radius:var(--fmm-radius);
  border:0;
  background:var(--fmm-primary);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:all .2s ease;
}

.fmmvs-submit-wrap button:hover{
  opacity:.9;
}

/* =========================================================
   RESULTS SECTION
========================================================= */

.fmmss-toolbar{
  margin-top:30px;
  margin-bottom:14px;
  font-size:16px;
  font-weight:600;
}

.fmmss-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
}

/* =========================================================
   PRODUCT CARD
========================================================= */

.fmmss-card{
  background:#ffffff;
  border:1px solid var(--fmm-border);
  border-radius:14px;
  overflow:hidden;
  transition:all .25s ease;
  display:flex;
  flex-direction:column;
}

.fmmss-card:hover{
  transform:translateY(-5px);
  box-shadow:0 12px 30px rgba(0,0,0,.08);
  border-color:#dbeaf0;
}

.fmmss-card__media{
  position:relative;
  aspect-ratio:1/1;
  background:#fafafa;
  overflow:hidden;
}

.fmmss-card__img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .4s ease;
}

.fmmss-card:hover .fmmss-card__img{
  transform:scale(1.06);
}

/* AI Similarity Badge */
.fmmss-stock{
  position:absolute;
  top:10px;
  right:10px;
  background:linear-gradient(135deg,#2fb5d2,#5ed6ff);
  color:#fff;
  font-size:11px;
  font-weight:700;
  padding:6px 9px;
  border-radius:6px;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
}

/* Card Body */
.fmmss-card__body{
  padding:18px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  flex:1;
}

.fmmss-card__name{
  font-size:15px;
  font-weight:600;
  margin-bottom:10px;
  line-height:1.4;
}

.fmmss-card__bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:8px;
}

.fmmss-price{
  font-size:17px;
  font-weight:700;
}

.fmmss-btn2{
  border:1px solid var(--fmm-border);
  background:#ffffff;
  border-radius:8px;
  padding:8px 14px;
  font-size:13px;
  font-weight:600;
  transition:all .2s ease;
}

.fmmss-btn2:hover{
  background:var(--fmm-primary);
  border-color:var(--fmm-primary);
  color:#ffffff;
}

/* =========================================================
   EMPTY STATE
========================================================= */

.fmmss-empty{
  margin-top:30px;
  padding:50px 20px;
  border:2px dashed var(--fmm-border);
  border-radius:14px;
  text-align:center;
  background:#fafafa;
}

.fmmss-empty__title{
  font-size:16px;
  font-weight:600;
  margin-bottom:6px;
}

.fmmss-empty__text{
  font-size:13px;
  color:var(--fmm-muted);
}

/* =========================================================
   LIST VIEW SUPPORT
========================================================= */

.fmmss-wrap[data-view="list"] .fmmss-grid{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.fmmss-wrap[data-view="list"] .fmmss-card{
  flex-direction:row;
}

.fmmss-wrap[data-view="list"] .fmmss-card__media{
  flex:0 0 160px;
  height:160px;
  aspect-ratio:auto;
}

.fmmss-wrap[data-view="list"] .fmmss-card__body{
  padding:16px;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width:1100px){
  .fmmss-grid{
    grid-template-columns:repeat(2,1fr);
  }
}

@media (max-width:768px){

  .fmmss-hero__title{
    font-size:20px;
  }

  .fmmvs-upload-area{
    padding:35px 20px;
  }

  .fmmss-grid{
    grid-template-columns:1fr;
  }

  .fmmss-card{
    border-radius:12px;
  }
}

/* =========================================================
   HEADER VISUAL SEARCH
========================================================= */

#fmmvs_search_widget{
  position:relative;
  max-width:260px;
  display: -webkit-inline-box;
  float: inline-end;
}

.fmmvs-header-upload{
  position:relative;
}

.fmmvs-header-input{
  height:44px;
  border:1px solid #e5e5e5;
  border-radius:6px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
  cursor:pointer;
  background:#fff;
  transition:all .2s ease;
}

.fmmvs-header-input:hover{
  border-color:#2fb5d2;
  box-shadow:0 0 0 1px rgba(47,181,210,.15);
}

.fmmvs-header-placeholder{
  font-size:13px;
  color:#7a7a7a;
}

/* Dropdown results */
.fmm-top-results{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  width:100%;
  background:#fff;
  border-radius:6px;
  box-shadow:0 6px 18px rgba(0,0,0,.1);
  z-index:9999;
  overflow:hidden;
}

.fmm-top-results ul{
  list-style:none;
  margin:0;
  padding:0;
}

.fmm-top-results li{
  border-bottom:1px solid #f1f1f1;
}

.fmm-top-results li:last-child{
  border-bottom:0;
}

.fmm-top-results a{
  display:block;
  padding:10px;
  text-decoration:none;
  color:#232323;
}

.fmm-top-results a:hover{
  background:#f7f7f7;
}

/* Mini product layout */
.fmmvs-mini-product{
  display:flex;
  gap:10px;
  align-items:center;
}

.fmmvs-mini-img{
  width:50px;
  height:50px;
  object-fit:cover;
  border-radius:6px;
  border:1px solid #eee;
}

.fmmvs-mini-info{
  flex:1;
  overflow:hidden;
}

.fmmvs-mini-name{
  font-size:13px;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.fmmvs-mini-price{
  font-size:12px;
  font-weight:600;
  color:#2fb5d2;
}

