/* assets/css/annam-shop.css */
/* ===============================
   DESKTOP STICKY FIX
================================= */

@media (min-width: 992px) {

    .annam-shop-wrap {
        display: flex;
        align-items: flex-start; /* IMPORTANT */
        gap: 30px;
    }

    .annam-sidebar {
        width: 320px;
        flex-shrink: 0;
    }

   .annam-sidebar.is-sticky {
        top: 100px;
        position: sticky;
        max-height: 100vh;
        height: calc(100vh - 150px);
    }

    .annam-main {
        flex: 1;
        min-width: 0;
    }
    .annam-sidebar.is-sticky {
  overflow-y: auto !important;
  scrollbar-width: thin;               /* Firefox */
  scrollbar-color: #669888 transparent;   /* Firefox */
}

.annam-sidebar.is-sticky::-webkit-scrollbar {
  width: 2px;
}

.annam-sidebar.is-sticky::-webkit-scrollbar-track {
  background: transparent;
}

.annam-sidebar.is-sticky::-webkit-scrollbar-thumb {
  background-color: #669888;
  border-radius: 3px;
}
}

/* ===============================
   FIX COMMON STICKY BREAK ISSUES
================================= */

/* Parent should NOT have overflow hidden */
.annam-shop-wrap,
.annam-shop-wrap * {
    overflow: visible !important;
}

/* ===============================
   MOBILE RESPONSIVE (NO STICKY)
================================= */

@media (max-width: 991px) {

    .annam-shop-wrap {
        display: block;
    }

    .annam-sidebar {
        /*position: relative !important;*/
        width: 80%;
        top: 0;
        height: auto;
    }

}
#annamProducts.is-loading {
  opacity: .5;
  pointer-events: none;
}
.annam-category-wrap {
    display: grid;
    gap: 28px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 0px;
}
/* loader center of entire screen */
#annamProducts.is-loading::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 4px solid #ddd;
  border-top-color: #2e7d32;
  border-radius: 50%;
  position: fixed; /* change from absolute */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: annamSpin 0.8s linear infinite;
  z-index: 9999;
}

/* optional background overlay */
#annamProducts.is-loading::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.6);
  z-index: 9998;
}

@keyframes annamSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.annam-body .annam-cat a { font-size: 16px;
    color: #E6B74A;
    font-weight: 400; }
.annam-cat { display: flex; align-items: left; justify-content: space-between; }
article.annam-card {
    position: relative;
}
.annam-shop-wrap{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 16px;
}

.annam-sidebar .annam-box {
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 5px 30px 5px 20px;
    margin-bottom: 8px;
    background: #fff;
    color: #000;
}

.annam-label{display:block;font-weight:600;margin-bottom:10px;}
.annam-input,.annam-select{
  width:100%;
  border:1px solid rgba(0,0,0,.15);
  border-radius:10px;
  padding:10px 12px;
  outline:none;
}

.annam-checklist{
  display:flex;
  flex-direction:column;
  gap:5px;
  max-height:240px;
  overflow:auto;
}
.annam-check{display:flex;gap:10px;align-items:center;font-size:14px;}
.annam-muted{opacity:.7;font-size:13px;}

.annam-range{display:flex;justify-content:space-between;margin-top:10px;font-size:13px;opacity:.85;}

.annam-btn{
  width:100%;
  border:0;
  border-radius:10px;
  padding:12px 14px;
  cursor:pointer;
}

.annam-main{min-width:0;}
.annam-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:14px;
}
.annam-title{font-size:20px;font-weight:700;}
.annam-controls{display:flex;gap:10px;align-items:center;}
.annam-view{display:flex;gap:6px;}
.annam-view-btn{
  border:1px solid rgba(0,0,0,.15);
  border-radius:10px;
  padding:10px 12px;
  background:#fff;
  cursor:pointer;
}
.annam-view-btn.is-active{border-color:rgba(0,0,0,.4);}

.annam-results{margin:10px 0 14px;}
.annam-count{opacity:.8;font-size:14px;}
/* Remove default arrow */
.annam-select,
.annam-filter-bar select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Custom arrow */
.annam-select,
.annam-filter-bar select {
    position: relative;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23222222' height='14' viewBox='0 0 24 24' width='14' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px; /* Space for arrow */
}

/* Clean spacing */
.annam-filter-bar select {
    min-width: 160px;
    height: 42px;
    padding: 8px 36px 8px 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
}
.annam-products{
  display:grid;
  gap:30px;
}
.annam-cate-wrap {
    display: flex;
    flex-wrap: wrap;
}

.annam-filter-bar {
    width: 100%;
    display: flex; justify-content: space-between;
}
.tax-product_cat .annam-products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 22px;
}

.tax-product_cat .annam-view-list {
    display: flex;
    flex-wrap: wrap;
}
.tax-product_cat .annam-view-list .annam-card {
    display: flex;
    gap: 0;
    width: 49%;
    justify-content: center;
    align-items: center;
}
.grid{grid-template-columns: repeat(4, minmax(0, 1fr));}
.annam-view-grid{grid-template-columns: repeat(3, minmax(0, 1fr));}
.annam-view-list{grid-template-columns: 1fr 1fr;}
.annam-view-list .annam-card{
   
  gap:16px;
  align-items: center;
  justify-content: flex-start;
  display: flex;
  grid-template-columns: 1fr 1fr;
}

.annam-card{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}
.annam-thumb{display:block;position:relative;}
/* IMAGE CONTAINER */
.annam-view-grid .annam-thumb {
  width: 100%;
  aspect-ratio: 1 / 0;
  background: #fffbfb; /* adds padding feel */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  border-radius: 10px;
}

/* IMAGE FIX */
.annam-view-grid .annam-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain !important; /* 🔥 KEY FIX */
  padding: 0; /* breathing space */
}

.annam-view-grid .annam-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1);
}
.annam-view-list .annam-thumb img{height:220px;}

.annam-badge-sold {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: #2E524A;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}
.annam-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: #2da8df;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

/* ORANGE DISCOUNT CIRCLE */
.annam-discount-badge {
    position: absolute;
    top: 90px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: #ff9800;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}
.annam-badge-sold{right:12px; top:12px; opacity:.9;}
.annam-badge-sale{top:12px; right:12px;}

.annam-body{padding:14px;}
.annam-cat{font-size:13px;opacity:.75;margin-bottom:6px;}
.annam-title{margin:0 0 8px;font-size:40px;}
.annam-title a{text-decoration:none;}
.annam-meta{margin-bottom:8px;}
.annam-price{font-weight:700;margin-bottom:10px;}

.annam-actions .button{
  width:100%;
  border-radius:12px;
}

.annam-empty{
  padding: 16px;
  border:1px dashed rgba(0,0,0,.2);
  border-radius: 12px;
  opacity: .8;
}

.annam-pagination{
  display:flex;
  gap:10px;
  margin: 22px 0 0;
}
.annam-page{
  width:42px;height:42px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.15);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.annam-page.is-active{
  border-color:rgba(0,0,0,.5);
}

#annamProducts.is-loading{opacity:.5;pointer-events:none;}

/* noUiSlider small polish */
.noUi-target{border-radius: 999px;}
.noUi-horizontal{height: 6px;}
.noUi-connect{background: rgba(0,0,0,.35);}
.noUi-handle{
  width: 18px !important;
  height: 18px !important;
  border-radius: 999px !important;
  top: -7px !important;
}
.noUi-handle:before,
.noUi-handle:after{display:none !important;}

@media (max-width: 1024px){
  .annam-shop-wrap{grid-template-columns:1fr;}
  .annam-view-grid{grid-template-columns: repeat(2, minmax(0, 1fr));}
}
@media (max-width: 640px){
  .annam-view-grid{grid-template-columns: 1fr 1fr;}
  .annam-view-list .annam-card{grid-template-columns:1fr;}
  .annam-view-list {
    grid-template-columns: 1fr;
}
}