/* Catalog cards (category pages) */

.cat-toolbar{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin:18px 0 14px;
}
.cat-toolbar__left{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.cat-toolbar__right{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.cat-input{
  min-width:260px;
  border:1px solid rgba(16,19,21,.14);
  border-radius:999px;
  padding:11px 14px;
  outline:none;
  background:#fff;
}
.cat-input:focus{
  border-color:rgba(31,90,58,.55);
  box-shadow:0 0 0 4px rgba(31,90,58,.12);
}
.cat-select{
  border:1px solid rgba(16,19,21,.14);
  border-radius:999px;
  padding:11px 14px;
  outline:none;
  background:#fff;
}

.product-list{
  display:grid;
  gap:16px;
}

.product-card{
  display:grid;
  position:relative;
  z-index:1;
  grid-template-columns: 220px 1fr 300px;
  gap:18px;
  padding:18px;
  border:1px solid rgba(16,19,21,.12);
  border-radius:22px;
  background:#fff;
  box-shadow:0 10px 24px rgba(16,19,21,.06);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-card--menu-open{
  z-index:120;
}
.product-card:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 40px rgba(16,19,21,.10);
  border-color:rgba(31,90,58,.20);
}

.product-img{
  width:220px;height:150px;
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg, rgba(31,90,58,.08), rgba(31,90,58,.02));
  border:1px solid rgba(16,19,21,.10);
  position:relative;
}
.product-img img{
  width:100%;height:100%;
  object-fit:cover;
  display:block;
}
.stock-badge{
  position:absolute;left:10px;bottom:10px;
  background:linear-gradient(180deg, var(--brand), var(--brand-2));
  color:#fff;
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:10px;
}
.product-badge{
  position:absolute;right:10px;top:10px;
  background:var(--brand);
  color:#fff;
  font-weight:900;
  font-size:11px;
  padding:5px 8px;
  border-radius:8px;
}
.product-badge--discount{
  background:#c53030;
}
.product-card--discount{
  background:linear-gradient(135deg, rgba(197,48,48,.06), transparent);
}
.price-main--discount s{
  color:var(--muted);
  font-size:18px;
}
.price-main--discount .price-new{
  color:#c53030;
  font-weight:900;
  font-size:inherit;
  line-height:1;
}
.price-main--discount .price-new strong{
  font-size:inherit;
  font-weight:inherit;
  color:inherit;
}

.product-main h3{margin:0;font-size:24px}
.product-sub{
  margin-top:4px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:rgba(16,19,21,.65);
  font-weight:700;
  font-size:13px;
}
.product-desc{
  margin-top:10px;
  color:rgba(16,19,21,.65);
  font-size:14px;
  line-height:1.4;
}

.product-right{
  display:flex;
  flex-direction:column;
  gap:10px;
  justify-content:space-between;
  align-items:flex-end;
  text-align:right;
}
.price-main{
  font-weight:900;
  font-size:30px;
  color:var(--brand);
}
.price-main span{
  font-size:14px;
  font-weight:800;
  color:rgba(16,19,21,.55);
}
.price-sub{
  font-weight:800;
  color:rgba(16,19,21,.55);
  margin-top:4px;
}

.length-select{
  width:100%;
  border:1px solid rgba(16,19,21,.14);
  border-radius:12px;
  padding:11px 12px;
  outline:none;
  background:#fff;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.02em;
}

.length-select--sr{
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.length-select-custom{
  position:relative;
  width:100%;
  font-family:inherit;
  z-index:1;
}
.length-select-custom.is-open{
  z-index:80;
}
.length-select-custom__trigger{
  position:relative;
  width:100%;
  border:1px solid rgba(16,19,21,.16);
  border-radius:14px;
  background:linear-gradient(180deg, #ffffff, #f7f8f7);
  color:#0f172a;
  font:inherit;
  font-weight:700;
  font-size:16px;
  line-height:1.2;
  text-align:left;
  padding:12px 44px 12px 14px;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(16,19,21,.08);
}
.length-select-custom__trigger::after{
  content:"";
  position:absolute;
  right:16px;
  top:50%;
  width:10px;
  height:10px;
  border-right:2px solid rgba(16,19,21,.5);
  border-bottom:2px solid rgba(16,19,21,.5);
  transform:translateY(-65%) rotate(45deg);
}
.length-select-custom.is-open .length-select-custom__trigger{
  border-color:rgba(31,90,58,.35);
  box-shadow:0 0 0 4px rgba(31,90,58,.12), 0 10px 24px rgba(16,19,21,.12);
}
.length-select-custom.is-open .length-select-custom__trigger::after{
  transform:translateY(-35%) rotate(-135deg);
}
.length-select-custom.is-error .length-select-custom__trigger{
  border-color:rgba(200,0,0,.4);
  box-shadow:0 0 0 3px rgba(200,0,0,.12);
}
.length-select-custom__menu{
  display:none;
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  right:0;
  z-index:40;
  background:#fff;
  border:1px solid rgba(16,19,21,.14);
  border-radius:14px;
  box-shadow:0 16px 36px rgba(16,19,21,.16);
  padding:6px;
  max-height:220px;
  overflow:auto;
}
.length-select-custom.is-open .length-select-custom__menu{
  display:block;
}
.length-select-custom__option{
  display:block;
  width:100%;
  border:0;
  background:transparent;
  border-radius:10px;
  padding:9px 10px;
  text-align:left;
  font:inherit;
  font-size:15px;
  font-weight:600;
  color:#111827;
  cursor:pointer;
}
.length-select-custom__option:hover,
.length-select-custom__option:focus-visible{
  background:rgba(31,90,58,.10);
  color:var(--brand-2);
  outline:none;
}

.stock-divider{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  padding:20px 0 8px;
}
.stock-divider:first-child{
  padding-top:0;
}
.stock-divider em{
  font-style:normal;
  background:rgba(16,19,21,.08);
  color:var(--text);
  font-size:11px;
  font-weight:700;
  padding:2px 8px;
  border-radius:999px;
}
.stock-divider--in{
  color:var(--brand);
}
.stock-divider--in em{
  background:rgba(31,90,58,.12);
  color:var(--brand);
}
.stock-divider--in::after,
.stock-divider--order::after{
  content:'';
  flex:1;
  height:1px;
  background:var(--border);
}

.add-btn{
  width:100%;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:12px 18px;
  font-size:15px;
  font-weight:600;
  border-radius:999px;
  border:1px solid rgba(16,19,21,.12);
  background:linear-gradient(180deg, var(--brand), var(--brand-2));
  color:#fff;
  cursor:pointer;
}
.add-btn:hover{filter:brightness(1.03)}
.add-btn:active{transform:translateY(1px)}

@media (max-width: 980px){
  .product-card{grid-template-columns: 180px 1fr;}
  .product-right{grid-column: 1 / -1; align-items:flex-start;text-align:left}
  .product-img{width:180px;height:130px}
  .product-main h3{font-size:20px}
  .price-main{font-size:26px}
}
@media (max-width: 720px){
  .cat-input{min-width:0;width:100%}
  .product-card{grid-template-columns: 1fr;padding:14px}
  .product-img{width:100%;height:180px}
  .product-right{align-items:flex-start}
  .product-main h3{font-size:18px}
  .price-main{font-size:24px}
  /* Ensure add button is full-width and easy to tap */
  .add-btn{padding:13px 18px;font-size:15px;min-height:44px}
  /* length select */
  .length-select-custom__trigger{padding:13px 44px 13px 14px;font-size:15px}
  .length-select-custom__option{padding:11px 10px}
}
@media (max-width: 480px){
  .product-card{padding:12px;gap:12px}
  .product-img{height:160px}
  .product-main h3{font-size:16px}
  .price-main{font-size:22px}
  .product-desc{font-size:13px}
}
