/* SPC Category Layout */
/* Bara sortare/comparare compactă */
.product-filter.clearfix { margin-bottom: 6px !important; }
.product-filter .product-compare { padding-top: 15px !important; padding-bottom: 10px !important; }
.product-filter .button-group.display { padding-top: 14px !important; padding-bottom: 10px !important; }
.product-filter .list-options .sort { padding-top: 3px !important; padding-bottom: 0 !important; }
.product-filter .list-options .sort::after { margin-top: 22px !important; }
.product-filter .list-options .limit { padding-top: 3px !important; padding-bottom: 0 !important; }
.product-filter .list-options .limit::after { margin-top: 22px !important; }
.product-grid, .product-list { margin-top: 20px !important; clear: both; position: relative; }
.center-column .product-grid::before,
.center-column .product-list::before { display: none !important; }
.product-filter.clearfix { border-bottom: 1px solid #eee; padding-bottom: 0 !important; }
.product-filter .list-options { padding-bottom: 0 !important; margin-bottom: 0 !important; }
.product-grid .row { margin-top: 0; }
.product.spc-card { margin-top: 0; margin-bottom: 16px; }
/* Sidebar filtre mai ingust doar pe pagini de categorie — ambele moduri */
[class*="product-category"] #column-left { width: 20%; }
[class*="product-category"] #column-left + .col-md-9,
[class*="product-category"] #column-left + .col-sm-9 { width: 80%; }
/* Aliniere filtre cu primul rând de carduri */
[class*="product-category"] #column-left .box { padding-top: 0 !important; }

/* SPC Category Card Redesign */
.product.spc-card { position: relative; border: 1px solid transparent; border-radius: 10px; overflow: hidden; transition: all 0.2s; display: flex; flex-direction: column; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.product.spc-card .left .image { overflow: hidden; border-radius: 10px 10px 0 0; }
.product.spc-card:hover { box-shadow: 0 4px 16px rgba(230,126,34,0.15); }
.product.spc-card::after { content: ''; position: absolute; inset: 0; border-radius: 10px; border: 2px solid transparent; pointer-events: none; z-index: 2; transition: border-color 0.2s; }
.product.spc-card:hover::after { border-color: #e67e22; }
.product.spc-card .left { position: relative; overflow: hidden; }
.product.spc-card .right { padding: 10px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.product.spc-card .name { margin-bottom: 6px; }
.product.spc-card .name a { font-size: 12px; font-weight: 400; line-height: 1.4; color: #333; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.product.spc-card .name a:hover { color: #e67e22; }
.product.spc-card .spc-card-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 5px; }
.product.spc-card .spc-card-rating i { font-size: 10px; color: #f39c12; }
.product.spc-card .spc-card-rating i.empty { color: #ddd; }
.product.spc-card .spc-card-stock { font-size: 10px; font-weight: 500; color: #27ae60; margin-bottom: 4px; }
.product.spc-card .spc-card-stock i { margin-right: 3px; }
.product.spc-card .spc-card-stock.out-of-stock { color: #e74c3c; }
.product.spc-card .price { margin-top: auto; padding-top: 8px; border-top: 1px solid #f5f5f5; margin-bottom: 8px; font-size: 18px; font-weight: 700; color: #e67e22; }
.product.spc-card .price .price-old { font-size: 12px; color: #999; text-decoration: line-through; display: block; font-weight: 400; }
.product.spc-card .price .price-new { font-size: 18px; font-weight: 700; color: #e67e22; }
.product.spc-card .cart-small { margin-top: auto; }
.product.spc-card .spc-card-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px; font-size: 13px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #f15a23, #d94a15);
  border: none; border-radius: 8px; cursor: pointer; text-decoration: none;
  transition: all 0.15s;
}
.product.spc-card .spc-card-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(241,90,35,0.3); color: #fff; }
.product.spc-card .spc-card-btn i { font-size: 14px; }
.product.spc-card .spc-card-btn-details {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px; font-size: 12px; font-weight: 500; color: #999;
  background: #f0f0f0; border: 1px solid #ddd; border-radius: 8px; text-decoration: none;
  cursor: pointer; position: relative; z-index: 10;
}
.product.spc-card .spc-card-btn-details:hover { background: #e8e8e8; color: #666; text-decoration: none; }
/* SPC List View — info (rating, stoc, buton) */
.product-list .spc-list-info { padding-left: 15px !important; }
.product-list .spc-list-info > * { margin-left: 0 !important; padding-left: 0 !important; text-indent: 0 !important; }
.product-list .spc-list-info .name { margin-bottom: 6px; padding: 0 !important; }
.spc-list-rating { display: flex; align-items: center; gap: 3px; margin: 4px 0; padding-left: 0; }
.spc-list-rating i { font-size: 12px; color: #f39c12; }
.spc-list-rating i.empty { color: #ddd; }
.spc-list-stock { font-size: 11px; font-weight: 500; color: #27ae60; margin-bottom: 8px; }
.spc-list-stock i { margin-right: 3px; }
.spc-list-stock.out-of-stock { color: #e74c3c; }
.spc-list-cart { margin-top: 8px; }
.spc-list-cart .spc-card-btn {
  display: inline-flex !important; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 20px !important; font-size: 13px !important; font-weight: 600 !important; color: #fff !important;
  background: linear-gradient(135deg, #f15a23, #d94a15) !important;
  border: none !important; border-radius: 8px !important; cursor: pointer; text-decoration: none !important;
  transition: all 0.15s;
}
.spc-list-cart .spc-card-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(241,90,35,0.3); color: #fff !important; }

/* SPC List View Styling */
.product-list > div { border: 1px solid transparent; border-radius: 10px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.06); margin-bottom: 12px; padding: 12px; transition: all 0.2s; }
.product-list > div:hover { box-shadow: 0 4px 16px rgba(230,126,34,0.15); outline: 2px solid #e67e22; outline-offset: -2px; }
.product-list .name a { color: #333; text-decoration: none; font-size: 14px; font-weight: 500; }
.product-list .name a:hover { color: #e67e22; }
.product-list .price { font-size: 18px; font-weight: 700; color: #e67e22; }
.product-list .price .price-old { font-size: 13px; color: #999; text-decoration: line-through; font-weight: 400; }
.product-list .price .price-new { font-size: 18px; font-weight: 700; color: #e67e22; }
.product-list .image { padding: 8px; text-align: center; }
.product-list .image img { max-height: 140px; object-fit: contain; }
.product-list .image.col-sm-3 { width: 18%; }
.product-list .name-actions.col-sm-4 { width: 41%; }
.product-list .desc.col-sm-5 { width: 41%; }
.product-list .desc { font-size: 12px; color: #666; line-height: 1.5; }
.product-list .desc .description { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Buton filtre — ascuns pe desktop */
.spc-filter-toggle { display: none !important; }
.spc-drawer-header { display: none; }
.spc-drawer-overlay { display: none; }
.spc-drawer-footer { display: none; }

/* ===== RESPONSIVE CATEGORY ===== */
@media (min-width: 992px) and (max-width: 1280px) {
  [class*="product-category"] #column-left { width: 25% !important; }
  [class*="product-category"] #column-left + .col-md-9,
  [class*="product-category"] #column-left + .col-sm-9 { width: 75% !important; }
}
@media (max-width: 991px) {
  /* Sidebar + produse full-width */
  [class*="product-category"] #column-left { width: 100% !important; }
  [class*="product-category"] #column-left + .col-md-9,
  [class*="product-category"] #column-left + .col-sm-9 { width: 100% !important; }
}

@media (max-width: 991px) {
  /* Sidebar ca drawer overlay pe mobil + tabletă */
  [class*="product-category"] #column-left {
    position: fixed !important; bottom: 0; right: 0; left: auto; width: 50% !important; max-height: 75vh;
    background: #fff; z-index: 9999; overflow-y: auto; padding: 0 16px 70px;
    transform: translateY(100%); transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    border-radius: 16px 16px 0 0;
  }
  [class*="product-category"] #column-left.spc-drawer-open { transform: translateY(0); }
  [class*="product-category"] #column-left + .col-md-9,
  [class*="product-category"] #column-left + .col-sm-9 { width: 100% !important; }
  /* Drawer header */
  .spc-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid #eee; margin-bottom: 4px;
    position: sticky; top: 0; background: #fff; z-index: 1;
  }
  .spc-drawer-header h3 { font-size: 15px; font-weight: 600; margin: 0; }
  .spc-drawer-close { width: 36px; height: 36px; border: none; background: #f0f0f0; border-radius: 50%; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  /* Drawer footer cu buton aplicare */
  .spc-drawer-footer {
    position: fixed; bottom: 0; right: 0; width: 50%; padding: 10px 16px;
    background: #fff; border-top: 1px solid #eee; z-index: 10000; display: none;
  }
  [class*="product-category"] #column-left.spc-drawer-open ~ .spc-drawer-footer { display: block; }
  .spc-drawer-apply {
    display: block; width: 100%; padding: 10px; font-size: 14px; font-weight: 600;
    color: #fff; background: linear-gradient(135deg, #f15a23, #d94a15);
    border: none; border-radius: 8px; cursor: pointer; text-align: center;
  }
  /* Buton Filtrează în pagină */
  .spc-filter-toggle {
    display: flex !important; align-items: center; justify-content: center; gap: 8px;
    width: auto; padding: 8px 24px; margin: 10px 0; font-size: 13px; font-weight: 600;
    color: #fff; background: #190a64; border: none;
    border-radius: 8px; cursor: pointer;
  }
  .spc-filter-toggle i { font-size: 16px; }
  /* Overlay fond */
  .spc-drawer-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0,0,0,0.4); z-index: 9998;
  }
  .spc-drawer-overlay.active { display: block; }
  /* Ascunde tot din sidebar pe mobil EXCEPTIE box-no-advanced (filtrele) */
  [class*="product-category"] #column-left > *:not(.box-no-advanced):not(.spc-drawer-header) { display: none !important; }
  [class*="product-category"] #column-left > .box-no-advanced { display: block !important; }
  [class*="product-category"] #column-left .box-no-advanced > .box-heading { display: none !important; }
  [class*="product-category"] #column-left .box-no-advanced > .strip-line { display: none !important; }
  [class*="product-category"] #column-left .box-no-advanced { margin: 0 !important; padding: 0 !important; }
  [class*="product-category"] #column-left .box-no-advanced .box-content { display: block !important; flex-direction: unset !important; padding: 0 !important; margin: 0 !important; border: none !important; }
  /* Filtre grup heading colapsabil în drawer */
  [class*="product-category"] #column-left .box-no-advanced { border-bottom: none; padding: 0; }
  [class*="product-category"] #column-left .box-filter > li,
  [class*="product-category"] #column-left .box-filter-manufacturer > li { border-bottom: 1px solid #f0f0f0; padding: 10px 0; }
  /* Heading Producatori — uniform cu restul */
  [class*="product-category"] #column-left .box-filter-manufacturer { margin: 0 !important; padding: 0 !important; list-style: none !important; }
  [class*="product-category"] #column-left .box-filter-manufacturer > li { padding: 10px 0 !important; }
  [class*="product-category"] #column-left .box-filter-manufacturer > li > span { padding-right: 30px !important; }
  [class*="product-category"] #column-left .box-filter > li > span::after,
  [class*="product-category"] #column-left .box-filter-manufacturer > li > span::after { content: '\f078' !important; font-family: FontAwesome !important; position: absolute !important; right: 0 !important; top: 50% !important; transform: translateY(-50%) !important; font-size: 12px !important; color: #999 !important; transition: transform 0.2s !important; }
  [class*="product-category"] #column-left .box-filter > li.spc-open > span::after,
  [class*="product-category"] #column-left .box-filter-manufacturer > li.spc-open > span::after { transform: translateY(-50%) rotate(180deg) !important; }
  /* Elimina border portocaliu din box */
  [class*="product-category"] #column-left .box-no-advanced .box-content { border: none !important; }
  [class*="product-category"] #column-left .box-filter > li > span,
  [class*="product-category"] #column-left .box-filter-manufacturer > li > span { cursor: pointer; position: relative; padding-right: 30px !important; font-size: 13px !important; font-weight: 600 !important; display: block !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; color: #333 !important; line-height: 1.4 !important; }
  [class*="product-category"] #column-left .box-filter > li > span::after,
  [class*="product-category"] #column-left .box-filter-manufacturer > li > span::after { content: '\f078'; font-family: FontAwesome; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 12px; color: #999; transition: transform 0.2s; }
  [class*="product-category"] #column-left .box-filter > li > ul,
  [class*="product-category"] #column-left .box-filter-manufacturer > li > ul { display: none; padding-top: 8px; }
  [class*="product-category"] #column-left .box-filter > li.spc-open > ul,
  [class*="product-category"] #column-left .box-filter-manufacturer > li.spc-open > ul { display: block; }
  [class*="product-category"] #column-left .box-filter > li.spc-open > span::after,
  [class*="product-category"] #column-left .box-filter-manufacturer > li.spc-open > span::after { transform: translateY(-50%) rotate(180deg); }
  /* Buton Filtrează ascuns în box */
  [class*="product-category"] #column-left .box-no-advanced #button-filter { display: none; }
  /* Afișează toate filtrele, ascunde "Mai multe..." */
  [class*="product-category"] #column-left .box-filter li li { display: list-item !important; }
  [class*="product-category"] #column-left .box-filter > li > a,
  [class*="product-category"] #column-left .box-filter-manufacturer > li > a { display: none !important; }
  /* Înlocuiește iconul trash cu text Resetează */
  [class*="product-category"] #column-left .box-filter .fa-trash { display: none; }
  [class*="product-category"] #column-left .box-filter a[data-original-title="Elimina filtrul"] { font-size: 11px; color: #e74c3c; float: none !important; margin-left: 8px; }
  [class*="product-category"] #column-left .box-filter a[data-original-title="Elimina filtrul"]::after { content: '✕'; }
  /* Grid 2 coloane pe mobil */
  .product-grid .row .col-xs-6 { width: 50%; }
  /* Bară sortare compactă */
  .product-filter .product-compare { font-size: 10px; }
  .product-filter .button-group.display { padding-top: 10px !important; }
  /* List view: stack vertical */
  .product-list .image.col-sm-3 { width: 100% !important; text-align: center; margin-bottom: 10px; }
  .product-list .name-actions.col-sm-4,
  .product-list .spc-list-info { width: 100% !important; }
  .product-list .desc.col-sm-5 { width: 100% !important; margin-top: 8px; }
}

@media (max-width: 767px) {
  [class*="product-category"] #column-left { width: 100% !important; left: 0 !important; right: auto !important; }
  .spc-drawer-footer { width: 100% !important; left: 0 !important; right: auto !important; }
}

@media (max-width: 767px) {
  /* Imagini mai mari pe mobil */
  .product.spc-card .left .image img { width: 100% !important; height: auto !important; max-height: none !important; }
  .product.spc-card .left .image { padding: 10px; }
}

@media (max-width: 480px) {
  .product.spc-card .name a { font-size: 11px; -webkit-line-clamp: 2; }
  .product.spc-card .price, .product.spc-card .price .price-new { font-size: 15px; }
  .product.spc-card .spc-card-btn { font-size: 11px; padding: 8px; }
  .product.spc-card .spc-card-rating i { font-size: 8px; }
  .product.spc-card .spc-card-stock { font-size: 9px; }
}
