/* ==========================================================================
   ArcSys Design System — main.css
   Custom component classes that work alongside Tailwind CSS.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --arcsys-link: #f59e0b;
  --arcsys-link-hover: #fbbf24;
  --arcsys-brand: #f59e0b;
  --arcsys-brand-text: #171717;
  --arcsys-bg-dark: #0a0a0a;
  --arcsys-bg-card: #171717;
  --arcsys-border: rgba(255, 255, 255, 0.1);
  --arcsys-border-hover: rgba(245, 158, 11, 0.3);
  --shimmer-from: rgba(255, 255, 255, 0.03);
  --shimmer-via: rgba(255, 255, 255, 0.08);
  --shimmer-to: rgba(255, 255, 255, 0.03);
}

/* --------------------------------------------------------------------------
   CSS Reset (Preflight) — matches Tailwind's built-in reset
   Ensures consistent styling even when Tailwind CDN fails to load
   or when using a compiled Tailwind build without @tailwind base.
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: 0 solid;
}

/* Remove default margins/padding on all elements */
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  background-color: #0a0a0a;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* RTL logical properties */
[dir='rtl'] body {
  text-align: right;
}

/* Reset headings — remove default margins & font-weight */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

/* Reset paragraphs */
p {
  margin: 0;
}

/* Reset links */
a {
  color: inherit;
  text-decoration: inherit;
  background-color: transparent;
}

/* Reset lists — remove bullets and default margins/padding */
ul, ol, li {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Reset images — prevent overflow */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
  max-width: 100%;
}

/* Reset images to inline for icon usage */
img[style*="font-size"], 
.iconify {
  display: inline-block;
}

/* Reset form elements */
button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

/* Reset buttons */
button, [type='button'], [type='reset'], [type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

/* Reset fields */
fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

legend {
  padding: 0;
}

/* Reset textareas */
textarea {
  resize: vertical;
}

/* Reset inputs */
input::placeholder,
textarea::placeholder {
  opacity: 1;
  color: rgba(255, 255, 255, 0.4);
}

/* Reset tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
  text-indent: 0;
}

/* Reset hr */
hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

/* Remove default summary marker */
summary {
  display: list-item;
}

/* Remove default blockquote styling */
blockquote, dl, dd {
  margin: 0;
}

/* Remove animations for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   WordPress-Specific Resets
   -------------------------------------------------------------------------- */

/* Reset WordPress captions */
.wp-caption,
.wp-caption-text,
.gallery-caption {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  margin: 0;
}

/* Reset WordPress gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Reset WordPress alignment classes */
.alignleft {
  float: left;
  margin-right: 1em;
  margin-bottom: 1em;
}

[dir='rtl'] .alignleft {
  float: right;
  margin-left: 1em;
  margin-right: 0;
}

.alignright {
  float: right;
  margin-left: 1em;
  margin-bottom: 1em;
}

[dir='rtl'] .alignright {
  float: left;
  margin-right: 1em;
  margin-left: 0;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Reset WordPress pagination */
.nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.nav-links .page-numbers:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-links .page-numbers:active {
  transform: scale(0.96);
}

.nav-links .page-numbers.current {
  background: var(--arcsys-brand);
  color: #171717;
  border-color: var(--arcsys-brand);
  font-weight: 600;
}

.nav-links .page-numbers.dots {
  background: transparent;
  border-color: transparent;
}

/* Reset WP pagination list output */
.nav-links ul,
.nav-links li {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
}

/* Reset screen reader text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

/* Reset WooCommerce specific elements */
.woocommerce .woocommerce-breadcrumb {
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.woocommerce .woocommerce-breadcrumb a {
  color: var(--arcsys-brand);
}

.woocommerce .woocommerce-breadcrumb a:hover {
  color: var(--arcsys-link-hover);
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce .quantity .qty {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  color: #fff;
  text-align: center;
  width: 60px;
}

/* Remove WooCommerce default borders and backgrounds */
.woocommerce table.shop_table {
  border: none;
  border-collapse: collapse;
  border-radius: 0;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  background: transparent !important;
}

::selection {
  background-color: var(--arcsys-brand);
  color: #171717;
}

::-moz-selection {
  background-color: var(--arcsys-brand);
  color: #171717;
}

/* --------------------------------------------------------------------------
   Link Color Strategy
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   1. Swiss Checkbox — `.swiss-check`
   -------------------------------------------------------------------------- */
.swiss-check {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
}

.swiss-check:checked,
.swiss-check.checked {
  background-color: var(--arcsys-brand);
  border-color: var(--arcsys-brand);
}

.swiss-check:checked::after,
.swiss-check.checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 10px;
  border: solid #171717;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
}

.swiss-check:focus-visible {
  outline: 2px solid rgba(var(--color-brand), 0.5);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   2. Swiss Input — `.swiss-input`
   -------------------------------------------------------------------------- */
.swiss-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.swiss-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.swiss-input:focus {
  border-color: rgba(var(--color-brand), 0.5);
  box-shadow: 0 0 0 2px rgba(var(--color-brand), 0.5);
}

.swiss-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   3. Swiss Select — `.swiss-select`
   -------------------------------------------------------------------------- */
.swiss-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 40px 14px 16px;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

[dir='rtl'] .swiss-select {
  padding: 14px 16px 14px 40px;
  background-position: left 14px center;
}

.swiss-select:focus {
  border-color: rgba(var(--color-brand), 0.5);
  box-shadow: 0 0 0 2px rgba(var(--color-brand), 0.5);
}

.swiss-select option {
  background: #171717;
  color: #fff;
}

/* --------------------------------------------------------------------------
   4. ArcSys Badge — `.arcsys-badge`
   -------------------------------------------------------------------------- */
.arcsys-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.arcsys-badge--amber {
  background: rgba(var(--color-brand), 0.15);
  color: var(--arcsys-brand);
}

.arcsys-badge--blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.arcsys-badge--green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.arcsys-badge--red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.arcsys-badge--neutral {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------------------------
   5. ArcSys Table — `.arcsys-table`
   -------------------------------------------------------------------------- */
.arcsys-table {
  width: 100%;
  font-size: 14px;
  border-collapse: collapse;
}

.arcsys-table thead {
  background: rgba(255, 255, 255, 0.05);
}

.arcsys-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[dir='rtl'] .arcsys-table th {
  text-align: right;
}

.arcsys-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.arcsys-table tbody tr {
  transition: background-color 0.15s ease;
}

.arcsys-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* --------------------------------------------------------------------------
   5b. Product Card Quick Add
   -------------------------------------------------------------------------- */
.quick-add {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.product-card:hover .quick-add {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   6. ArcSys Button — `.arcsys-btn`
   -------------------------------------------------------------------------- */
.arcsys-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.arcsys-btn--primary {
  background: var(--arcsys-brand);
  color: #171717;
}

.arcsys-btn--primary:hover {
  background: var(--arcsys-link-hover);
}

.arcsys-btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

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

.arcsys-btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.arcsys-btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.arcsys-btn--ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
}

.arcsys-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.arcsys-btn--sm {
  padding: 8px 16px;
  font-size: 11px;
}

.arcsys-btn--lg {
  padding: 16px 32px;
  font-size: 14px;
}

.arcsys-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.arcsys-btn:active {
  transform: scale(0.96);
}

/* --------------------------------------------------------------------------
   6b. ArcSys Carousel — nav button + edge fade (RTL)
   -------------------------------------------------------------------------- */
.arcsys-carousel-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  font-family: inherit;
  flex-shrink: 0;
}

.arcsys-carousel-nav:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: var(--arcsys-link);
}

.arcsys-carousel-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.arcsys-carousel-nav:active:not(:disabled) {
  transform: scale(0.96);
}

.arcsys-carousel-fade-left {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 80px;
  pointer-events: none;
  z-index: 10;
  background: linear-gradient(
    to right,
    #0a0a0a 0%,
    #0a0a0a 25%,
    rgba(10, 10, 10, 0.7) 55%,
    rgba(10, 10, 10, 0) 100%
  );
  transition: opacity 0.3s ease;
}

@media (min-width: 640px) {
  .arcsys-carousel-fade-left {
    width: 120px;
  }
}

@media (min-width: 1024px) {
  .arcsys-carousel-fade-left {
    width: 160px;
  }
}

/* --------------------------------------------------------------------------
   7. ArcSys Nav Item — `.arcsys-nav-item`
   -------------------------------------------------------------------------- */
.arcsys-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}

[dir='rtl'] .arcsys-nav-item {
  text-align: right;
}

.arcsys-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.arcsys-nav-item--active {
  background: rgba(var(--color-brand), 0.1);
  color: var(--arcsys-brand);
}

.arcsys-nav-item--active:hover {
  background: rgba(var(--color-brand), 0.15);
  color: var(--arcsys-link-hover);
}

/* --------------------------------------------------------------------------
   8. ArcSys Loading — `.arcsys-loading`
   -------------------------------------------------------------------------- */
.arcsys-loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   9. Spinner — `.spinner`
   -------------------------------------------------------------------------- */
.spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--arcsys-brand);
  border-radius: 9999px;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-brand {
  border-top-color: var(--arcsys-brand);
}

/* --------------------------------------------------------------------------
   10. Skeleton — `.skeleton`
   -------------------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--shimmer-from) 25%,
    var(--shimmer-via) 50%,
    var(--shimmer-to) 75%
  );
  background-size: 200% 100%;
  border-radius: 12px;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   11. Toast — rendered by the Alpine toast store (header.php) with its own
       Tailwind classes and x-transition; no component CSS needed here.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   12. Fade Up — `.fade-up`
   -------------------------------------------------------------------------- */
/* Scoped under html.js so content stays visible if JS never loads */
html.js .fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

html.js .fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered entrance for [data-stagger] containers — one-shot keyframes
   (keyframes are reserved for exactly this: staged sequences that run once).
   Children keep their own interactive transitions; the entrance is
   animation-composited and sequenced via --stagger-i set by main.js. */
@keyframes arcsys-stagger-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

html.js [data-stagger]:not(.stagger-in) > * {
  opacity: 0;
}

html.js [data-stagger].stagger-in > * {
  animation: arcsys-stagger-in 0.5s ease both;
  animation-delay: calc(var(--stagger-i, 0) * 100ms);
}

/* --------------------------------------------------------------------------
   13. Product Card — `.product-card`
   -------------------------------------------------------------------------- */
.product-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  border-color: rgba(var(--color-brand), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.product-card__image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

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

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

.product-card__body {
  padding: 16px;
}

.product-card__title {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.4;
}

.product-card__price {
  font-size: 16px;
  font-weight: 700;
  color: var(--arcsys-brand);
}

.product-card__price--old {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
  margin-inline-start: 8px;
}

/* --------------------------------------------------------------------------
   14. Category Cell — `.cat-cell`
   -------------------------------------------------------------------------- */
.cat-cell {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  aspect-ratio: 4 / 3;
}

.cat-cell:hover {
  border-color: rgba(var(--color-brand), 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.cat-cell__image {
  position: absolute;
  inset: 0;
}

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

.cat-cell:hover .cat-cell__image img {
  transform: scale(1.08);
}

.cat-cell__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.cat-cell__name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* --------------------------------------------------------------------------
   15. On Sale Badge — `.onsale`
   -------------------------------------------------------------------------- */
.onsale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #ef4444;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  z-index: 2;
  line-height: 1;
}

[dir='rtl'] .onsale {
  left: auto;
  right: 12px;
}

/* --------------------------------------------------------------------------
   16. Out of Stock Badge — `.out-of-stock-badge`
   -------------------------------------------------------------------------- */
.out-of-stock-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: #a3a3a3;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   17. Brand Marquee — `.brand-marquee`
   -------------------------------------------------------------------------- */
.brand-marquee {
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 10%,
    black 90%,
    transparent 100%
  );
}

.brand-marquee__track {
  display: inline-flex;
  animation: marquee 30s linear infinite;
}

.brand-marquee:hover .brand-marquee__track {
  animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   18. Megamenu Panel — `.megamenu-panel`
   -------------------------------------------------------------------------- */
.megamenu-panel {
  position: absolute;
  width: 600px;
  background: #171717;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  padding: 24px;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.megamenu-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   19. Mobile Filters — `.mobile-filters`
   -------------------------------------------------------------------------- */
.mobile-filters {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 320px;
  background: #171717;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 24px;
}

[dir='rtl'] .mobile-filters {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

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

[dir='rtl'] .mobile-filters.is-open {
  transform: translateX(0);
}

.mobile-filters__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 59;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-filters__backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   20. Mobile Menu — `.mobile-menu`
   -------------------------------------------------------------------------- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 320px;
  background: #171717;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 24px;
}

[dir='rtl'] .mobile-menu {
  right: auto;
  left: 0;
  transform: translateX(-100%);
}

.mobile-menu.is-open {
  transform: translateX(0);
}

[dir='rtl'] .mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 59;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu__backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* --------------------------------------------------------------------------
   21. Mini Cart — `.mini-cart`
   -------------------------------------------------------------------------- */
.mini-cart {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 384px;
  background: #171717;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .mini-cart {
    width: 384px;
  }
}

[dir='rtl'] .mini-cart {
  left: auto;
  right: 0;
  transform: translateX(100%);
}

.mini-cart.is-open {
  transform: translateX(0);
}

[dir='rtl'] .mini-cart.is-open {
  transform: translateX(0);
}

.mini-cart__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 59;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mini-cart__backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.mini-cart__header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-cart__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.mini-cart__footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   22. Skeleton Card — `.skeleton-card`
   -------------------------------------------------------------------------- */
.skeleton-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

.skeleton-card__image {
  aspect-ratio: 1 / 1;
  background: linear-gradient(
    90deg,
    var(--shimmer-from) 25%,
    var(--shimmer-via) 50%,
    var(--shimmer-to) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skeleton-card__line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--shimmer-from) 25%,
    var(--shimmer-via) 50%,
    var(--shimmer-to) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card__line--title {
  width: 75%;
  height: 16px;
}

.skeleton-card__line--price {
  width: 40%;
  height: 18px;
}

.skeleton-card__line--short {
  width: 55%;
}

/* --------------------------------------------------------------------------
   Custom Scrollbar
   -------------------------------------------------------------------------- */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   Animations & Keyframes
   -------------------------------------------------------------------------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--color-brand), 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(var(--color-brand), 0);
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

[dir='rtl'] .brand-marquee__track {
  animation-name: marquee-rtl;
}

@keyframes marquee-rtl {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0);
  }
}

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

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

/* --------------------------------------------------------------------------
   Utility Animations (apply via class)
   -------------------------------------------------------------------------- */
.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-shimmer {
  animation: shimmer 1.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   Mega Menu - CSS hover
   -------------------------------------------------------------------------- */
.mega-menu { opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease; }
.mega-trigger:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* --------------------------------------------------------------------------
   Animation Keyframes (from HTML reference)
   -------------------------------------------------------------------------- */
@keyframes floatAnim { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.float-anim { animation: floatAnim 4s ease-in-out infinite; }
@keyframes slideInUp { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
.slide-in { animation: slideInUp 0.5s ease forwards; }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 20px rgba(var(--color-brand), 0.15); } 50% { box-shadow: 0 0 40px rgba(var(--color-brand), 0.3); } }
.glow-pulse { animation: pulseGlow 3s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   Category Card Hover Effects
   -------------------------------------------------------------------------- */
.cat-card:hover .cat-img { transform: scale(1.1); }
.cat-img { transition: transform 0.5s ease; }
.cat-card:hover .cat-overlay { background: linear-gradient(to top, rgba(10,10,10,0.9), rgba(10,10,10,0.3)); }
.cat-overlay { transition: background 0.4s ease; }

/* --------------------------------------------------------------------------
   Blog Card Hover Effects
   -------------------------------------------------------------------------- */
.blog-card:hover .blog-img { transform: scale(1.05); }
.blog-img { transition: transform 0.5s ease; }

/* --------------------------------------------------------------------------
   Image Outlines — subtle edge for depth
   Pure white at 10% in dark mode; light-mode.css flips to pure black.
   -------------------------------------------------------------------------- */
.product-card__image img,
.product-img,
.cat-cell__image img,
.cat-track-img,
.zoom-img {
  outline: 1px solid rgb(255 255 255 / 0.1);
  outline-offset: -1px;
}

/* --------------------------------------------------------------------------
   Product Gallery — Zoom, Lightbox, Tabs
   -------------------------------------------------------------------------- */

/* Gallery zoom */
.zoom-container { overflow: hidden; cursor: zoom-in; }
.zoom-container:hover .zoom-img { transform: scale(1.6); }
.zoom-img { transition: transform 0.3s ease; transform-origin: var(--zoom-x, center) var(--zoom-y, center); }

/* Thumbnail active state */
.thumb-active { border-color: var(--arcsys-brand) !important; opacity: 1 !important; }

/* Tab active state (border-bottom style) */
.tab-active { color: var(--arcsys-brand); border-color: var(--arcsys-brand); }

/* Quantity button press */
.qty-btn { transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease; }
.qty-btn:active { transform: scale(0.96); }

/* Lightbox */
.lightbox { cursor: zoom-out; }

/* Review rating bars */
.review-bar { transition: width 0.6s ease; }

/* Hide WC rating dropdown in review modal — we use custom stars */
.review-modal-form .comment-form-rating { display: none; }

/* Modal star transitions */
#modal-stars-container button { transition: color 0.15s ease; }

/* Utility animation classes (uses keyframes defined above) */
.fade-in { animation: fadeIn 0.3s ease forwards; }
.zoom-in { animation: zoomIn 0.3s ease forwards; }

/* ═════════════════════════════════════════════════════════════════
   LIGHT MODE — Theme Overrides
   Toggle: <html data-theme="dark|light">
   ═════════════════════════════════════════════════════════════════ */

/* light-mode CSS is loaded lazily from assets/css/light-mode.css */

/* ── Theme-toggle icon cross-fade (moon ⇄ sun) ── */
/* Driven purely by html[data-theme], which both the pre-paint script and
   toggleTheme() set — so the correct icon renders before Alpine loads with
   no flash and no animation on first paint. */
.icon-swap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-swap .iconify {
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1),
                transform 0.2s cubic-bezier(0.2, 0, 0, 1),
                filter 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.icon-swap .icon-theme-sun {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
[data-theme='light'] .icon-theme-moon,
[data-theme='dark'] .icon-theme-sun {
    opacity: 0;
    transform: scale(0.25);
    filter: blur(4px);
    pointer-events: none;
}

/* ── Smooth theme transition ── */
/* Only active during a theme toggle (class added by toggleTheme JS).
   NOT on initial page load — prevents dark flash before light mode paints. */
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.2s ease;
}
html.theme-transitioning img,
html.theme-transitioning svg,
html.theme-transitioning .iconify,
html.theme-transitioning video,
html.theme-transitioning [x-transition] { transition: none; }

/* Keep the moon/sun cross-fade alive during the theme switch */
html.theme-transitioning .icon-swap .iconify {
    transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1),
                transform 0.2s cubic-bezier(0.2, 0, 0, 1),
                filter 0.2s cubic-bezier(0.2, 0, 0, 1);
}

/* ── Palette-aware pulse-glow (overrides hardcoded amber from Tailwind) ── */
@keyframes arcsys-pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(var(--color-brand), 0.15); }
    50%      { box-shadow: 0 0 40px rgba(var(--color-brand), 0.3); }
}
.animate-glow-pulse {
    animation: arcsys-pulse-glow 3s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
    .animate-glow-pulse { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════
   Contrast remediation — dark theme (WCAG 4.5:1 for normal text).
   Raw neutral-500/600 sit at 2.6–4.2:1 on #0a0a0a–#171717 surfaces.
   Light-mode counterparts live in light-mode.css.
   ═══════════════════════════════════════════════════════════════ */
[data-theme="dark"] .text-neutral-500 { color: #848484; }
[data-theme="dark"] .text-neutral-600 { color: #828282; }

/* opacity-dimmed controls/labels fail contrast in BOTH themes:
   builder step nav + brand marquee chips. Hierarchy still reads
   from the active state / gray tone. */
[x-data="pcBuilder()"] button.opacity-40 { opacity: 1; }
.brand-marquee .opacity-40 { opacity: 1; }

/* Header logo image (WP custom logo) — cap size per design */
.site-branding .custom-logo,
.custom-logo-link .custom-logo {
    max-width: 70px;
    width: auto;
    height: auto;
}
