/* ═══════════════════════════════════════════════════
   EFFORTMART GLOBAL CSS PATCH v4.1
   Applied to all pages via footer.php
═══════════════════════════════════════════════════ */
/* ── CSS Variables ── */
:root {
  --primary: #E97C43;
  --primary-dark: #C45A2A;
  --primary-light: #FFF7ED;
  --dark: #1E293B;
  --gray: #64748B;
  --gray-light: #F8FAFC;
  --gray-border: #E2E8F0;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

/* ── Smooth tap feedback (mobile) ── */
a,
button,
.btn,
[role="button"],
.nav-item,
.product-card,
.category-item {
  -webkit-tap-highlight-color: rgba(233, 124, 67, 0.08);
  cursor: pointer;
}

a:active,
button:active,
.btn:active,
.nav-item:active,
.product-card:active {
  opacity: 0.82;
  transform: scale(0.98);
  transition: opacity 0.08s ease, transform 0.08s ease;
}

/* ── Safe area for bottom nav (iPhones / newer Android with gesture nav) ── */
#mobileBottomNav,
.mobile-bottom-nav {
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
  padding-bottom: max(env(safe-area-inset-bottom), 0px);
}

/* Body bottom padding so content is not covered by bottom nav + system nav */
@media (max-width: 991px) {
  body:not(.em-native-app) {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 8px)) !important;
  }
  /* In native app, app's own CSS handles this */
  body.em-native-app {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
  }
  } /* ── App mode: hide footer ── */ body.em-native-app footer,
  body.em-native-app .em-footer,
  body.em-native-app .site-footer,
  body.em-native-app footer.em-footer {
    display: none !important;
  }
  /* ── Pending Payment Banner (website) ── */
  .em-pending-payment-bar {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    background: linear-gradient(135deg, #1E293B, #0F172A);
    color: #fff;
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9998;
    box-shadow: var(--sh-3);
    animation: slideUpBar 0.4s cubic-bezier(.4,0,.2,1);
    font-family: 'Inter', system-ui, sans-serif;
    max-width: 500px;
    margin: 0 auto;
  }
  @keyframes slideUpBar {
    from {
      transform: translateY(100px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  .em-pending-payment-bar .bar-icon {
    width: 40px;
    height: 40px;
    background: rgba(233,124,67,.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--primary);
  }
  .em-pending-payment-bar .bar-text {
    flex: 1;
    min-width: 0;
  }
  .em-pending-payment-bar .bar-text strong {
    display: block;
    font-size: .85rem;
    font-weight: 700;
  }
  .em-pending-payment-bar .bar-text span {
    font-size: .75rem;
    color: rgba(255,255,255,.65);
  }
  .em-pending-payment-bar .bar-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
  }
  .em-pending-payment-bar .bar-btn {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: .76rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .em-pending-payment-bar .bar-btn.primary {
    background: var(--primary);
    color: #fff;
  }
  .em-pending-payment-bar .bar-btn.dismiss {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
  }
  /* ── Smooth page transitions ── */
  html {
    scroll-behavior: smooth;
  }
  /* ── Improved button/link focus ── */
  a:focus-visible,
  button:focus-visible,
  .btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
  }
  /* ── Better image loading ── */
  img {
    image-rendering: auto;
  }
  img[loading="lazy"] {
    opacity: 0;
    transition: opacity .3s;
  }
  img[loading="lazy"].loaded {
    opacity: 1;
  }
  /* ── Skeleton shimmer ── */
  @keyframes shimmer {
    0% {
      background-position: -600px 0;
    }
    100% {
      background-position: 600px 0;
    }
  }
  .skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 600px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
  }
  /* ── Font loading ── */
  body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  /* ========================================= */
  /*         EFFORTMART PUBLIC FOOTER          */
  /*           COLOR THEME SYSTEM              */
  /* ========================================= */
  :root {
    --primary: #E97C43;
    --primary-dark: #973B14;
    --primary-light: #FFEFE5;
    --secondary: #FF9A3D;
    --dark: #1E293B;
    --light: #FFFFFF;
    --gray: #64748B;
    --gray-light: #F8FAFC;
    --gray-border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
  }
  /* =========================== */
  /*        GLOBAL FOOTER        */
  /* =========================== */
  footer.em-footer {
    background: linear-gradient(135deg, var(--dark) 0%, #0F172A 100%);
    color: var(--light);
    padding: 20px 0 0;
    position: relative;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  }
  /* Animated Background Elements */
  footer.em-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(233, 124, 67, 0.08) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
  }
  .em-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
  }
  /* =========================== */
  /*   BRAND + INFO SECTION      */
  /* =========================== */
  .em-footer-top {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .em-brand-box {
    max-width: 500px;
  }
  .em-brand-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
  }
  .em-brand-logo img {
    height: 56px;
    width: auto;
    border-radius: 12px;
    background: white !important;
    padding: 8px;
    box-shadow: var(--sh-2);
    transition: all 0.3s ease;
  }
  .em-brand-logo img:hover {
    transform: scale(1.05);
    box-shadow: var(--sh-3);
  }
  .em-brand-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin: 0;
  }
  .em-brand-desc {
    font-size: 16px;
    color: #CBD5E1;
    line-height: 1.6;
    margin: 15px 0 25px;
    font-weight: 400;
  }
  /* Corporate Info */
  .em-corporate-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
  }
  .em-corporate-info h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--warning));
    border-radius: 2px;
  }
  .em-corporate-info p {
    color: #CBD5E1;
    font-size: 14px;
    line-height: 1.6;
    margin: 8px 0;
  }
  /* Contact Info */
  .em-contact-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
  }
  .em-contact-info h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--warning), var(--success));
    border-radius: 2px;
  }
  .em-contact-info p {
    color: #CBD5E1;
    font-size: 14px;
    line-height: 1.6;
    margin: 8px 0;
  }
  .em-contact-info a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
  }
  .em-contact-info a:hover {
    color: var(--warning);
    text-decoration: underline;
  }
  /* Social Icons */
  .em-social-icons {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 20px;
  }
  .em-social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--light);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
  }
  .em-social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--sh-2);
    border-color: var(--primary);
  }
  /* =========================== */
  /*       MENU GRID LAYOUT      */
  /* =========================== */
  .em-menu-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 50px;
  }
  .em-menu-col {
    padding: 0 10px;
  }
  .em-menu-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 12px;
  }
  .em-menu-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--warning));
    border-radius: 2px;
  }
  .em-menu-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .em-menu-col ul li {
    margin-bottom: 12px;
  }
  .em-menu-col ul li a {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #CBD5E1;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 400;
    position: relative;
  }
  .em-menu-col ul li a::before {
    content: '›';
    margin-right: 10px;
    color: var(--primary);
    font-weight: bold;
    transition: transform 0.3s ease;
  }
  .em-menu-col ul li a:hover {
    color: var(--light);
    transform: translateX(8px);
  }
  .em-menu-col ul li a:hover::before {
    transform: translateX(3px);
    color: var(--warning);
  }
  /* =========================== */
  /*       FEATURES SECTION      */
  /* =========================== */
  .em-features {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 40px 0;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .em-feature-item {
    flex: 1;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
  }
  .em-feature-item:hover {
    background: rgba(233, 124, 67, 0.1);
    transform: translateY(-5px);
  }
  .em-feature-icon {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 15px;
    display: inline-block;
  }
  .em-feature-item h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--light);
    margin: 0 0 8px 0;
  }
  .em-feature-item p {
    font-size: 14px;
    color: #CBD5E1;
    margin: 0;
  }
  /* Payment Methods */
  .em-payment-methods {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    margin: 5px 0;
    padding: 20px 0;
  }
  .em-payment-methods h5 {
    font-size: 16px;
    color: #CBD5E1;
    margin-bottom: 15px;
  }
  .em-payment-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  .payment-icon {
    font-size: 32px;
    color: var(--light);
    opacity: 0.8;
    transition: all 0.3s ease;
  }
  .payment-icon:hover {
    opacity: 1;
    transform: scale(1.1);
  }
  /* =========================== */
  /*       FOOTER BOTTOM         */
  /* =========================== */
  .em-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    /*border-top: 1px solid rgba(255, 255, 255, 0.1);
    */ color: #94A3B8;
    font-size: 14px;
  }
  .em-copyright {
    flex: 1;
  }
  .em-copyright p {
    margin: 5px 0;
    color: #94A3B8;
  }
  .em-legal-links {
    display: flex;
    gap: 25px;
    align-items: center;
  }
  .em-legal-links a {
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative;
  }
  .em-legal-links a:hover {
    color: var(--primary);
  }
  .em-legal-links a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -15px;
    color: #64748B;
  }
  /* =========================== */
  /*      TABLET LAYOUT          */
  /* =========================== */
  @media (max-width: 1024px) {
    .em-container {
      padding: 0 30px;
    }
    .em-footer-top {
      grid-template-columns: 1fr;
      gap: 30px;
    }
    .em-brand-box {
      max-width: 100%;
      text-align: center;
    }
    .em-brand-logo {
      justify-content: center;
    }
    .em-corporate-info,
    .em-contact-info {
      text-align: center;
    }
    .em-corporate-info h4::after,
    .em-contact-info h4::after {
      left: 50%;
      transform: translateX(-50%);
    }
    .em-social-icons {
      justify-content: center;
    }
    .em-menu-row {
      grid-template-columns: repeat(2, 1fr);
      gap: 30px;
    }
    .em-features {
      flex-wrap: wrap;
    }
    .em-feature-item {
      flex: 0 0 calc(50% - 20px);
    }
    .em-footer-bottom {
      flex-direction: column;
      gap: 15px;
      text-align: center;
    }
    .em-legal-links a:not(:last-child)::after {
      display: none;
    }
  }
  /* =========================== */
  /*       MOBILE LAYOUT         */
  /* =========================== */
  @media (max-width: 768px) {
    footer.em-footer {
      padding: 40px 0 75px;
    }
    .em-container {
      padding: 0 20px;
    }
    .em-footer-top {
      margin-bottom: 40px;
      padding-bottom: 30px;
    }
    .em-brand-logo {
      flex-direction: column;
      text-align: center;
      gap: 15px;
    }
    .em-brand-title {
      font-size: 24px;
    }
    .em-brand-desc {
      font-size: 15px;
    }
    .em-menu-row {
      grid-template-columns: 1fr;
      gap: 0;
    }
    .em-menu-col {
      border: none;
      padding: 0;
      margin-bottom: 0;
      background: transparent;
    }
    .em-menu-col h4 {
      display: flex;
      justify-content: space-between;
      align-items: center;
      cursor: pointer;
      padding: 20px 0;
      margin-bottom: 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      font-size: 16px;
    }
    .em-menu-col h4::after {
      content: '›';
      font-size: 24px;
      font-weight: 300;
      background: none;
      width: auto;
      height: auto;
      position: static;
      transition: transform 0.3s ease;
      color: var(--primary);
    }
    .em-menu-col.active h4::after {
      transform: rotate(90deg);
      color: var(--warning);
    }
    .em-menu-col ul {
      display: none;
      padding: 15px 0 20px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    .em-menu-col.active ul {
      display: block;
    }
    .em-menu-col ul li a {
      padding: 10px 0;
      font-size: 14px;
    }
    .em-features {
      flex-direction: column;
      gap: 15px;
    }
    .em-feature-item {
      width: 100%;
    }
    .em-payment-icons {
      gap: 15px;
    }
    .em-footer-bottom {
      padding: 20px 0;
      text-align: center;
    }
    .em-legal-links {
      display: block;
      flex-direction: column;
      gap: 10px;
    }
    .em-legal-links a:not(:last-child)::after {
      display: none;
    }
  }
  /* =========================== */
  /*     SMALL MOBILE LAYOUT     */
  /* =========================== */
  @media (max-width: 480px) {
    .em-container {
      padding: 0 15px;
    }
    .em-brand-logo img {
      height: 48px;
    }
    .em-brand-title {
      font-size: 22px;
    }
    .em-social-icons a {
      width: 40px;
      height: 40px;
      font-size: 18px;
    }
    .em-footer-bottom {
      font-size: 13px;
    }
  }
  /* =========================== */
  /*     ANIMATION KEYFRAMES     */
  /* =========================== */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  .em-menu-col {
    animation: fadeInUp 0.6s ease-out;
  }
  .em-menu-col:nth-child(1) {
    animation-delay: 0.1s;
  }
  .em-menu-col:nth-child(2) {
    animation-delay: 0.2s;
  }
  .em-menu-col:nth-child(3) {
    animation-delay: 0.3s;
  }
  .em-menu-col:nth-child(4) {
    animation-delay: 0.4s;
  }
  /* =========================== */
  /*     ACCESSIBILITY SUPPORT   */
  /* =========================== */
  @media (prefers-reduced-motion: reduce) {
    .em-brand-logo img,
    .em-social-icons a,
    .em-menu-col ul li a,
    .em-feature-item {
      transition: none;
    }
    .em-menu-col {
      animation: none;
    }
  }
}
