@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700;800&family=Arima:wght@100..700&family=Arbutus+Slab&family=Roboto:ital,wght@0,400;1,400&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  body {
    font-family: "Archivo", sans-serif;
  }
}

@layer components {
  /* Product Card Hover Overlay */
  .product-card .product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .product-card:hover .product-overlay {
    opacity: 1;
  }

  .product-card .product-overlay img {
    width: 22px;
    height: 22px;
  }

  .product-card .product-overlay span {
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

  /* Hide Swiper's default navigation arrows/lines */
  .swiper-button-next,
  .swiper-button-prev {
    display: none !important;
  }

  .swiper-button-next::after,
  .swiper-button-prev::after {
    display: none !important;
  }

  /* Hide Swiper's default pagination if not used */
  .swiper-pagination:not(.product-list-pagination):not(.fabrication-pagination):not(.projects-pagination):not(.advantage-pagination):not(.art-value-pagination):not(.detail2-pagination):not(.product-main-pagination) {
    display: none !important;
  }

  /* ── Unified bullet pagination token ────────────────────────────────────
     All standard Swiper dot paginations share the same sizing:
     Mobile  : 8px  dot  (w-2 h-2), gap = 7px  (3.5px each side)
     Desktop : 12px dot  (w-3 h-3), gap = 12px (6px  each side)
     Active  : same size circle, secondary color #C76E00 (no stretch)
  ──────────────────────────────────────────────────────────────────────── */
  .fabrication-pagination .swiper-pagination-bullet,
  .projects-pagination .swiper-pagination-bullet,
  .product-list-pagination .swiper-pagination-bullet,
  .advantage-pagination .swiper-pagination-bullet,
  .art-value-pagination .swiper-pagination-bullet,
  .detail2-pagination .swiper-pagination-bullet,
  .product-main-pagination .swiper-pagination-bullet {
    background: rgba(199, 110, 0, 0.3) !important;
    opacity: 1 !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 9999px !important;
    transition: background 0.3s ease !important;
    margin: 0 6px !important;
  }

  .fabrication-pagination .swiper-pagination-bullet-active,
  .projects-pagination .swiper-pagination-bullet-active,
  .product-list-pagination .swiper-pagination-bullet-active,
  .advantage-pagination .swiper-pagination-bullet-active,
  .art-value-pagination .swiper-pagination-bullet-active,
  .detail2-pagination .swiper-pagination-bullet-active,
  .product-main-pagination .swiper-pagination-bullet-active {
    background: #C76E00 !important;
  }

  @media (max-width: 767px) {
    .fabrication-pagination .swiper-pagination-bullet,
    .projects-pagination .swiper-pagination-bullet,
    .product-list-pagination .swiper-pagination-bullet,
    .advantage-pagination .swiper-pagination-bullet,
    .art-value-pagination .swiper-pagination-bullet,
    .detail2-pagination .swiper-pagination-bullet,
    .product-main-pagination .swiper-pagination-bullet {
      width: 8px !important;
      height: 8px !important;
      margin: 0 3.5px !important;
    }
  }

  /* Hide Swiper's default scrollbar */
  .swiper-scrollbar {
    display: none !important;
  }

  /* Remove any horizontal rules from Swiper */
  .swiper-horizontal > .swiper-scrollbar,
  .swiper .swiper-scrollbar {
    display: none !important;
  }

  .shipping-table th,
  .shipping-table td {
    border: 1px solid #2e2f2a;
    padding: 1.5rem 1rem;
  }

  .shipping-table th {
    background-color: transparent;
    color: #2e2f2a;
    font-weight: bold;
    text-align: center;
  }

  .spec-table th,
  .spec-table td {
    @apply py-[10px] md:py-4 text-center;
  }
}

@layer utilities {
  /* Hide scrollbar for Chrome, Safari and Opera */
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }

  /* Hide scrollbar for IE, Edge and Firefox */
  .scrollbar-hide {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
  }

  /* Custom scroll indicator for horizontal scroll (JS-created) */
  /* Hide native scrollbar everywhere - JS indicator replaces it */
  .mobile-scroll-visible {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .mobile-scroll-visible::-webkit-scrollbar {
    display: none;
  }

  /* Custom scroll indicator track + thumb (JS-created) */
  .scroll-indicator-track {
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
  }

  @media (min-width: 768px) {
    .scroll-indicator-track {
      height: 8px;
    }
  }

  .scroll-indicator-thumb {
    height: 100%;
    background: #c76e00cc;
    border-radius: 10px;
    position: absolute;
    top: 0;
    left: 0;
    transition: width 0.1s ease, left 0.1s ease;
    cursor: grab;
  }

  .scroll-indicator-thumb:active,
  .scroll-indicator-thumb.is-dragging {
    cursor: grabbing;
    background: #c76e00;
  }

  .catalog-text-vertical {
    color: #fff;
    text-align: center;
    font-family: "Archivo", sans-serif;
    font-size: 15px;
    font-style: normal;
    font-weight: 800;
    line-height: 10px;
    text-transform: uppercase;
    display: block;
    white-space: nowrap;
    transform-origin: center;
    transform: rotate(-90deg);
  }
}

@media (max-width: 767px) {
  main[data-page="index"] section h2 {
    font-family: "Archivo", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 32px;
    text-transform: uppercase;
    letter-spacing: 0;
  }
}

/* Rich Text Content — ensures consistent typography for admin-editable HTML content */
.rich-text-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-primary, #1a1a1a);
  margin-bottom: 1rem;
  text-align: justify;
}
.rich-text-content ul {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.rich-text-content ol {
  list-style: decimal;
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.rich-text-content li {
  margin-bottom: 0.25rem;
}
.rich-text-content strong {
  font-weight: 700;
  color: var(--color-primary, #1a1a1a);
}
@media (min-width: 768px) {
  .rich-text-content p {
    font-size: 16px;
    line-height: 1.7;
  }
}