/* ==========================================================
   QTAH CATEGORY SECTIONS v1.0.8
   Reference-rebuilt product card geometry
   ========================================================== */

.qtah-category-section{
  --qcs-navy:#17365d;
  --qcs-text:#3a3a3a;
  --qcs-border:#e0e0e0;
  --qcs-muted:#6b7280;

  position:relative !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  background:#fff;
  overflow:visible;
  box-sizing:border-box;
  font-family:inherit;
}

.qtah-category-section,
.qtah-category-section *{
  box-sizing:border-box;
}

.qtah-category-section .qcs-inner{
  width:1280px;
  max-width:calc(100% - 32px);
  margin-inline:auto !important;
  padding:0 0 22px;
  position:relative;
}

/* ---------- heading ---------- */
.qtah-category-section .qcs-head{
  height:64px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  direction:rtl;
  padding:0 0 14px;
}

.qtah-category-section .qcs-section-title{
  margin:0 !important;
  padding:0 !important;
  color:var(--qcs-navy) !important;
  font:inherit !important;
  font-size:22px !important;
  font-weight:800 !important;
  line-height:1.15 !important;
  text-align:right !important;
}

.qtah-category-section .qcs-show-all{
  color:#111 !important;
  font:inherit !important;
  font-size:12px !important;
  font-weight:500 !important;
  line-height:1.1 !important;
  text-decoration:underline !important;
  text-underline-offset:2px !important;
  white-space:nowrap;
  padding:0 !important;
}

.qtah-category-section .qcs-show-all::before{display:none !important;content:none !important;}

/* ---------- rail ---------- */
.qtah-category-section .qcs-stage{
  position:relative;
  width:100%;
  overflow:visible;
}

.qtah-category-section .qcs-grid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:30px;
  direction:rtl;
  align-items:stretch;
}

@media (min-width:1320px){
  .qtah-category-section .qcs-grid{
    grid-template-columns:repeat(5,231.6px);
    gap:30px;
    justify-content:center;
  }
}

/* ==========================================================
   CARD — built from supplied reference measurements
   Desktop: 390px total
   275 image block (255 content + 20 padding)
   8 gap + 67 body + 40 reserved actions = 390
   ========================================================== */
.qtah-category-section .qcs-card{
  position:relative;
  min-width:0;
  height:390px;
  min-height:390px;
  padding-bottom:40px;
  border:1px solid var(--qcs-border);
  background:#fff;
  overflow:hidden;
  color:var(--qcs-text);
  font-family:inherit;
  transition:transform .28s cubic-bezier(.2,.75,.25,1),box-shadow .28s ease,border-color .28s ease;
}

.qtah-category-section .qcs-img-link{
  position:relative;
  isolation:isolate;
  display:block;
  width:100%;
  height:275px;
  margin:0 0 8px !important;
  padding:10px !important;
  overflow:hidden !important;
  background:#fff;
  text-align:center;
}

.qtah-category-section .qcs-img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  margin:0 !important;
  padding:0 !important;
  object-fit:contain !important;
  object-position:center center !important;
  transition:transform .38s cubic-bezier(.2,.72,.25,1);
}

.qtah-category-section .qcs-no-img{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  color:#9ca3af;
  font-size:11px;
}

.qtah-category-section .qcs-body{
  width:100%;
  height:67px;
  min-height:67px;
  padding:0 10px;
  overflow:hidden;
  color:var(--qcs-text);
}

.qtah-category-section .qcs-title{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  max-height:32px;
  overflow:hidden;
  margin:0 0 8px !important;
  padding:0 !important;
  color:var(--qcs-text) !important;
  text-decoration:none !important;
  text-align:right;
  direction:rtl;
  font:inherit !important;
  font-size:12px !important;
  font-weight:500 !important;
  line-height:16px !important;
  word-break:normal;
  overflow-wrap:anywhere;
}

.qtah-category-section .qcs-price{
  width:100%;
  min-height:24px;
  margin:0 !important;
  padding:0 !important;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  direction:ltr;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  color:var(--qcs-text);
  font:inherit !important;
  font-size:16px !important;
  font-weight:500 !important;
  line-height:24px !important;
}

.qtah-category-section .qcs-price-current{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  direction:ltr;
  min-width:0;
}

.qtah-category-section .qcs-price-amount{
  color:var(--qcs-text) !important;
  font:inherit !important;
  font-size:16px !important;
  font-weight:500 !important;
  line-height:24px !important;
}

.qtah-category-section .qcs-currency{
  color:var(--qcs-text) !important;
  font:inherit !important;
  font-size:14px !important;
  font-weight:400 !important;
  line-height:20px !important;
  margin:0 !important;
}

/* Kept compact so discounted products preserve the reference geometry. */
.qtah-category-section .qcs-price-meta{
  display:inline-flex;
  align-items:center;
  gap:4px;
  direction:rtl;
  min-width:0;
  overflow:hidden;
}

.qtah-category-section .qcs-old{
  color:#8b919a;
  font-size:9px;
  font-weight:500;
  line-height:1;
  text-decoration:line-through;
}

.qtah-category-section .qcs-discount{
  color:#16a34a;
  font-size:9px;
  font-weight:600;
  line-height:1;
}

/* ---------- actions, exactly reserved at card bottom ---------- */
.qtah-category-section .qcs-actions{
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  height:35px;
  min-height:35px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:0;
  direction:ltr;
  padding:0;
  margin:0;
}

.qtah-category-section .qcs-heart,
.qtah-category-section .qcs-cart{
  width:35px;
  min-width:35px;
  height:35px;
  min-height:35px;
  padding:0;
  border:0;
  border-radius:0;
  display:grid;
  place-items:center;
  cursor:pointer;
  transition:background-color .2s ease,color .2s ease,transform .2s ease;
}

.qtah-category-section .qcs-cart{order:1;background:var(--qcs-navy);color:#fff;}
.qtah-category-section .qcs-heart{order:2;background:#fff;color:#213352;}

.qtah-category-section .qcs-heart svg,
.qtah-category-section .qcs-cart svg{
  width:20px;
  height:20px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
}

.qtah-category-section .qcs-heart.is-active svg{fill:currentColor;}

/* ---------- reference-like subtle shine ---------- */
.qtah-category-section .qcs-img-link::after{
  content:"";
  position:absolute;
  inset:-20% auto -20% -60%;
  width:38%;
  z-index:3;
  pointer-events:none;
  opacity:0;
  transform:skewX(-18deg) translateX(-220%);
  background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.12) 34%,rgba(255,255,255,.48) 50%,rgba(255,255,255,.12) 66%,rgba(255,255,255,0));
}

@media (hover:hover) and (pointer:fine){
  .qtah-category-section .qcs-card:hover{
    transform:translateY(-4px);
    border-color:#c8d1dc;
    box-shadow:0 12px 28px rgba(23,54,93,.10);
  }
  .qtah-category-section .qcs-card:hover .qcs-img{transform:scale(1.025);}
  .qtah-category-section .qcs-card:hover .qcs-img-link::after{opacity:1;animation:qcsPremiumShine .8s cubic-bezier(.2,.72,.25,1) both;}
  .qtah-category-section .qcs-cart:hover{background:#102b4d;transform:translateY(-1px);}
  .qtah-category-section .qcs-heart:hover{background:#f6f8fb;transform:translateY(-1px);}
}

@keyframes qcsPremiumShine{0%{transform:skewX(-18deg) translateX(-220%)}100%{transform:skewX(-18deg) translateX(520%)}}

/* ---------- arrows ---------- */
.qtah-category-section .qcs-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:20;
  width:35px;
  min-width:35px;
  height:35px;
  min-height:35px;
  border-radius:0;
  display:grid;
  place-items:center;
  cursor:pointer;
  font-family:Arial,sans-serif;
  font-size:18px;
  font-weight:400;
  line-height:1;
  padding:0;
  transition:transform .2s ease,box-shadow .2s ease,background-color .2s ease;
}
.qtah-category-section .qcs-arrow--left{left:0;background:var(--qcs-navy);color:#fff;border:1px solid var(--qcs-navy);}
.qtah-category-section .qcs-arrow--right{right:0;background:#fff;color:#6b7280;border:1px solid #eef0f3;}
.qtah-category-section .qcs-arrow[disabled]{display:none;}

@media (hover:hover) and (pointer:fine){
  .qtah-category-section .qcs-arrow:not([disabled]):hover{transform:translateY(-50%) scale(1.06);box-shadow:0 6px 16px rgba(23,54,93,.18);}
}

/* ---------- loading skeleton ---------- */
.qtah-category-section .qcs-skeleton{pointer-events:none;position:relative;padding-bottom:40px;}
.qtah-category-section .qcs-sk-img{
  height:275px;
  margin:0 0 8px;
  background:linear-gradient(90deg,#f7f7f7 25%,#eeeeee 37%,#f7f7f7 63%);
  background-size:400% 100%;
  animation:qcsShimmer 1.1s ease infinite;
}
.qtah-category-section .qcs-sk-lines{height:67px;padding:6px 10px 0;}
.qtah-category-section .qcs-sk-lines i{display:block;height:9px;margin:0 0 9px auto;background:#f0f1f3;width:92%;}
.qtah-category-section .qcs-sk-lines i+i{width:56%;}
.qtah-category-section .qcs-sk-actions{position:absolute;bottom:0;left:0;width:70px;height:35px;background:#f0f1f3;}
@keyframes qcsShimmer{0%{background-position:100% 0}100%{background-position:0 0}}

.qtah-category-section .qcs-loading,
.qtah-category-section .qcs-error{
  grid-column:1/-1;
  min-height:390px;
  display:grid;
  place-items:center;
  color:var(--qcs-muted);
  font-size:13px;
}

.qtah-category-section .qcs-grid[aria-busy="true"]{cursor:progress;}
.qtah-category-section .qcs-cart:disabled{opacity:.65;cursor:wait;}
.qtah-category-section .qcs-heart:focus-visible,
.qtah-category-section .qcs-cart:focus-visible,
.qtah-category-section .qcs-arrow:focus-visible,
.qtah-category-section .qcs-show-all:focus-visible{outline:2px solid var(--qcs-navy);outline-offset:2px;}

.qtah-category-section[data-state="pending"] .qcs-grid,
.qtah-category-section[data-state="loading"] .qcs-grid{min-height:390px;}

/* ---------- tablet ---------- */
@media (max-width:819px) and (min-width:621px){
  .qtah-category-section .qcs-inner{width:calc(100% - 20px);max-width:none;}
  .qtah-category-section .qcs-head{height:52px;padding-bottom:10px;}
  .qtah-category-section .qcs-section-title{font-size:19px !important;}
  .qtah-category-section .qcs-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;}
  .qtah-category-section .qcs-card{height:390px;min-height:390px;}
}

/* ==========================================================
   MOBILE — copy the supplied reference proportions
   2 cards, 10px mobile spacing, 320px card total
   205 image block (185 content + 20 padding)
   8 gap + 67 body + 40 reserved actions = 320
   ========================================================== */
@media (max-width:620px){
  .qtah-category-section{overflow:hidden;}

  .qtah-category-section .qcs-inner{
    width:100% !important;
    max-width:100% !important;
    margin:0 !important;
    padding:0 0 14px !important;
  }

  .qtah-category-section .qcs-head{
    height:46px;
    padding:0 0 10px;
    align-items:flex-end;
  }

  .qtah-category-section .qcs-section-title{
    font-size:18px !important;
    font-weight:800 !important;
    line-height:1.15 !important;
  }

  .qtah-category-section .qcs-show-all{
    color:#111 !important;
    font-size:11px !important;
    font-weight:500 !important;
    line-height:1.1 !important;
    text-decoration:underline !important;
    text-underline-offset:2px !important;
  }

  .qtah-category-section .qcs-stage{width:100%;overflow:hidden;}

  .qtah-category-section .qcs-grid{
    display:flex !important;
    flex-wrap:nowrap !important;
    grid-template-columns:none !important;
    width:100%;
    max-width:100%;
    gap:10px !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    direction:rtl;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    touch-action:pan-x pan-y;
    padding:0 0 6px;
    margin:0;
    scrollbar-width:none;
    -ms-overflow-style:none;
  }
  .qtah-category-section .qcs-grid::-webkit-scrollbar{display:none;}

  .qtah-category-section .qcs-card,
  .qtah-category-section .qcs-skeleton{
    flex:0 0 calc((100% - 10px) / 2) !important;
    width:calc((100% - 10px) / 2) !important;
    min-width:calc((100% - 10px) / 2) !important;
    max-width:calc((100% - 10px) / 2) !important;
  }

  .qtah-category-section .qcs-card{
    height:320px !important;
    min-height:320px !important;
    padding-bottom:40px !important;
    scroll-snap-align:start;
    scroll-snap-stop:always;
    transform:none !important;
    box-shadow:none !important;
  }

  .qtah-category-section .qcs-img-link{
    height:205px !important;
    margin:0 0 8px !important;
    padding:10px !important;
    background:#fff !important;
  }

  .qtah-category-section .qcs-img{
    width:100% !important;
    height:100% !important;
    object-fit:contain !important;
    object-position:center center !important;
    transform:none !important;
  }

  .qtah-category-section .qcs-img-link::after{display:none !important;}

  .qtah-category-section .qcs-body{
    height:67px !important;
    min-height:67px !important;
    padding:0 10px !important;
  }

  .qtah-category-section .qcs-title{
    -webkit-line-clamp:2 !important;
    max-height:32px !important;
    margin:0 0 8px !important;
    font-size:12px !important;
    font-weight:500 !important;
    line-height:16px !important;
    color:#3a3a3a !important;
  }

  .qtah-category-section .qcs-price{
    min-height:24px !important;
    font-size:16px !important;
    font-weight:500 !important;
    line-height:24px !important;
    justify-content:flex-end !important;
    direction:ltr !important;
  }

  .qtah-category-section .qcs-price-amount{
    font-size:16px !important;
    font-weight:500 !important;
    line-height:24px !important;
  }

  .qtah-category-section .qcs-currency{
    font-size:14px !important;
    font-weight:400 !important;
    line-height:20px !important;
  }

  .qtah-category-section .qcs-actions,
  .qtah-category-section .qcs-heart,
  .qtah-category-section .qcs-cart{
    height:35px !important;
    min-height:35px !important;
  }

  .qtah-category-section .qcs-heart,
  .qtah-category-section .qcs-cart{
    width:35px !important;
    min-width:35px !important;
  }

  .qtah-category-section .qcs-heart svg,
  .qtah-category-section .qcs-cart svg{
    width:20px !important;
    height:20px !important;
    stroke-width:1.8 !important;
  }

  .qtah-category-section .qcs-arrow{display:none !important;}

  .qtah-category-section .qcs-sk-img{height:205px !important;margin-bottom:8px !important;}
  .qtah-category-section .qcs-sk-lines{height:67px !important;padding:6px 10px 0 !important;}
  .qtah-category-section .qcs-sk-actions{width:70px !important;height:35px !important;}

  .qtah-category-section[data-state="pending"] .qcs-grid,
  .qtah-category-section[data-state="loading"] .qcs-grid{min-height:320px !important;}

  .qtah-category-section .qcs-loading,
  .qtah-category-section .qcs-error{flex:0 0 100%;width:100%;min-height:320px;}
}

@media (max-width:370px){
  .qtah-category-section .qcs-grid{gap:10px !important;}
  .qtah-category-section .qcs-card,
  .qtah-category-section .qcs-skeleton{
    flex-basis:calc((100% - 10px) / 2) !important;
    width:calc((100% - 10px) / 2) !important;
    min-width:calc((100% - 10px) / 2) !important;
    max-width:calc((100% - 10px) / 2) !important;
  }
}
