/* ===========================================================
   ADVANCED WOOCOMMERCE PRODUCT GRID — Frontend Styles
   Sleek, modern, premium design
   =========================================================== */

/* ---- CSS Variables (themeable) ---- */
.awpg-wrapper {
  --awpg-cols: 3;
  --awpg-gap: 20px;
  --awpg-ar: 1-1;
  --awpg-card-bg: #ffffff;
  --awpg-card-radius: 12px;
  --awpg-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --awpg-card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  --awpg-details-padding: 16px 20px 20px;
  --awpg-primary: #1a1a1a;
  --awpg-accent: #e63946;
  --awpg-text: #1a1a1a;
  --awpg-text-light: #666;
  --awpg-border: #e8e8e8;
  --awpg-badge-sale-bg: #e63946;
  --awpg-badge-sale-color: #fff;
  --awpg-badge-stock-bg: #999;
  --awpg-badge-stock-color: #fff;
  --awpg-badge-new-bg: #2ecc71;
  --awpg-badge-new-color: #fff;
  --awpg-atc-bg: #1a1a1a;
  --awpg-atc-color: #fff;
  --awpg-atc-hover-bg: #333;
  --awpg-atc-active-bg: #2ecc71;
  --awpg-transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --awpg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ---- Layout ---- */
.awpg-wrapper {
  font-family: var(--awpg-font);
  position: relative;
}

.awpg-layout {
  display: flex;
  gap: 30px;
}

.awpg-wrapper--has-sidebar .awpg-layout {
  flex-direction: row;
}

.awpg-sidebar {
  flex: 0 0 260px;
  min-width: 260px;
}

.awpg-content {
  flex: 1;
  min-width: 0;
}

/* ---- Grid ---- */
.awpg-grid {
  display: grid;
  grid-template-columns: repeat(var(--awpg-cols, 3), 1fr);
  gap: var(--awpg-gap, 20px);
  position: relative;
}

.awpg-grid.awpg-loading {
  opacity: 0.5;
  pointer-events: none;
}

.awpg-grid.awpg-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid var(--awpg-border);
  border-top-color: var(--awpg-primary);
  border-radius: 50%;
  animation: awpg-spin 0.8s linear infinite;
  z-index: 10;
}

@keyframes awpg-spin {
  to { transform: rotate(360deg); }
}

/* ---- Product Card ---- */
.awpg-product-card {
  background: var(--awpg-card-bg);
  border-radius: var(--awpg-card-radius);
  box-shadow: var(--awpg-card-shadow);
  overflow: hidden;
  transition: transform var(--awpg-transition), box-shadow var(--awpg-transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.awpg-product-card:hover {
  box-shadow: var(--awpg-card-hover-shadow);
}

/* Lift effect */
.awpg-product-card[data-hover-effect="lift"]:hover,
.awpg-product-card:not([data-hover-effect]):hover {
  transform: translateY(-4px);
}

/* Equal height */
.awpg-grid--equal-height .awpg-product-card {
  height: 100%;
}

.awpg-grid--equal-height .awpg-product-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.awpg-grid--equal-height .awpg-add-to-cart {
  margin-top: auto;
}

/* ---- Product Image ---- */
.awpg-product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--awpg-ar-custom, auto);
  background: #f8f8f8;
}

.awpg-product-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.awpg-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: block;
}

.awpg-product-card:hover .awpg-product-image img {
  transform: scale(1.06);
}

/* Aspect ratio classes */
[data-layout="grid"] .awpg-product-image {
  --awpg-ar-custom: 1 / 1;
}

/* ---- Badges ---- */
.awpg-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
  pointer-events: none;
}

.awpg-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  line-height: 1.4;
  animation: awpg-badge-in 0.3s ease-out;
}

@keyframes awpg-badge-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.awpg-badge--sale {
  background: var(--awpg-badge-sale-bg);
  color: var(--awpg-badge-sale-color);
}

.awpg-badge--outofstock {
  background: var(--awpg-badge-stock-bg);
  color: var(--awpg-badge-stock-color);
}

.awpg-badge--new {
  background: var(--awpg-badge-new-bg);
  color: var(--awpg-badge-new-color);
}

/* ---- Quick View Button ---- */
.awpg-quick-view-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--awpg-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all var(--awpg-transition);
  z-index: 3;
}

.awpg-product-card:hover .awpg-quick-view-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.awpg-quick-view-btn:hover {
  background: var(--awpg-primary);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

/* ---- Product Details ---- */
.awpg-product-details {
  padding: var(--awpg-details-padding);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.awpg-product-card {
  padding: 0;
}

.awpg-product-cats {
  font-size: 12px;
  color: var(--awpg-text-light);
}

.awpg-product-cats a {
  color: var(--awpg-text-light);
  text-decoration: none;
  transition: color var(--awpg-transition);
}

.awpg-product-cats a:hover {
  color: var(--awpg-primary);
}

/* ---- Product Meta Row (categories + attribute) ---- */
.awpg-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.awpg-product-attribute {
  font-size: 12px;
  color: var(--awpg-text-light);
  text-align: right;
  flex-shrink: 0;
}

.awpg-product-details[dir="rtl"] .awpg-product-attribute {
  text-align: left;
}

.awpg-product-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  padding: 0;
}

.awpg-product-title a {
  color: var(--awpg-text);
  text-decoration: none;
  transition: color var(--awpg-transition);
}

.awpg-product-title a:hover {
  color: var(--awpg-accent);
}

/* ---- Price ---- */
.awpg-product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--awpg-text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.awpg-product-price .amount {
  color: inherit;
}

.awpg-product-price ins {
  text-decoration: none;
  color: var(--awpg-accent);
}

.awpg-product-price del {
  font-size: 13px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}

/* ---- Rating ---- */
.awpg-product-rating {
  display: flex;
  align-items: center;
  font-size: 13px;
}

.awpg-product-rating .star-rating {
  display: inline-block;
  overflow: hidden;
  position: relative;
  height: 1em;
  line-height: 1;
  font-size: 14px;
  width: 5.4em;
  font-family: star;
  color: #ddd;
}

.awpg-product-rating .star-rating::before {
  content: '\73\73\73\73\73';
  float: left;
  top: 0;
  left: 0;
  position: absolute;
  color: #ddd;
}

.awpg-product-rating .star-rating span {
  overflow: hidden;
  float: left;
  top: 0;
  left: 0;
  position: absolute;
  padding-top: 1.5em;
}

.awpg-product-rating .star-rating span::before {
  content: '\53\53\53\53\53';
  top: 0;
  position: absolute;
  left: 0;
  color: #f4c150;
}

/* ---- Short Description ---- */
.awpg-product-desc {
  font-size: 13px;
  color: var(--awpg-text-light);
  line-height: 1.5;
}

/* ---- Add to Cart ---- */
.awpg-add-to-cart {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.awpg-add-to-cart .awpg-qty-selector + .awpg-add-to-cart-btn {
  flex: 1;
  min-width: 0;
}

.awpg-add-to-cart .button,
.awpg-add-to-cart .awpg-add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.3px;
  border-radius: 8px;
  background: var(--awpg-atc-bg);
  color: var(--awpg-atc-color);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--awpg-transition);
  text-decoration: none;
  width: 100%;
  min-height: 42px;
  line-height: 1.2;
  font-family: inherit;
}

.awpg-add-to-cart .button:hover {
  background: var(--awpg-atc-hover-bg);
  color: #fff;
  border-color: transparent;
}



.awpg-add-to-cart .button.loading,
.awpg-add-to-cart .awpg-add-to-cart-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.awpg-add-to-cart .button.loading::after,
.awpg-add-to-cart .awpg-add-to-cart-btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: awpg-spin 0.6s linear infinite;
}

.awpg-add-to-cart .button.added,
.awpg-add-to-cart .awpg-add-to-cart-btn.added {
  background: var(--awpg-atc-active-bg);
  color: #fff;
  pointer-events: none;
}

.awpg-view-product {
  background: #f0f0f0 !important;
  color: var(--awpg-text) !important;
}

.awpg-view-product:hover {
  background: #e0e0e0 !important;
  color: var(--awpg-text) !important;
}

/* ---- Quantity Selector ---- */
.awpg-qty-selector {
  display: inline-flex;
  align-items: center;
  background: var(--awpg-atc-bg);
  border-radius: 8px;
  overflow: hidden;
  min-height: 42px;
}

.awpg-qty-btn {
  width: 40px;
  height: 42px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--awpg-transition);
  line-height: 1;
}

.awpg-qty-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.awpg-qty-input {
  width: 44px;
  height: 42px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
  outline: none;
}

.awpg-qty-input::-webkit-inner-spin-button,
.awpg-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- Filters: Top Bar ---- */
.awpg-filters--top-bar {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px solid var(--awpg-border);
}

.awpg-filters--top-bar .awpg-filters-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
}

.awpg-filters--top-bar .awpg-filter-block {
  flex: 1;
  min-width: 180px;
}

.awpg-filters--top-bar .awpg-filter-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--awpg-text-light);
  margin: 0 0 8px;
}

.awpg-filters--top-bar .awpg-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.awpg-filters--top-bar .awpg-price-slider {
  min-width: 160px;
}

/* ---- Filters: Sidebar ---- */
.awpg-filters--sidebar {
  padding: 0;
}

.awpg-filters--sidebar .awpg-filter-block {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--awpg-border);
}

.awpg-filters--sidebar .awpg-filter-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.awpg-filters--sidebar .awpg-filter-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
}

.awpg-filters--sidebar .awpg-filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---- Filter Checkbox ---- */
.awpg-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--awpg-text);
  user-select: none;
  position: relative;
  padding: 4px 0;
}

.awpg-filter-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.awpg-checkbox-mark {
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--awpg-transition);
  flex-shrink: 0;
  position: relative;
}

.awpg-filter-checkbox input:checked + .awpg-checkbox-mark {
  background: var(--awpg-primary);
  border-color: var(--awpg-primary);
}

.awpg-filter-checkbox input:checked + .awpg-checkbox-mark::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 2px;
}

.awpg-checkbox-label {
  flex: 1;
}

/* ---- Price Range Slider ---- */
.awpg-price-slider {
  user-select: none;
}

.awpg-slider-wrapper {
  position: relative;
  height: 32px;
  margin-bottom: 4px;
}

.awpg-slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}

.awpg-slider-fill {
  position: absolute;
  top: 50%;
  height: 4px;
  background: var(--awpg-primary, #6c5ce7);
  border-radius: 2px;
  transform: translateY(-50%);
  pointer-events: none;
}

.awpg-slider-input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  margin: 0;
  padding: 0;
  outline: none;
  z-index: 2;
}

.awpg-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--awpg-primary, #6c5ce7);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  transition: box-shadow 0.2s, transform 0.2s;
}

.awpg-slider-input::-webkit-slider-thumb:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transform: scale(1.1);
}

.awpg-slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--awpg-primary, #6c5ce7);
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.awpg-slider-input::-moz-range-thumb:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.awpg-slider-input::-moz-range-track {
  background: transparent;
  border: none;
}

.awpg-slider-input:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(108,92,231,0.25);
}

.awpg-slider-input:focus::-moz-range-thumb {
  box-shadow: 0 0 0 3px rgba(108,92,231,0.25);
}

.awpg-price-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--awpg-text, #333);
  margin-top: 2px;
}

.awpg-price-label-min,
.awpg-price-label-max {
  white-space: nowrap;
}

/* ---- Filter Reset Button ---- */
.awpg-filter-reset {
  background: transparent;
  border: 1px solid var(--awpg-border);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--awpg-transition);
  color: var(--awpg-text-light);
}

.awpg-filter-reset:hover {
  border-color: var(--awpg-accent);
  color: var(--awpg-accent);
}

/* ---- Pagination ---- */
.awpg-pagination {
  margin-top: 30px;
  text-align: center;
}

/* Numbered */
.awpg-pagination-numbered {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

.awpg-pagination-numbered a,
.awpg-pagination-numbered span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--awpg-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--awpg-text);
  transition: all var(--awpg-transition);
  background: #fff;
}

.awpg-pagination-numbered a:hover {
  background: var(--awpg-primary);
  color: #fff;
  border-color: var(--awpg-primary);
}

.awpg-pagination-numbered span.current {
  background: var(--awpg-primary);
  color: #fff;
  border-color: var(--awpg-primary);
}

.awpg-pagination-numbered span.dots {
  border: none;
  background: transparent;
}

/* Load More */
.awpg-load-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 36px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--awpg-primary);
  border-radius: 8px;
  background: transparent;
  color: var(--awpg-primary);
  cursor: pointer;
  transition: all var(--awpg-transition);
}

.awpg-load-more-btn:hover {
  background: var(--awpg-primary);
  color: #fff;
}

.awpg-load-more-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.awpg-load-more-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.awpg-load-more-btn.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: awpg-spin 0.6s linear infinite;
}

/* Infinite Scroll */
.awpg-infinite-loader {
  padding: 30px 0;
  display: flex;
  justify-content: center;
}

.awpg-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--awpg-border);
  border-top-color: var(--awpg-primary);
  border-radius: 50%;
  animation: awpg-spin 0.8s linear infinite;
}

/* ---- Quick View Modal ---- */
.awpg-quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: none;
}

.awpg-quick-view-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.awpg-quick-view-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  animation: awpg-modal-in 0.3s ease-out;
  display: flex;
  flex-direction: column;
}

@keyframes awpg-modal-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.awpg-quick-view-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  transition: all var(--awpg-transition);
  z-index: 10;
  line-height: 1;
}

.awpg-quick-view-close:hover {
  background: var(--awpg-accent);
  color: #fff;
}

.awpg-quick-view-body {
  overflow-y: auto;
  max-height: 85vh;
}

.awpg-qv-loading .awpg-quick-view-body::after {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  margin: 80px auto;
  border: 3px solid var(--awpg-border);
  border-top-color: var(--awpg-primary);
  border-radius: 50%;
  animation: awpg-spin 0.8s linear infinite;
}

.awpg-quick-view-inner {
  display: flex;
  flex-direction: row;
  gap: 0;
}

.awpg-qv-images {
  flex: 0 0 45%;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.awpg-qv-images img {
  width: 100%;
  height: auto;
  display: block;
}

.awpg-qv-details {
  flex: 1;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.awpg-qv-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--awpg-text);
  line-height: 1.3;
}

.awpg-qv-rating {
  display: flex;
  gap: 8px;
}

.awpg-qv-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--awpg-text);
}

.awpg-qv-price ins {
  text-decoration: none;
  color: var(--awpg-accent);
}

.awpg-qv-price del {
  font-size: 17px;
  font-weight: 400;
  color: #999;
  margin-left: 8px;
}

.awpg-qv-stock {
  font-size: 13px;
  font-weight: 600;
}

.awpg-qv-instock {
  color: #2ecc71;
}

.awpg-qv-outofstock {
  color: var(--awpg-accent);
}

.awpg-qv-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--awpg-text-light);
}

.awpg-qv-cart {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.awpg-qv-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--awpg-border);
  border-radius: 8px;
  overflow: hidden;
}

.awpg-qv-qty-btn {
  width: 38px;
  height: 42px;
  border: none;
  background: #f9f9f9;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--awpg-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.awpg-qv-qty-btn:hover {
  background: #eee;
}

.awpg-qv-qty-input {
  width: 48px;
  height: 42px;
  border: none;
  border-left: 1px solid var(--awpg-border);
  border-right: 1px solid var(--awpg-border);
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  outline: none;
  -moz-appearance: textfield;
}

.awpg-qv-qty-input::-webkit-inner-spin-button,
.awpg-qv-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.awpg-qv-add-to-cart {
  flex: 1;
  padding: 12px 24px;
  background: var(--awpg-atc-bg);
  color: var(--awpg-atc-color);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--awpg-transition);
  min-height: 42px;
}

.awpg-qv-add-to-cart:hover {
  background: var(--awpg-atc-hover-bg);
}

.awpg-qv-add-to-cart.loading {
  opacity: 0.7;
  pointer-events: none;
}

.awpg-qv-add-to-cart.loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: awpg-spin 0.6s linear infinite;
}

.awpg-qv-add-to-cart.added {
  background: var(--awpg-atc-active-bg);
  pointer-events: none;
}

.awpg-qv-view-product,
.awpg-qv-more-info {
  display: inline-block;
  font-size: 13px;
  color: var(--awpg-text-light);
  text-decoration: underline;
  transition: color var(--awpg-transition);
}

.awpg-qv-view-product:hover,
.awpg-qv-more-info:hover {
  color: var(--awpg-text);
}

/* ---- Notification Toast ---- */
.awpg-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 100000;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease-out;
  max-width: 360px;
}

.awpg-notice--visible {
  transform: translateY(0);
  opacity: 1;
}

.awpg-notice--success {
  background: #2ecc71;
}

.awpg-notice--error {
  background: var(--awpg-accent);
}

/* ---- No Products ---- */
.awpg-no-products {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  color: var(--awpg-text-light);
  background: #f9f9f9;
  border-radius: 12px;
  border: 1px dashed var(--awpg-border);
}

/* ---- List Layout ---- */
[data-layout="list"] .awpg-grid {
  grid-template-columns: 1fr !important;
}

[data-layout="list"] .awpg-product-card {
  flex-direction: row;
  align-items: flex-start;
}

[data-layout="list"] .awpg-product-image {
  flex: 0 0 280px;
  aspect-ratio: 1 / 1;
}

[data-layout="list"] .awpg-product-details {
  gap: 8px;
}

/* ---- RTL direction ---- */
.awpg-product-details[dir="rtl"],
.awpg-qv-details[dir="rtl"] {
  direction: rtl;
}

.awpg-product-details[dir="rtl"] .awpg-product-price {
  flex-direction: row-reverse;
}

.awpg-product-details[dir="rtl"] .awpg-product-cats a + a::before {
  content: '\200F';
}

/* ---- Body scroll lock ---- */
body.awpg-qv-open {
  overflow: hidden;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .awpg-sidebar {
    flex: 0 0 220px;
    min-width: 220px;
  }

  [data-layout="list"] .awpg-product-image {
    flex: 0 0 200px;
  }

  .awpg-quick-view-inner {
    flex-direction: column;
  }

  .awpg-qv-images {
    flex: none;
    max-height: 320px;
  }

  .awpg-qv-details {
    padding: 24px;
  }
}

@media (max-width: 767px) {
  .awpg-wrapper--has-sidebar .awpg-layout {
    flex-direction: column;
  }

  .awpg-sidebar {
    flex: none;
    width: 100%;
    min-width: auto;
  }

  .awpg-filters--top-bar .awpg-filters-form {
    flex-direction: column;
    gap: 12px;
  }

  .awpg-filters--top-bar .awpg-filter-block {
    min-width: auto;
    width: 100%;
  }

  .awpg-filters--top-bar .awpg-price-inputs {
    width: 100%;
  }

  .awpg-filters--top-bar .awpg-price-inputs input {
    flex: 1;
    width: auto;
  }

  .awpg-product-title {
    font-size: 14px;
  }

  [data-layout="list"] .awpg-product-card {
    flex-direction: column;
  }

  [data-layout="list"] .awpg-product-image {
    flex: none;
    width: 100%;
  }

  [data-layout="list"] .awpg-product-details {
    padding: 16px;
  }

  .awpg-quick-view-content {
    width: 96%;
    max-height: 90vh;
    border-radius: 12px;
  }

  .awpg-qv-images {
    max-height: 240px;
  }

  .awpg-qv-details {
    padding: 20px;
    gap: 10px;
  }

  .awpg-qv-title {
    font-size: 18px;
  }

  .awpg-qv-price {
    font-size: 18px;
  }

  .awpg-qv-cart {
    flex-direction: column;
    align-items: stretch;
  }

  .awpg-notice {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }
}
