/* ===== 1. SCOPE & RESET ===== */
body.products_grid,
body.products_list {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1c1c1e;
}
body.products_grid *,
body.products_list * { box-sizing: border-box; }

body.products_grid .products-grid .card {
  background: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  box-shadow: none;
}

body.products_grid .breadcrumb,
body.products_grid .well,
body.products_grid h1.top,
body.products_grid .form-products-per-page,
body.products_grid .product-filters-select-view-type,
body.products_grid .pagination-left,
body.products_list .breadcrumb,
body.products_list .well,
body.products_list h1.top,
body.products_list .form-products-per-page,
body.products_list .product-filters-select-view-type,
body.products_list .pagination-left,
body.products_list label[for="addressbook_id"],
body.products_list .plp-orig-hidden {
  display: none !important;
}

/* ===== 2. HEADER CARD ===== */
.plp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e6e6e9;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,16,20,.04);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.plp-head-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.plp-head-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.plp-head-thumb {
  width: 74px; height: 50px; flex: 0 0 auto;
  border-radius: 8px; object-fit: contain; background: #faf7ef;
}
.plp-head-text { min-width: 0; }
.plp-head-title {
  font-size: 22px; font-weight: 700; line-height: 1.1; margin: 0 0 4px;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.plp-head-count { font-size: 14px; font-weight: 400; color: #8a8a8f; }
.plp-head-sub { font-size: 14px; color: #8a8a8f; margin: 0; }

/* ===== 2a. SORT DROPDOWN ===== */
.plp-sort {
  position: relative; flex: 0 0 auto;
}
.plp-sort-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #ffffff; border: 1px solid #e6e6e9;
  border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font-size: 14px; color: #1c1c1e; white-space: nowrap;
  transition: border-color .15s;
}

.plp-sort-btn:focus,
.plp-sort-btn:active,
.plp-sort.open .plp-sort-btn { border-color: #93117E; outline: none; }
.plp-sort-btn .plp-sort-ico { font-size: 15px; color: #8a8a8f; }
.plp-sort-btn .plp-caret { margin-left: 2px; color: #8a8a8f; transition: transform .15s; }
.plp-sort.open .plp-caret { transform: rotate(180deg); }
.plp-sort-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid #e6e6e9;
  border-radius: 10px; box-shadow: 0 8px 28px rgba(16,16,20,.12);
  padding: 6px; min-width: 220px; z-index: 60; display: none;
}
.plp-sort.open .plp-sort-menu { display: block; }
.plp-sort-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 9px 12px; border-radius: 7px; font-size: 14px; cursor: pointer; color: #1c1c1e;
}
.plp-sort-menu button { transition: background-color .12s, color .12s; }
.plp-sort-menu button:hover { background: #F4E7F2; color: #860F73; }
.plp-sort-menu button:focus,
.plp-sort-menu button:active { background: #EFDBEC; color: #5B0B4F; outline: none; }
.plp-sort-menu button.active { background: #faeef5; color: #93117E; font-weight: 600; }

/* ===== 2b. VIEW TOGGLE (Photos / List) ===== */
.plp-view-toggle {
  display: inline-flex; align-items: center;
  border: 1px solid #e6e6e9; border-radius: 10px;
  background: #fff; padding: 3px; gap: 2px; flex: 0 0 auto;
}
.plp-view-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 34px; border-radius: 8px;
  color: #8a8a8f; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.plp-view-btn:hover { background: #F4E7F2; color: #860F73; }
.plp-view-btn.active { background: #faeef5; color: #93117E; }
.plp-view-btn .plp-view-ico { display: block; }

/* ===== 3. CATEGORY BAR ===== */
.plp-catbar {
  position: relative;
  background: #ffffff;
  border: 1px solid #e6e6e9;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,16,20,.04);
  padding: 14px 16px 16px;
  margin-bottom: 18px;
}
.plp-catbar-scroll {
  display: flex; align-items: center; gap: 10px;
  overflow-x: auto; scroll-behavior: smooth;
  padding-bottom: 8px; -ms-overflow-style: none; scrollbar-width: none;
}
.plp-catbar-scroll::-webkit-scrollbar { display: none; }
.plp-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #e6e6e9; background: #fff;
  border-radius: 999px; padding: 9px 16px; font-size: 14px;
  color: #1c1c1e; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.plp-pill:hover { background: #F4E7F2; border-color: #860F73; }
.plp-pill:focus,
.plp-pill:active { background: #E3E3E3; border-color: #5B0B4F; outline: none; }
.plp-pill.plp-pill-all { border-color: #93117E; color: #93117E; font-weight: 600; }
.plp-pill.plp-pill-all .plp-pill-ico { font-size: 13px; }
.plp-pill.active { border-color: #93117E; color: #93117E; font-weight: 600; }

.plp-catbar-underline {
  position: absolute; left: 16px; bottom: 8px; height: 3px; width: 46px;
  background: #1c1c1e; border-radius: 3px;
}
.plp-catbar-next {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid #e6e6e9; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(16,16,20,.08); z-index: 5;
}
.plp-catbar-next:hover { background: #faf3f8; border-color: #93117E; }
.plp-catbar-next-ico { width: 16px; height: 16px; display: block; }

body.products_grid .products-grid { margin: 0; display: block; }

/* ===== 4. PRODUCT GRID + CARDS ===== */
body.products_grid .products-grid > form,
body.products_grid form#add-products-multiple-form {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 0;
}

body.products_grid .products-grid > form > input[type="hidden"],
body.products_grid form#add-products-multiple-form > input[type="hidden"] {
  display: none !important;
}

@media (max-width: 1400px){ body.products_grid .products-grid > form, body.products_grid form#add-products-multiple-form { grid-template-columns: repeat(4,1fr);} }
@media (max-width: 992px){  body.products_grid .products-grid > form, body.products_grid form#add-products-multiple-form { grid-template-columns: repeat(3,1fr);} }
@media (max-width: 680px){  body.products_grid .products-grid > form, body.products_grid form#add-products-multiple-form { grid-template-columns: repeat(2,1fr);} }

body.products_grid .products-grid .col-xs-6,
body.products_grid .products-grid .col-sm-4,
body.products_grid .products-grid .col-md-3 {
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  float: none !important; padding: 0 !important;
  display: flex !important; flex: 0 0 auto !important;
  align-items: stretch !important;
}
body.products_grid .products-grid .col-xs-6 > .card-product { width: 100%; }

body.products_grid .products-grid .card-product {
  background: #ffffff;
  border: 1px solid #e6e6e9;
  border-radius: 14px;
  overflow: hidden;
  margin: 0;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 100%;

  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  flex: 1 1 auto !important;
  transition: border-color .15s;
}

body.products_grid .products-grid .card-product:hover {
  border-color: #828282 !important;
}
body.products_grid .products-grid .card-product:focus,
body.products_grid .products-grid .card-product:focus-within,
body.products_grid .products-grid .card-product:active {
  border-color: #454545 !important;
}

body.products_grid .card-image {
  display: block !important;
  width: 100% !important;
  align-self: stretch !important;
  padding: 14px 14px 0 !important;
}
body.products_grid .card-image > div {
  display: block !important;
  width: 100% !important;
}
body.products_grid .card-image .thumb {
  display: block !important;
  width: 100% !important;
  border-radius: 10px;
  overflow: hidden;
}

body.products_grid .card-image .thumb,
body.products_grid .card-image .thumb:hover,
body.products_grid .card-image .thumb:focus,
body.products_grid .card-image .thumb:active {
  outline: none !important;
  box-shadow: none !important;
  cursor: default !important;
  text-decoration: none !important;
}
body.products_grid .card-image img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  display: block !important;
  outline: none !important;
}
body.products_grid .card-image img:hover,
body.products_grid .card-image img:focus {
  outline: none !important;
  box-shadow: none !important;
  transform: none !important;
}

body.products_grid .card-content {
  height: auto !important;
  width: 100% !important;
  align-self: stretch !important;
  flex: 1 1 auto !important;
  border-radius: 8px;
  padding: 16px !important;
  display: flex !important; flex-direction: column !important;
  align-items: flex-start !important; gap: 12px;
  transition: background-color .15s;
}

body.products_grid .products-grid .card-product:hover .card-content {
  background: #F5F5F5;
}
body.products_grid .products-grid .card-product:focus .card-content,
body.products_grid .products-grid .card-product:focus-within .card-content,
body.products_grid .products-grid .card-product:active .card-content {
  background: #E3E3E3;
}

body.products_grid .plp-brand,
body.products_grid .card-title {
  width: 100%;
  align-self: stretch;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

body.products_grid .plp-brand {
  font-size: 12px; color: #9a9aa0; line-height: 1; letter-spacing: .2px;
}
body.products_grid .card-title a {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; font-weight: 600; font-style: normal;
  color: #000; line-height: 150%;
  text-decoration: none;

  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; min-height: 48px;
}
body.products_grid .card-title a:hover { color: #93117E; }

body.products_grid .footer { margin-top: auto !important; }

body.products_grid .price,
body.products_grid .qty-discount-prices .dropdown-toggle {
  color: #048259 !important;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; font-weight: 700; font-style: normal;
  line-height: 150%;
  letter-spacing: 0.019px;
}

/* ===== 4c. PRODUCT LIST VIEW ===== */
.plp-list {
  background: #ffffff;
  border: 1px solid #e6e6e9;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,16,20,.04);
  overflow: hidden;
}
.plp-list-head {
  display: flex; align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #ececef;
  font-size: 14px; color: #8a8a8f;
}
.plp-list-head-product { flex: 1 1 auto; }
.plp-list-head-price { flex: 0 0 auto; width: 220px; }

.plp-list-body { display: block; }

.plp-list-row {
  display: flex; align-items: center; gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid #ececef;
  text-decoration: none; color: inherit;
  transition: background .15s;
}
.plp-list-body .plp-list-row:last-child { border-bottom: 0; }
.plp-list-row:hover { background: #F5F5F5; }
.plp-list-row:focus,
.plp-list-row:active { background: #E3E3E3; outline: none; }

.plp-list-thumb {
  flex: 0 0 auto;
  width: 88px; height: 66px;
  border: 1px solid #ececef; border-radius: 10px;
  background: #fff; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.plp-list-thumb img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; display: block;
}

.plp-list-info { flex: 1 1 auto; min-width: 0; }
.plp-list-brand {
  font-size: 12px; color: #9a9aa0; line-height: 1;
  letter-spacing: .2px; margin-bottom: 4px;
}
.plp-list-name {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; font-weight: 600; color: #000; line-height: 1.4;
  margin-bottom: 8px;
}
.plp-list-row:hover .plp-list-name { color: #93117E; }
.plp-list-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: #6d6d72;
}
.plp-list-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: #048259; display: inline-block;
}
.plp-list-status.out .plp-list-dot { background: #c0392b; }

.plp-list-price {
  flex: 0 0 auto; width: 220px;
  color: #048259;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px; font-weight: 700; line-height: 150%;
  letter-spacing: 0.019px;
}

/* ===== 5. PAGINATION BAR ===== */
.plp-pager {
  margin: 24px 0 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  align-self: stretch;
}
.plp-pager-row {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: #FFF;
  align-self: stretch;
}

.plp-pager-controls {
  display: flex; justify-content: center; align-items: center;
  gap: 16px;
}
.plp-pg-btn {
  width: 40px; height: 40px; border-radius: 8px;
  border: 1px solid #e6e6e9; background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #1c1c1e;
  text-decoration: none; font-size: 14px;
  transition: background .15s, border-color .15s;
}
.plp-pg-btn:hover { background: #F5F5F5; border-color: #E3E3E3; }
.plp-pg-btn:focus,
.plp-pg-btn:active { background: #E3E3E3; border-color: #E3E3E3; outline: none; }
.plp-pg-btn.disabled { opacity: .4; pointer-events: none; }

.plp-pg-btn .plp-pg-ico { width: 18px; height: 18px; display: block; }
.plp-pg-label { font-size: 14px; color: #1c1c1e; padding: 0 2px; }
.plp-pg-input {
  width: 120px; height: 40px; text-align: center; border: 1px solid #e6e6e9;
  border-radius: 8px; font-size: 14px; color: #1c1c1e;
}
.plp-pg-input:focus { outline: none; border-color: #93117E; }
.plp-pg-of { font-size: 14px; color: #1c1c1e; padding: 0 2px; }

.plp-pg-showing {
  font-size: 13px; color: #8a8a8f; white-space: nowrap; text-align: center;
}
.plp-pg-showing b { color: #1c1c1e; }

/* ===== 6. RESPONSIVE / MOBILE ===== */
@media (max-width: 768px) {
  .plp-head {
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px;
  }
  .plp-head-title { font-size: 20px; }
  .plp-head-tools { width: 100%; }
  .plp-sort { flex: 1 1 auto; }
  .plp-sort-btn { width: 100%; justify-content: space-between; }
  .plp-sort-menu { left: 0; right: 0; width: 100%; }

  .plp-list-head-price,
  .plp-list-price { width: 120px; }
}

@media (max-width: 680px) {

  body.products_grid .products-grid > form,
  body.products_grid form#add-products-multiple-form {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }

  body.products_grid .products-grid .card-product {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-right: 1px solid #ececef !important;
    border-bottom: 1px solid #ececef !important;
  }

  body.products_grid .products-grid .col-xs-6:nth-child(2n) .card-product {
    border-right: 0 !important;
  }

  body.products_grid .products-grid .card-product:hover,
  body.products_grid .products-grid .card-product:focus,
  body.products_grid .products-grid .card-product:focus-within,
  body.products_grid .products-grid .card-product:active {
    border-color: transparent #ececef #ececef transparent !important;
  }
  body.products_grid .products-grid .col-xs-6:nth-child(2n) .card-product:hover,
  body.products_grid .products-grid .col-xs-6:nth-child(2n) .card-product:focus-within {
    border-right-color: transparent !important;
  }

  body.products_grid .card-image { padding: 12px 12px 0 !important; }
  body.products_grid .card-content { padding: 12px !important; gap: 8px; }

  .plp-catbar { padding: 12px 12px 14px; }
  .plp-pager-controls { flex-wrap: wrap; gap: 10px; }
  .plp-pg-input { width: 90px; }
  .plp-head-thumb { width: 56px; height: 40px; }

  .plp-list-head { padding: 14px 16px; }
  .plp-list-row { padding: 14px 16px; gap: 14px; }
  .plp-list-thumb { width: 64px; height: 50px; }
  .plp-list-name { font-size: 15px; }
  .plp-list-head-price,
  .plp-list-price { width: 84px; }
}

.products_list .col-xl-6.col-md-8.addressbook {
	display:none;
}