/* Swagger Store — Amazon-style shop layout */

body.store-mode .store-only-view {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 6px 10px 10px 4px !important;
  height: 100%;
  box-sizing: border-box;
}

body.store-mode #swaggerStoreGrid.store-shop-layout {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 100%;
  height: 100%;
  min-height: 0;
  position: relative;
}

.store-shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 10px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
  margin-bottom: 0;
  flex-shrink: 0;
  width: 100%;
}

.store-shop-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  min-width: 0;
}

.store-shop-toolbar-right {
  flex-shrink: 0;
  margin-left: auto;
}

.store-shop-breadcrumb {
  font-size: 0.95rem;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
}

.store-result-count {
  font-size: 0.72rem;
}

.store-cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #e8eef5;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}

.store-cart-toggle:hover,
.store-cart-toggle.active {
  border-color: var(--gold);
  background: rgba(197, 160, 89, 0.12);
}

.store-cart-icon {
  width: 20px;
  height: 20px;
  color: var(--gold-soft);
}

.store-cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #0a0e14;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.store-shop-body {
  display: grid !important;
  grid-template-columns: 160px minmax(0, 1fr) !important;
  gap: 0 !important;
  align-items: start;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.store-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100%;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  border: none;
  border-right: 1px solid rgba(197, 160, 89, 0.18);
  border-radius: 0;
  background: rgba(6, 10, 16, 0.55);
  padding: 10px 0 12px;
  margin: 0;
}

.store-sidebar-heading {
  margin: 0 12px 8px;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.store-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.store-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #b8c4d0;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  border-left: 3px solid transparent;
}

.store-category-link:hover {
  background: rgba(197, 160, 89, 0.08);
  color: var(--gold-soft);
}

.store-category-link.active {
  background: rgba(197, 160, 89, 0.12);
  border-left-color: var(--gold);
  color: var(--gold-soft);
  font-weight: 600;
}

.store-category-count {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.store-main {
  min-width: 0;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  padding: 10px 4px 16px 12px;
}

.store-product-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
  gap: 10px 10px;
  width: 100%;
  align-content: start;
}

@media (min-width: 900px) {
  .store-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)) !important;
  }
}

@media (min-width: 1200px) {
  .store-product-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)) !important;
  }
}

.store-product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(197, 160, 89, 0.12);
  border-radius: 8px;
  background: rgba(12, 18, 28, 0.75);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.store-product-card:hover {
  border-color: rgba(197, 160, 89, 0.32);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.store-product-card.in-cart {
  border-color: rgba(197, 160, 89, 0.4);
}

.store-product-image-wrap {
  position: relative;
  aspect-ratio: 1;
  background: #0d1219;
  overflow: hidden;
  max-height: 140px;
}

.store-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-product-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(120, 180, 255, 0.25);
  color: #b8d4ff;
  border: 1px solid rgba(120, 180, 255, 0.4);
}

.store-product-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 8px 10px;
  flex: 1;
}

.store-product-title {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 600;
  color: #e8eef5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.85em;
}

.store-product-price {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold-soft);
}

.store-product-actions {
  margin-top: 4px;
}

.store-product-actions .btn {
  width: 100%;
  padding: 4px 6px;
  font-size: 0.68rem;
}

.store-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.store-cart-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.store-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 92vw);
  height: 100vh;
  z-index: 201;
  display: flex;
  flex-direction: column;
  background: #0c121c;
  border-left: 1px solid rgba(197, 160, 89, 0.25);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.store-cart-panel.open {
  transform: translateX(0);
}

.store-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.store-cart-header h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--gold-soft);
}

.store-cart-close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
}

.store-cart-close:hover {
  color: #fff;
}

.store-cart-lines {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
}

.store-cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.store-cart-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: #0d1219;
  border: 1px solid rgba(197, 160, 89, 0.15);
}

.store-cart-line-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.store-cart-line-info strong {
  font-size: 0.82rem;
  line-height: 1.3;
}

.store-cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.store-qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid rgba(197, 160, 89, 0.3);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--gold-soft);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.store-cart-line-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.store-cart-line-total {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gold-soft);
}

.store-cart-remove {
  border: none;
  background: none;
  color: #7a8fa8;
  font-size: 0.72rem;
  cursor: pointer;
  text-decoration: underline;
}

.store-cart-footer {
  padding: 16px 18px;
  border-top: 1px solid rgba(197, 160, 89, 0.2);
  background: rgba(0, 0, 0, 0.25);
}

.store-cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.store-cart-subtotal strong {
  font-size: 1.15rem;
  color: var(--gold-soft);
}

.store-cart-checkout-note {
  font-size: 0.72rem;
  margin: 0 0 12px;
}

.store-checkout-btn {
  width: 100%;
}

.store-cart-empty {
  padding: 32px 24px;
  text-align: center;
}

.store-cart-empty-title {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold-soft);
}

.store-empty-msg {
  grid-column: 1 / -1;
  padding: 16px;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .store-shop-body {
    grid-template-columns: 1fr !important;
  }

  .store-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid rgba(197, 160, 89, 0.18);
  }

  .store-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 8px 6px;
  }

  .store-category-link {
    width: auto;
    padding: 6px 10px;
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: 999px;
    border-left-width: 1px;
  }

  .store-category-link.active {
    border-left-width: 1px;
  }

  .store-main {
    max-height: none;
    padding-left: 0;
  }
}
