/* -------------------------------------------------------------
 * Corporate Light Inventory Showcase & Product Catalog CSS
 * ------------------------------------------------------------- */

.inventory-header {
  padding: 4rem 0 2rem 0;
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}

/* Grand Multi-Condition Search & Filter Suite CSS */
.advanced-filter-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.8rem 2rem;
  margin: 2rem 0 2.5rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.grand-search-box {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

.grand-search-input {
  width: 100%;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 3rem 1rem 3.2rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: #0f172a;
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.grand-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.grand-search-box .search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: #cbd5e1;
  color: #0f172a;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.clear-search-btn:hover {
  background: #dc2626;
  color: #ffffff;
}

.filter-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.multi-cat-container {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px dashed #e2e8f0;
}

.cat-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 0.55rem 1.1rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  user-select: none;
}

.cat-pill .pill-check {
  display: none;
  font-weight: 800;
}

.cat-pill:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.cat-pill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.cat-pill.selected {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.cat-pill.selected .pill-check {
  display: inline;
}

.filter-controls-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-select:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.price-range-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.filter-input-sm {
  width: 100%;
  padding: 0.65rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.85rem;
  font-weight: 600;
  box-sizing: border-box;
}

.filter-input-sm:focus {
  outline: none;
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.range-dash {
  color: #94a3b8;
  font-weight: 700;
}

.filter-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 1rem;
}

.count-badge {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
}

.btn-reset-filters {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-reset-filters:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.no-results-card {
  text-align: center;
  padding: 4rem 2rem;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.no-results-card h3 {
  color: #0f172a;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
}

.no-results-card p {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

@media (max-width: 1024px) {
  .filter-controls-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .filter-controls-grid {
    grid-template-columns: 1fr;
  }
  .advanced-filter-panel {
    padding: 1.2rem;
  }
}

/* Product Cards Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding: 2rem 0 6rem 0;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-subtle);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-red);
  box-shadow: var(--shadow-elevated);
}

.product-thumb-wrap {
  aspect-ratio: 1 / 1;
  width: 100%;
  position: relative;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

.product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-thumb {
  transform: scale(1.05);
}

.product-thumb-wrap .stock-badge {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
}

.stock-badge, .modal-stock-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
}

.modal-stock-badge {
  position: static;
  display: inline-block;
  padding: 0.25rem 0.7rem;
}

.badge-in_stock {
  background: rgba(16, 185, 129, 0.5);
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-low_stock {
  background: rgba(245, 158, 11, 0.5);
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-pre_order {
  background: rgba(124, 58, 237, 0.5);
  color: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-out_of_stock {
  background: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-content {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-cat {
  font-size: 0.8rem;
  color: var(--brand-red);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.product-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: auto;
  margin-bottom: 1rem;
}

.regular-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
  margin-left: 0.5rem;
}

.btn-detail {
  width: 100%;
  justify-content: center;
}

/* Enhanced 1080x1080 Specification View Modal Layout */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 2.2rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: #0f172a;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.modal-detail-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* 1:1 Square Frame for 1080x1080 Product Image Presentation */
.modal-img-container {
  aspect-ratio: 1 / 1;
  width: 100%;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.modal-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.modal-img-container:hover .modal-product-img {
  transform: scale(1.06);
}

/* Modal Multi-Image Gallery Strip */
.modal-gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.6rem;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-behavior: smooth;
}

.modal-thumb-btn {
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  padding: 3px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.modal-thumb-btn:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.modal-thumb-btn.active {
  border-color: #dc2626;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-2px);
}

.modal-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.modal-info-container {
  display: flex;
  flex-direction: column;
}

.modal-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.modal-product-title {
  color: #0f172a;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.modal-price-stock-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}

.modal-product-price {
  font-size: 1.85rem;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.modal-stock-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-sku-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 1.2rem;
}

.modal-sku-tag code {
  background: #f1f5f9;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  color: #0f172a;
  font-family: monospace;
}

.modal-product-desc {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.specs-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  background: #f8fafc;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.specs-table tr {
  border-bottom: 1px solid #e2e8f0;
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td.spec-key {
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #0f172a;
  width: 38%;
  font-size: 0.88rem;
  background: #f1f5f9;
}

.specs-table td.spec-val {
  padding: 0.75rem 1rem;
  color: #334155;
  font-size: 0.88rem;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}
