/* ==========================================================================
   TRENDHIDE DESIGN SYSTEM & ANIMATIONS
   ========================================================================== */
:root {
  --th-black: #111111;
  --th-charcoal: #1c1c1c;
  --th-red: #c00000;
  --th-red-hover: #9c0000;
  --th-gray-light: #f7f7f8;
  --th-border: #e8e8e8;
  --th-text-sub: #666666;
  --th-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base resets & typography */
body, .th-auto-card {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--th-black);
}

/* ==========================================================================
   AUTOMATIC WOOCOMMERCE LOOP CARD (Applied to all products)
   ========================================================================== */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  margin: 40px 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

ul.products::before, ul.products::after {
  content: none !important;
}

ul.products li.product {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
  background: #ffffff;
  border: 1px solid var(--th-border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--th-ease), box-shadow 0.4s var(--th-ease), border-color 0.3s ease;
  position: relative;
}

/* Card hover animation */
ul.products li.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
  border-color: #d1d1d1;
}

/* 3:4 Image Frame with Dual Hover Flip */
.th-product-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--th-gray-light);
}

.th-product-image-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.6s var(--th-ease), opacity 0.4s ease;
}

.th-product-image-wrap .th-img-secondary {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

ul.products li.product:hover .th-product-image-wrap .th-img-primary {
  transform: scale(1.05);
}

ul.products li.product:hover .th-product-image-wrap .th-img-secondary {
  opacity: 1;
  transform: scale(1.05);
}

/* Badges */
.th-badge-container {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.th-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  border-radius: 2px;
  text-transform: uppercase;
}

.th-badge-sale {
  background: var(--th-red);
  color: #ffffff;
  animation: pulseBadge 3s infinite ease-in-out;
}

.th-badge-featured {
  background: var(--th-black);
  color: #ffffff;
}

@keyframes pulseBadge {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.92; transform: scale(1.03); }
}

/* Title, Rating & Pricing inside card */
ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  padding: 12px 14px 4px 14px !important;
  margin: 0 !important;
  color: var(--th-black) !important;
  height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.th-loop-rating {
  padding: 0 14px;
  font-size: 12px;
  color: #f59e0b;
}

.th-loop-rating .star-rating {
  font-size: 11px;
  float: none;
  display: inline-block;
  margin: 0 4px 0 0;
}

.th-rev-count {
  font-size: 11px;
  color: var(--th-text-sub);
}

ul.products li.product .price {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--th-black) !important;
  padding: 8px 14px 14px 14px !important;
  margin: auto 0 0 0 !important;
}

ul.products li.product .price del {
  color: #8c8c8c !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  margin-right: 6px;
}

ul.products li.product .price ins {
  text-decoration: none !important;
  color: var(--th-red) !important;
}

/* Auto-styled Button */
ul.products li.product .button {
  display: block !important;
  width: calc(100% - 28px) !important;
  margin: 0 14px 14px 14px !important;
  background: var(--th-black) !important;
  color: #ffffff !important;
  text-align: center !important;
  padding: 11px 0 !important;
  border-radius: 3px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  text-transform: uppercase !important;
  transition: all 0.3s var(--th-ease) !important;
  border: 1px solid var(--th-black) !important;
}

ul.products li.product .button:hover {
  background: var(--th-red) !important;
  border-color: var(--th-red) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(192, 0, 0, 0.25);
}

/* ==========================================================================
   MEGA NAVIGATION WITH SLIDE-DOWN ANIMATION
   ========================================================================== */
.th-navbar-container {
  background: #ffffff;
  border-bottom: 1px solid var(--th-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.th-navbar-container.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.th-menu-bar {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.th-menu-item {
  position: relative;
}

.th-menu-link {
  display: block;
  padding: 18px 20px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--th-black);
  text-decoration: none;
  transition: color 0.2s ease;
}

.th-menu-item:hover > .th-menu-link {
  color: var(--th-red);
}

/* Mega dropdown container */
.th-mega-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 900px;
  background: #ffffff;
  border: 1px solid var(--th-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s var(--th-ease);
}

.th-menu-item:hover .th-mega-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.th-col-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--th-red);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}

.th-sub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.th-sub-list li {
  margin-bottom: 9px;
}

.th-sub-list a {
  font-size: 13px;
  color: #333333;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.th-sub-list a:hover {
  color: var(--th-red);
  transform: translateX(4px);
}

/* Responsive Grid */
@media (max-width: 1024px) {
  ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

@media (max-width: 600px) {
  ul.products {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}
/* ==========================================================================
   HEADER, MEGA DROPDOWNS & TOP TICKER
   ========================================================================== */
.th-topbar {
  background: #111111;
  color: #d1d1d1;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  border-bottom: 1px solid #222222;
  padding: 8px 0;
}
.th-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.th-topbar strong {
  color: #ffffff;
}
.th-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.th-topbar-divider {
  color: #444444;
}
.th-topbar-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}
.th-topbar-link:hover {
  text-decoration: underline;
}

/* Main Site Header */
.th-site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--th-border);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.th-site-header.is-scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.th-header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Brand Logo */
.th-logo-text {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #111111;
  text-transform: uppercase;
}
.th-logo-accent {
  color: var(--th-red);
}
.th-brand-logo a {
  text-decoration: none;
}

/* Desktop Navigation Menu */
.th-desktop-nav {
  height: 100%;
}
.th-nav-menu {
  display: flex;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.th-menu-item {
  height: 100%;
  display: flex;
  align-items: center;
}
.th-menu-link {
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #111111;
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}
.th-menu-item:hover > .th-menu-link,
.th-menu-link:hover {
  color: var(--th-red);
}
.th-arrow {
  font-size: 9px;
  margin-left: 5px;
  opacity: 0.6;
}
.th-nav-tag {
  background: var(--th-red);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 2px;
  margin-left: 6px;
}
.th-link-sale {
  color: var(--th-red) !important;
}
.th-badge-sale-nav {
  background: #111;
  color: #fff;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 2px;
  margin-left: 5px;
}

/* ==========================================================================
   MEGA DROPDOWNS
   ========================================================================== */
.th-has-mega, .th-has-dropdown {
  position: relative;
}
.th-mega-box {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #ffffff;
  border: 1px solid var(--th-border);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
}
.th-has-mega:hover .th-mega-box {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.th-mega-4col {
  width: 980px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 240px;
  gap: 28px;
}
.th-mega-3col {
  width: 780px;
  display: grid;
  grid-template-columns: 1fr 1fr 240px;
  gap: 28px;
}
.th-mega-heading {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--th-red);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0f0f0;
}
.th-mega-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.th-mega-list li {
  margin-bottom: 8px;
}
.th-mega-list a {
  font-size: 13px;
  color: #333333;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}
.th-mega-list a:hover {
  color: var(--th-red);
  transform: translateX(4px);
}
.th-mega-card {
  background: #fafafa;
  border-radius: 4px;
  overflow: hidden;
  padding: 10px;
  text-align: center;
}
.th-mega-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 8px;
}
.th-mega-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}
.th-mega-card a {
  font-size: 12px;
  color: var(--th-red);
  font-weight: 700;
  text-decoration: none;
}

/* Simple Dropdown */
.th-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 220px;
  background: #fff;
  border: 1px solid var(--th-border);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  list-style: none;
  padding: 12px 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
}
.th-has-dropdown:hover .th-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.th-dropdown-menu a {
  display: block;
  padding: 8px 18px;
  font-size: 13px;
  color: #222;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.th-dropdown-menu a:hover {
  background: #f8f8f8;
  color: var(--th-red);
}

/* Header Actions */
.th-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.th-action-btn {
  background: none;
  border: none;
  color: #111111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}
.th-action-btn:hover {
  color: var(--th-red);
}
.th-cart-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--th-red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search Modal */
.th-search-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.th-search-modal.is-active {
  opacity: 1;
  visibility: visible;
}
.th-search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
}
.th-search-modal-dialog {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 650px;
  background: #fff;
  border-radius: 6px;
  padding: 24px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
}
.th-search-form {
  display: flex;
  gap: 10px;
}
.th-search-input {
  flex-grow: 1;
  font-size: 16px;
  padding: 14px 18px;
  border: 2px solid #111;
  border-radius: 3px;
  outline: none;
}
.th-search-submit {
  background: #111;
  color: #fff;
  border: none;
  padding: 0 24px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 3px;
}
.th-quick-search-tags {
  margin-top: 14px;
  font-size: 12px;
  color: #666;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.th-quick-search-tags a {
  color: #111;
  text-decoration: none;
  font-weight: 600;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 3px;
}

/* Mobile Drawer */
.th-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.th-mobile-toggle span {
  width: 22px;
  height: 2px;
  background: #111;
}
.th-mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  background: #fff;
  z-index: 2500;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
}
.th-mobile-drawer.is-open {
  transform: translateX(0);
}
.th-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2400;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.th-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.th-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #eee;
}
.th-drawer-title {
  font-weight: 900;
  letter-spacing: 1px;
}
.th-drawer-close {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
}
.th-mobile-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.th-mob-item {
  border-bottom: 1px solid #f2f2f2;
}
.th-mob-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}
.th-mob-item a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}
.th-mob-toggle-arrow {
  background: none;
  border: none;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.th-mob-sub {
  list-style: none;
  padding: 0 0 10px 30px;
  margin: 0;
  display: none;
}
.th-mob-sub.is-visible {
  display: block;
}
.th-mob-sub li {
  padding: 6px 0;
}
.th-mob-sub a {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}
.th-drawer-footer {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.th-drawer-btn {
  text-align: center;
  padding: 11px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 12px;
  border-radius: 3px;
}
.th-drawer-btn-alt {
  background: #f0f0f0;
  color: #111;
}

/* ==========================================================================
   FOOTER STYLING
   ========================================================================== */
.th-site-footer {
  background: #111111;
  color: #ffffff;
  padding-top: 50px;
  font-size: 14px;
}
.th-footer-perks {
  border-bottom: 1px solid #222222;
  padding-bottom: 40px;
  margin-bottom: 50px;
}
.th-perks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.th-perk-box {
  display: flex;
  align-items: center;
  gap: 14px;
}
.th-perk-box svg {
  width: 32px;
  height: 32px;
  stroke: var(--th-red);
  flex-shrink: 0;
}
.th-perk-box strong {
  display: block;
  font-size: 13px;
  color: #fff;
}
.th-perk-box span {
  display: block;
  font-size: 11px;
  color: #888;
}

/* Footer Grid */
.th-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.th-footer-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.th-footer-desc {
  color: #999;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.th-newsletter-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #ddd;
  margin-bottom: 8px;
}
.th-footer-form {
  display: flex;
  gap: 6px;
}
.th-footer-form input {
  background: #222;
  border: 1px solid #333;
  color: #fff;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 3px;
  flex-grow: 1;
}
.th-footer-form button {
  background: var(--th-red);
  color: #fff;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 16px;
  cursor: pointer;
  border-radius: 3px;
}

.th-col-heading {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 8px;
  border-bottom: 1px solid #222;
}
.th-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.th-footer-links li {
  margin-bottom: 10px;
}
.th-footer-links a {
  color: #888;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}
.th-footer-links a:hover {
  color: #fff;
  transform: translateX(4px);
}

/* Bottom Strip */
.th-footer-bottom {
  background: #080808;
  border-top: 1px solid #1a1a1a;
  padding: 22px 0;
  font-size: 12px;
  color: #666;
}
.th-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.th-payment-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.th-badge-pay {
  background: #1c1c1c;
  color: #ccc;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid #2d2d2d;
}
.th-legal-links {
  display: flex;
  gap: 14px;
}
.th-legal-links a {
  color: #777;
  text-decoration: none;
}
.th-legal-links a:hover {
  color: #fff;
}

/* Responsive */
@media (max-width: 1024px) {
  .th-desktop-nav, .th-topbar-right {
    display: none;
  }
  .th-mobile-toggle {
    display: flex;
  }
  .th-perks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .th-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .th-perks-grid {
    grid-template-columns: 1fr;
  }
  .th-footer-grid {
    grid-template-columns: 1fr;
  }
  .th-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}