/* =====================================================
   SHOP PAGE STYLES
   ===================================================== */

/* Shop Page Base */
.shop-page {
  min-height: 100vh;
  background: var(--bg-secondary, #f8fafc);
}

/* Reset body margin for shop page */
.shop-page .app-header {
  margin-top: 0;
}

 /* Main content spacing */
 .shop-main {
   padding: 32px 16px;
   max-width: 1200px;
   margin: 0 auto;
 }

.shop-container {
  width: 100%;
}

.shop-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 8px;
  text-align: center;
}

.shop-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 32px;
  text-align: center;
}

.shop-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
}

.shop-filters {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  padding: 18px 16px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 900px) {
  .shop-filters {
    position: fixed;
    inset: 0;
    width: min(420px, 92vw);
    height: 100vh;
    margin-left: auto;
    transform: translateX(110%);
    transition: transform 0.22s ease;
    z-index: 14000;
    border-radius: 18px 0 0 18px;
    padding: 18px 16px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .shop-filters.is-open {
    transform: translateX(0);
  }

  .shop-filter-block {
    max-width: 100%;
  }

  .shop-price-filter,
  .shop-price-slider,
  .shop-price-filter__row {
    max-width: 100%;
    box-sizing: border-box;
  }

  .shop-price-slider__inputs {
    max-width: 100%;
  }

  .shop-price-filter input[type="number"] {
    max-width: 100%;
  }

  #btnApplyPrice,
  #btnResetFilters {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

.shop-filters__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
}

.shop-filter-block {
  margin-top: 18px;
}

.shop-filter-block__title {
  margin: 0 0 10px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.72);
}

.shop-filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-search-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
  font-size: 0.95rem;
}

.shop-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.75);
  cursor: pointer;
  margin-bottom: 8px;
}

.shop-check span {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.9);
}

.shop-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #2563eb;
}

.shop-price-slider {
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.75);
  margin-bottom: 10px;
}

.shop-price-slider__inputs {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
}

.shop-price-slider input[type="range"] {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 6px;
}

.shop-price-slider input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.shop-price-slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.shop-price-slider input[type="range"]:first-child {
  z-index: 1;
}

.shop-price-slider input[type="range"]:last-child {
  z-index: 2;
}

.shop-price-slider__track {
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(148, 163, 184, 0.35);
  border-radius: 3px;
}

.shop-price-slider__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.8);
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(248, 250, 252, 0.75);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  padding-left: calc(10px + (var(--cat-indent, 0) * 16px));
}

.filter-item--parent .filter-item__label {
  font-weight: 800;
}

.filter-item:hover {
  background: rgba(226, 232, 240, 0.8);
  border-color: rgba(37, 99, 235, 0.35);
}

.filter-item input[type="radio"] {
  accent-color: #2563eb;
}

.filter-item__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.9);
}

.filter-item__icon {
  width: 20px;
  display: inline-flex;
  justify-content: center;
}

.shop-price-filter {
  overflow: hidden;
}

.shop-price-filter__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.shop-price-filter__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.shop-price-filter__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(15, 23, 42, 0.7);
}

.shop-price-filter input[type="number"] {
  width: 100%;
  min-width: 0;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.shop-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.shop-toolbar__meta {
  flex: 1;
  display: flex;
  justify-content: center;
}

.shop-toolbar__count {
  font-size: 0.95rem;
  color: rgba(15, 23, 42, 0.7);
}

.shop-toolbar__sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shop-toolbar__sort-label {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.7);
}

.shop-toolbar__sort-select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: white;
}

.shop-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.shop-breadcrumbs__link {
  color: rgba(15, 23, 42, 0.78);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.shop-breadcrumbs__link:hover {
  text-decoration: underline;
}

.shop-breadcrumbs__sep {
  color: rgba(15, 23, 42, 0.45);
}

@media (max-width: 900px) {
  .shop-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .shop-toolbar__meta {
    flex: 1;
    justify-content: center;
  }

  .shop-toolbar__count {
    font-size: 0.8rem;
  }

  .shop-toolbar__sort {
    flex: 0 0 auto;
  }

  .shop-toolbar__sort-label {
    display: none;
  }

  .shop-toolbar__sort-select {
    padding: 8px 10px;
    font-size: 0.8rem;
    min-width: 100px;
  }

  #btnToggleFilters {
    padding: 8px 12px;
    font-size: 0.8rem;
  }
}

.shop-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.shop-pagination__info {
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.72);
}

#btnToggleFilters {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

@media (min-width: 901px) {
  #btnToggleFilters {
    display: none;
  }
}

.shop-pagination .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 56px;
}

@media (prefers-color-scheme: dark) {
  .shop-filters {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.18);
  }

  .shop-filters__title {
    color: #f8fafc;
  }

  .shop-filter-block__title,
  .shop-price-filter__label,
  .shop-toolbar__sort-label,
  .shop-toolbar__count,
  .shop-pagination__info {
    color: rgba(226, 232, 240, 0.78);
  }

  .filter-item {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
  }

  .filter-item:hover {
    background: rgba(51, 65, 85, 0.85);
    border-color: rgba(59, 130, 246, 0.45);
  }

  .filter-item__label {
    color: rgba(248, 250, 252, 0.92);
  }

  .shop-price-filter input,
  .shop-search-input,
  .shop-toolbar__sort-select {
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.22);
  }

  .shop-check,
  .shop-price-slider {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.2);
  }

  .shop-check span {
    color: rgba(248, 250, 252, 0.92);
  }

  .shop-price-slider__labels {
    color: rgba(226, 232, 240, 0.85);
  }

  .shop-price-filter__label {
    color: rgba(226, 232, 240, 0.78);
  }

  .shop-toolbar {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.18);
  }

  .shop-breadcrumbs {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.18);
  }

  .shop-breadcrumbs__link {
    color: rgba(248, 250, 252, 0.85);
  }

  .shop-breadcrumbs__sep {
    color: rgba(226, 232, 240, 0.45);
  }
}

/* =====================================================
   MODERN PRODUCT GRID - Responsive columns
   ===================================================== */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
}

/* Tablet - 3 columns */
@media (max-width: 1200px) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Mobile - 2 columns */
@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* Very small screens - still 2 columns but tighter */
@media (max-width: 400px) {
  .shop-grid {
    gap: 8px;
  }
}

/* =====================================================
   MODERN PRODUCT CARD
   ===================================================== */
.product-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.product-card__image {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  overflow: hidden;
}

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

.product-card:hover .product-card__image img {
  transform: scale(1.08);
}

.product-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 10px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.product-card-badge.sale {
  left: auto;
  right: 10px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.product-card-badge + .product-card-badge.sale {
  top: 10px;
}

.product-card__content {
  padding: 12px;
}

/* Mobile: smaller padding */
@media (max-width: 768px) {
  .product-card__content {
    padding: 10px;
  }
  
  .product-card-badge {
    padding: 4px 8px;
    font-size: 0.6rem;
    top: 8px;
    left: 8px;
  }
  
  .product-card-badge.sale {
    right: 8px;
  }
}

.product-card__category {
  font-size: 0.7rem;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.product-card__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile: smaller text */
@media (max-width: 768px) {
  .product-card__name {
    font-size: 0.8rem;
    margin: 0 0 4px;
  }
}

.product-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .product-card__price {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }
}

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

.product-card__actions {
  display: flex;
  gap: 6px;
}

.product-card__btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  .product-card__btn {
    padding: 8px 10px;
    font-size: 0.7rem;
    border-radius: 8px;
  }
}

.product-card__btn--primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.product-card__btn--primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.product-card__btn--disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Loading and Empty States */
.products-loading,
.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary, #64748b);
}

.products-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

/* Product Card Image (new class from shop.js) */
.product-card-image {
  position: relative;
  aspect-ratio: 1;
  background: #f1f5f9;
  overflow: hidden;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-content {
  padding: 12px;
}

.product-card-category {
  font-size: 0.75rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 4px;
}

.product-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  margin: 0 0 8px;
  line-height: 1.3;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.product-card-price .current {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2563eb;
}

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

.product-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #cbd5e1;
}

/* Add to Cart Button */
.btn-add-to-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-add-to-cart:hover {
  background: #1d4ed8;
}

.btn-add-to-cart:active {
  transform: scale(0.98);
}

.btn-add-to-cart:disabled {
  background: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  background: white;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* Product Modal */
.product-modal {
  max-width: 800px;
}

.product-modal-content {
  padding: 24px;
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.product-detail-image {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.product-detail-category {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 16px;
}

.product-detail-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 16px;
}

.product-detail-stock {
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.product-detail-stock.in-stock {
  color: #22c55e;
}

.product-detail-stock.out-of-stock {
  color: #ef4444;
}

.product-detail-description {
  font-size: 0.9375rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 24px;
}

.product-detail-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.product-detail-qty label {
  font-weight: 500;
}

.product-detail-qty input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.cart-sidebar[hidden] {
  display: none !important;
}

.cart-sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.cart-sidebar-content {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: white;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.cart-sidebar-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.cart-sidebar-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
}

.cart-sidebar-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-sidebar-footer {
  padding: 20px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.btn-block {
  width: 100%;
}

/* SOS Modal - use full width from components.css */
/* max-width removed to allow full-screen modal */

.sos-modal-content {
  padding: 24px;
}

.sos-modal-content h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.sos-numbers {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sos-numbers li {
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1rem;
}

.sos-numbers li:last-child {
  border-bottom: none;
}

.sos-numbers strong {
  color: #dc2626;
  font-size: 1.25rem;
  margin-right: 8px;
}

/* Auth Modal */
.auth-modal {
  max-width: 420px;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  .shop-page {
    background: #0f172a;
  }
  
  .shop-title {
    color: #f1f5f9;
  }
  
  .shop-subtitle {
    color: #94a3b8;
  }
  
  .product-card {
    background: #1e293b;
  }
  
  .product-card__name,
  .product-card-name {
    color: #f1f5f9;
  }
  
  .modal-container {
    background: #1e293b;
    color: #f1f5f9;
  }
  
  .cart-sidebar-content {
    background: #1e293b;
  }
  
  .cart-sidebar-footer {
    background: #0f172a;
  }
  
  .product-card-category,
  .product-card__category {
    color: #93c5fd;
  }

  .product-card-price .current,
  .product-card__price,
  .product-detail-price .current {
    color: #93c5fd;
  }

  .product-card-price .original,
  .product-card__price .original-price,
  .product-detail-price .original {
    color: #94a3b8;
  }

  .product-detail-name,
  .cart-item-name,
  .cart-item-quantity span,
  .cart-total,
  #cartSubtotal {
    color: #f1f5f9;
  }

  .cart-item-price,
  .product-detail-description {
    color: #cbd5e1;
  }

  .cart-item-quantity button {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #334155;
  }
}

/* =====================================================
   SHOPPING CART SIDEBAR
   ===================================================== */

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2000;
}

.cart-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--card-bg, #fff);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.cart-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.btn-close-cart {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-muted, #6b7280);
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-close-cart:hover {
  background: var(--bg-hover, #f3f4f6);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-empty {
  text-align: center;
  color: var(--text-muted, #6b7280);
  padding: 40px 0;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: var(--bg-secondary, #f3f4f6);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.9375rem;
  font-weight: 500;
  margin: 0 0 4px;
  color: var(--text-color, #1f2937);
}

.cart-item-price {
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin: 0 0 8px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item-quantity button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-quantity button:hover {
  background: var(--bg-hover, #f3f4f6);
}

.cart-item-quantity span {
  font-size: 0.9375rem;
  font-weight: 500;
  min-width: 24px;
  text-align: center;
  color: var(--text-color, #1f2937);
}

.btn-remove-item {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 0;
}

.btn-remove-item:hover {
  text-decoration: underline;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1rem;
}

.cart-subtotal strong {
  font-size: 1.25rem;
}

.btn-checkout {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary-color, #2563eb);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-checkout:hover {
  background: var(--primary-dark, #1d4ed8);
}

/* =====================================================
   MODERN PRODUCT MODAL - Complete Redesign
   ===================================================== */

.product-modal {
  max-width: 520px !important;
}

.product-modal-content {
  max-width: 520px;
  width: 95%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 0;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  border-radius: 24px !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar for modal */
.product-modal-content::-webkit-scrollbar {
  width: 5px;
}

.product-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.product-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.product-detail {
  display: flex;
  flex-direction: column;
}

/* Product Image */
.product-detail-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-radius: 20px;
  margin: 16px;
  margin-bottom: 0;
  width: calc(100% - 32px);
  overflow: hidden;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-detail-image:hover img {
  transform: scale(1.05);
}

.product-detail-gallery {
  display: grid;
  gap: 12px;
}

.product-detail-image[role="button"] {
  cursor: zoom-in;
}

.product-detail-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 64px;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 12px;
  -webkit-overflow-scrolling: touch;
}

.product-detail-thumb {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 0;
  width: 64px;
  height: 64px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.product-detail-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(59, 130, 246, 0.12);
}

.product-detail-thumb.is-active {
  border-color: rgba(59, 130, 246, 0.9);
  background: rgba(59, 130, 246, 0.18);
}

.product-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
}

.shop-lightbox[hidden] {
  display: none !important;
}

.shop-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.shop-lightbox__dialog {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.shop-lightbox__img {
  width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.shop-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.shop-lightbox__nav {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.shop-lightbox__nav:hover,
.shop-lightbox__close:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(59, 130, 246, 0.55);
}

@media (max-width: 560px) {
  .product-detail-thumbs {
    grid-auto-columns: 56px;
    padding: 0 12px 10px;
  }
  .product-detail-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }
  .shop-lightbox__dialog {
    grid-template-columns: 44px 1fr 44px;
    padding: 12px;
  }
  .shop-lightbox__nav {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 30px;
  }
}

/* Product Info Section */
.product-detail-info {
  padding: 24px;
  color: #f8fafc;
}

/* Category Tag */
.product-detail-category {
  display: inline-block;
  font-size: 0.7rem;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0 0 10px;
  padding: 6px 12px;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Product Name */
.product-detail-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: #ffffff;
  line-height: 1.3;
}

/* Price Display */
.product-detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-detail-price .current {
  font-size: 1.75rem;
  font-weight: 800;
  color: #3b82f6;
}

.product-detail-price .original {
  font-size: 1rem;
  color: #64748b;
  text-decoration: line-through;
}

/* Description */
.product-detail-description {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #94a3b8;
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 3px solid rgba(59, 130, 246, 0.5);
}

/* Stock Status */
.product-detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 10px 16px;
  border-radius: 10px;
}

.product-detail-stock.in-stock {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.product-detail-stock.out-of-stock {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Quantity Selector */
.product-detail-quantity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.product-detail-quantity label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
}

.quantity-selector {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.quantity-selector button {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  font-size: 1.25rem;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quantity-selector button:hover {
  background: rgba(59, 130, 246, 0.3);
  color: #3b82f6;
}

.quantity-selector input {
  width: 50px;
  height: 40px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: #f8fafc;
}

/* Add to Cart Button */
.btn-add-to-cart-large {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-add-to-cart-large:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

.btn-add-to-cart-large:active {
  transform: translateY(0);
}

.btn-add-to-cart-large:disabled {
  background: #475569;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-add-to-cart-large svg {
  width: 20px;
  height: 20px;
}

/* Mobile Responsive */
@media (max-width: 550px) {
  .product-modal-content {
    width: 100%;
    max-height: 95vh;
    border-radius: 20px 20px 0 0 !important;
  }
  
  .product-detail-image {
    margin: 12px;
    width: calc(100% - 24px);
    border-radius: 16px;
  }
  
  .product-detail-info {
    padding: 20px;
  }
  
  .product-detail-name {
    font-size: 1.2rem;
  }
  
  .product-detail-price .current {
    font-size: 1.5rem;
  }
  
  .product-detail-description {
    font-size: 0.85rem;
  }
}

/* =====================================================
   HEADER CART BUTTON
   ===================================================== */

.btn-cart {
  position: relative;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text-color, #1f2937);
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-cart:hover {
  background: var(--bg-hover, #f3f4f6);
}

.cart-count {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 18px;
  height: 18px;
  background: #ef4444;
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

#btnOpenCart {
  position: relative;
}

#btnOpenCart .cart-count {
  top: -6px;
  right: -6px;
}

/* =====================================================
   DARK MODE
   ===================================================== */

/* =====================================================
   FILTER ENHANCEMENTS
   ===================================================== */

.shop-filters__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary-color, #2563eb);
}

.shop-filters__header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-color, #1f2937);
}

.shop-filters__close {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted, #6b7280);
}

@media (max-width: 900px) {
  .shop-filters__close {
    display: block;
  }
}

.filter-section h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #6b7280);
  margin: 0 0 12px;
}

.price-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 0.875rem;
  background: white;
}

.price-separator {
  color: var(--text-muted, #6b7280);
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 8px 14px;
  background: var(--bg-secondary, #f3f4f6);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 20px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tag:hover,
.filter-tag.is-active {
  background: var(--primary-color, #2563eb);
  border-color: var(--primary-color, #2563eb);
  color: white;
}

/* Products Toolbar */
.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.products-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-filter-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-filter-toggle:hover {
  border-color: var(--primary-color, #2563eb);
  color: var(--primary-color, #2563eb);
}

@media (max-width: 900px) {
  .btn-filter-toggle {
    display: flex;
  }
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}

.view-btn {
  padding: 8px 12px;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted, #6b7280);
  transition: all 0.2s;
}

.view-btn:hover {
  background: var(--bg-secondary, #f3f4f6);
}

.view-btn.is-active {
  background: var(--primary-color, #2563eb);
  color: white;
}

/* =====================================================
   CART ENHANCEMENTS
   ===================================================== */

.nav-modern__cart {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: rgba(37, 99, 235, 0.1);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-modern__cart:hover {
  background: rgba(37, 99, 235, 0.2);
}

.cart-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-summary {
  margin-bottom: 16px;
}

.cart-shipping-note {
  font-size: 0.8125rem;
  color: var(--text-muted, #6b7280);
  margin: 8px 0 0;
}

.btn-continue {
  width: 100%;
  margin-top: 10px;
}

/* =====================================================
   CHECKOUT MODAL
   ===================================================== */

.checkout-modal-content {
  max-width: 700px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}

.checkout-content {
  padding: 32px;
}

.checkout-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 24px;
  text-align: center;
}

.checkout-steps {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.checkout-step.is-active,
.checkout-step.is-complete {
  opacity: 1;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--border-color, #e5e7eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.checkout-step.is-active .step-number {
  background: var(--primary-color, #2563eb);
  color: white;
}

.checkout-step.is-complete .step-number {
  background: #22c55e;
  color: white;
}

.step-label {
  font-size: 0.875rem;
  font-weight: 500;
}

.checkout-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--text-color, #1f2937);
}

.checkout-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 500px) {
  .checkout-form .form-row {
    grid-template-columns: 1fr;
  }
}

.checkout-form .form-field {
  margin-bottom: 16px;
}

.checkout-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-color, #1f2937);
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--primary-color, #2563eb);
}

.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-field input {
  width: auto;
  accent-color: var(--primary-color, #2563eb);
}

.checkout-review {
  background: var(--bg-secondary, #f9fafb);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.review-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.review-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.review-section h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.review-address {
  font-size: 0.9375rem;
  line-height: 1.6;
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary-color, #2563eb);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}

.btn-link:hover {
  text-decoration: underline;
}

.review-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9375rem;
}

.review-item-name {
  flex: 1;
}

.review-item-qty {
  color: var(--text-muted, #6b7280);
  margin: 0 16px;
}

.review-totals {
  background: white;
  border-radius: 8px;
  padding: 16px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9375rem;
}

.total-line--grand {
  border-top: 2px solid var(--border-color, #e5e7eb);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.125rem;
}

.checkout-actions {
  display: flex;
  gap: 12px;
}

.checkout-actions .btn {
  flex: 1;
}

.checkout-message {
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  margin-top: 16px;
}

.checkout-message.success {
  background: #dcfce7;
  color: #166534;
}

.checkout-message.error {
  background: #fee2e2;
  color: #991b1b;
}

/* =====================================================
   SHOP FOOTER
   ===================================================== */

.shop-footer {
  background: #1e293b;
  color: white;
  padding: 60px 20px 30px;
  margin-top: 60px;
}

.shop-footer__content {
  max-width: 1200px;
  margin: 0 auto;
}

.shop-footer__info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: #f1f5f9;
}

.footer-section p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: #94a3b8;
  margin: 0;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  font-size: 0.9375rem;
  color: #94a3b8;
  padding: 6px 0;
}

.shop-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid #334155;
  flex-wrap: wrap;
  gap: 20px;
}

.shop-footer__bottom p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

/* =====================================================
   SHOP MODAL BASE
   ===================================================== */

/* =====================================================
   MODERN PRODUCT MODAL / POPUP
   ===================================================== */
.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.shop-modal[hidden] {
  display: none !important;
}

.shop-modal .modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: auto;
}

.shop-modal .modal-content {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal scrollbar */
.shop-modal .modal-content::-webkit-scrollbar {
  width: 6px;
}

.shop-modal .modal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.shop-modal .modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

/* Modal close button */
.shop-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.shop-modal .modal-close:hover {
  background: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Product detail content */
.product-detail {
  color: #f8fafc;
}

.product-detail-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  margin-bottom: 20px;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-content {
  padding: 0 24px 24px;
}

.product-detail-category {
  font-size: 0.75rem;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-detail-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  line-height: 1.3;
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.product-detail-price .current {
  font-size: 1.75rem;
  font-weight: 800;
  color: #3b82f6;
}

.product-detail-price .original {
  font-size: 1rem;
  color: #64748b;
  text-decoration: line-through;
}

.product-detail-description {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.product-detail-stock.in-stock {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.product-detail-stock.out-of-stock {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Modal actions */
.product-detail-actions {
  display: flex;
  gap: 12px;
}

.product-detail-actions .btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.product-detail-actions .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.product-detail-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

.product-detail-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-detail-actions .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Quantity selector in modal */
.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
}

.quantity-selector button {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quantity-selector button:hover {
  background: rgba(59, 130, 246, 0.3);
}

.quantity-selector input {
  width: 50px;
  text-align: center;
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 1rem;
  font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .shop-modal {
    padding: 8px;
  }
  
  .shop-modal .modal-content {
    border-radius: 20px;
    max-height: 95vh;
  }
  
  .product-detail-content {
    padding: 0 16px 20px;
  }
  
  .product-detail-name {
    font-size: 1.25rem;
  }
  
  .product-detail-price .current {
    font-size: 1.5rem;
  }
  
  .product-detail-actions {
    flex-direction: column;
  }
}

/* Animation */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.shop-modal:not([hidden]) .modal-content {
  animation: modalFadeIn 0.3s ease-out;
}

/* =====================================================
   DARK MODE
   ===================================================== */

@media (prefers-color-scheme: dark) {
  .shop-page {
    background: var(--bg-dark, #0f172a);
  }
  
  .shop-filters,
  .product-card,
  .cart-panel,
  .products-toolbar,
  .shop-modal .modal-content {
    background: var(--card-bg-dark, #1e293b);
  }

  .filter-item:hover,
  .btn-pagination:hover:not(:disabled),
  .btn-close-cart:hover {
    background: var(--bg-hover-dark, #334155);
  }

  .price-input,
  .filter-select,
  .quantity-selector input,
  .checkout-form input,
  .checkout-form select,
  .checkout-form textarea {
    background: var(--bg-dark, #0f172a);
    color: var(--text-color-dark, #f1f5f9);
    border-color: var(--border-color-dark, #334155);
  }
  
  .checkout-review,
  .review-totals {
    background: var(--bg-dark, #0f172a);
  }

  .product-card-category,
  .product-card__category {
    color: #93c5fd;
  }

  .product-card-price .current,
  .product-card__price,
  .product-detail-price .current {
    color: #93c5fd;
  }

  .product-card-price .original,
  .product-card__price .original-price,
  .product-detail-price .original {
    color: #94a3b8;
  }

  .product-detail-name,
  .cart-item-name,
  .cart-item-quantity span,
  .cart-total,
  #cartSubtotal {
    color: #f1f5f9;
  }

  .cart-item-price,
  .product-detail-description {
    color: #cbd5e1;
  }

  .cart-item-quantity button {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #334155;
  }
}

/* =====================================================
   CHECKOUT FORM DARK MODE FIX
   ===================================================== */

@media (prefers-color-scheme: dark) {
  .checkout-title,
  .checkout-content h2,
  .checkout-content h3,
  .checkout-content h4 {
    color: #f1f5f9;
  }

  .checkout-form label {
    color: #e2e8f0;
  }

  .step-label {
    color: #cbd5e1;
  }

  .checkout-step.is-active .step-label {
    color: #f1f5f9;
  }

  .review-section h4 {
    color: #94a3b8;
  }

  .review-address,
  .review-items {
    color: #e2e8f0;
  }

  .total-line {
    color: #cbd5e1;
  }

  .total-line--grand,
  .total-line--grand strong {
    color: #f1f5f9;
  }

  .checkout-form input::placeholder,
  .checkout-form textarea::placeholder {
    color: #64748b;
  }

  .checkout-actions .btn {
    color: #f1f5f9;
  }

  .checkout-actions .btn-primary {
    background: var(--primary-color, #2563eb);
    color: white;
  }
}

/* Fix secondary button contrast in dark mode */
@media (prefers-color-scheme: dark) {
  .checkout-actions .btn:not(.btn-primary) {
    background: #334155;
    color: #f1f5f9;
    border: 1px solid #475569;
  }

  .checkout-actions .btn:not(.btn-primary):hover {
    background: #475569;
  }
}

/* Stripe payment section */
.payment-info {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.stripe-payment-methods {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stripe-badge {
  height: 28px;
  width: auto;
}

.btn-stripe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (prefers-color-scheme: dark) {
  .payment-info {
    color: #cbd5e1;
  }
  
  .stripe-badge {
    filter: brightness(1.2);
  }
}

/* Payment method icons */
.payment-icon {
  height: 32px;
  width: 50px;
  border-radius: 6px;
  background: white;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
  .payment-icon {
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  }
}

/* Shipping method field hint */
.field-hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
  .field-hint {
    color: #94a3b8;
  }
}

.shipping-breakdown {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(15, 23, 42, 0.12);
  font-size: 0.8125rem;
  color: #475569;
}

.shipping-breakdown.error {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.4);
}

.shipping-breakdown.is-hidden {
  display: none;
}

.shipping-breakdown .component-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.shipping-breakdown .component-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.shipping-breakdown .component-label {
  flex: 1;
}

.shipping-breakdown .component-amount {
  flex-shrink: 0;
  font-weight: 500;
}

@media (prefers-color-scheme: dark) {
  .shipping-breakdown {
    border-color: rgba(148, 163, 184, 0.4);
    color: #cbd5f5;
  }

  .shipping-breakdown .component-amount {
    color: #f8fafc;
  }
}

.checkout-processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 15000;
}

.checkout-processing-card {
  width: min(520px, 92vw);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  text-align: center;
  color: #0f172a;
}

.checkout-processing-spinner {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  margin: 0 auto 16px;
  border: 4px solid rgba(15, 23, 42, 0.18);
  border-top-color: rgba(37, 99, 235, 0.95);
  animation: checkoutProcessingSpin 0.9s linear infinite;
}

.checkout-processing-title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
}

.checkout-processing-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.78);
}

@keyframes checkoutProcessingSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-color-scheme: dark) {
  .checkout-processing-card {
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
  }

  .checkout-processing-text {
    color: rgba(226, 232, 240, 0.85);
  }

  .checkout-processing-spinner {
    border-color: rgba(226, 232, 240, 0.18);
    border-top-color: rgba(59, 130, 246, 0.95);
  }
}

/* =====================================================
   SHOP PAGE MOBILE HEADER FIX - Cart in same row as SOS/Login
   ===================================================== */
@media (max-width: 900px) {
  .shop-page .nav-modern__top-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.4rem;
    row-gap: 0.5rem;
    width: 100%;
  }

  .shop-page .language-pill-group {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
  }

  .shop-page .nav-modern__sos {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    min-width: 0;
    padding: 0.5rem 0.4rem !important;
    font-size: 0.75rem !important;
  }

  .shop-page .nav-modern__auth {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-width: 0;
    display: flex !important;
    justify-content: center;
  }

  /* Hide elements with hidden attribute - must override flex */
  .shop-page .nav-modern__auth [hidden],
  .shop-page .nav-modern__auth .hidden,
  .shop-page .auth-actions-inline [hidden],
  .shop-page .auth-actions-inline .hidden {
    display: none !important;
  }

  .shop-page .nav-modern__auth .nav-modern__login:not([hidden]),
  .shop-page .nav-modern__auth .btn.btn-sm:not([hidden]) {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0.5rem 0.25rem !important;
    font-size: 0.65rem !important;
    white-space: nowrap;
    overflow: visible !important;
    text-overflow: clip !important;
    border-radius: 10px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .shop-page #btnOpenCart {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
    height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    min-width: 0;
  }

  .shop-page #btnOpenCart .cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
  }
}

/* =====================================================
   MODERN CART SIDEBAR DESIGN
   ===================================================== */

/* Overlay with blur effect */
.cart-sidebar-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Main cart panel */
.cart-sidebar-content {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  border-radius: 24px 0 0 24px;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.3);
  max-width: 420px;
}

/* Header with gradient accent */
.cart-sidebar-header {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 24px !important;
}

.cart-sidebar-header h2 {
  color: #ffffff !important;
  font-size: 1.35rem !important;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-sidebar-header h2::before {
  content: "🛒";
  font-size: 1.2rem;
}

/* Close button - modern pill style */
.cart-sidebar-close {
  width: 40px !important;
  height: 40px !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  font-size: 20px !important;
  transition: all 0.2s ease !important;
}

.cart-sidebar-close:hover {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
  transform: scale(1.05);
}

/* Cart items area */
.cart-sidebar-items {
  padding: 20px !important;
  background: transparent;
}

/* Individual cart item styling */
.cart-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.cart-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

.cart-item-image {
  border-radius: 12px;
  overflow: hidden;
}

.cart-item-name {
  color: #f8fafc;
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-price {
  color: #3b82f6;
  font-weight: 700;
}

.cart-item-quantity {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px 8px;
}

/* Remove button */
.cart-item-remove {
  color: #94a3b8 !important;
  background: transparent !important;
  border: none !important;
  transition: all 0.2s ease;
}

.cart-item-remove:hover {
  color: #ef4444 !important;
  transform: scale(1.1);
}

/* Empty cart state */
.cart-empty {
  color: #94a3b8 !important;
  text-align: center;
  padding: 60px 20px !important;
  font-size: 1rem;
}

.cart-empty::before {
  content: "🛒";
  display: block;
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Footer with totals */
.cart-sidebar-footer {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, #0f172a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding: 24px !important;
  color: #f8fafc;
}

/* Cart total styling */
.cart-total {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cart-total-label {
  color: #94a3b8;
  font-size: 0.9rem;
}

.cart-total-value {
  color: #3b82f6;
  font-size: 1.5rem;
  font-weight: 700;
}

/* Checkout button - vibrant gradient */
#btnCheckout {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 16px 24px !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#btnCheckout:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
}

#btnCheckout:active {
  transform: translateY(0);
}

/* Continue shopping link */
.cart-continue-shopping {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cart-continue-shopping:hover {
  color: #3b82f6;
}

/* Scrollbar styling */
.cart-sidebar-items::-webkit-scrollbar {
  width: 6px;
}

.cart-sidebar-items::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.cart-sidebar-items::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.cart-sidebar-items::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Animation for cart opening */
@keyframes slideInCart {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.cart-sidebar:not([hidden]) .cart-sidebar-content {
  animation: slideInCart 0.3s ease-out;
}
