/**
 * ThemesPlugin Universal Responsive Stylesheet
 * Fully optimized for ALL devices:
 * - Mobile (Small 320px - 375px, Medium 376px - 480px, Large 481px - 768px)
 * - Tablet (Portrait 768px - 834px, Landscape 835px - 1024px)
 * - Laptop (1025px - 1440px)
 * - Desktop (Full HD 1441px - 1920px)
 * - Big Screen Desktop, 2K, 4K Ultra-Wide & Smart TVs (1921px - 3840px+)
 */

/* ==========================================================================
   1. GLOBAL FOUNDATIONAL GUARDS (All Viewports)
   ========================================================================== */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Base Container Safety */
.tpp-wrap,
.tp-wrap,
.tps-page .tpp-wrap,
.ast-container {
  width: min(1280px, calc(100% - 40px));
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Touch Friendly Elements */
button,
a.button,
.tpp-button,
.tps-search-button,
.tps-dashboard,
.tpp-mobile > summary {
  touch-action: manipulation;
}

/* ==========================================================================
   2. BIG SCREEN DESKTOP, 2K & ULTRA-WIDE (1921px - 2559px)
   ========================================================================== */
@media (min-width: 1921px) {
  .tpp-wrap,
  .tp-wrap,
  .tps-page .tpp-wrap,
  .ast-container {
    width: min(1620px, calc(100% - 80px)) !important;
    max-width: 1620px !important;
  }

  /* Typography Scaling */
  .tp-site h1,
  .tps-hero h1 {
    font-size: clamp(52px, 3.6vw, 76px) !important;
    line-height: 1.08 !important;
  }

  .tp-site .tp-hero p,
  .tps-hero p {
    font-size: 18px !important;
    max-width: 780px !important;
    line-height: 1.7 !important;
  }

  /* Grid Expansion */
  .tp-site .tp-tools,
.tp-ready-grid,
.tpp-page ul.products,
ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 26px !important;
  }

  

  

  /* Referral & Account Stats */
  .tp-ref-stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
  }

  .tp-stat-val {
    font-size: 26px !important;
  }
}

/* ==========================================================================
   3. 4K UHD, 5K ULTRA-WIDE & SMART TVs (min-width: 2560px+)
   ========================================================================== */
@media (min-width: 2560px) {
  body {
    font-size: 18px !important;
  }

  .tpp-wrap,
  .tp-wrap,
  .tps-page .tpp-wrap,
  .ast-container {
    width: min(1980px, calc(100% - 120px)) !important;
    max-width: 1980px !important;
  }

  /* Header on 4K/TV */
  .tpp-header .tps-primary-nav {
    font-size: 16px !important;
    gap: 32px !important;
  }

  .tpp-brand img.tpp-brand-logo,
  .tpp-brand img {
    width: 64px !important;
    height: 64px !important;
  }

  .tpp-brand strong {
    font-size: 19px !important;
  }

  /* Grand Hero on TV */
  .tp-site h1,
  .tps-hero h1 {
    font-size: 84px !important;
    letter-spacing: -2.5px !important;
  }

  .tp-site .tp-hero p,
  .tps-hero p {
    font-size: 22px !important;
    max-width: 920px !important;
  }

  

  /* Showcase 5 Columns on Ultra-Wide / 4K */
  .tp-site .tp-tools,
.tpp-page ul.products,
ul.products {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 30px !important;
  }

  .tp-ready-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 26px !important;
  }

  .tp-ready-image img {
    height: 280px !important;
  }

  /* Cards & Spacing */
  .tpp-card,
.tp-ready-card,
.tp-tool {
    border-radius: 20px !important;
  }

  .tpp-button,
  a.checkout-button {
    font-size: 16px !important;
    padding: 14px 28px !important;
  }

  /* Footer on TV */
  .tp-ref-footer .tpfr-directory {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 40px !important;
  }

  .tp-ref-footer .tpfr-column > a {
    font-size: 16px !important;
    line-height: 2 !important;
  }
}

/* ==========================================================================
   4. LAPTOP & COMPACT DESKTOP (1025px - 1440px)
   ========================================================================== */
@media (min-width: 1025px) and (max-width: 1440px) {
  .tpp-header .tps-primary-nav {
    gap: 16px !important;
    font-size: 13.5px !important;
  }

  /* Prevent dropdowns near the right edge from overflowing */
  .tps-primary-nav .tps-nav-dropdown:nth-last-child(-n+3) .tps-dropdown-panel {
    left: auto !important;
    right: 0 !important;
  }

  .tp-site .tp-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .tpp-columns {
    gap: 24px !important;
  }
}

/* ==========================================================================
   5. TABLET DEVICES (769px - 1024px)
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Layout Padding */
  .tpp-wrap,
  .tp-wrap,
  .tps-page .tpp-wrap {
    width: calc(100% - 48px) !important;
  }

  /* Hero on Tablet */
  .tps-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  

  .tp-site h1 {
    font-size: clamp(38px, 5.2vw, 54px) !important;
  }

  /* Grids on Tablet */
  

  .tp-site .tp-tools,
.tp-ready-grid,
ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  /* Single Product on Tablet */
  .tpp-columns {
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }

  .tpp-purchase h1 {
    font-size: 28px !important;
  }

  /* Checkout on Tablet */
  .woocommerce-checkout .col2-set {
    width: 100% !important;
    float: none !important;
    margin-bottom: 30px !important;
  }

  .woocommerce-checkout #order_review {
    width: 100% !important;
    float: none !important;
  }

  /* Footer on Tablet */
  .tp-ref-footer .tpfr-directory {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px !important;
  }
}

/* ==========================================================================
   6. MOBILE VIEWPORTS (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* Prevent horizontal scroll */
  body, html {
    overflow-x: hidden !important;
  }

  .tpp-wrap,
  .tp-wrap,
  .tps-page .tpp-wrap {
    width: calc(100% - 32px) !important;
  }

  /* Header Layout */
  .tpp-header > .tpp-wrap {
    min-height: 64px !important;
    gap: 10px !important;
  }

  .tpp-brand {
    gap: 8px !important;
    min-width: 0 !important;
  }

  .tpp-brand img.tpp-brand-logo,
  .tpp-brand img {
    width: 44px !important;
    height: 44px !important;
    object-fit: contain !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }

  .tpp-brand strong {
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .tpp-brand small {
    display: none !important;
  }

  /* Header Action Buttons */
  .tps-header-actions {
    gap: 8px !important;
    margin-left: auto !important;
  }

  .tps-header-actions .tps-search-button,
  .tps-header-actions .tps-dashboard,
  .tpp-mobile > summary {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .tps-search-button span,
.tps-search-button kbd,
.tps-dashboard span {
    display: none !important;
  }

  /* Mobile Navigation Drawer */
  .tpp-mobile nav {
    position: fixed !important;
    inset: 76px 14px auto 14px !important;
    width: auto !important;
    max-width: calc(100vw - 28px) !important;
    max-height: calc(100dvh - 92px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    background: #ffffff !important;
    border: 1px solid #c9ded8 !important;
    border-radius: 16px !important;
    padding: 14px !important;
    box-shadow: 0 20px 60px rgba(12, 52, 55, 0.35) !important;
    z-index: 99999 !important;
  }

  /* Top Bar */
  .tpp-top .tpp-wrap {
    justify-content: center !important;
    text-align: center !important;
    font-size: 11px !important;
    padding: 6px 0 !important;
  }

  .tpp-top .tps-top-links {
    display: none !important;
  }

  /* Hero Section */
  .tp-site .tp-hero,
  .tps-hero {
    padding: 44px 0 54px !important;
  }

  .tp-site h1,
  .tps-hero h1 {
    font-size: clamp(30px, 8.2vw, 44px) !important;
    line-height: 1.15 !important;
    letter-spacing: -1.2px !important;
    margin: 16px 0 !important;
  }

  .tp-site .tp-hero p,
  .tps-hero p {
    font-size: 14.5px !important;
    line-height: 1.65 !important;
    margin-bottom: 22px !important;
  }

  /* Floating Badges inside frame */
  

  

  /* Single Product Page Stacking */
  .tpp-columns {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .tpp-purchase.summary {
    position: static !important;
    width: 100% !important;
  }

  .tpp-purchase h1 {
    font-size: 24px !important;
    line-height: 1.25 !important;
  }

  .tpp-variation-pills {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .tpp-variation-pills button {
    flex: 1 1 calc(50% - 6px) !important;
    min-height: 42px !important;
    font-size: 13px !important;
  }

  .tpp-purchase button.single_add_to_cart_button,
  .tpp-purchase .button.alt {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 15px !important;
  }

  /* WooCommerce Checkout & Cart */
  .woocommerce-checkout .col2-set,
  .woocommerce-checkout #order_review {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
  }

  .woocommerce table.cart td.actions .coupon {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .woocommerce table.cart td.actions .coupon .input-text,
  .woocommerce table.cart td.actions .coupon button {
    width: 100% !important;
    min-height: 44px !important;
  }

  /* Table Horizontal Scrolling */
  .woocommerce-cart-form,
  .woocommerce-table--order-details,
  .woocommerce-orders-table,
  .tp-ref-table-wrapper {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  /* iOS Input Zoom Guard */
  input[type="text"],
  input[type="search"],
  input[type="tel"],
  input[type="url"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* My Account Navigation */
  .woocommerce-MyAccount-navigation {
    width: 100% !important;
    float: none !important;
    margin-bottom: 24px !important;
  }

  .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
  }

  /* Footer on Mobile */
  .tp-ref-footer .tpfr-directory {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
}

/* ==========================================================================
   7. COMPACT SMARTPHONES (max-width: 480px & 360px)
   ========================================================================== */
@media (max-width: 480px) {
  .tpp-wrap,
  .tp-wrap,
  .tps-page .tpp-wrap {
    width: calc(100% - 24px) !important;
  }

  /* Header Compact */
  .tpp-header > .tpp-wrap {
    min-height: 58px !important;
    gap: 6px !important;
  }

  .tpp-brand img.tpp-brand-logo,
  .tpp-brand img {
    width: 38px !important;
    height: 38px !important;
  }

  .tpp-brand strong {
    font-size: 13px !important;
  }

  .tps-header-actions .tps-search-button,
  .tps-header-actions .tps-dashboard,
  .tpp-mobile > summary {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  /* Catalog Grid on Small Mobile */
  .tp-site .tp-tools,
.tp-ready-grid,
ul.products {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  

  /* Referral Stats on Small Screen */
  .tp-ref-stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .tp-ref-link-field {
    flex-direction: column !important;
  }

  .tp-ref-copy-btn {
    width: 100% !important;
    min-height: 42px !important;
  }

  .tp-ref-share-buttons {
    flex-direction: column !important;
  }

  .tp-share-btn {
    justify-content: center !important;
    width: 100% !important;
  }

  /* Checkout Wallet Box */
  .tp-wallet-box-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }

  .tp-wallet-action {
    width: 100% !important;
  }

  .tp-wallet-action .button.tp-wallet-toggle-btn {
    width: 100% !important;
    text-align: center !important;
  }
}

/* Extra small devices (iPhone SE, Galaxy Fold 320px - 360px) */
@media (max-width: 360px) {
  .tpp-wrap,
  .tp-wrap,
  .tps-page .tpp-wrap {
    width: calc(100% - 16px) !important;
  }

  .tpp-brand strong {
    font-size: 11.5px !important;
    max-width: 110px !important;
  }

  .tps-header-actions .tps-search-button,
  .tps-header-actions .tps-dashboard,
  .tpp-mobile > summary {
    width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  .tpp-variation-pills button {
    flex: 1 1 100% !important;
  }
}
/* Hide the AJAX "Added to cart" notice inside product cards. Success is already shown by the button's Added state and the header cart count. */article .woocommerce-notices-wrapper,article .woocommerce-message,ul.products .woocommerce-notices-wrapper,ul.products .woocommerce-message{display:none!important}
/* Hide the "Added to cart" notice line inside product cards. The notice container holds the View cart link but not the button. */article :has(> a.wc-forward):not(:has(> button)){display:none!important}