/*
Theme Name: Global Trade
Theme URI: https://www.shopagg.com/
Author: ShopAGG
Author URI: https://www.shopagg.com/
Description: Global Trade - A premium B2B foreign trade theme with Alibaba-inspired orange palette, designed for trading companies, manufacturers, and global suppliers. Bright, professional, conversion-focused.
Version: 1.0.0
License: MIT
*/

/**
 * Global Trade Theme - Custom Styles
 * Design language: B2B marketplace, trust-driven, bright & professional
 * Color palette: Alibaba orange (#FF6A00) + Trust blue (#0A4DB8) + Clean neutrals
 */

/* ===== Base & Variables ===== */
:root {
  --gt-ink: #0f1729;
  --gt-muted: #5b6478;
  --gt-surface: #ffffff;
  --gt-bg: #f5f7fa;
  --gt-border: #e6e9ef;
  --gt-primary: #ff6a00;
  --gt-primary-dark: #e55e00;
  --gt-accent: #0a4db8;
  --gt-accent-light: #3b82f6;
  --gt-success: #16a34a;
  --gt-gold: #f59e0b;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Plus Jakarta Sans", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--gt-bg);
  color: var(--gt-ink);
}

img,
video {
  max-width: 100%;
}

/* ===== Typography Utilities ===== */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.font-display {
  font-family: "Plus Jakarta Sans", "DM Sans", sans-serif;
  letter-spacing: -0.02em;
}

/* ===== Hero Swiper ===== */
.hero-banner {
  min-height: 540px;
  height: clamp(540px, 48vw, 880px);
}

.hero-banner .swiper,
.hero-banner .swiper-wrapper,
.hero-banner .swiper-slide {
  height: 100%;
}

.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  background: rgba(255, 255, 255, 0.18);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(8px);
}

.hero-swiper .swiper-button-prev:hover,
.hero-swiper .swiper-button-next:hover {
  background: var(--gt-primary);
  transform: scale(1.08);
}

.hero-swiper .swiper-button-prev::after,
.hero-swiper .swiper-button-next::after {
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
}

.hero-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.5);
  opacity: 1;
  width: 10px;
  height: 10px;
  transition: all 0.2s;
}

.hero-swiper .swiper-pagination-bullet-active {
  background: var(--gt-primary);
  width: 28px;
  border-radius: 5px;
}

/* ===== Swiper Thumbs ===== */
.thumbs-swiper .swiper-slide {
  opacity: 0.55;
  transition: opacity 0.2s, border-color 0.2s;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  overflow: hidden;
}

.thumbs-swiper .swiper-slide:hover {
  opacity: 0.85;
}

.thumbs-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--gt-primary) !important;
}

/* ===== Rich Content Safety ===== */
.rich-content img {
  height: auto;
  border-radius: 0.5rem;
}

.rich-content table {
  width: 100%;
  border-collapse: collapse;
}

.rich-content table th,
.rich-content table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--gt-border);
}

.rich-content table th {
  background: #f8fafc;
  font-weight: 600;
}

@media (max-width: 767px) {
  .rich-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* ===== Smooth Scroll ===== */
html {
  scroll-behavior: smooth;
}

/* ===== Focus States ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 106, 0, 0.35);
  outline-offset: 2px;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
  transition: all 0.3s ease;
}

/* ===== GT Components ===== */

/* Trust badge ribbon */
.gt-ribbon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: var(--gt-primary-dark);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Gradient text */
.gt-text-gradient {
  background: linear-gradient(135deg, var(--gt-primary) 0%, var(--gt-primary-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Card hover lift */
.gt-card-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.gt-card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -12px rgba(255, 106, 0, 0.18), 0 8px 16px -4px rgba(15, 23, 41, 0.08);
}

/* Primary button with shine */
.gt-btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gt-primary) 0%, var(--gt-primary-dark) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px -6px rgba(255, 106, 0, 0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gt-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -8px rgba(255, 106, 0, 0.6);
}

.gt-btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}

.gt-btn-primary:hover::after {
  left: 130%;
}

/* Section heading divider */
.gt-section-title {
  position: relative;
  display: inline-block;
}

.gt-section-title::after {
  content: "";
  position: absolute;
  bottom: -12px;
  left: 0;
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--gt-primary), var(--gt-primary-dark));
  border-radius: 2px;
}

.gt-section-title-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Stat counter card */
.gt-stat-card {
  position: relative;
  overflow: hidden;
}

.gt-stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

/* Category tile */
.gt-category-tile {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.gt-category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 106, 0, 0) 0%, rgba(255, 106, 0, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

.gt-category-tile:hover::before {
  opacity: 1;
}

.gt-category-tile:hover .gt-category-icon {
  transform: scale(1.15) rotate(-6deg);
  color: var(--gt-primary);
}

.gt-category-icon {
  transition: transform 0.3s, color 0.3s;
}

/* Marquee for trust logos */
@keyframes gt-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gt-marquee {
  display: flex;
  width: max-content;
  animation: gt-marquee 28s linear infinite;
}

.gt-marquee:hover {
  animation-play-state: paused;
}

/* ===== Floating Contact ===== */
.site-float-contact {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 45;
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.site-float-contact__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gt-primary) 0%, var(--gt-primary-dark) 100%);
  color: #fff;
  padding: 0.9rem 1.1rem;
  font-weight: 700;
  box-shadow: 0 22px 40px rgba(255, 106, 0, 0.35);
  cursor: pointer;
}

.site-float-contact__panel {
  width: min(340px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border-radius: 1.5rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(255, 106, 0, 0.15), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 237, 0.97));
  border: 1px solid rgba(255, 106, 0, 0.22);
  box-shadow: 0 28px 60px rgba(255, 106, 0, 0.22);
  backdrop-filter: blur(14px);
}

.site-float-contact__eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gt-primary-dark);
  margin-bottom: 0.45rem;
}

.site-float-contact__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gt-ink);
  font-family: "Plus Jakarta Sans", sans-serif;
}

.site-float-contact__desc {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--gt-muted);
}

.site-float-contact__group {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
}

.site-float-contact__item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(230, 233, 239, 0.9);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.site-float-contact__item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 106, 0, 0.45);
  box-shadow: 0 16px 32px rgba(255, 106, 0, 0.12);
}

.site-float-contact__icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  color: var(--gt-primary-dark);
  flex-shrink: 0;
}

.site-float-contact__item--phone .site-float-contact__icon {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
}

.site-float-contact__item--email .site-float-contact__icon {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #fff;
}

.site-float-contact__item--whatsapp .site-float-contact__icon {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
}

.site-float-contact__item--address .site-float-contact__icon {
  background: linear-gradient(135deg, var(--gt-primary) 0%, #fb923c 100%);
  color: #fff;
}

.site-float-contact__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.site-float-contact__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gt-muted);
}

.site-float-contact__value {
  color: var(--gt-ink);
  font-size: 0.94rem;
  line-height: 1.45;
  word-break: break-word;
}

.site-float-contact__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.site-float-contact__social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.35rem;
  border-radius: 999px;
  background: #fff;
  color: var(--gt-ink);
  border: 1px solid rgba(230, 233, 239, 0.95);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.site-float-contact__social-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 106, 0, 0.45);
  color: var(--gt-primary-dark);
}

.site-float-contact__social-icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.site-float-contact__social-text {
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-float-contact__social-link {
  background-color: #ffffff;
}

.site-float-contact__social-link--facebook .site-float-contact__social-icon {
  background: linear-gradient(135deg, #1877f2 0%, #60a5fa 100%);
}

.site-float-contact__social-link--instagram .site-float-contact__social-icon {
  background: linear-gradient(135deg, #f97316 0%, #e4405f 55%, #8b5cf6 100%);
}

.site-float-contact__social-link--twitter .site-float-contact__social-icon {
  background: linear-gradient(135deg, #0f172a 0%, #1da1f2 100%);
}

.site-float-contact__social-link--linkedin .site-float-contact__social-icon {
  background: linear-gradient(135deg, #0a66c2 0%, #38bdf8 100%);
}

.site-float-contact__social-link--youtube .site-float-contact__social-icon {
  background: linear-gradient(135deg, #dc2626 0%, #ff0000 100%);
}

.site-float-contact__cta {
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, var(--gt-primary) 0%, var(--gt-primary-dark) 100%);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(255, 106, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.site-float-contact__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(255, 106, 0, 0.35);
}

@media (min-width: 1024px) {
  .site-float-contact {
    left: 0;
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    align-items: flex-start;
  }

  .site-float-contact__toggle {
    display: none;
  }

  .site-float-contact__panel {
    width: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    padding: 0.75rem 0.55rem;
    border-radius: 0 1.4rem 1.4rem 0;
    background:
      radial-gradient(circle at top right, rgba(255, 106, 0, 0.22), transparent 38%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.96));
    border-color: rgba(255, 106, 0, 0.22);
    box-shadow: 0 22px 50px rgba(255, 106, 0, 0.18);
  }

  .site-float-contact__eyebrow,
  .site-float-contact__title,
  .site-float-contact__desc,
  .site-float-contact__cta {
    display: none;
  }

  .site-float-contact__group {
    margin-top: 0;
    gap: 0.55rem;
  }

  .site-float-contact__item {
    width: 3.35rem;
    min-height: 3.35rem;
    padding: 0.38rem;
    border-radius: 999px;
    border-color: rgba(255, 106, 0, 0.16);
    box-shadow: none;
    overflow: hidden;
    white-space: nowrap;
  }

  .site-float-contact__item:hover {
    width: min(17rem, calc(100vw - 3rem));
    box-shadow: 0 18px 36px rgba(255, 106, 0, 0.18);
  }

  .site-float-contact__icon {
    width: 2.6rem;
    height: 2.6rem;
    box-shadow: 0 12px 24px rgba(255, 106, 0, 0.18);
  }

  .site-float-contact__item:hover .site-float-contact__icon {
    transform: scale(1.02);
  }

  .site-float-contact__meta {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.22s ease, opacity 0.18s ease;
  }

  .site-float-contact__item:hover .site-float-contact__meta {
    max-width: 11rem;
    opacity: 1;
  }

  .site-float-contact__label {
    color: #c2410c;
  }

  .site-float-contact__value {
    max-width: 10.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f1729;
  }

  .site-float-contact__social {
    margin-top: 0.55rem;
    flex-direction: column;
    gap: 0.55rem;
  }

  .site-float-contact__social-link {
    width: 3.15rem;
    min-height: 3.15rem;
    padding: 0.32rem;
    border-color: rgba(255, 106, 0, 0.14);
    overflow: hidden;
    box-shadow: none;
  }

  .site-float-contact__social-link:hover {
    width: min(13rem, calc(100vw - 3rem));
    box-shadow: 0 18px 36px rgba(255, 106, 0, 0.18);
  }

  .site-float-contact__social-icon {
    width: 2.5rem;
    height: 2.5rem;
    box-shadow: 0 12px 24px rgba(255, 106, 0, 0.18);
  }

  .site-float-contact__social-text {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    color: #0f1729;
    transition: max-width 0.22s ease, opacity 0.18s ease;
  }

  .site-float-contact__social-link:hover .site-float-contact__social-text {
    max-width: 7rem;
    opacity: 1;
  }
}

/* ============================================================
   Product List Page
   ============================================================ */
.gt-pl-hero {
  position: relative;
}

.gt-cat-item {
  border-left: 2px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gt-cat-item:hover {
  border-left-color: rgba(255, 106, 0, 0.4);
}

.gt-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.gt-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.gt-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 106, 0, 0.25);
  border-radius: 3px;
}

.gt-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 106, 0, 0.45);
}

.gt-page-btn {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gt-page-btn[aria-current="page"],
.gt-page-btn.bg-brand-500 {
  pointer-events: none;
}

/* ============================================================
   Product Detail Page
   ============================================================ */
.gt-main-swiper {
  --swiper-navigation-size: 24px;
}

.gt-main-swiper .swiper-slide {
  position: relative;
}

.gt-main-swiper .swiper-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 41, 0);
  transition: background 0.2s ease;
  pointer-events: none;
}

.gt-main-swiper .swiper-slide:hover::after {
  background: rgba(15, 23, 41, 0.05);
}

.gt-thumbs-swiper .swiper-slide {
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.gt-thumbs-swiper .swiper-slide:hover {
  opacity: 1;
}

.gt-thumbs-swiper .swiper-slide.swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--gt-brand, #FF6A00) !important;
}

/* Lightbox */
#image-lightbox:not(.hidden) {
  animation: gt-fade-in 0.2s ease;
}

#image-lightbox img {
  animation: gt-zoom-in 0.25s ease;
}

@keyframes gt-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes gt-zoom-in {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Inquiry Modal */
#inquiry-modal:not(.hidden) {
  animation: gt-fade-in 0.2s ease;
}

#inquiry-modal > div:last-child > div {
  animation: gt-slide-up 0.25s ease;
}

@keyframes gt-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Price tier highlight pulse */
.gt-price-best {
  animation: gt-pulse-border 2s ease-in-out infinite;
}

@keyframes gt-pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 106, 0, 0); }
  50% { box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.1); }
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .gt-pl-hero h1 {
    font-size: 1.875rem;
    line-height: 1.2;
  }
  .gt-main-swiper {
    --swiper-navigation-size: 18px;
  }
  .gt-main-swiper .swiper-button-next,
  .gt-main-swiper .swiper-button-prev {
    width: 2.25rem !important;
    height: 2.25rem !important;
  }
}

@media (max-width: 1023px) {
  .site-float-contact {
    right: 0.75rem;
    align-items: flex-end;
  }

  .site-float-contact__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(0.75rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .site-float-contact__social-link {
    padding-right: 0.9rem;
  }

  .site-float-contact.is-open .site-float-contact__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .hero-banner {
    min-height: 500px;
    height: min(640px, calc(100svh - 4rem));
  }

  .hero-swiper .swiper-button-prev,
  .hero-swiper .swiper-button-next {
    display: none;
  }

  .site-float-contact__toggle {
    width: 3.25rem;
    height: 3.25rem;
    justify-content: center;
    padding: 0;
    box-shadow: 0 16px 32px rgba(255, 106, 0, 0.3);
  }

  .site-float-contact__toggle span {
    display: none;
  }

  .site-float-contact__panel {
    width: calc(100vw - 1.5rem);
    max-height: min(76vh, 34rem);
  }
}

/* ===== Print Styles ===== */
@media print {
  nav, footer, .no-print, .site-float-contact {
    display: none !important;
  }

  body {
    background: white;
  }

  .container {
    max-width: 100%;
  }
}

/* ===== Responsive Typography ===== */
@media (max-width: 640px) {
  .rich-content {
    font-size: 0.9375rem;
  }
}

/* ===== High Contrast Mode Support ===== */
@media (prefers-contrast: high) {
  .bg-gradient-to-r {
    background: #1e293b !important;
  }
}

/* ===== Reduced Motion Support ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gt-primary);
}
