/* =========================
   FA COMPANY - MƏHSULLAR SƏHİFƏSİ
   Korporativ rənglər:
   Sarı: #F8B216
   Tünd: #373435
   Ağ: #FEFEFE
   ========================= */

.products-page {
  background: #FEFEFE;
  padding: 55px 0;
  font-family: "Inter", "Arial", sans-serif;
  color: #373435;
}

.products-container {
  width: min(1520px, 94%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 270px 1fr 350px;
  gap: 28px;
}

/* =========================
   SOL KATEQORİYA BLOKU
   ========================= */

.products-sidebar,
.cart-sidebar {
  background: #FEFEFE;
  border: 1px solid rgba(55, 52, 53, 0.14);
  border-radius: 20px;
  box-shadow: 0 12px 35px rgba(55, 52, 53, 0.08);
  height: fit-content;
  position: sticky;
  top: 120px;
}

.products-sidebar {
  padding: 20px;
}

.sidebar-top,
.cart-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-top h3,
.cart-top h3 {
  font-size: 16px;
  text-transform: uppercase;
  color: #373435;
  margin-bottom: 18px;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-btn {
  width: 100%;
  border: none;
  background: transparent;
  color: #373435;
  border-radius: 13px;
  padding: 14px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s ease;
}

.category-btn span {
  min-width: 34px;
  height: 26px;
  padding: 0 8px;
  border-radius: 50px;
  background: rgba(55, 52, 53, 0.08);
  color: #373435;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.category-btn.active {
  background: #373435;
  color: #FEFEFE;
}

.category-btn.active span {
  background: #F8B216;
  color: #373435;
}

.category-btn:hover {
  background: rgba(248, 178, 22, 0.18);
}

.missing-product-box {
  margin-top: 34px;
  border: 1px solid rgba(55, 52, 53, 0.14);
  border-radius: 18px;
  padding: 20px;
  background: #fafafa;
}

.missing-product-box h4 {
  font-size: 17px;
  margin-bottom: 10px;
}

.missing-product-box p {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(55, 52, 53, 0.75);
}

/* =========================
   MƏHSUL BAŞLIĞI VƏ AXTARIŞ
   ========================= */

.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.products-toolbar h2 {
  font-size: 30px;
  color: #373435;
  margin-bottom: 6px;
}

.products-toolbar span {
  display: inline-block;
  background: rgba(248, 178, 22, 0.18);
  color: #373435;
  padding: 6px 13px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 800;
}

.search-box {
  width: 360px;
}

.search-box input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(55, 52, 53, 0.16);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 14px;
  color: #373435;
  outline: none;
}

.search-box input:focus {
  border-color: #F8B216;
  box-shadow: 0 0 0 4px rgba(248, 178, 22, 0.15);
}

/* =========================
   MƏHSUL KARTLARI
   ========================= */

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  background: #FEFEFE;
  border: 1px solid rgba(55, 52, 53, 0.13);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 32px rgba(55, 52, 53, 0.07);
  transition: 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(55, 52, 53, 0.12);
}

.product-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #f5f5f5;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-image img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
}

.brand-badge {
  display: inline-block;
  margin-top: 12px;
  background: #373435;
  color: #FEFEFE;
  padding: 5px 11px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 800;
}

.product-card h3 {
  margin: 10px 0 6px;
  font-size: 17px;
  color: #373435;
}

.product-card p {
  margin-bottom: 12px;
  font-size: 13px;
  color: rgba(55, 52, 53, 0.7);
}

.product-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
}

.qty-control {
  height: 38px;
  border: 1px solid rgba(55, 52, 53, 0.16);
  border-radius: 50px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 14px;
}

.qty-control button {
  height: 100%;
  border: none;
  background: transparent;
  color: #373435;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.qty-control button:hover {
  background: rgba(248, 178, 22, 0.2);
}

.qty-control input {
  width: 100%;
  border: none;
  outline: none;
  text-align: center;
  font-weight: 800;
  color: #373435;
  background: transparent;
}

.add-cart-btn {
  width: 100%;
  border: none;
  border-radius: 11px;
  background: #373435;
  color: #FEFEFE;
  padding: 13px 10px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.25s ease;
}

.add-cart-btn:hover {
  background: #F8B216;
  color: #373435;
}

/* =========================
   SAĞ SƏBƏT BLOKU
   ========================= */

.cart-sidebar {
  overflow: hidden;
}

.cart-top {
  padding: 20px;
  border-bottom: 1px solid rgba(55, 52, 53, 0.12);
}

.cart-top h3 {
  margin-bottom: 0;
}

.cart-top span {
  min-width: 30px;
  height: 30px;
  background: #F8B216;
  color: #373435;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.cart-items {
  padding: 8px 20px;
  max-height: 520px;
  overflow-y: auto;
}

.empty-cart {
  text-align: center;
  color: rgba(55, 52, 53, 0.65);
  padding: 30px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr 26px;
  gap: 12px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(55, 52, 53, 0.1);
}

.cart-item img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f5f5f5;
  object-fit: contain;
}

.cart-item h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.cart-item p {
  font-size: 12px;
  color: rgba(55, 52, 53, 0.65);
  margin-bottom: 8px;
}

.cart-item .qty-control {
  height: 32px;
  margin-bottom: 4px;
}

.cart-item small {
  color: rgba(55, 52, 53, 0.7);
  font-size: 12px;
}

.remove-item {
  border: none;
  background: transparent;
  color: #d11f1f;
  font-size: 22px;
  cursor: pointer;
}

.cart-bottom {
  padding: 20px;
  border-top: 1px solid rgba(55, 52, 53, 0.12);
}

.cart-bottom p {
  margin-bottom: 14px;
  color: #373435;
}

.go-order-btn {
  width: 100%;
  border: none;
  border-radius: 13px;
  background: #F8B216;
  color: #373435;
  padding: 16px;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.25s ease;
}

.go-order-btn:hover {
  background: #373435;
  color: #FEFEFE;
}

.cart-bottom small {
  display: block;
  margin-top: 10px;
  color: rgba(55, 52, 53, 0.65);
  line-height: 1.4;
}

/* =========================
   MOBİL PANEL DÜYMƏLƏRİ
   ========================= */

.mobile-products-actions {
  display: none;
}

.close-mobile-panel {
  display: none;
  border: none;
  background: transparent;
  color: #373435;
  font-size: 28px;
  cursor: pointer;
}

.mobile-overlay {
  display: none;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1250px) {
  .products-container {
    grid-template-columns: 240px 1fr;
  }

  .cart-sidebar {
    display: none;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .products-page {
    padding: 30px 0 90px;
  }

  .products-container {
    width: 94%;
    display: block;
  }

  .mobile-products-actions {
    width: 94%;
    margin: 0 auto 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .mobile-products-actions button {
    border: 1px solid rgba(55, 52, 53, 0.16);
    background: #FEFEFE;
    color: #373435;
    border-radius: 14px;
    padding: 13px;
    font-weight: 900;
    cursor: pointer;
  }

  .mobile-products-actions button:last-child {
    background: #373435;
    color: #FEFEFE;
  }

  .products-sidebar,
  .cart-sidebar {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 86%;
    max-width: 360px;
    z-index: 9999;
    border-radius: 0;
    overflow-y: auto;
    transition: 0.3s ease;
  }

  .products-sidebar {
    left: -100%;
  }

  .cart-sidebar {
    right: -100%;
  }

  .products-sidebar.active {
    left: 0;
  }

  .cart-sidebar.active {
    right: 0;
  }

  .close-mobile-panel {
    display: block;
  }

  .mobile-overlay.active {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
  }

  .products-toolbar {
    display: block;
    margin-bottom: 18px;
  }

  .products-toolbar h2 {
    font-size: 26px;
  }

  .search-box {
    width: 100%;
    margin-top: 16px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 520px) {
  .product-card {
    padding: 10px;
    border-radius: 16px;
  }

  .product-card h3 {
    font-size: 14px;
  }

  .product-card p,
  .product-card label {
    font-size: 11px;
  }

  .brand-badge {
    font-size: 10px;
    padding: 4px 9px;
  }

  .qty-control {
    height: 34px;
    grid-template-columns: 36px 1fr 36px;
  }

  .add-cart-btn {
    font-size: 12px;
    padding: 11px 8px;
  }
}