/*
 * JIBREENTEC - Products Page Styles
 * Innovative, space-efficient design with collapsible filters
 */

/* ===========================================
   PAGE HEADER - Modern JIBREENTEC theme
   =========================================== */

.products-page-header {
  position: relative;
  background: linear-gradient(160deg, #f0f4f8 0%, #e8eef5 30%, #dce6f0 100%);
  overflow: hidden;
  padding-top: 5rem;
  border-bottom: 1px solid rgba(0, 56, 127, 0.06);
}

@media (min-width: 640px) {
  .products-page-header {
    padding-top: 0;
  }
}

.products-header-background {
  background:
    radial-gradient(ellipse 100% 80% at 0% 50%, rgba(0, 56, 127, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 100% 30%, rgba(238, 124, 1, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 70% 100%, rgba(0, 56, 127, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* Orange dots pattern - JIBREENTEC hero */
.products-header-dots {
  background-image: radial-gradient(circle, rgba(238, 124, 1, 0.35) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.9;
}

/* Decorative shapes - brand accent */
.products-header-shape {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.4;
}

.products-header-shape--top {
  width: 20rem;
  height: 20rem;
  top: -8rem;
  right: -4rem;
  background: radial-gradient(circle, rgba(238, 124, 1, 0.15) 0%, transparent 70%);
}

.products-header-shape--right {
  width: 16rem;
  height: 16rem;
  bottom: -6rem;
  right: -2rem;
  background: radial-gradient(circle, rgba(0, 56, 127, 0.12) 0%, transparent 70%);
}

[dir="rtl"] .products-header-shape--top {
  right: auto;
  left: -4rem;
}

[dir="rtl"] .products-header-shape--right {
  right: auto;
  left: -2rem;
}

.products-header-content {
  position: relative;
}

.products-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  margin-bottom: 1.25rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  border: 1px solid rgba(0, 56, 127, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.products-breadcrumb-link {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease, font-weight 0.2s ease;
}

.products-breadcrumb-link:hover {
  color: #00387F;
  font-weight: 500;
}

.products-breadcrumb-separator {
  color: #cbd5e1;
  font-weight: 300;
}

.products-breadcrumb-current {
  color: #0f172a;
  font-weight: 600;
}

.products-page-title {
  font-size: clamp(1.875rem, 4.5vw, 2.875rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.875rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  position: relative;
  display: inline-block;
}

.products-page-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 5rem;
  height: 4px;
  background: linear-gradient(90deg, #00387F 0%, #0056a6 40%, #EE7C01 100%);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 56, 127, 0.2);
}

[dir="rtl"] .products-page-title::after {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, #00387F 0%, #0056a6 40%, #EE7C01 100%);
}

.products-page-subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: #475569;
  line-height: 1.65;
  max-width: 32rem;
  margin-top: 0.5rem;
}

/* ===========================================
   MAIN LAYOUT
   =========================================== */

.products-page-main {
  min-height: 60vh;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 35%, #e2e8f0 100%);
}

.products-page-main.bg-neutral-50 {
  background: linear-gradient(180deg, #fafafa 0%, #f4f4f5 35%, #e4e4e7 100%);
}

.products-page-main .container {
  padding-top: 1.25rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .products-page-main .container {
    padding-top: 1.5rem;
    padding-bottom: 2rem;
  }
}

.products-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.products-main {
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 1rem 1.25rem;
  position: relative;
  transition: opacity 0.2s ease;
  overflow: visible;
}

.products-main.products-applying {
  opacity: 0.7;
}

@media (min-width: 640px) {
  .products-main {
    padding: 1.25rem 1.5rem;
  }
}

/* ===========================================
   FILTER TOGGLE (inline in toolbar)
   =========================================== */

.products-filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.products-filter-toggle-btn--inline {
  margin-bottom: 0;
}

.products-filter-toggle-icon {
  width: 1.125rem;
  height: 1.125rem;
}

.products-filter-toggle-btn:hover {
  background: #f8fafc;
  border-color: #00387F;
  color: #00387F;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 56, 127, 0.15);
}

.products-filter-toggle-btn.active {
  background: linear-gradient(135deg, #00387F, #002A60);
  border-color: #00387F;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 56, 127, 0.35);
}

.products-filter-count-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  background: #EE7C01;
  color: #ffffff;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-inline-start: 0.25rem;
}

.products-filter-count-badge:not(:empty) {
  display: inline-flex;
}

.products-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.products-filter-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ===========================================
   COLLAPSIBLE SIDEBAR FILTERS
   =========================================== */

.products-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: #ffffff;
}

[dir="rtl"] .products-sidebar {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.products-sidebar.open {
  transform: translateX(0);
}

[dir="rtl"] .products-sidebar.open {
  transform: translateX(0);
}

.products-sidebar-inner {
  background: #ffffff;
  height: 100%;
  min-height: 100vh;
  padding: 1.5rem;
  padding-bottom: 2rem;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

[dir="rtl"] .products-sidebar-inner {
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.products-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f5f9;
}

.products-sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.products-sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.products-sidebar-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Filter Section */
.products-filter-section {
  margin-bottom: 2rem;
}

.products-filter-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}

.products-filter-title::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, #EE7C01, transparent);
  border-radius: 2px;
}

[dir="rtl"] .products-filter-title::after {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, #EE7C01, transparent);
}

.products-filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.products-filter-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.products-filter-item:hover {
  background: #f8fafc;
}

.products-filter-item:has(.products-filter-input:checked),
.products-filter-item:has(.products-filter-checkbox:checked) {
  background: rgba(0, 56, 127, 0.05);
  border-left: 3px solid #00387F;
}

[dir="rtl"] .products-filter-item:has(.products-filter-input:checked),
[dir="rtl"] .products-filter-item:has(.products-filter-checkbox:checked) {
  border-left: none;
  border-right: 3px solid #00387F;
}

.products-filter-sublist {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
}

[dir="rtl"] .products-filter-sublist {
  margin-left: 0;
  margin-right: 1.5rem;
}

.products-filter-subitem {
  padding-left: 0.5rem;
}

[dir="rtl"] .products-filter-subitem {
  padding-left: 0;
  padding-right: 0.5rem;
}

.products-filter-input,
.products-filter-checkbox {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
  accent-color: #00387F;
}

.products-filter-label {
  flex: 1;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  transition: color 0.3s ease;
}

.products-filter-item:hover .products-filter-label,
.products-filter-item:has(.products-filter-input:checked) .products-filter-label,
.products-filter-item:has(.products-filter-checkbox:checked) .products-filter-label {
  color: #00387F;
  font-weight: 500;
}

/* Price Range */
.products-price-range {
  padding: 0.5rem 0;
}

.products-price-inputs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.products-price-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #0f172a;
  transition: all 0.3s ease;
}

.products-price-input:focus {
  outline: none;
  border-color: #00387F;
  box-shadow: 0 0 0 3px rgba(0, 56, 127, 0.1);
}

.products-price-input::placeholder {
  color: #94a3b8;
}

.products-price-separator {
  color: #94a3b8;
  font-weight: 500;
}

/* Filter Actions */
.products-filter-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #f1f5f9;
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding-bottom: 1rem;
  margin-bottom: 0;
}

.products-filter-btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.products-filter-btn-primary {
  background: linear-gradient(135deg, #00387F, #002A60);
  color: #ffffff;
}

.products-filter-btn-primary:hover {
  background: linear-gradient(135deg, #002A60, #001f47);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 56, 127, 0.3);
}

.products-filter-btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 2px solid #e2e8f0;
}

.products-filter-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Active Filters Bar */
.products-active-filters-bar {
  display: none;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.5rem 0;
  background: transparent;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.products-active-filters-bar.has-filters {
  display: flex;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: #475569;
}

.active-filter-tag .remove-filter {
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.3s ease;
}

.active-filter-tag .remove-filter:hover {
  color: #dc2626;
}

/* ===========================================
   PRODUCTS TOOLBAR
   =========================================== */

.products-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.625rem 0;
  margin-bottom: 0.75rem;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.75rem;
  overflow: visible;
}

@media (min-width: 640px) {
  .products-toolbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem;
  }
}

[dir="rtl"] .products-toolbar {
  border-left: none;
}

/* RTL desktop: put Sort on the right so the native dropdown opens leftward and isn't cut off */
@media (min-width: 640px) {
  [dir="rtl"] .products-toolbar .products-sort {
    order: -1;
  }
}

.products-count {
  font-size: 0.8125rem;
  color: #64748b;
  flex-shrink: 0;
  white-space: nowrap;
}

.products-count strong {
  color: #0f172a;
  font-weight: 700;
}

/* Search in toolbar */
.products-search-toolbar {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1 1 180px;
  min-width: 0;
  max-width: 280px;
}

@media (min-width: 640px) {
  .products-search-toolbar {
    flex: 1 1 auto;
    max-width: 320px;
  }
}
.products-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.products-search-input:focus {
  outline: none;
  border-color: #00387F;
  box-shadow: 0 0 0 3px rgba(0, 56, 127, 0.12);
}
.products-search-input::placeholder {
  color: #94a3b8;
}
.products-search-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: #00387F;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.products-search-btn:hover {
  background: #002d66;
}
.products-search-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: #64748b;
  background: #f1f5f9;
  transition: color 0.2s ease, background 0.2s ease;
}
.products-search-clear-btn:hover {
  color: #0f172a;
  background: #e2e8f0;
}
.products-search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: #e6f0f9;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 56, 127, 0.15);
}
.products-search-results-text {
  font-size: 0.875rem;
  color: #0f172a;
  margin: 0;
  font-weight: 500;
}
.products-search-clear {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #00387F;
  text-decoration: none;
}
.products-search-clear:hover {
  text-decoration: underline;
}

.products-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  overflow: visible;
}

.products-sort-label {
  font-size: 0.875rem;
  color: #475569;
  font-weight: 500;
}

.products-sort-select {
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  background-color: #ffffff;
  color: #0f172a;
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300387F'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  min-width: 0;
}

[dir="rtl"] .products-sort-select {
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  background-position: left 0.75rem center;
}

.products-sort-select:focus {
  outline: none;
  border-color: #00387F;
  box-shadow: 0 0 0 3px rgba(0, 56, 127, 0.1);
}

/* ===========================================
   PRODUCTS GRID
   =========================================== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

/* Few products (1–3): center grid and cap width so cards don't feel lost */
.products-grid--few {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

[dir="rtl"] .products-grid--few {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1024px) {
  .products-grid--few .product-card-enhanced--highlight {
    grid-column: 1 / -1;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
    justify-self: center;
  }

  [dir="rtl"] .products-grid--few .product-card-enhanced--highlight {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ===========================================
   PRODUCTS SKELETON LOADING
   =========================================== */

body.page-loaded .products-skeleton {
  display: none !important;
}

.products-skeleton {
  margin-bottom: 1.5rem;
}

.products-skeleton-card {
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
}

.products-skeleton-card__image {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(
    90deg,
    #e5e7eb 25%,
    #f3f4f6 50%,
    #e5e7eb 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.products-skeleton-card__body {
  padding: 0.625rem 0.75rem;
}

.products-skeleton-card__line {
  height: 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(
    90deg,
    #e5e7eb 25%,
    #f3f4f6 50%,
    #e5e7eb 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.products-skeleton-card__line:last-child {
  margin-bottom: 0;
}

.products-skeleton-card__line--short {
  width: 40%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.products-content-load {
  min-height: 0;
}

/* ===========================================
   ENHANCED PRODUCT CARD
   =========================================== */

.product-card-enhanced {
  background: #ffffff;
  border-radius: 0.5rem;
  overflow: visible;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #e5e7eb;
}

.product-card-enhanced::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0.5rem;
  padding: 1px;
  background: linear-gradient(135deg, #00387F, #EE7C01, #00387F);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
  pointer-events: none;
}

.product-card-enhanced:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 56, 127, 0.08);
}

.product-card-enhanced:hover::before {
  opacity: 1;
}

.product-card-image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #f9fafb;
  border-radius: 0.5rem 0.5rem 0 0;
}

.product-card-image-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  filter: brightness(1);
}

.product-card-enhanced:hover .product-card-image {
  transform: scale(1.04);
  filter: brightness(1.02);
}

/* Shimmer Effect on Image */
.product-card-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 2;
  pointer-events: none;
}

.product-card-enhanced:hover .product-card-image-wrapper::after {
  left: 100%;
}

.product-card-badges {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

[dir="rtl"] .product-card-badges {
  left: auto;
  right: 0.5rem;
}

.product-card-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
  transform: scale(1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.product-card-enhanced:hover .product-card-badge {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.product-badge-sale {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
  animation: pulse-badge 2s ease-in-out infinite;
}

.product-badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
  50% {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), 0 0 0 4px rgba(220, 38, 38, 0.1);
  }
}

/* Quick Actions - Top Right Position */
.product-card-quick-actions {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  opacity: 0.9;
  transform: translateX(6px);
  transition: all 0.25s ease;
}

[dir="rtl"] .product-card-quick-actions {
  right: auto;
  left: 0.75rem;
  transform: translateX(-8px);
}

.product-card-enhanced:hover .product-card-quick-actions {
  opacity: 1;
  transform: translateX(0);
}

[dir="rtl"] .product-card-enhanced:hover .product-card-quick-actions {
  transform: translateX(0);
}

/* Make buttons more visible even when not hovering */
@media (min-width: 1024px) {
  .product-card-quick-actions {
    opacity: 0.7;
  }
}

.product-card-quick-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0.625rem;
  color: #0f172a;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: visible;
}

.product-card-quick-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00387F, #EE7C01);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 0.625rem;
  z-index: 0;
}

/* Tooltip — positioned to the LEFT of buttons (stays inside card) */
.product-card-quick-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 50%;
  right: calc(100% + 0.5rem);
  left: auto;
  bottom: auto;
  transform: translateY(-50%) translateX(4px);
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 0.4rem 0.65rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 25;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* RTL: tooltip to the RIGHT of buttons */
[dir="rtl"] .product-card-quick-btn[data-tooltip]::after {
  right: auto;
  left: calc(100% + 0.5rem);
  transform: translateY(-50%) translateX(-4px);
}

.product-card-quick-btn[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

[dir="rtl"] .product-card-quick-btn[data-tooltip]:hover::after {
  transform: translateY(-50%) translateX(0);
}

.product-card-quick-icon {
  width: 0.875rem;
  height: 0.875rem;
  position: relative;
  z-index: 2;
  transition: all 0.2s ease;
  stroke-width: 2;
}

.product-card-quick-btn:hover {
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 56, 127, 0.3), 0 2px 6px rgba(0, 0, 0, 0.2);
  border-color: transparent;
}

.product-card-quick-btn:hover::before {
  opacity: 1;
}

.product-card-quick-btn:hover .product-card-quick-icon {
  transform: scale(1.1);
}

.product-card-quick-btn:active {
  transform: scale(1.02);
}

/* Specific button styles */
.product-card-quick-view:hover {
  box-shadow: 0 6px 16px rgba(0, 56, 127, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.product-card-quick-cart:hover {
  box-shadow: 0 6px 16px rgba(238, 124, 1, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.product-card-quick-cart::before {
  background: linear-gradient(135deg, #EE7C01, #D46F00);
}

.product-card-quick-quote:hover {
  box-shadow: 0 6px 16px rgba(0, 56, 127, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.product-card-quick-quote::before {
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
}

/* Hover Overlay for Additional Effects */
.product-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 100%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}

.product-card-enhanced:hover .product-card-overlay {
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.4) 100%);
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.product-card-body {
  padding: 0.625rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  transition: background 0.2s ease;
  border-radius: 0 0 0.5rem 0.5rem;
}

.product-card-enhanced:hover .product-card-body {
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
}

.product-card-category {
  font-size: 0.65rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.product-card-enhanced:hover .product-card-category {
  color: #00387F;
  transform: translateX(2px);
}

[dir="rtl"] .product-card-enhanced:hover .product-card-category {
  transform: translateX(-2px);
}

.product-card-title-link {
  text-decoration: none;
  display: block;
  margin-bottom: 0.375rem;
  transition: color 0.2s ease;
}

.product-card-enhanced:hover .product-card-title-link {
  transform: translateX(2px);
}

[dir="rtl"] .product-card-enhanced:hover .product-card-title-link {
  transform: translateX(-2px);
}

.product-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  margin: 0;
  position: relative;
}

.product-card-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #00387F, #EE7C01);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-enhanced:hover .product-card-title {
  color: #00387F;
}

.product-card-enhanced:hover .product-card-title::after {
  width: 100%;
}

.product-card-code {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.25rem 0 0;
  line-height: 1.3;
}

.product-card-price-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  transition: color 0.2s ease;
}


.product-card-price-current {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  transition: color 0.2s ease;
  position: relative;
}

.product-card-enhanced:hover .product-card-price-current {
  color: #00387F;
}

.product-card-price-original {
  font-size: 0.75rem;
  color: #9ca3af;
  text-decoration: line-through;
  transition: opacity 0.2s ease;
}

.product-card-enhanced:hover .product-card-price-original {
  opacity: 0.7;
}

/* ===========================================
   EMPTY STATE
   =========================================== */

.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.products-empty-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

.products-empty-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.products-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.products-empty-text {
  color: #64748b;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

/* ===========================================
   PAGINATION
   =========================================== */

.products-pagination-wrapper {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-item {
  min-width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-item:hover:not(.disabled):not(.active) {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #00387F;
}

.pagination-item.active {
  background: linear-gradient(135deg, #00387F, #002A60);
  border-color: #00387F;
  color: #ffffff;
}

.pagination-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===========================================
   RESPONSIVE ENHANCEMENTS
   =========================================== */

@media (max-width: 639px) {
  .products-page-header {
    padding-top: 6rem;
    padding-bottom: 2.5rem;
  }
  
  .products-page-header .container {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .products-breadcrumb {
    margin-bottom: 1.5rem;
  }
  
  /* Mobile Hover Optimizations */
  .product-card-enhanced:hover {
    transform: translateY(-2px);
  }
  
  .product-card-enhanced:hover .product-card-image {
    transform: scale(1.04);
  }
  
  .product-card-action-btn {
    width: 2rem;
    height: 2rem;
  }
  
  .product-card-quick-btn {
    width: 1.75rem;
    height: 1.75rem;
  }

  /* Hide tooltips on touch devices */
  .product-card-quick-btn[data-tooltip]::after {
    display: none;
  }
  
  /* Touch-friendly hover states */
  @media (hover: hover) {
    .product-card-enhanced:hover {
      transform: translateY(-2px);
    }
  }
}

  .products-breadcrumb {
    font-size: 0.8125rem;
  }

  .products-page-title {
    font-size: 1.5rem;
  }

  .products-page-subtitle {
    font-size: 0.875rem;
  }

  .products-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0 0.625rem;
    gap: 0.5rem;
  }

  .products-sort {
    width: 100%;
  }

  .products-sort-select {
    flex: 1;
    width: 100%;
  }

  .products-grid {
    gap: 0.75rem;
  }

  .product-card-body {
    padding: 0.5rem 0.625rem;
  }

  .product-card-title {
    font-size: 0.75rem;
  }

  .product-card-price-current {
    font-size: 0.9375rem;
  }

  .products-sidebar {
    max-width: 100%;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .products-grid {
    gap: 1rem;
  }
}

/* Custom Scrollbar */
.products-sidebar-inner::-webkit-scrollbar {
  width: 6px;
}

.products-sidebar-inner::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.products-sidebar-inner::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.products-sidebar-inner::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Additional Hover Enhancements */
.product-card-enhanced {
  will-change: transform;
}

.product-card-image {
  will-change: transform;
}

/* Glow Effect on Hover */
.product-card-enhanced::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #00387F, #EE7C01);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
  filter: blur(8px);
  pointer-events: none;
}

.product-card-enhanced:hover::after {
  opacity: 0.3;
}

/* Smooth Stagger Animation for Quick Actions */
.product-card-quick-btn:nth-child(1) {
  transition-delay: 0s;
}

.product-card-quick-btn:nth-child(2) {
  transition-delay: 0.05s;
}

.product-card-quick-btn:nth-child(3) {
  transition-delay: 0.1s;
}

.product-card-enhanced:hover .product-card-quick-btn:nth-child(1) {
  transition-delay: 0.1s;
}

.product-card-enhanced:hover .product-card-quick-btn:nth-child(2) {
  transition-delay: 0.15s;
}

.product-card-enhanced:hover .product-card-quick-btn:nth-child(3) {
  transition-delay: 0.2s;
}

/* Ensure buttons don't overlap with badges */
.product-card-badges {
  z-index: 12;
}

.product-card-quick-actions {
  z-index: 15;
}

/* Tooltip arrow - using box-shadow trick */
.product-card-quick-btn[data-tooltip]:hover::after {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 0 0 0 rgba(15, 23, 42, 0.95);
}

/* Enhanced tooltip with better visibility */
.product-card-quick-btn[data-tooltip]::after {
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: 0.025em;
}

/* ===========================================
   PRODUCT DETAIL PAGE
   =========================================== */

/* Breadcrumb */
.product-detail-breadcrumb {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: 1rem 0;
  padding-top: 5rem;
  border-bottom: 1px solid #e2e8f0;
}

@media (min-width: 640px) {
  .product-detail-breadcrumb {
    padding-top: 6rem;
  }
}

@media (min-width: 1024px) {
  .product-detail-breadcrumb {
    padding-top: 7rem;
  }
}

.product-breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.product-breadcrumb-link {
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.product-breadcrumb-link:hover {
  color: #00387F;
  transform: translateX(2px);
}

[dir="rtl"] .product-breadcrumb-link:hover {
  transform: translateX(-2px);
}

.product-breadcrumb-separator {
  color: #cbd5e1;
  font-weight: 300;
}

.product-breadcrumb-current {
  color: #0f172a;
  font-weight: 600;
}

/* Main Section */
.product-detail-section {
  background: #ffffff;
  min-height: 60vh;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .product-detail-layout {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* Gallery */
.product-gallery-wrapper {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.product-main-image-container {
  margin-bottom: 1.5rem;
}

.product-main-image-wrapper {
  position: relative;
  aspect-ratio: 1;
  border-radius: 1.5rem;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-main-image-wrapper:hover {
  box-shadow: 0 8px 30px rgba(0, 56, 127, 0.15);
  transform: translateY(-2px);
}

.product-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: zoom-in;
}

.product-main-image-wrapper:hover .product-main-image {
  transform: scale(1.05);
}

/* Clickable main image: click anywhere to open lightbox */
.product-main-image-clickable {
  cursor: pointer;
}

/* Badges */
.product-badge-discount,
.product-badge-new {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  animation: badgePulse 2s ease-in-out infinite;
}

[dir="rtl"] .product-badge-discount,
[dir="rtl"] .product-badge-new {
  left: auto;
  right: 1.25rem;
}

.product-badge-discount {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  color: #ffffff;
}

.product-badge-new {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
}

.product-badge-text {
  display: block;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Zoom Button */
.product-zoom-btn {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 3rem;
  height: 3rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

[dir="rtl"] .product-zoom-btn {
  right: auto;
  left: 1.25rem;
}

.product-zoom-btn:hover {
  background: linear-gradient(135deg, #00387F, #EE7C01);
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 6px 20px rgba(0, 56, 127, 0.3);
}

.product-zoom-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5;
}

/* Thumbnails */
.product-thumbnails-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.product-thumbnails-container::-webkit-scrollbar {
  height: 6px;
}

.product-thumbnails-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.product-thumbnails-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.product-thumbnails-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.product-thumbnails-scroll {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.product-thumbnail {
  position: relative;
  flex-shrink: 0;
  width: 5rem;
  height: 5rem;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f8fafc;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.product-thumbnail:hover {
  border-color: #00387F;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 56, 127, 0.2);
}

.product-thumbnail-active {
  border-color: #00387F;
  box-shadow: 0 0 0 3px rgba(0, 56, 127, 0.1), 0 4px 12px rgba(0, 56, 127, 0.2);
}

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

.product-thumbnail:hover .product-thumbnail-image {
  transform: scale(1.1);
}

.product-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.product-thumbnail:hover .product-thumbnail-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.product-thumbnail-active .product-thumbnail-overlay {
  background: rgba(0, 56, 127, 0.1);
}

/* Product Info */
.product-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.product-sku {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.product-sku-value {
  color: #0f172a;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.product-title {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

@media (min-width: 768px) {
  .product-title {
    font-size: 2.5rem;
  }
}

.product-category-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #00387F;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
}

.product-category-link:hover {
  color: #EE7C01;
  transform: translateX(2px);
}

[dir="rtl"] .product-category-link:hover {
  transform: translateX(-2px);
}

.product-category-icon {
  width: 1rem;
  height: 1rem;
}

/* Price */
.product-price-container {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.product-price-current {
  font-size: 2.5rem;
  font-weight: 700;
  color: #00387F;
  line-height: 1;
}

.product-price-original {
  font-size: 1.5rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.product-price-badge {
  padding: 0.375rem 0.75rem;
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #dc2626;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.product-short-description {
  font-size: 1.125rem;
  color: #475569;
  line-height: 1.7;
  margin: 1.25rem 0;
}

/* Stock Status */
.product-stock-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  margin: 1.25rem 0;
}

.product-stock-indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  animation: stockPulse 2s ease-in-out infinite;
}

.product-stock-in {
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.product-stock-out {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2);
}

@keyframes stockPulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.product-stock-text {
  font-weight: 600;
  font-size: 0.9375rem;
}

.product-stock-text-in {
  color: #059669;
}

.product-stock-text-out {
  color: #dc2626;
}

/* Actions */
.product-actions-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.product-quantity-wrapper {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #ffffff;
}

.product-quantity-btn {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-quantity-btn:hover {
  background: #f8fafc;
  color: #00387F;
}

.product-quantity-icon {
  width: 1rem;
  height: 1rem;
  stroke-width: 2.5;
}

.product-quantity-input {
  width: 3rem;
  height: 2.5rem;
  min-width: 2.5rem;
  text-align: center;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
}

.product-quantity-input:focus {
  outline: none;
  background: #f8fafc;
}

.product-btn-primary,
.product-btn-secondary {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
}

.product-btn-primary {
  background: linear-gradient(135deg, #00387F, #002A60);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 56, 127, 0.3);
}

.product-btn-primary:hover {
  background: linear-gradient(135deg, #002A60, #001f47);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 56, 127, 0.4);
}

.product-btn-secondary {
  background: #ffffff;
  color: #00387F;
  border: 2px solid #00387F;
}

.product-btn-secondary:hover {
  background: #00387F;
  color: #ffffff;
  transform: translateY(-2px);
}

.product-btn-icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke-width: 2.5;
}

/* Share */
.product-share-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.product-share-label {
  font-size: 0.9375rem;
  color: #64748b;
  font-weight: 500;
}

.product-share-buttons {
  display: flex;
  gap: 0.75rem;
}

.product-share-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 0.625rem;
  color: #64748b;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.product-share-buttons a.product-share-btn {
  text-decoration: none;
}

.product-share-btn:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-share-facebook:hover {
  background: #1877f2;
  color: #ffffff;
  border-color: #1877f2;
}

.product-share-twitter:hover,
.product-share-x:hover {
  background: #0f1419;
  color: #ffffff;
  border-color: #0f1419;
}

.product-share-whatsapp:hover {
  background: #25d366;
  color: #ffffff;
  border-color: #25d366;
}

.product-share-instagram:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #ffffff;
  border-color: transparent;
}

.product-share-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Share toast (Instagram copy feedback) - matches main toast styling */
.product-share-toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: max(1.5rem, env(safe-area-inset-bottom, 1rem));
  margin: 0 auto;
  max-width: 24rem;
  transform: translateY(1rem);
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.product-share-toast-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 640px) {
  .product-share-toast {
    left: 50%;
    right: auto;
    width: auto;
    transform: translateX(-50%) translateY(1rem);
    padding: 0.75rem 1.25rem;
  }
  .product-share-toast-visible {
    transform: translateX(-50%) translateY(0);
  }
}

/* Tabs */
.product-tabs-container {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid #e2e8f0;
}

.product-tabs-header {
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 2rem;
}

.product-tabs-nav {
  display: flex;
  gap: 2rem;
}

.product-tab-btn {
  padding: 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #64748b;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.product-tab-btn:hover {
  color: #00387F;
}

.product-tab-active {
  color: #00387F;
  border-bottom-color: #00387F;
}

.product-tabs-content {
  min-height: 200px;
}

.product-tab-panel {
  animation: fadeInUp 0.4s ease;
}

.product-tab-panel-hidden {
  display: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-description-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #475569;
}

.product-description-content p {
  margin-bottom: 1.5rem;
}

.product-no-specs {
  color: #94a3b8;
  font-style: italic;
  text-align: center;
  padding: 3rem;
}

/* Lightbox */
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.product-lightbox-open {
  opacity: 1;
  visibility: visible;
}

.product-lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-lightbox-close,
.product-lightbox-prev,
.product-lightbox-next {
  position: absolute;
  z-index: 10000;
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-lightbox-close {
  top: 2rem;
  right: 2rem;
}

[dir="rtl"] .product-lightbox-close {
  right: auto;
  left: 2rem;
}

.product-lightbox-prev {
  left: 2rem;
}

.product-lightbox-next {
  right: 2rem;
}

[dir="rtl"] .product-lightbox-prev {
  left: auto;
  right: 2rem;
}

[dir="rtl"] .product-lightbox-next {
  right: auto;
  left: 2rem;
}

.product-lightbox-close:hover,
.product-lightbox-prev:hover,
.product-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.product-lightbox-close svg,
.product-lightbox-prev svg,
.product-lightbox-next svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2.5;
}

.product-lightbox-content {
  position: relative;
  z-index: 10001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.product-lightbox-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: lightboxFadeIn 0.4s ease;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.product-lightbox-counter {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Related Products - You May Also Like */
.product-related-section {
  background: linear-gradient(160deg, #f1f5f9 0%, #f8fafc 50%, #ffffff 100%);
  padding: 3rem 0 3.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.product-related-section .container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.product-related-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 0 auto 2.25rem;
  max-width: 28ch;
  line-height: 1.3;
  position: relative;
  padding-bottom: 0.75rem;
}

.product-related-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, transparent, #0ea5e9, transparent);
  border-radius: 2px;
}

.product-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

/* Responsive */
@media (max-width: 1023px) {
  .product-gallery-wrapper {
    position: static;
  }
  
  .product-main-image-wrapper {
    border-radius: 1rem;
  }
  
  .product-title {
    font-size: 1.75rem;
  }
  
  .product-price-current {
    font-size: 2rem;
  }
  
  .product-actions-container {
    flex-direction: column;
  }
  
  .product-btn-primary,
  .product-btn-secondary {
    width: 100%;
  }
  
  .product-lightbox-prev,
  .product-lightbox-next {
    width: 3rem;
    height: 3rem;
  }
  
  .product-lightbox-prev {
    left: 1rem;
  }
  
  .product-lightbox-next {
    right: 1rem;
  }
  
  [dir="rtl"] .product-lightbox-prev {
    left: auto;
    right: 1rem;
  }
  
  [dir="rtl"] .product-lightbox-next {
    right: auto;
    left: 1rem;
  }
}

@media (max-width: 639px) {
  .product-detail-breadcrumb {
    padding: 0.75rem 0;
    padding-top: 5rem;
  }
  
  .product-breadcrumb-nav {
    font-size: 0.8125rem;
  }
  
  .product-detail-layout {
    gap: 1.5rem;
  }
  
  .product-main-image-wrapper {
    border-radius: 0.75rem;
  }
  
  .product-thumbnail {
    width: 4rem;
    height: 4rem;
  }
  
  .product-title {
    font-size: 1.5rem;
  }
  
  .product-price-current {
    font-size: 1.75rem;
  }
  
  .product-price-original {
    font-size: 1.25rem;
  }
  
  .product-short-description {
    font-size: 1rem;
    margin: 0.75rem 0;
  }
  
  .product-tabs-container {
    margin-top: 1rem;
    padding-top: 1.25rem;
  }
  
  .product-tabs-nav {
    gap: 0.5rem;
  }
  
  .product-tab-btn {
    font-size: 0.9375rem;
    padding: 0.5rem 0.75rem;
  }
  
  /* Tighter stock & actions section on mobile */
  .product-stock-status {
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    gap: 0.5rem;
  }
  
  .product-stock-text {
    font-size: 0.875rem;
  }
  
  .product-actions-container {
    margin: 0.75rem 0;
    gap: 0.75rem;
  }
  
  /* Compact quantity counter - smaller and clean */
  .product-quantity-wrapper {
    border-radius: 0.5rem;
    border-width: 1px;
  }
  
  .product-quantity-btn {
    width: 2.25rem;
    height: 2.25rem;
  }
  
  .product-quantity-icon {
    width: 0.875rem;
    height: 0.875rem;
  }
  
  .product-quantity-input {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.25rem;
    font-size: 0.875rem;
  }
  
  .product-btn-primary,
  .product-btn-secondary {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    min-width: 0;
    border-radius: 0.5rem;
  }
  
  .product-btn-icon {
    width: 1.125rem;
    height: 1.125rem;
  }
  
  .product-share-container {
    padding-top: 0.75rem;
    gap: 0.5rem;
  }
  
  .product-share-label {
    font-size: 0.875rem;
  }
  
  .product-share-btn {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .product-lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }
  
  [dir="rtl"] .product-lightbox-close {
    right: auto;
    left: 1rem;
  }
  
  .product-lightbox-prev,
  .product-lightbox-next {
    width: 2.5rem;
    height: 2.5rem;
  }
  
  .product-lightbox-prev {
    left: 0.5rem;
  }
  
  .product-lightbox-next {
    right: 0.5rem;
  }
  
  [dir="rtl"] .product-lightbox-prev {
    left: auto;
    right: 0.5rem;
  }
  
  [dir="rtl"] .product-lightbox-next {
    right: auto;
    left: 0.5rem;
  }
  
  .product-related-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
