/**
 * Product Grid View CSS v4
 * For: includes/templates/mytpl/css/product_grid_view.css
 */
.plv-toggle { display: inline-flex; gap: 0; vertical-align: middle; }
.plv-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 28px; border: 1px solid #ccc; background: #fff; color: #888; cursor: pointer; text-decoration: none; transition: all 0.15s ease; }
.plv-btn:first-child { border-radius: 4px 0 0 4px; border-right: none; }
.plv-btn:last-child { border-radius: 0 4px 4px 0; }
.plv-btn:hover { background: #f0f0f0; color: #555; text-decoration: none; }
.plv-btn.plv-active { background: #333; border-color: #333; color: #fff; }
.plv-btn.plv-active:hover { background: #444; }
.plv-btn svg { display: block; }

.plg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: 100%; margin: 0; padding: 0; }

.plg-card { position: relative; border: 1px solid #e8e8e8; border-radius: 6px; overflow: hidden; background: #fff; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; }
.plg-card:hover { border-color: #ccc; box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }

.plg-img-link { display: block; text-decoration: none; }
.plg-badge-discount { position: absolute; top: 8px; right: 8px; z-index: 5; background: #f97316; color: #fff; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 3px; line-height: 1; }

.plg-img-wrap { position: relative; width: 100%; padding-top: 100%; background: #f9f9f9; overflow: hidden; }
.plg-img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform 0.3s ease; }
.plg-card:hover .plg-img { transform: translate(-50%, -50%) scale(1.05); }
.plg-img-placeholder { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 50%; height: 50%; background: #e5e5e5; border-radius: 6px; opacity: 0.4; }

.plg-quick-view { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.55); color: #fff; text-align: center; padding: 8px; font-size: 12px; font-weight: 500; letter-spacing: 0.5px; opacity: 0; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease; }
.plg-card:hover .plg-quick-view { opacity: 1; transform: translateY(0); }

.plg-body { padding: 10px 12px 14px; }
.plg-title { font-size: 13px; font-weight: 400; line-height: 1.4; color: #222; margin: 0 0 4px 0; padding: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.plg-title a { color: #222; text-decoration: none; }
.plg-title a:hover { color: #0066cc; }

.plg-model { font-size: 11px; color: #999; margin-bottom: 5px; font-family: 'Courier New', Courier, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-user-select: text; -moz-user-select: text; user-select: text; cursor: text; }

.plg-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.plg-stars { color: #f59e0b; font-size: 13px; letter-spacing: 0.5px; line-height: 1; }
.plg-review-count { font-size: 11px; color: #888; }

.plg-price-section { margin-top: 6px; padding-top: 8px; border-top: 1px solid #f0f0f0; font-size: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.plg-price-section .normalprice { font-size: 12px; color: #999; text-decoration: line-through; }
.plg-price-section .productSpecialPrice, .plg-price-section .productSalePrice { font-size: 16px; font-weight: 600; color: #16a34a; }
.plg-price-section .productBasePrice { font-size: 16px; font-weight: 600; color: #16a34a; }
.plg-price-section .productPriceDiscount { font-size: 11px; color: #e53e3e; margin-left: auto; }

.plg-bottom-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; min-height: 20px; }
.plg-opt-tag { display: inline-block; font-size: 10px; color: #0369a1; background: #e0f2fe; padding: 2px 7px; border-radius: 3px; line-height: 1.4; }
.plg-qty-hint { font-size: 10px; color: #0369a1; text-decoration: none; }
.plg-qty-hint:hover { text-decoration: underline; }

/* List view container: transparent, no style interference */
#plg-list-container { }
#plg-list-container table { width: 100%; }

/* ========== centerBoxContentsbk Card Overrides (Featured / Main Category) ========== */
/* Override existing card style to match Grid View aesthetic */
.centerBoxContentsbk {
  border: 1px solid #e8e8e8 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: #fff !important;
  padding: 0 !important;
  margin: 0 4px 14px 4px !important;
  height: auto !important;
  overflow: hidden !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
}
.centerBoxContentsbk:hover {
  border-color: #ccc !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
  transform: translateY(-2px);
}
/* Image container */
.centerBoxContentsbk .productslistimg {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: #f9f9f9;
}
.centerBoxContentsbk .productslistimg img {
  width: 100% !important;
  height: auto !important;
  display: block;
  transition: transform 0.3s ease;
}
.centerBoxContentsbk:hover .productslistimg img {
  transform: scale(1.05);
}
/* Title */
.centerBoxContentsbk .itemTitle {
  padding: 8px 10px 4px 10px !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 36px;
}
.centerBoxContentsbk .itemTitle a {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #222 !important;
  line-height: 1.4 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none !important;
}
.centerBoxContentsbk .itemTitle a:hover {
  color: #0066cc !important;
}
/* Reviews */
.centerBoxContentsbk .listreviews {
  padding: 0 10px !important;
  margin: 0 0 4px 0 !important;
  text-align: left !important;
  font-size: 12px;
}
.centerBoxContentsbk .listreviews img {
  height: 14px !important;
  width: auto !important;
  vertical-align: middle;
}
/* Prices */
.centerBoxContentsbk .normalprice {
  display: inline !important;
  float: none !important;
  padding: 0 !important;
  font-size: 12px !important;
  color: #999 !important;
  text-decoration: line-through;
}
.centerBoxContentsbk .productSpecialPrice {
  display: inline !important;
  float: none !important;
  padding: 0 0 0 4px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #16a34a !important;
}
.centerBoxContentsbk .productPriceDiscount {
  position: static !important;
  display: inline !important;
  float: none !important;
  width: auto !important;
  padding: 0 0 0 4px !important;
  font-size: 11px !important;
  color: #e53e3e !important;
  background: none !important;
}
.centerBoxContentsbk span[id^="dqjg-"] {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #16a34a !important;
  padding: 0 !important;
}
/* Buy Now button - cart icon */
.centerBoxContentsbk .button_buy_now,
.centerBoxContentsbk .cssButton.button_buy_now {
  float: right !important;
  margin: 0 8px 0 0 !important;
}
/* Price container - add padding */
.centerBoxContentsbk > span,
.centerBoxContentsbk > a {
  padding-left: 10px;
}

/* Featured Products carousel li items */
#featuredProducts .centerBoxWrapper ul li {
  padding: 0 5px !important;
  box-sizing: border-box;
}

/* Main category columnar display - 5 columns */
.centerBoxContentsProducts.centeredContent.back {
  box-sizing: border-box;
  padding: 0 !important;
}

@media screen and (max-width: 900px) { .plg-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
@media screen and (max-width: 650px) { .plg-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .plg-title { font-size: 12px; min-height: 32px; } }