.m-shop-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 1024px) {
  .m-shop-wrapper {
    flex-direction: row;
  }
}

.m-content-area {
  flex: 1;
  min-width: 0;
}

.m-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0.625rem 1rem;
  background: #ffffff;
  border: 1px solid #f0f0f5;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.m-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem;
  gap: 0.75rem;
  border-radius: 20px;
  background: #f8fafc;
  border: 2px dashed #e2e8f0;
}

.m-empty-icon {
  width: 56px;
  height: 56px;
  opacity: 0.35;
  color: #94a3b8;
}

.m-empty-text {
  font-size: 1rem;
  font-weight: 600;
  color: #94a3b8;
  margin: 0;
}

.m-card {
  background: #ffffff;
  border: 1px solid #f1f3f9;
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.28s ease,
              border-color 0.22s ease;
  cursor: pointer;
}

.m-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.12),
              0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: #e0e3ff;
}

.m-card-img-wrap {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #f5f7fc;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.m-card-img-primary,
.m-card-img-secondary {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.625rem;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.m-card-img-primary {
  opacity: 1;
  transform: scale(1);
}

.m-card-img-secondary {
  opacity: 0;
  transform: scale(1.04);
}

.m-card:hover .m-card-img-primary {
  opacity: 0;
  transform: scale(0.96);
}

.m-card:hover .m-card-img-secondary {
  opacity: 1;
  transform: scale(1);
}

.m-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  z-index: 10;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.m-badge-out {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.35);
}

.m-badge-low {
  background: rgba(245, 158, 11, 0.9);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

.m-card-price-unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: #000000;
}

.m-card-out-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: #f87171;
}

.m-pagination-wrap {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.m-card-price-contact {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f97316;
}

.m-product-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .m-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
}

@media (min-width: 1280px) {
    .m-product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

.m-card-body {
    padding: 1rem 1.125rem 1.125rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem; 
}

.m-card-name {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.m-card-category {
    font-size: 15px;
    font-weight: 600;
    color: #700dfb;
    margin: 0;
}

.m-card-sale-type {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
    margin: 0.25rem 0 0.5rem;
}

.m-card-price-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem;
    margin: 0.5rem 0;
}

.m-card-price-label {
    font-size: 14px;
    color: #000000;
    margin: 0 0 0.375rem 0;
    font-weight: 500;
}

.m-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.375rem;
}

.m-card-price-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    direction: ltr;
    text-align: right;
}

.m-card-stock {
    font-size: 0.8125rem;
    color: rgb(59 130 246);
    font-weight: 500;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.m-card-stock-out {
    color: #dc2626;
    font-weight: 500;
}

.m-card-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
    margin-top: auto;
}

.m-card-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.sale-badge {
    padding: 0.20rem 0.4rem;
    border-radius: 0.20rem;
    font-size: 12px;
    font-weight: 200;
}

.sale-badge-wholesale {
    background-color: #fed7aa;
    color: #ea580c;
}

.sale-badge-retail {
    background-color: #dbeafe;
    color: #2563eb;
}

/* toolbar */

.m-toolbar{
display:flex;
align-items:center;
justify-content:space-between;
gap:16px;
flex-wrap:wrap;
margin-bottom:20px;
}

.m-toolbar > div{
display:flex;
align-items:center;
gap:8px;
}


/* mobile */

@media (max-width:768px){

.m-toolbar{
flex-direction:column;
align-items:stretch;
}

.m-toolbar > div{
width:100%;
justify-content:space-between;
}

.m-toolbar select{
width:60%;
}

}
