/* ==========================================
   TIME OF KNIGHTS
   STATIC ROYAL DESIGN + MOBILE LAYOUT FIX
   ========================================== */

:root {
  --tok-gold: #d4a52b;
  --tok-gold-light: #f2d477;
  --tok-dark: #11100e;
}

/* ---------- BASE ---------- */

html {
  scroll-behavior: auto;
  max-width: 100%;
}

body {
  max-width: 100%;
}

#root {
  max-width: 100%;
  min-width: 0;
}

/* ---------- DISABLE REVEAL ANIMATIONS ---------- */

.tok-reveal,
.tok-reveal.tok-visible {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* ---------- DISABLE HERO ANIMATIONS ---------- */

.tok-hero-motion,
.tok-hero-motion img,
.tok-hero-motion h1 {
  animation: none !important;
  transform: none !important;
  filter: none !important;
  will-change: auto !important;
}

/* ---------- DISABLE BUTTON ANIMATIONS ---------- */

#root button,
#root a[role="button"],
#root a.button,
#root button[type="submit"] {
  animation: none !important;
  transition: none !important;
}

/* ---------- DISABLE PRODUCT ANIMATIONS ---------- */

#root .product-card,
#root .product-card img,
#root .woocommerce ul.products li.product,
#root .woocommerce ul.products li.product img {
  animation: none !important;
  transition: none !important;
}

/* ---------- DISABLE HOVER MOVEMENT ---------- */

@media (hover: hover) {
  #root button:hover,
  #root a[role="button"]:hover,
  #root a.button:hover,
  #root button[type="submit"]:hover,
  #root .product-card:hover,
  #root .woocommerce ul.products li.product:hover,
  #root .product-card:hover img,
  #root .woocommerce ul.products li.product:hover img {
    transform: none !important;
    box-shadow: none !important;
  }
}

/* ---------- GOLD TEXT SELECTION ---------- */

::selection {
  color: #11100e;
  background: var(--tok-gold-light);
}

/* ==========================================
   MOBILE RESPONSIVE FIX
   ========================================== */

@media screen and (max-width: 768px) {

  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: hidden !important;
  }

  #root {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  #root *,
  #root *::before,
  #root *::after {
    box-sizing: border-box;
  }

  /* Prevent oversized media */
  #root img,
  #root video,
  #root iframe {
    max-width: 100%;
  }

  /* WooCommerce product layout */
  #root .woocommerce div.product {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Product gallery */
  #root .woocommerce div.product div.images,
  #root .woocommerce-product-gallery,
  #root .woocommerce-product-gallery__wrapper,
  #root .woocommerce-product-gallery__image {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #root .woocommerce-product-gallery__image a {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  #root .woocommerce-product-gallery__image img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Product information */
  #root .woocommerce div.product div.summary,
  #root .woocommerce div.product .summary {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
  }

  /* Product titles and descriptions */
  #root .woocommerce div.product .product_title,
  #root .woocommerce-breadcrumb,
  #root h1,
  #root h2,
  #root h3,
  #root p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* Product thumbnails */
  #root .woocommerce div.product .flex-control-thumbs {
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  #root .woocommerce div.product .flex-control-thumbs li {
    flex: 0 0 auto !important;
    max-width: 24% !important;
  }

  #root .woocommerce div.product .flex-control-thumbs img {
    width: 100% !important;
    height: auto !important;
  }

  /* Product listing grid */
  #root .woocommerce ul.products {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #root .woocommerce ul.products li.product {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Shipping notice and header content */
  #root header,
  #root nav {
    max-width: 100%;
  }

  /* Keep normal image proportions */
  #root img {
    height: auto;
  }
}

/* ---------- ACCESSIBILITY ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}