/* ============================= */
/* IDRISI MART - MAIN STYLESHEET */
/* Version: 3.0 - ENHANCED EDITION */
/* ============================= */

/* ============================= */
/* GLOBAL STYLES */
/* ============================= */
* {
  font-family: 'Cairo', sans-serif !important;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-secondary);
}

/* Restore Font Awesome icon font overridden by * !important above */
.fa, .fas, .far, .fal, .fab, .fad,
[class^="fa-"], [class*=" fa-"],
.fa::before, .fas::before, .far::before, .fal::before, .fab::before, .fad::before,
[class^="fa-"]::before, [class*=" fa-"]::before {
  font-family: "Font Awesome 7 Free", "Font Awesome 7 Brands",
               "Font Awesome 5 Free", "Font Awesome 5 Brands" !important;
}
*,
::after,
::before {
  box-sizing: border-box;
}

:root {
  /* Primary Colors */
  --primary-color: #4b315e;
  --primary-dark: #3a2449;
  --secondary-color: #ff6001;
  --white-color: #ffffff;
  --black-color: #000000;
  --light-gray: #f5f5f5;
  --dark-gray: #333333;
  --accent-purple: #6b4c7a;
  --accent-orange: #ff8534;

  /* Theme Colors - Light Mode */
  --bg-primary: #f5f7fa;
  --bg-secondary: #f5f5f5;
  --bg-tertiary: #fafafa;
  /* Lighter variant used for subtle section backgrounds */
  --bg-secondary-light: #ffffff;
  --text-primary: #000000;
  --text-secondary: #333333;
  --text-muted: #666666;
  --border-color: #e0e0e0;

  /* Theme Toggle Colors - Light Mode */
  --theme-toggle-bg: rgba(255, 255, 255, 0.1);
  --theme-toggle-border: rgba(255, 255, 255, 0.3);
  --theme-toggle-color: var(--white-color);
  --theme-toggle-hover-bg: rgba(255, 255, 255, 0.2);

  /* Bootstrap Override - Custom Primary Color */
  --bs-primary: #4b315e;
  --bs-primary-rgb: 75, 49, 94;
}

/* Bootstrap Primary Color Override */
.bg-primary {
  --bs-bg-opacity: 1;
  background-color: var(--primary-color) !important;
}

/* Dark mode bg-primary maintains the same purple brand color */
[data-theme='dark'] .bg-primary {
  background-color: var(--primary-color) !important;
}

.btn-primary {
  --bs-btn-bg: var(--primary-color);
  --bs-btn-border-color: var(--primary-color);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
  --bs-btn-active-bg: var(--primary-dark);
  --bs-btn-active-border-color: var(--primary-dark);
}

.text-primary {
  color: #ffffff !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

/* ================================ */
/* MODERN AD CARD COMPONENT STYLES */
/* ================================ */

/* ===================================== */
/* AD CARD COMPONENT - OPTIMIZED */
/* ===================================== */

/* Enhanced Publisher Avatar Only */
.feature-pill.publisher-avatar-only {
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    z-index: 5;
}

.publisher-avatar-enhanced {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
    object-fit: cover;
}

.feature-pill.publisher-avatar-only:hover .publisher-avatar-enhanced {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transform: scale(1.15) rotate(5deg);
}

/* Avatar Verified Badge */
.avatar-verified-badge {
    position: absolute;
    top: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: #ffffff;
    border: 2px solid #ffffff;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.avatar-verified-badge.person-badge {
    background: linear-gradient(135deg, #1877f2, #0a66d9);
}

.avatar-verified-badge.company-badge {
    background: linear-gradient(135deg, #1877f2, #0a66d9);
}

.feature-pill.publisher-avatar-only:hover .avatar-verified-badge {
    transform: scale(1.2) rotate(-5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Enhanced Price Display */
.ad-price-modern {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    padding: 14px 18px;
    border-radius: 12px;
    margin: 12px 0;
    position: relative;
    overflow: visible;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.2);
    transition: all 0.3s ease;
}

/* Clean Price Display - No Background */
.ad-price-clean {
    color: var(--text-primary);
    padding: 8px 0;
    margin: 12px 0;
    position: relative;
    overflow: visible;
}

.ad-price-clean .price-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.ad-price-clean .price-icon {
    color: #059669;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #ecfccb, #d9f99d);
    padding: 6px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.2);
    transition: all 0.3s ease;
}

.ad-price-clean .price-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.3);
    background: linear-gradient(135deg, #d9f99d, #bef264);
}

.ad-price-clean .price-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary-color);
    text-align: left;
    white-space: nowrap;
    overflow: visible;
}

/* Price Container and Amount Styling */
.price-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    white-space: nowrap;
    overflow: visible;
}

.price-comparison {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.original-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    opacity: 0.8;
}

.discount-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 8px;
}

/* Modern Verified Badge - Enhanced */
.verified-badge-modern {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    height: 32px;
    min-width: 100px;
    max-width: 120px;
    justify-content: center;
}

.verified-badge-modern.verified-person {
    background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
    color: #ffffff;
}

.verified-badge-modern.verified-company {
    background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
    color: #ffffff;
}

/* Negotiable Badge */
.ad-badge.negotiable-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    height: 32px;
    min-width: 100px;
    max-width: 120px;
    text-align: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Watermark for Premium/Featured Ads */
.ad-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-12deg);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.9), rgba(255, 193, 7, 0.9));
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    z-index: 3;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: watermarkPulse 3s ease-in-out infinite;
}

.ad-watermark i {
    font-size: 1rem;
    margin-right: 4px;
}

@keyframes watermarkPulse {
    0%, 100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) rotate(-12deg) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-12deg) scale(1.05);
    }
}

/* Excellence Badge for High Quality Ads */
.excellence-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    z-index: 4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.excellence-badge i {
    font-size: 0.8rem;
    color: #ffd700;
}

/* Quality Indicator Enhancements */
.quality-indicator {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 4;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quality-indicator.high-quality {
    background: linear-gradient(135deg, #059669, #047857);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(5, 150, 105, 0.4);
}

.quality-indicator.good-quality {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.4);
}

.quality-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Enhanced Feature Pills */
.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    height: 32px;
    min-width: 80px;
    max-width: 120px;
    text-align: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .feature-pill.publisher-avatar-only {
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
    }

    .publisher-avatar-enhanced {
        width: 26px !important;
        height: 26px !important;
        border-width: 2px;
    }

    .avatar-verified-badge {
        width: 18px;
        height: 18px;
        font-size: 0.65rem;
        top: -1px;
        right: -1px;
    }

    .verified-badge-modern,
    .ad-badge.negotiable-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
        height: 28px;
        min-width: 80px;
        max-width: 100px;
    }
}

@media (max-width: 480px) {
    .feature-pill.publisher-avatar-only {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
    }

    .publisher-avatar-enhanced {
        width: 22px !important;
        height: 22px !important;
    }

    .avatar-verified-badge {
        width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }

    .verified-badge-modern,
    .ad-badge.negotiable-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
        height: 24px;
        min-width: 70px;
        max-width: 90px;
        border-radius: 12px;
    }
}
  --theme-toggle-hover-border: rgba(255, 255, 255, 0.5);

  /* Shadows */
  --shadow-sm: rgba(0, 0, 0, 0.1);
  --shadow-md: rgba(0, 0, 0, 0.15);
  --shadow-lg: rgba(0, 0, 0, 0.2);
  --shadow-xl: rgba(0, 0, 0, 0.25);
  --shadow-2xl: rgba(0, 0, 0, 0.3);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --shadow-glow: 0 0 20px rgba(75, 49, 94, 0.3);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Bootstrap Override */
  --bs-navbar-toggler-icon-idrissimart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2'%3E%3Cpath d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Dark Theme */
[data-theme='dark'] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #353535;
  /* Lighter variant for dark mode (subtle card/section background) */
  --bg-secondary-light: #232323;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #999999;
  --border-color: #404040;

  /* Theme Toggle Colors - Dark Mode */
  --theme-toggle-bg: rgba(0, 0, 0, 0.2);
  --theme-toggle-border: rgba(255, 255, 255, 0.3);
  --theme-toggle-color: var(--white-color);
  --theme-toggle-hover-bg: rgba(255, 255, 255, 0.1);
  --theme-toggle-hover-border: rgba(255, 255, 255, 0.4);

  /* Shadows */
  --shadow-sm: rgba(255, 255, 255, 0.05);
  --shadow-md: rgba(255, 255, 255, 0.1);
  --shadow-lg: rgba(255, 255, 255, 0.15);
  --shadow-xl: rgba(255, 255, 255, 0.2);
  --shadow-2xl: rgba(255, 255, 255, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(255, 255, 255, 0.03);
  --shadow-glow: 0 0 20px rgba(107, 76, 122, 0.4);
  --shadow-card: 0 4px 6px -1px rgba(255, 255, 255, 0.05), 0 2px 4px -1px rgba(255, 255, 255, 0.03);
  --shadow-card-hover: 0 10px 15px -3px rgba(255, 255, 255, 0.08), 0 4px 6px -2px rgba(255, 255, 255, 0.04);

  /* Bootstrap Override - lighten the brand purple in dark mode.
     #4b315e (the light-mode value) is near-black and unreadable as
     text (e.g. .text-primary price labels on plan/renewal cards)
     against dark-theme card backgrounds. */
  --bs-primary: #9b6fc2;
  --bs-primary-rgb: 155, 111, 194;
}

/* Bootstrap 5 Dark Theme Support */
[data-bs-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #353535;
  --bg-secondary-light: #232323;
  --text-primary: #ffffff;
  --text-secondary: #e0e0e0;
  --text-muted: #999999;
  --border-color: #404040;

  /* Theme Toggle Colors */
  --theme-toggle-bg: rgba(0, 0, 0, 0.2);
  --theme-toggle-border: rgba(255, 255, 255, 0.3);
  --theme-toggle-color: var(--white-color);
  --theme-toggle-hover-bg: rgba(255, 255, 255, 0.1);
  --theme-toggle-hover-border: rgba(255, 255, 255, 0.4);

  /* Shadows */
  --shadow-sm: rgba(255, 255, 255, 0.05);
  --shadow-md: rgba(255, 255, 255, 0.1);
  --shadow-lg: rgba(255, 255, 255, 0.15);
  --shadow-xl: rgba(255, 255, 255, 0.2);
  --shadow-2xl: rgba(255, 255, 255, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(255, 255, 255, 0.03);
  --shadow-glow: 0 0 20px rgba(107, 76, 122, 0.4);
  --shadow-card: 0 4px 6px -1px rgba(255, 255, 255, 0.05), 0 2px 4px -1px rgba(255, 255, 255, 0.03);
  --shadow-card-hover: 0 10px 15px -3px rgba(255, 255, 255, 0.08), 0 4px 6px -2px rgba(255, 255, 255, 0.04);

  /* Bootstrap Override - lighten the brand purple in dark mode.
     #4b315e (the light-mode value) is near-black and unreadable as
     text (e.g. .text-primary price labels on plan/renewal cards)
     against dark-theme card backgrounds. */
  --bs-primary: #9b6fc2;
  --bs-primary-rgb: 155, 111, 194;
}

body {
  overflow-x: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
  /* CRITICAL: Always visible */
  opacity: 1 !important;
  visibility: visible !important;
}

/* Section Tag Styling */
section {
  background-color: var(--bg-secondary);
  transition: background-color 0.3s ease;
}

[data-theme='dark'] section,
[data-bs-theme="dark"] section {
  background-color: #2a2a2a !important;
}

/* Ensure all section variants follow theme */
section[class*='-section'] {
  background-color: var(--bg-secondary);
}

[data-theme='dark'] section[class*='-section'],
[data-bs-theme="dark"] section[class*='-section'] {
  background-color: #2a2a2a !important;
}

a,
button {
  transition:
    all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.2s ease;
}

/* ============================= */
/* BUTTON STYLES */
/* ============================= */
.btn-custom {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  border-radius: 25px;
  overflow: hidden;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px var(--shadow-md);
  z-index: 1;
  margin-block: 0.4rem;
}

.btn-custom::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
  z-index: -1;
}

.btn-custom:hover::before {
  width: 300px;
  height: 300px;
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-lg), var(--shadow-glow);
}

.btn-custom:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--shadow-md);
}

.btn-primary-custom {
  background: linear-gradient(135deg, #4b315e 0%, #3a2449 100%);
  color: var(--white-color);
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, #3a2449 0%, #4b315e 100%);
  color: var(--white-color);
}

.btn-secondary-custom {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-orange) 100%);
  color: var(--white-color);
}

.btn-secondary-custom:hover {
  background: linear-gradient(135deg, var(--accent-orange) 0%, var(--secondary-color) 100%);
  color: var(--white-color);
}

.btn-outline-custom {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline-custom:hover {
  background: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
}

/* ============================= */
/* UTILITY CLASSES */
/* ============================= */
.bg-secondary-light {
  background: var(--bg-secondary) !important;
}

.text-primary-color {
  color: var(--primary-color) !important;
}

.text-secondary-color {
  color: var(--secondary-color) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.object-fit-cover {
  object-fit: cover;
}

/* ============================= */
/* BOOTSTRAP BUTTON OVERRIDES */
/* ============================= */

/* Primary Button */
.btn-primary {
  background-color: #4b315e !important;
  border-color: #4b315e !important;
  color: #ffffff !important;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: #6b4c7a !important;
  border-color: #6b4c7a !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.3);
}

/* Outline Primary Button */
.btn-outline-primary {
  background-color: transparent !important;
  border-color: #4b315e !important;
  color: #4b315e !important;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: #4b315e !important;
  border-color: #4b315e !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.3);
}

/* Dark Theme Adjustments */
[data-theme='dark'] .btn-outline-primary {
  border-color: #ff6001 !important;
  color: #ff6001 !important;
}

[data-theme='dark'] .btn-outline-primary:hover,
[data-theme='dark'] .btn-outline-primary:focus,
[data-theme='dark'] .btn-outline-primary:active {
  background-color: #ff6001 !important;
  border-color: #ff6001 !important;
  color: #ffffff !important;
}

/* ============================= */
/* MODERN AD CARD STYLES - ENHANCED */
/* ============================= */
/* Stretched-link: make entire card clickable via title link */
.modern-ad-card { cursor: pointer; }
.modern-ad-card .ad-quick-actions,
.modern-ad-card .ad-wishlist-btn,
.modern-ad-card .ad-cart-btn { position: relative; z-index: 2; }
/* ===================================== */
/* MODERN AD CARD - RESPONSIVE & OPTIMIZED */
/* ===================================== */
/* Main Card Container */
.modern-ad-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: none;
  background: var(--bg-primary, #ffffff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(75, 49, 94, 0.12);
  border: 1px solid rgba(75, 49, 94, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: auto;
}

.modern-ad-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(75, 49, 94, 0.18);
  border-color: var(--primary-color, #4b315e);
}

.modern-ad-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.modern-ad-card:hover::before {
  opacity: 1;
}

/* Image Container */
.ad-image-container {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ad-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Crop in slightly by default so product photos with a lot of their own
     white background (thin items shot on a plain backdrop) don't leave
     visible empty space around them inside the card. */
  transform: scale(1.15);
  transition: transform 0.4s ease;
}

.modern-ad-card:hover .ad-image {
  transform: scale(1.22);
}

.ad-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: var(--text-muted, #6c757d);
}

.ad-image-placeholder i {
  font-size: 3rem;
  opacity: 0.4;
}

.ad-image-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Crop in slightly by default so product photos with a lot of their own
     white background (thin items shot on a plain backdrop) don't leave
     visible empty space around them inside the card. */
  transform: scale(1.15);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
  filter: brightness(1.05) contrast(1.02) saturate(1.1);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.modern-ad-card:hover .ad-image {
  transform: scale(1.22);
  filter: brightness(1.15) contrast(1.08) saturate(1.15);
}

.image-overlay-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.modern-ad-card:hover .image-overlay-gradient {
  opacity: 1;
}

/* Enhanced Badges */
.ad-badges-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  z-index: 3;
  gap: 8px;
}

.ad-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 25px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  animation: badgeFloat 2s ease-in-out infinite;
}

@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.featured-badge {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #7c2d12;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.urgent-badge {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.new-badge {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.delivery-badge {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  color: white;
  box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.negotiable-badge {
  background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
  color: white;
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.3);
}

.highlighted-badge {
  background: linear-gradient(135deg, #3a2449, #f5576c);
  color: white;
  box-shadow: 0 6px 20px rgba(240, 147, 251, 0.4);
}

.pinned-badge {
  background: linear-gradient(135deg, #ff6001, #fee140);
  color: #7c2d12;
  box-shadow: 0 6px 20px rgba(250, 112, 154, 0.4);
}

/* Info Overlay Enhanced */
.ad-info-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.ad-stats-container {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ad-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-quick-actions {
  display: flex;
  gap: 8px;
}

.quick-action-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.quick-action-btn.compare-btn.active {
  background: var(--secondary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(255, 96, 1, 0.4);
}

/* Wishlist Button Active State */
.quick-action-btn.wishlist-btn-card.active {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.5);
  animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1.1); }
  25% { transform: scale(1.25); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.2); }
}

/* Cart Button Active State */
.quick-action-btn.cart-btn-card.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.5);
  animation: cartPop 0.4s ease;
}

@keyframes cartPop {
  0%, 100% { transform: scale(1.1); }
  50% { transform: scale(1.3); }
}

/* Compare Bar Styles - Floating Widget */
.compare-bar {
    position: fixed;
    bottom: 20px;
    right: -400px; /* Initially hidden off-screen */
    width: 350px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 1040;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.compare-bar.show {
    right: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .compare-bar {
        width: 280px;
        right: -300px;
        bottom: 80px; /* Move up to avoid overlap with bottom navigation */
    }

    .compare-bar.show {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .compare-bar {
        width: 250px;
        right: -270px;
        bottom: 85px; /* Move higher on small screens */
    }

    .compare-bar.show {
        right: 10px;
    }
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.compare-header h6 {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.compare-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.compare-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.compare-items {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.compare-item {
    position: relative;
}

.compare-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.remove-compare-item {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 20px;
    text-align: center;
}

.compare-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.compare-actions .btn {
    border-radius: 10px;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    flex: 1;
    white-space: nowrap;
}

.compare-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Content Section - Optimized Layout */
.ad-content {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  min-height: auto;
  background: var(--bg-primary);
}

.ad-header {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

/* Category Badge */
.ad-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  background: rgba(75, 49, 94, 0.08);
  border: 1.5px solid rgba(75, 49, 94, 0.18);
  border-radius: 50px;
  color: var(--primary-color);
  font-size: 0.71rem;
  font-weight: 700;
  align-self: flex-start;
  transition: all 0.2s ease;
  max-width: 100%;
  overflow: hidden;
}

.ad-category-badge .badge-cat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-color);
  flex-shrink: 0;
  opacity: 0.7;
}

.ad-category-badge i {
  font-size: 0.68rem;
  flex-shrink: 0;
}

.ad-category-badge .badge-cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ad-category-badge:hover {
  background: rgba(75, 49, 94, 0.14);
  border-color: rgba(75, 49, 94, 0.3);
  transform: translateY(-1px);
}

[data-theme='dark'] .ad-category-badge {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
  color: #c89de0;
}
[data-theme='dark'] .ad-category-badge .badge-cat-dot { background: #c89de0; }

.ad-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  letter-spacing: -0.01em;
}

.ad-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.ad-title a:hover {
  color: var(--primary-color);
  transform: translateX(2px);
}

.ad-meta-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ad-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.ad-location i {
  color: var(--primary-color);
  font-size: 0.75rem;
}

/* Ad Info Row - Location & Publisher Combined */
.ad-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0;
  border-top: 1px solid rgba(75, 49, 94, 0.08);
  border-bottom: 1px solid rgba(75, 49, 94, 0.08);
  margin: 0;
}

[data-theme='dark'] .ad-info-row {
  border-color: rgba(255, 255, 255, 0.08);
}

/* Publisher Info Inline */
.publisher-info-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.publisher-avatar-mini {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(75, 49, 94, 0.15);
}

.modern-ad-card:hover .publisher-avatar-mini {
  transform: scale(1.1);
  border-color: var(--secondary-color);
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.25);
}

.avatar-verified-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.22);
}

.avatar-verified-badge.person-badge {
  background: linear-gradient(135deg, #1877f2, #0a66d9);
  color: white;
}

.avatar-verified-badge.company-badge {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
}

.avatar-verified-badge i {
  font-size: 0.55rem;
}

.avatar-verified-badge span {
  display: none;
}

[data-theme='dark'] .avatar-verified-badge {
  border-color: var(--bg-card, #1f2937);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
}

/* Ad Meta Inline - Time & Views */
.ad-meta-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.meta-item i {
  color: var(--primary-color);
  font-size: 0.7rem;
}

.meta-separator {
  color: var(--text-muted);
  opacity: 0.5;
  font-weight: 400;
}

/* Price Negotiable Inline */
.price-negotiable-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 6px;
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 600;
  margin: 0;
  transition: all 0.3s ease;
}

.price-negotiable-inline:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  transform: translateY(-1px);
}

.price-negotiable-inline i {
  font-size: 0.75rem;
}

[data-theme='dark'] .price-negotiable-inline {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

/* Features Row */
.ad-features-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1.5px solid transparent;
}

.feature-tag i {
  font-size: 0.75rem;
}

.delivery-tag {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border-color: #6ee7b7;
}

.delivery-tag:hover {
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.negotiable-tag {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border-color: #93c5fd;
}

.negotiable-tag:hover {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.condition-tag {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #6b21a8;
  border-color: #d8b4fe;
}

.condition-tag:hover {
  background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.custom-field-tag {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  border-color: #93c5fd;
}

.custom-field-tag:hover {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cart-enabled-tag {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  border-color: #fbbf24;
}

.cart-enabled-tag:hover {
  background: linear-gradient(135deg, #fde68a, #fbbf24);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

/* Dark theme support for feature tags */
[data-theme='dark'] .delivery-tag {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme='dark'] .negotiable-tag {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme='dark'] .condition-tag {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.15));
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

[data-theme='dark'] .custom-field-tag {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme='dark'] .cart-enabled-tag {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}

.ad-time-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: rgba(75, 49, 94, 0.1);
  color: var(--primary-color);
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
}

/* ===================================== */
/* AD RATING COMPACT - BOTTOM OF CARD */
/* ===================================== */
.ad-rating-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 10px;
  margin: 0;
  transition: all 0.3s ease;
}

.ad-rating-compact:hover {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.12));
  border-color: rgba(251, 191, 36, 0.3);
  transform: translateY(-1px);
}

.rating-stars-mini {
  display: flex;
  gap: 2px;
}

.rating-stars-mini i {
  font-size: 0.75rem;
  color: #fbbf24;
  transition: color 0.2s ease;
}

.rating-stars-mini i.fas.fa-star {
  color: #fbbf24;
}

.rating-stars-mini i.fas.fa-star-half-alt {
  color: #fbbf24;
}

.rating-stars-mini i.far.fa-star {
  color: #d1d5db;
}

.rating-value-mini {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.rating-count-mini {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

[data-theme='dark'] .ad-rating-compact {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.12));
  border-color: rgba(251, 191, 36, 0.25);
}

[data-theme='dark'] .rating-stars-mini i.far.fa-star {
  color: rgba(255, 255, 255, 0.2);
}

/* Description removed - using badges instead */

/* Features Icons Enhanced */
.ad-features-icons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(var(--secondary-color), 0.1);
  color: var(--secondary-color);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
}

.feature-count {
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

/* Modern Features Section - Compact */
.ad-features-modern {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  align-items: center;
  min-height: 28px;
  max-height: 60px;
  overflow: hidden;
}

.feature-pill,
.ad-badge.negotiable-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: capitalize;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  backdrop-filter: blur(5px);
  white-space: nowrap;
}

/* Simplified Publisher Avatar */
.publisher-badge-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.publisher-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

/* Rating Badge Styles */
.ad-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255, 133, 52, 0.1), rgba(255, 96, 1, 0.1));
    border: 1px solid rgba(255, 133, 52, 0.2);
    border-radius: 20px;
    margin: 8px 0;
    transition: all 0.3s ease;
}

.ad-rating-badge:hover {
    background: linear-gradient(135deg, rgba(255, 133, 52, 0.15), rgba(255, 96, 1, 0.15));
    border-color: rgba(255, 133, 52, 0.3);
    transform: translateY(-1px);
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 0.85rem;
    color: #ff8534;
    transition: all 0.2s ease;
}

.rating-stars i.fas.fa-star,
.rating-stars i.fas.fa-star-half-alt {
    color: #ff8534;
    text-shadow: 0 1px 2px rgba(255, 133, 52, 0.3);
}

.rating-stars i.far.fa-star {
    color: rgba(255, 133, 52, 0.3);
}

.rating-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ff8534;
    margin-left: 2px;
}

.rating-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

[data-theme='dark'] .ad-rating-badge {
    background: linear-gradient(135deg, rgba(255, 133, 52, 0.15), rgba(255, 96, 1, 0.12));
    border-color: rgba(255, 133, 52, 0.25);
}

[data-theme='dark'] .rating-stars i.fas.fa-star,
[data-theme='dark'] .rating-stars i.fas.fa-star-half-alt {
    color: #ff8534;
}

[data-theme='dark'] .rating-stars i.far.fa-star {
    color: rgba(255, 133, 52, 0.4);
}

[data-theme='dark'] .rating-value {
    color: #ff8534;
}

.publisher-avatar-simple {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    object-fit: cover;
    background: #f0f0f0;
}

.publisher-avatar-wrapper:hover .publisher-avatar-simple {
    transform: scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Avatar Badge */
.avatar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: #ffffff;
    border: 2px solid #ffffff;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.avatar-badge.person-badge {
    background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
}

.avatar-badge.company-badge {
    background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
}

.publisher-avatar-wrapper:hover .avatar-badge {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  backdrop-filter: blur(5px);
}

.feature-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.delivery-feature {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
  color: #059669;
  border-color: rgba(34, 197, 94, 0.2);
}

.delivery-feature:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
}

.negotiable-feature {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
  color: #2563eb;
  border-color: rgba(59, 130, 246, 0.2);
}

.negotiable-feature:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
}

.video-feature {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.2);
}

.video-feature:hover {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
}

.gallery-feature {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(147, 51, 234, 0.1));
  color: #9333ea;
  border-color: rgba(168, 85, 247, 0.2);
}

.gallery-feature:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.2));
}

.featured-feature {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.2);
}

.featured-feature:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.2));
}

.feature-pill i {
  font-size: 0.8rem;
}

/* Dark theme support for feature pills */
[data-theme='dark'] .feature-pill {
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .delivery-feature {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.15));
  color: #10b981;
}

[data-theme='dark'] .negotiable-feature {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
  color: #3b82f6;
}

[data-theme='dark'] .video-feature {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
  color: #ef4444;
}

[data-theme='dark'] .gallery-feature {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.15));
  color: #a855f7;
}

[data-theme='dark'] .featured-feature {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
  color: #f59e0b;
}

/* ===================================== */
/* PRICE SECTION - FANCY BOX DESIGN */
/* ===================================== */
.ad-price-section {
  margin: 0;
  padding: 0;
}

.ad-price-wrapper {
  display: flex;
  align-items: stretch;
}

.ad-price-box {
  flex: 1;
  padding: 10px 12px;
  background: linear-gradient(135deg,
    rgba(75, 49, 94, 0.03),
    rgba(255, 96, 1, 0.03));
  border: 2px solid rgba(75, 49, 94, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.ad-price-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-ad-card:hover .ad-price-box {
  border-color: rgba(75, 49, 94, 0.2);
  background: linear-gradient(135deg,
    rgba(75, 49, 94, 0.06),
    rgba(255, 96, 1, 0.06));
}

.modern-ad-card:hover .ad-price-box::before {
  opacity: 1;
}

.price-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.ad-price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ad-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

/* Dark theme support */
[data-theme='dark'] .ad-price-box {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 96, 1, 0.05));
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .modern-ad-card:hover .ad-price-box {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 96, 1, 0.08));
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================= */
/* AD QUOTE BOX - Price on Request */
/* ============================= */
/* ============================= */
/* AD QUOTE BOX - Modern Redesign */
/* ============================= */
.ad-quote-box {
  padding: 12px 14px;
  background: var(--bg-primary, #fff);
  border: 1.5px solid rgba(75, 49, 94, 0.15);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(75, 49, 94, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

/* Accent bar on the right (RTL-friendly) */
.ad-quote-box::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
  border-radius: 0 14px 14px 0;
  transition: width 0.3s ease;
}

[dir="ltr"] .ad-quote-box::after {
  right: auto;
  left: 0;
  border-radius: 14px 0 0 14px;
}

.ad-quote-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.04) 0%, rgba(255, 96, 1, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.ad-quote-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(75, 49, 94, 0.14);
  border-color: rgba(75, 49, 94, 0.3);
}

.ad-quote-box:hover::before {
  opacity: 1;
}

.ad-quote-box:hover::after {
  width: 6px;
}

/* Icon wrapper - circle badge */
.quote-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.25);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-quote-box:hover .quote-icon {
  transform: scale(1.08) rotate(-5deg);
  box-shadow: 0 6px 18px rgba(75, 49, 94, 0.35);
}

@keyframes quote-icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.quote-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  z-index: 2;
  position: relative;
  min-width: 0;
}

.quote-text {
  color: var(--text-primary, #1a1a1a);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.3;
  margin: 0;
  word-break: break-word;
}

.btn-get-quote {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: linear-gradient(135deg, var(--primary-color, #4b315e), #6b4c7a);
  color: white;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.72rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  align-self: flex-start;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(75, 49, 94, 0.25);
}

.btn-get-quote:hover {
  background: linear-gradient(135deg, var(--secondary-color, #ff6001), #ff8534);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 96, 1, 0.35);
  text-decoration: none;
}

.btn-get-quote:active {
  transform: translateY(0) scale(0.98);
}

.btn-get-quote:focus {
  outline: 2px solid var(--primary-color, #4b315e);
  outline-offset: 2px;
}

.btn-get-quote i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.btn-get-quote:hover i {
  transform: translateX(-2px);
}

/* Dark theme */
[data-theme='dark'] .ad-quote-box {
  background: var(--bg-secondary, #2a2a2a);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

[data-theme='dark'] .ad-quote-box:hover {
  border-color: rgba(255, 96, 1, 0.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] .quote-text {
  color: var(--text-primary, #ffffff);
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .ad-quote-box {
    padding: 10px 12px;
    gap: 10px;
  }

  .quote-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.85rem;
  }

  .quote-text {
    font-size: 0.78rem;
  }

  .btn-get-quote {
    font-size: 0.65rem;
    padding: 4px 10px;
  }
}

.ad-price-clean {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-icon {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  letter-spacing: -0.02em;
  display: inline-block;
}

.price-currency {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.price-comparison {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
}

.original-price {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.7;
}

.discount-badge {
  padding: 2px 6px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
}

.ad-price-meta {
  margin-top: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.status-pending {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.status-sold {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

/* ===================================== */
/* FOOTER - COMPACT DESIGN */
/* ===================================== */
.ad-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(75, 49, 94, 0.1);
  background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(255, 255, 255, 0.6));
  backdrop-filter: blur(10px);
  margin-top: auto;
}

[data-theme='dark'] .ad-footer {
  background: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(40, 40, 60, 0.6));
  border-top-color: rgba(255, 255, 255, 0.1);
}

.ad-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.ad-author {
  flex: 1;
  min-width: 0;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(75, 49, 94, 0.15);
  flex-shrink: 0;
}

.modern-ad-card:hover .author-avatar {
  border-color: var(--secondary-color);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.25);
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.author-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.author-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  flex-shrink: 0;
}

.verification-badge i {
  font-size: 0.65rem;
}

.company-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
  color: white;
  flex-shrink: 0;
}

.company-badge i {
  font-size: 0.65rem;
}

.author-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ad-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.ad-time i {
  color: var(--primary-color);
  font-size: 0.65rem;
}

.ad-location-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.ad-location-mini i {
  color: var(--secondary-color);
  font-size: 0.65rem;
}

.ad-quick-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.08), rgba(75, 49, 94, 0.04));
  border: 1px solid rgba(75, 49, 94, 0.1);
  transition: all 0.3s ease;
}

.stat-badge:hover {
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.12), rgba(75, 49, 94, 0.08));
  transform: translateY(-1px);
}

.stat-badge i {
  color: var(--primary-color);
  font-size: 0.75rem;
}

.stat-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.views-stat {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
  border-color: rgba(59, 130, 246, 0.2);
}

.views-stat i {
  color: #3b82f6;
}

/* Dark theme support */
[data-theme='dark'] .author-avatar {
  border-color: var(--primary-color);
}

[data-theme='dark'] .stat-badge {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .stat-badge:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
}

[data-theme='dark'] .views-stat {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.08));
  border-color: rgba(59, 130, 246, 0.3);
}

/* Publisher Footer Info */
.publisher-footer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.publisher-footer-info .publisher-avatar-wrapper {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.publisher-footer-info .publisher-avatar-simple {
  width: 30px !important;
  height: 30px !important;
}

.publisher-footer-info .avatar-badge {
  width: 14px;
  height: 14px;
  font-size: 0.55rem;
  top: -2px;
  right: -2px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.publisher-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.publisher-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.publisher-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owner-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary-color), rgba(75, 49, 94, 0.9));
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(75, 49, 94, 0.25);
}

.btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.35);
  color: white;
}

.ad-stats-footer {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ad-stats-footer .stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.ad-stats-footer .stat-item i {
  color: var(--primary-color);
  font-size: 0.7rem;
}

.ad-author {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  border-radius: 50%;
  border: 3px solid var(--primary-color);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.2);
}

.modern-ad-card:hover .author-avatar {
  border-color: var(--secondary-color);
  transform: scale(1.1);
}

.author-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.author-name-container {
  display: flex;
  align-items: center;
  gap: 6px;
}

.author-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Verification Badge */
.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
}

.verification-badge i {
  font-size: 0.7rem;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.author-rating {
  color: #fbbf24;
}

.ad-actions {
  display: flex;
  gap: 8px;
}

.contact-btn, .call-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-btn {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
}

.call-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.contact-btn:hover, .call-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Quality Indicator */
.quality-indicator {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  z-index: 4;
  animation: qualityPulse 2s ease-in-out infinite;
}

@keyframes qualityPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.high-quality {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  color: #7c2d12;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.good-quality {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* Notification Toast */
.notification-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--primary-color);
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 9999;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Dark Theme Enhanced */
[data-theme='dark'] .modern-ad-card {
  background: var(--bg-primary);
  border-color: var(--border-color);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .modern-ad-card:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  border-color: var(--secondary-color);
}

[data-theme='dark'] .ad-title a {
  background: linear-gradient(135deg, var(--text-primary), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme='dark'] .price-display {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme='dark'] .ad-footer {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border-top-color: var(--border-color);
}

/* ===================================== */
/* RESPONSIVE DESIGN - MOBILE & DESKTOP */
/* ===================================== */

/* Large Desktop (≥1400px) */
@media (min-width: 1400px) {
  .modern-ad-card {
    min-height: 555px;
    max-height: 620px;
  }

  .ad-image-container {
    height: 230px;
    min-height: 230px;
    max-height: 230px;
  }

  .ad-content {
    padding: 18px 20px;
  }

  .ad-title {
    font-size: 1.1rem;
  }

  .price-amount {
    font-size: 1.5rem;
  }
}

/* Desktop (992px - 1399px) */
@media (min-width: 992px) and (max-width: 1399px) {
  .modern-ad-card {
    min-height: 420px;
    max-height: 520px;
  }

  .ad-image-container {
    height: 220px;
    min-height: 220px;
    max-height: 220px;
  }

  .ad-content {
    padding: 16px 18px;
  }

  .ad-title {
    font-size: 1.05rem;
  }

  .price-amount {
    font-size: 1.4rem;
  }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .modern-ad-card {
    min-height: 400px;
    max-height: 500px;
    border-radius: 18px;
  }

  .ad-image-container {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }

  .ad-content {
    padding: 14px 16px;
    gap: 6px;
  }

  .ad-title {
    font-size: 1rem;
  }

  .ad-location {
    font-size: 0.75rem;
  }

  .ad-badges-inline {
    gap: 5px;
  }

  .inline-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .ad-features-modern {
    gap: 5px;
    min-height: 24px;
    max-height: 50px;
  }

  .feature-pill,
  .ad-badge.negotiable-badge {
    font-size: 0.6rem;
    padding: 3px 7px;
  }

  .price-amount {
    font-size: 1.3rem;
  }

  .ad-footer {
    padding: 10px 16px;
  }

  .publisher-label {
    font-size: 0.6rem;
  }

  .publisher-name {
    font-size: 0.75rem;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .modern-ad-card {
    min-height: 400px;
    max-height: 500px;
    border-radius: 16px;
  }

  .modern-ad-card:hover {
    transform: translateY(-4px) scale(1);
  }

  .ad-image-container {
    height: 200px;
    min-height: 200px;
    max-height: 200px;
  }

  .ad-content {
    padding: 12px 14px;
    gap: 6px;
    min-height: auto;
  }

  .ad-header {
    gap: 0;
  }

  .ad-category-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .ad-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }

  .ad-location {
    font-size: 0.7rem;
    gap: 4px;
  }

  .ad-features-row {
    gap: 5px;
    margin: 6px 0;
  }

  .feature-tag {
    font-size: 0.65rem;
    padding: 5px 10px;
  }

  .feature-tag i {
    font-size: 0.7rem;
  }

  .ad-price-box {
    padding: 10px 12px;
  }

  .price-label {
    font-size: 0.6rem;
  }

  .ad-time-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .ad-features-modern {
    gap: 4px;
    min-height: 22px;
    max-height: 45px;
  }

  .feature-pill,
  .ad-badge.negotiable-badge {
    font-size: 0.55rem;
    padding: 3px 6px;
    gap: 3px;
  }

  .feature-pill i {
    font-size: 0.7rem;
  }

  .ad-price-section {
    padding: 8px 0 0;
  }

  .ad-price-wrapper {
    gap: 8px;
  }

  .price-icon {
    font-size: 0.8rem;
  }

  .price-amount {
    font-size: 1.2rem;
  }

  .price-currency {
    font-size: 0.8rem;
  }

  .verification-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .author-name {
    font-size: 0.8rem;
  }

  .author-meta-row {
    gap: 8px;
  }

  .ad-time {
    font-size: 0.65rem;
  }

  .ad-time i {
    font-size: 0.6rem;
  }

  .ad-location-mini {
    font-size: 0.65rem;
  }

  .ad-location-mini i {
    font-size: 0.6rem;
  }

  .stat-badge {
    padding: 5px 10px;
    gap: 5px;
  }

  .stat-badge i {
    font-size: 0.7rem;
  }

  .stat-value {
    font-size: 0.75rem;
  }

  .verification-badge,
  .company-badge {
    width: 16px;
    height: 16px;
  }

  .verification-badge i,
  .company-badge i {
    font-size: 0.6rem;
  }

  .discount-badge {
    font-size: 0.6rem;
    padding: 2px 5px;
  }

  .ad-footer {
    padding: 10px 14px;
  }

  .ad-footer-top {
    gap: 8px;
  }

  .publisher-footer-info .publisher-avatar-wrapper {
    width: 30px;
    height: 30px;
  }

  .publisher-footer-info .publisher-avatar-simple {
    width: 26px !important;
    height: 26px !important;
  }

  .publisher-footer-info .avatar-badge {
    width: 12px;
    height: 12px;
    font-size: 0.5rem;
  }

  .publisher-label {
    font-size: 0.6rem;
  }

  .publisher-name {
    font-size: 0.7rem;
  }

  .btn-edit {
    padding: 6px 12px;
    font-size: 0.75rem;
    gap: 4px;
  }

  .ad-stats-footer .stat-item {
    font-size: 0.7rem;
    gap: 3px;
  }

  .ad-stats-footer .stat-item i {
    font-size: 0.65rem;
  }

  /* Reduce hover effects on mobile */
  .quick-action-btn:hover {
    transform: scale(1.05);
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .modern-ad-card {
    min-height: 360px;
    max-height: 460px;
    border-radius: 14px;
  }

  .ad-image-container {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
  }

  .ad-content {
    padding: 10px 12px;
    gap: 4px;
    min-height: auto;
  }

  .ad-category-badge {
    font-size: 0.6rem;
    padding: 3px 7px;
  }

  .ad-title {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  .ad-location {
    font-size: 0.65rem;
  }

  .ad-features-row {
    gap: 4px;
    margin: 5px 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .ad-features-row::-webkit-scrollbar {
    display: none;
  }

  .feature-tag {
    font-size: 0.6rem;
    padding: 4px 8px;
    flex-shrink: 0;
  }

  .feature-tag i {
    font-size: 0.65rem;
  }

  .ad-price-box {
    padding: 8px 10px;
  }

  .price-label {
    font-size: 0.55rem;
  }

  .ad-features-modern {
    gap: 3px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .ad-features-modern::-webkit-scrollbar {
    display: none;
  }

  .feature-pill,
  .ad-badge.negotiable-badge {
    font-size: 0.5rem;
    padding: 2px 5px;
    flex-shrink: 0;
  }

  .ad-price-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .price-amount {
    font-size: 1.1rem;
  }

  .price-currency {
    font-size: 0.75rem;
  }

  .negotiable-badge {
    font-size: 0.55rem;
    padding: 2px 6px;
  }

  .verification-badge {
    font-size: 0.55rem;
    padding: 2px 6px;
  }

  .ad-footer {
    padding: 8px 12px;
  }

  .ad-footer-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .author-info {
    gap: 8px;
  }

  .author-name {
    font-size: 0.7rem;
  }

  .author-meta-row {
    gap: 6px;
  }

  .ad-time {
    font-size: 0.6rem;
  }

  .ad-time i {
    font-size: 0.55rem;
  }

  .ad-location-mini {
    font-size: 0.6rem;
  }

  .ad-location-mini i {
    font-size: 0.55rem;
  }

  .ad-quick-stats {
    align-self: flex-end;
  }

  .stat-badge {
    padding: 4px 8px;
    gap: 4px;
  }

  .stat-badge i {
    font-size: 0.65rem;
  }

  .stat-value {
    font-size: 0.7rem;
  }

  .verification-badge,
  .company-badge {
    width: 14px;
    height: 14px;
  }

  .verification-badge i,
  .company-badge i {
    font-size: 0.55rem;
  }

  .publisher-name {
    font-size: 0.65rem;
  }

  .btn-edit {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .ad-stat-item {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  .ad-stat-item .stat-text {
    display: none;
  }

  .ad-badges-top {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 6px;
  }

  .ad-badge {
    padding: 6px 10px;
    font-size: 0.65rem;
    gap: 4px;
  }

  .ad-badge span {
    display: inline;
  }
}

  /* Mobile feature pills */
  .ad-features-modern {
    gap: 6px;
    flex-wrap: wrap;
    /* Ensure no overflow issues on mobile */
    overflow: visible;
  }

  .publisher-avatar-wrapper {
    width: 36px;
    height: 36px;
  }

  .publisher-avatar-simple {
    width: 28px !important;
    height: 28px !important;
    border-width: 2px;
  }

  .avatar-badge {
    width: 14px;
    height: 14px;
    font-size: 0.5rem;
    top: -1px;
    right: -1px;
  }

  .feature-pill {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .feature-pill i {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .ad-badges-top {
    top: 12px;
    left: 12px;
    right: 12px;
  }

  .ad-badge {
    padding: 6px 10px;
    font-size: 0.65rem;
  }

  .quality-indicator {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }

  /* Stack feature pills on very small screens but ensure avatar is visible */
  .ad-features-modern {
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    /* Ensure no overflow issues */
    overflow: visible;
    min-height: auto;
  }

  .publisher-avatar-wrapper {
    width: 32px;
    height: 32px;
  }

  .publisher-avatar-simple {
    width: 24px !important;
    height: 24px !important;
    border-width: 1px;
  }

  .avatar-badge {
    width: 12px;
    height: 12px;
    font-size: 0.45rem;
    border-width: 1px;
  }

  .feature-pill {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
}

/* Extra Small Screens (≤360px) */
@media (max-width: 360px) {
  .modern-ad-card {
    min-height: 340px;
    border-radius: 12px;
  }

  .ad-image-container {
    height: 140px;
    min-height: 140px;
    max-height: 140px;
  }

  .ad-content {
    padding: 8px 10px;
    gap: 4px;
  }

  .ad-category-badge {
    font-size: 0.55rem;
    padding: 2px 6px;
  }

  .ad-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }

  .ad-location {
    font-size: 0.6rem;
  }

  .feature-tag {
    font-size: 0.55rem;
    padding: 3px 6px;
  }

  .feature-tag i {
    font-size: 0.6rem;
  }

  .ad-price-box {
    padding: 6px 8px;
  }

  .price-label {
    font-size: 0.5rem;
  }

  .price-amount {
    font-size: 1rem;
  }

  .ad-footer {
    padding: 6px 10px;
  }

  .author-name {
    font-size: 0.65rem;
  }

  .ad-time {
    font-size: 0.55rem;
  }

  .ad-time i {
    font-size: 0.5rem;
  }

  .ad-location-mini {
    font-size: 0.55rem;
  }

  .ad-location-mini i {
    font-size: 0.5rem;
  }

  .stat-badge {
    padding: 3px 6px;
    gap: 3px;
  }

  .stat-badge i {
    font-size: 0.6rem;
  }

  .stat-value {
    font-size: 0.65rem;
  }

  .verification-badge,
  .company-badge {
    width: 12px;
    height: 12px;
  }

  .verification-badge i,
  .company-badge i {
    font-size: 0.5rem;
  }

  .ad-badge {
    padding: 4px 8px;
    font-size: 0.6rem;
  }
}

/* Dark Theme Support */
[data-theme='dark'] .modern-ad-card {
  background: var(--bg-secondary, #1e1e2e);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .modern-ad-card:hover {
  border-color: var(--primary-color, #4b315e);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .ad-image-placeholder {
  background: linear-gradient(135deg, #2a2a3e, #3a3a4e);
  color: rgba(255, 255, 255, 0.5);
}

[data-theme='dark'] .ad-price-section {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .verification-badge {
  background: linear-gradient(135deg, #059669, #047857);
}

/* Legacy compatibility */
.ad-card {
  /* Redirect to modern card styles for backward compatibility */
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-primary);
  border: 2px solid transparent;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
}

[data-theme='dark'] .ad-card {
  background: var(--bg-secondary);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

.ad-card:hover {
  transform: translateY(-16px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

[data-theme='dark'] .ad-card:hover {
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border-color: var(--primary-color);
}

/* Loading Animation for Images */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}

.image-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 400% 100%;
  animation: shimmer 1.5s infinite linear;
}

/* Interactive Effects */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.favorite-btn.active {
  animation: heartbeat 0.6s ease-in-out;
}

/* Smooth transitions for all interactive elements */
.modern-ad-card *,
.ad-card * {
  transition: inherit;
}

.modern-ad-card .quick-action-btn:active,
.modern-ad-card .contact-btn:active,
.modern-ad-card .call-btn:active {
  transform: scale(0.95);
}

/* Enhanced hover effects for better UX */
.modern-ad-card .ad-badge:hover {
  transform: translateY(-2px) scale(1.05);
  filter: brightness(1.1);
}

.modern-ad-card .feature-icon:hover {
  transform: scale(1.1);
  background: rgba(var(--secondary-color), 0.2);
}[data-theme='dark'] .ad-card small.text-muted {
  color: var(--text-muted) !important;
}

/* User profile in card footer */
.ad-card .card-footer img.rounded-circle {
  width: 32px;
  height: 32px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.ad-card .card-footer img.rounded-circle:hover {
  border-color: var(--secondary-color);
}

[data-theme='dark'] .ad-card .card-footer img.rounded-circle {
  border-color: var(--border-color);
  background: var(--bg-secondary);
}

[data-theme='dark'] .ad-card .card-footer img.rounded-circle:hover {
  border-color: var(--secondary-color);
}

[data-theme='dark'] .ad-card .card-footer small {
  color: var(--text-secondary) !important;
}

/* Keep ad-card avatar verification badges Facebook-blue across duplicate card styles. */
.modern-ad-card .publisher-info-inline .avatar-verified-badge.person-badge,
.modern-ad-card .publisher-info-inline .avatar-verified-badge.company-badge {
  background: #1877f2 !important;
  background-image: linear-gradient(135deg, #1877f2, #0a66d9) !important;
  color: #fff !important;
}

/* Verified badge in card footer */
.badge-verified {
  background-color: #0d6efd !important;
  color: var(--white-color) !important;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.2);
}

.badge-verified:hover {
  background-color: #0b5ed7 !important;
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
  transform: translateY(-1px);
}

.badge-verified i {
  font-size: 0.875rem;
}

/* Dark theme for verified badge */
[data-theme='dark'] .badge-verified {
  background-color: #0d6efd !important;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.4);
}

[data-theme='dark'] .badge-verified:hover {
  background-color: #0b5ed7 !important;
  box-shadow: 0 4px 8px rgba(13, 110, 253, 0.5);
}

/* Legacy support for old badge style */
.ad-card .card-footer .badge.bg-success {
  background-color: #2ecc71 !important;
  color: var(--white-color);
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

[data-theme='dark'] .ad-card .card-footer .badge.bg-success {
  background-color: #27ae60 !important;
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.3);
}

/* ============================= */
/* ============================= */
/* MODERN BLOG CARD STYLES - ENHANCED */
/* ============================= */

/* ============================= */
/* GLOBAL MODAL Z-INDEX FIX */
/* COMMENTED OUT - Conflicts with slide panels and dashboard modals */
/* Let Bootstrap handle modal z-index naturally */
/* ============================= */
/*
.modal-backdrop {
    z-index: 9998 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

.modal-backdrop.fade {
    opacity: 0 !important;
}

.modal-backdrop.show {
    opacity: 1 !important;
}

.modal {
    z-index: 9999 !important;
}

.modal.show {
    display: block !important;
}

.modal-dialog {
    z-index: 10000 !important;
    position: relative;
}

.modal-content {
    z-index: 10001 !important;
    position: relative;
}
*/

/* Ensure Bootstrap modals work correctly */
body.modal-open {
    overflow: hidden;
}

.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.fade.show .modal-dialog {
    transform: none;
}

.blog-post-card {
    background: var(--card-bg, #ffffff);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(10px);
}

.blog-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.blog-post-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

[data-theme='dark'] .blog-post-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .blog-post-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-color);
}

.blog-post-card:hover::before {
    opacity: 1;
}

/* Blog Image Container Enhanced */
.blog-post-card .card-img-container {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.blog-post-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95) contrast(1.05);
}

.blog-post-card:hover .card-img-top {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.05) contrast(1.1) saturate(1.2);
}

.blog-post-card .card-img-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-post-card:hover .card-img-container::after {
    opacity: 1;
}

/* Blog Content Enhanced */
.blog-post-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme='dark'] .blog-post-card .card-body {
    background: var(--bg-secondary);
}

/* Blog Tags Section */
.blog-post-card .blog-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-post-card .blog-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    text-decoration: none;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.blog-post-card .blog-tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

/* Blog Title Enhanced */
.blog-post-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    position: relative;
}

.blog-post-card .card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

[data-theme='dark'] .blog-post-card .card-title a {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.blog-post-card .card-title a:hover {
    transform: translateX(5px);
    filter: brightness(1.2);
}

/* Blog Text Enhanced */
.blog-post-card .card-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.blog-post-card:hover .card-text {
    opacity: 1;
}

[data-theme='dark'] .blog-post-card .card-text {
    color: var(--text-primary);
}

/* Related Post Card (product-card) - Theme Aware */
.product-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .product-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme='dark'] .product-card .card-title a {
    color: var(--text-primary);
}

[data-theme='dark'] .product-card .card-text,
[data-theme='dark'] .product-card .text-muted {
    color: var(--text-muted);
}

/* Blog Footer Enhanced */
.blog-post-card .card-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
    position: relative;
    z-index: 2;
}

[data-theme='dark'] .blog-post-card .card-footer {
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post-card .blog-footer-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-post-card .blog-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-post-card .blog-stats small {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-post-card .blog-author-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.blog-post-card .blog-author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.blog-post-card .blog-author-details small {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

[data-theme='dark'] .blog-post-card .blog-author-details small {
    color: var(--text-primary);
    opacity: 0.8;
}

.blog-post-card .blog-author-details i {
    color: var(--primary-color);
    font-size: 0.7rem;
}

/* Blog Read More Button Enhanced */
.blog-post-card .blog-read-more-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.blog-post-card .blog-read-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.blog-post-card .blog-read-more-btn:hover::before {
    left: 100%;
}

.blog-post-card .blog-read-more-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

/* Author Avatar if present */
.blog-post-card .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.blog-post-card:hover .author-avatar {
    transform: scale(1.1);
    border-color: var(--secondary-color);
}

/* Additional Dark Theme Support */
[data-theme='dark'] .blog-post-card .card-img-container {
    background: linear-gradient(135deg, #374151, #4b5563);
}

[data-theme='dark'] .blog-tag {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white-color);
}

/* Responsive Design for Blog Cards */
@media (max-width: 768px) {
    .blog-post-card .card-img-container {
        height: 185px;
    }

    .blog-post-card .card-body {
        padding: 0.9rem;
    }

    .blog-post-card .card-footer {
        padding: 0.6rem 0.9rem;
    }

    .blog-post-card .card-title {
        font-size: 0.92rem;
        margin-bottom: 0.45rem;
        line-height: 1.35;
    }

    .blog-post-card .card-text {
        font-size: 0.78rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    .blog-post-card .blog-tags {
        gap: 0.3rem;
        margin-bottom: 0.6rem;
    }

    .blog-post-card .blog-tag {
        font-size: 0.65rem;
        padding: 0.18rem 0.55rem;
    }

    .blog-post-card .blog-author-details small {
        font-size: 0.7rem;
    }

    .blog-post-card .blog-author-details i,
    .blog-post-card .blog-stats i {
        font-size: 0.62rem;
    }

    .blog-post-card .blog-stats small {
        font-size: 0.7rem;
        gap: 0.2rem;
    }

    .blog-post-card .blog-stats {
        gap: 0.6rem;
    }

    .blog-post-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

@media (max-width: 480px) {
    .blog-post-card .card-img-container {
        height: 155px;
    }

    .blog-post-card .card-body {
        padding: 0.7rem;
    }

    .blog-post-card .card-footer {
        padding: 0.5rem 0.7rem;
    }

    .blog-post-card .card-title {
        font-size: 0.82rem;
        margin-bottom: 0.35rem;
    }

    .blog-post-card .card-text {
        font-size: 0.72rem;
        margin-bottom: 0.55rem;
    }

    .blog-post-card .blog-tag {
        font-size: 0.6rem;
        padding: 0.15rem 0.45rem;
    }

    .blog-post-card .blog-author-details small {
        font-size: 0.65rem;
    }

    .blog-post-card .blog-stats small {
        font-size: 0.65rem;
    }

    .blog-post-card .blog-author-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .blog-post-card .blog-read-more-btn {
        align-self: stretch;
        text-align: center;
        font-size: 0.72rem;
        padding: 0.3rem 0.7rem;
    }

    .author-avatar {
        width: 28px !important;
        height: 28px !important;
    }
}

/* RTL/LTR Support for Blog Card Content Alignment */
[dir="rtl"] .blog-post-card .card-body,
[dir="rtl"] .blog-post-card .card-footer {
    text-align: right;
}

[dir="ltr"] .blog-post-card .card-body,
[dir="ltr"] .blog-post-card .card-footer {
    text-align: left;
}

/* Blog Tags Alignment */
[dir="rtl"] .blog-post-card .blog-tags {
    justify-content: flex-start;
    flex-wrap: wrap;
}

[dir="ltr"] .blog-post-card .blog-tags {
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Blog Footer Info Alignment */
[dir="rtl"] .blog-post-card .blog-footer-info {
    direction: rtl;
}

[dir="ltr"] .blog-post-card .blog-footer-info {
    direction: ltr;
}

[dir="rtl"] .blog-post-card .blog-author-details small i {
    margin-left: 0.25rem;
    margin-right: 0;
}

[dir="ltr"] .blog-post-card .blog-author-details small i {
    margin-right: 0.25rem;
    margin-left: 0;
}

/* Animation for Blog Cards Loading */
@keyframes blogCardFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-post-card.gsap-fade-up {
    animation: blogCardFadeIn 0.6s ease-out forwards;
}

/* Enhanced Blog Section Titles */
.blog-section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 2rem;
    position: relative;
    text-align: center;
    padding-bottom: 1rem;
}

.blog-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* HOME CATEGORIES SECTION STYLES */
/* ============================= */
.categories-section {
  background-color: var(--bg-secondary);
  padding: 4rem 0;
}

[data-theme='dark'] .categories-section {
  background-color: var(--bg-secondary);
}

.category-section-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.category-section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
  border-color: var(--primary-color);
}

.section-header-card {
  padding: 1.5rem 1.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.total-ads-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.categories-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  flex-grow: 1;
}

.category-item {
  position: relative;
  overflow: hidden;
}

.category-link {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 100%;
  min-height: 80px;
  position: relative;
  cursor: pointer;
}

.category-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.category-expand-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--primary-color);
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  z-index: 2;
}

.category-link.expanded .category-expand-icon i {
  transform: rotate(180deg);
}

.category-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.2);
  text-decoration: none;
}

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.category-icon i {
  font-size: 1rem;
  color: white;
}

.category-link:hover .category-icon {
  background: white;
  transform: scale(1.1);
}

.category-link:hover .category-icon i {
  color: var(--primary-color);
}

.category-info {
  flex-grow: 1;
  min-width: 0;
}

.category-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-link:hover .category-name {
  color: white;
}

.ads-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.category-link:hover .ads-count {
  color: rgba(255, 255, 255, 0.8);
}

.see-more-section {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  text-align: center;
}

.see-more-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.see-more-link:hover {
  background: var(--accent-purple);
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.3);
}

.see-more-link i {
  font-size: 0.8rem;
}

/* Dark Theme Support */
[data-theme='dark'] .category-section-card {
  background: var(--bg-primary);
  border-color: var(--border-color);
}

[data-theme='dark'] .category-link {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='dark'] .category-link:hover {
  background: var(--secondary-color);
}

[data-theme='dark'] .category-link:hover .category-icon {
  background: white;
}

[data-theme='dark'] .category-link:hover .category-icon i {
  color: var(--secondary-color);
}

[data-theme='dark'] .see-more-section {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='dark'] .see-more-link {
  background: var(--secondary-color);
}

[data-theme='dark'] .see-more-link:hover {
  background: var(--accent-orange);
}

[data-theme='dark'] .section-header-card {
  background: linear-gradient(135deg, var(--secondary-color), var(--accent-orange));
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 2fr;
    padding: 1rem;
    gap: 0.75rem;
  }

  .category-link {
    padding: 0.75rem;
    min-height: 70px;
  }

  .category-icon {
    width: 35px;
    height: 35px;
    margin-right: 0.75rem;
  }

  .category-icon i {
    font-size: 0.9rem;
  }

  .category-name {
    font-size: 0.9rem;
  }

  .ads-count {
    font-size: 0.7rem;
  }

  .section-header-card {
    padding: 1rem;
  }

  .section-name {
    font-size: 1.1rem;
  }

  .total-ads-count {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
  }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(1, 1fr);
    gap: 0.875rem;
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .categories-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .category-link {
    min-height: 90px;
  }
}

/* Subcategories Styles for Home Page */
.subcategories-container {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.subcategories-loading {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.subcategories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.subcategory-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  font-size: 0.85rem;
}

.subcategory-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.2);
  text-decoration: none;
}

.subcategory-item i {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.subcategory-item:hover i {
  color: white;
}

.subcategories-actions {
  text-align: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.view-all-subcategories {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.view-all-subcategories:hover {
  color: var(--secondary-color);
  text-decoration: none;
}

/* Dark Theme Support for Subcategories */
[data-theme='dark'] .subcategories-container {
  background: var(--bg-primary);
}

[data-theme='dark'] .subcategory-item {
  background: var(--bg-secondary);
}

[data-theme='dark'] .subcategory-item:hover {
  background: var(--secondary-color);
}

[data-theme='dark'] .category-expand-icon {
  color: var(--secondary-color);
}

/* Mobile Responsive Subcategories */
@media (max-width: 768px) {
  .subcategories-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
  }

  .category-expand-icon {
    top: 8px;
    right: 8px;
    font-size: 0.7rem;
  }

  .subcategories-container {
    padding: 0.75rem;
  }
}

/* ============================= */
/* AD DETAIL PAGE - NEW STYLES */
/* ============================= */
.ad-detail-section {
  background-color: var(--bg-secondary);
  animation: fadeInUp 0.6s ease-out;
}

[data-theme='dark'] .ad-detail-section {
  background-color: var(--bg-secondary);
}

/* Title Header */
.ad-title-header {
  margin-bottom: 1.5rem;
}
.ad-title-main {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.ad-meta-info {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Image Gallery */
.ad-gallery-container {
  position: relative;
}
.ad-gallery-swiper {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.ad-gallery-swiper .swiper-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}
.ad-thumbnails-swiper {
  padding: 5px;
}
.ad-thumbnails-swiper .swiper-slide {
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
}
.ad-thumbnails-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--primary-color);
  transform: scale(1.05);
}
.ad-thumbnails-swiper img {
  width: 100%;
  height: 80px;
  object-fit: cover;
}
.swiper-button-next,
.swiper-button-prev {
  color: var(--white-color);
  background: rgba(0, 0, 0, 0.3);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 1rem;
  font-weight: 900;
}

/* Sidebar Cards */
.ad-sidebar {
  position: sticky;
  top: 120px;
}
.ad-details-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: all 0.3s ease;
}
.ad-details-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}
.ad-details-card .card-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.25rem;
}
.card-title-main {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.ad-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
}
[data-theme='dark'] .ad-price {
  color: var(--secondary-color);
}
.ad-location {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.seller-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ad-details-card .card-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

/* Main Content Cards */
.ad-content-card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}
.ad-content-card .card-header {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
.ad-description {
  color: var(--text-secondary);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* Related Ads */
.section-title-related {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

[data-theme='dark'] .section-title-related,
[data-bs-theme="dark"] .section-title-related {
  color: #e9ecef !important;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* My Ads Page Styles */
.my-ads-section {
  background-color: var(--bg-secondary);
}

.my-ads-section h2 {
  color: var(--text-primary);
  font-weight: 700;
}

[data-theme='dark'] .my-ads-section {
  background-color: var(--bg-secondary);
}

/* My Ads Page Empty State Card */
.my-ads-section .ad-content-card {
  animation: fadeInUp 0.6s ease-out;
}

.my-ads-section .ad-content-card h4 {
  color: var(--text-primary);
}

.my-ads-section .ad-content-card .text-muted {
  color: var(--text-muted) !important;
}

[data-theme='dark'] .my-ads-section .ad-content-card h4 {
  color: var(--text-primary);
}

[data-theme='dark'] .my-ads-section .ad-content-card .text-muted {
  color: #adb5bd !important;
}

/* My Ads Table Styles */
.table-ads {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.table-ads thead {
  background: linear-gradient(135deg, #4b315e, #3a2449);
  color: white;
}

.table-ads thead th {
  border: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

.table-ads tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.table-ads tbody tr:hover {
  background-color: rgba(75, 49, 94, 0.05);
  transform: scale(1.01);
}

[data-theme='dark'] .table-ads tbody tr:hover {
  background-color: rgba(75, 49, 94, 0.15);
}

.table-ads tbody td {
  padding: 1rem 0.75rem;
  vertical-align: middle;
  border: none;
}

.ad-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ad-thumbnail-placeholder {
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}

.ad-title-cell {
  max-width: 300px;
}

.ad-title-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.ad-title-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.category-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.1), rgba(58, 36, 73, 0.1));
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

[data-theme='dark'] .category-badge {
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.3), rgba(58, 36, 73, 0.3));
  color: #b794f6;
}

.views-count {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons .btn {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.action-buttons .btn-info {
  background: linear-gradient(135deg, #17a2b8, #138496);
  border: none;
  color: white;
}

.action-buttons .btn-info:hover {
  background: linear-gradient(135deg, #138496, #117a8b);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* ============================= */
/* CONFIRM VERIFY PHONE BUTTON */
/* ============================= */
#confirmVerifyPhoneBtn {
  background: linear-gradient(135deg, #17a2b8, #138496);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2);
  min-width: 120px;
}

#confirmVerifyPhoneBtn:hover {
  background: linear-gradient(135deg, #138496, #117a8b);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(23, 162, 184, 0.35);
}

#confirmVerifyPhoneBtn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

#confirmVerifyPhoneBtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.25);
}

#confirmVerifyPhoneBtn:disabled {
  background: linear-gradient(135deg, #a8a8a8, #8c8c8c);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

#confirmVerifyPhoneBtn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

#confirmVerifyPhoneBtn:hover i {
  transform: scale(1.1);
}

.action-buttons .btn-warning {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  border: none;
  color: #000;
}

.action-buttons .btn-warning:hover {
  background: linear-gradient(135deg, #ffb300, #ffa000);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.action-buttons .btn-danger {
  background: linear-gradient(135deg, #dc3545, #c82333);
  border: none;
  color: white;
}

.action-buttons .btn-danger:hover {
  background: linear-gradient(135deg, #c82333, #bd2130);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Responsive Table */
@media (max-width: 1200px) {
  .table-ads thead th,
  .table-ads tbody td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }

  .ad-title-cell {
    max-width: 200px;
  }
}

@media (max-width: 768px) {
  .table-responsive {
    border-radius: 0;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }
}

/* ============================= */
/* AD DETAIL PAGE STYLES */
/* ============================= */
.ad-detail-section {
  background-color: var(--bg-secondary);
}

[data-theme='dark'] .ad-detail-section {
  background-color: var(--bg-secondary);
}

.ad-details-card,
.ad-detail-section .card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

[data-theme='dark'] .ad-details-card,
[data-theme='dark'] .ad-detail-section .card {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ad-details-card .card-body {
  color: var(--text-primary);
  background: var(--bg-primary);
}

[data-theme='dark'] .ad-details-card .card-body {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.ad-details-card .badge.bg-secondary {
  background-color: var(--secondary-color) !important;
  color: var(--white-color);
}

.ad-details-card .bg-secondary-light {
  background-color: var(--bg-secondary) !important;
  border-color: var(--border-color) !important;
}

/* Image Gallery */
.ad-gallery-swiper .swiper-slide {
  border-radius: 16px;
  overflow: hidden;
}

.ad-gallery-swiper .swiper-slide img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.ad-thumbnails-swiper .swiper-slide {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.ad-thumbnails-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border: 2px solid var(--primary-color);
}

/* Dark theme adjustments for ad detail page */
[data-theme='dark'] .ad-details-card .bg-secondary-light {
  background-color: var(--bg-secondary-light) !important;
}


/* ============================= */
/* NAVBAR STYLES */
/* ============================= */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  box-shadow: 0 4px 20px var(--shadow-md);
  padding: 1rem 0;
  transition: all 0.3s ease;
  border-bottom: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

[data-theme='dark'] .navbar {
  background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%);
  border-bottom: 2px solid var(--secondary-color);
}

.navbar-toggler-icon {
  background-image: var(--bs-navbar-toggler-icon-idrissimart) !important;
  color: var(--secondary-color);
}

[data-theme='dark'] .navbar-toggler-icon {
  color: var(--secondary-color);
}

/* Navbar Brand */
.navbar-brand {
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--white-color) !important;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

/* Theme-specific logo styles */
.navbar-brand img {
  height: 45px;
  width: auto;
  filter: brightness(1.2);
  transition: all 0.3s ease;
}

.navbar-brand .main-logo {
  height: 55px;
  width: auto;
}

.navbar-brand .mini-logo {
  height: 70px;
  width: auto;
  opacity: 0;
  position: absolute;
  top: 50%;
  margin: 0 auto;
  transform: translateY(-50%) scale(0.8);
  padding: 0.5rem 0.5rem;
}

.navbar.scrolled .navbar-brand .main-logo {
  opacity: 0;
  transform: translateY(-10px);
}

.navbar.scrolled .navbar-brand .mini-logo {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* Always use dark theme logo for both themes */
.light-theme-logo {
  display: none;
}

.dark-theme-logo {
  display: inline-block;
}

.navbar-brand:hover img {
  transform: rotate(5deg);
}

/* Scrolled navbar style for mini logo */
.navbar.scrolled {
  padding: 0.6rem 0;
}

/* Nav Links */
.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  margin: 0 0.5rem;
  /* Responsive font size that scales smoothly */
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  /* Touch-friendly padding and min-height */
  padding: 0.5rem 1rem !important;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-link:hover {
  color: var(--secondary-color) !important;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 80%;
}

/* Ensure label text inside nav-link truncates but icons remain visible */
.nav-link .nav-label {
  display: inline-block;
  vertical-align: middle;
  max-width: 10rem; /* reasonable default, will shrink with parent */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Slightly increase hit target on touch devices */
@media (hover: none) and (pointer: coarse) {
  .nav-link {
    padding: 0.55rem 0.85rem !important;
    min-height: 48px;
  }
}

/* Slightly more compact navbar for larger desktops */
@media (min-width: 992px) {
  .navbar {
    padding: 0.6rem 0; /* reduce vertical padding */
  }

  .navbar-brand {
    font-size: 1.5rem; /* reduce brand font-size on wide screens */
  }

  /* Force navbar items to stay on a single line */
  .navbar-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap; /* prevent wrapping into multiple lines */
  }

  .nav-link {
    font-size: 0.8rem; /* slightly smaller nav link text */
    padding: 0.25rem 0.65rem !important; /* reduce link padding */
    margin: 0 0.4rem;
    white-space: nowrap; /* keep labels on one line */
  }

  /* Standardize icon sizes in header */
  .icon-link i {
    font-size: 1.15rem; /* slightly smaller to keep compact */
    width: 1.6rem;
    height: 1.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Nav label: fixed max width to avoid wrapping and keep consistent height */
  .nav-link .nav-label {
    max-width: 8.5rem;
    display: inline-block;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* When scrolled (compact) make the brand a bit tighter */
  .navbar.scrolled {
    padding: 0.4rem 0;
  }
}

/* ============================= */
/* CART & WISHLIST ICONS */
/* ============================= */
.icon-link {
  position: relative;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  /* allow badges that sit outside the anchor box to be visible */
  overflow: visible;
}

.icon-link i {
  font-size: 1.3rem;
  transition: all 0.3s ease;
}

.icon-link:hover i {
  transform: scale(1.2);
}

/* Counter badge - matches chatbot badge style */
.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
  animation: pulse-badge 2s ease-in-out infinite;
  transition: transform 0.2s ease;
  z-index: 10;
}

.badge-count:hover {
  transform: scale(1.15);
}

@keyframes pulse-badge {
  0%,
  100% {
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
  }
  50% {
    box-shadow: 0 2px 12px rgba(244, 67, 54, 0.6);
  }
}

.wishlist-link:hover {
  color: #ff4757 !important;
}

.cart-link:hover {
  color: var(--secondary-color) !important;
}

/* ============================= */
/* ENHANCED BADGES - DESKTOP */
/* ============================= */
.enhanced-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ff6001 0%, #ff8534 100%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow:
    0 3px 10px rgba(255, 96, 1, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
  z-index: 10;
  transition: all 0.3s ease;
}

.wishlist-badge {
  background: linear-gradient(135deg, #e74c3c 0%, #ff6b6b 100%);
  box-shadow:
    0 3px 10px rgba(231, 76, 60, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.3);
}

.cart-badge {
  background: linear-gradient(135deg, #4b315e 0%, #6b4c7a 100%);
  box-shadow:
    0 3px 10px rgba(75, 49, 94, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.3);
}

.icon-link:hover .enhanced-badge {
  transform: scale(1.15) rotate(5deg);
  box-shadow:
    0 4px 15px rgba(255, 96, 1, 0.6),
    0 0 0 4px rgba(255, 255, 255, 0.5);
}

.icon-link:hover .wishlist-badge {
  box-shadow:
    0 4px 15px rgba(231, 76, 60, 0.6),
    0 0 0 4px rgba(255, 255, 255, 0.5);
}

.icon-link:hover .cart-badge {
  box-shadow:
    0 4px 15px rgba(75, 49, 94, 0.6),
    0 0 0 4px rgba(255, 255, 255, 0.5);
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ============================= */
/* MOBILE BADGES */
/* ============================= */
.mobile-badge {
  background: linear-gradient(135deg, #ff6001 0%, #ff8534 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(255, 96, 1, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
}

.mobile-badge.wishlist {
  background: linear-gradient(135deg, #e74c3c 0%, #ff6b6b 100%);
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.mobile-badge.cart {
  background: linear-gradient(135deg, #4b315e 0%, #6b4c7a 100%);
  box-shadow: 0 2px 8px rgba(75, 49, 94, 0.3);
}

/* ============================= */
/* COUNTRY SELECTOR - DESKTOP */
/* ============================= */
.country-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.current-country {
  font-size: 1.5rem;
  line-height: 1;
  animation: fadeIn 0.3s ease;
}

.country-dropdown {
  min-width: 200px;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.country-flag {
  font-size: 1.5rem;
}

.country-name {
  flex: 1;
  font-weight: 600;
}

.country-check {
  color: var(--secondary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.country-item.active .country-check {
  opacity: 1;
}

.country-item:hover {
  background: linear-gradient(90deg, rgba(255, 96, 1, 0.1), transparent);
  padding-right: 2rem;
}

/* ============================= */
/* THEME TOGGLE - SINGLE ICON */
/* ============================= */
.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--white-color);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin: 0 0.5rem;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 4px 15px var(--shadow-md);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Show only relevant icon */
.theme-icon-light,
.theme-icon-dark {
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

/* Light mode: show sun, hide moon */
[data-theme='light'] .theme-icon-light {
  display: block;
  animation: iconRotateIn 0.4s ease;
}

[data-theme='light'] .theme-icon-dark {
  display: none;
}

/* Dark mode: hide sun, show moon */
[data-theme='dark'] .theme-icon-light {
  display: none;
}

[data-theme='dark'] .theme-icon-dark {
  display: block;
  animation: iconRotateIn 0.4s ease;
}

@keyframes iconRotateIn {
  from {
    transform: rotate(-180deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

/* Legacy support for old class names */
.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.theme-toggle .sun-icon {
  display: block;
}

.theme-toggle .moon-icon {
  display: none;
}

[data-theme='dark'] .theme-toggle .sun-icon {
  display: none;
}

[data-theme='dark'] .theme-toggle .moon-icon {
  display: block;
}

/* ============================= */
/* DROPDOWN MENU */
/* ============================= */
.dropdown-menu {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 25px var(--shadow-lg);
  border-radius: 18px;
  padding: 0.5rem;
  animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  color: var(--text-primary);
  padding: 0.7rem 1rem;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background: var(--primary-color);
  color: var(--white-color);
  transform: translateX(-5px);
}

/* Dropdown icon colors */
.dropdown-item .text-purple {
  color: #6f42c1 !important;
}

.dropdown-item:hover .text-purple,
.dropdown-item:hover .text-primary,
.dropdown-item:hover .text-success,
.dropdown-item:hover .text-warning,
.dropdown-item:hover .text-info,
.dropdown-item:hover .text-secondary,
.dropdown-item:hover .text-danger {
  color: var(--white-color) !important;
}

/* ============================= */
/* MOBILE NAVIGATION - FIXED VERSION */
/* ============================= */

/* Hamburger Button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.hamburger:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.05);
}

.hamburger:active {
  transform: scale(0.95);
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #ff6c2f;
  border-radius: 10px;
  transition: all 0.3s ease;
  transform-origin: center;
  box-shadow: 0 1px 2px rgba(255, 108, 47, 0.3);
}

/* Dark theme - ensure proper contrast */
[data-theme="dark"] .hamburger span {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .hamburger:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Light theme hover */
[data-theme="light"] .hamburger:hover {
  background: rgba(255, 108, 47, 0.1);
}

/* Light theme - orange color */
[data-theme="light"] .hamburger span,
html:not([data-theme]) .hamburger span {
  background: #ff6c2f;
  box-shadow: 0 1px 2px rgba(255, 108, 47, 0.3);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100dvh; /* uses dynamic viewport height, more reliable on iOS Safari */
  background: var(--bg-primary);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* ✅ enables smooth scrolling on iOS */
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.active {
  transform: translateX(0);
}

[data-theme='dark'] .mobile-nav {
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.7);
}

/* Close Button */
.mobile-nav-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 96, 1, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-primary);
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-nav-close:hover {
  background: var(--secondary-color);
  transform: rotate(90deg);
}

.mobile-nav-close:hover svg {
  stroke: white;
}

/* Header inside mobile nav */
.mobile-nav-header {
  padding: 40px 0 30px;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Mobile Logo Container */
.mobile-logo-container {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.mobile-logo {
  width: 55px;
  height: auto;
  transition: transform 0.3s ease;
}

.mobile-logo:hover {
  transform: scale(1.1);
}

/* Always use dark theme logo for mobile as well */
.mobile-logo.light-theme-logo {
  display: none;
}

.mobile-logo.dark-theme-logo {
  display: block;
}

/* Guest info section */
.mobile-guest-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-guest-info p {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-guest-info i {
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 1 !important;
  visibility: visible !important;
}

/* User info section */
.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-user-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 1 !important;
  visibility: visible !important;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mobile-user-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 1 !important;
  visibility: visible !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.mobile-user-email {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 1 !important;
  visibility: visible !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* Menu list */
.mobile-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-nav-menu li {
  margin-bottom: 8px;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1rem;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative;
}

.mobile-nav-link i {
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: all 0.3s ease;
  width: 24px;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-nav-link span {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Mobile badge for cart/wishlist counts */
.mobile-nav-link .mobile-badge {
  margin-left: auto;
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  min-width: 20px;
  text-align: center;
}

.mobile-nav-link:hover {
  background: linear-gradient(90deg, rgba(75, 49, 94, 0.1), transparent);
  color: var(--primary-color);
  transform: translateX(-5px);
}

.mobile-nav-link:hover i {
  transform: scale(1.2);
  color: var(--secondary-color);
}

.mobile-nav-link.highlight {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  color: white;
}

.mobile-nav-link.highlight:hover {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--primary-color) 100%);
  transform: translateX(-5px) scale(1.02);
}

.mobile-nav-link.highlight i {
  color: white;
}

.mobile-nav-link.logout {
  color: #e74c3c;
}

.mobile-nav-link.logout i {
  color: #e74c3c;
}

.mobile-nav-link.logout:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Divider */
.mobile-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 15px 0;
  opacity: 1 !important;
  visibility: visible !important;
}

/* ============================= */
/* ENHANCED MOBILE COUNTRY SELECTOR */
/* ============================= */
.mobile-country-selector {
  margin-top: 25px;
  padding: 20px 0 0;
  border-top: 2px solid var(--border-color);
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  display: flex;
  align-items: center;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-country-toggle {
  width: 100%;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 12px;
}

.mobile-country-toggle:hover {
  background: var(--bg-primary);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-sm);
}

.mobile-country-toggle:active {
  transform: translateY(0);
}

.current-selection {
  display: flex;
  align-items: center;
  gap: 12px;
}

.country-flag-large {
  font-size: 2rem;
  line-height: 1;
}

.country-name-large {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.toggle-icon {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.mobile-country-toggle[aria-expanded='true'] .toggle-icon {
  transform: rotate(180deg);
}

/* Country List */
.country-list-wrapper {
  background: var(--bg-secondary);
  border-radius: 14px;
  padding: 8px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px var(--shadow-sm);
}

.mobile-country-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 6px;
  background: var(--bg-primary);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-country-item:last-child {
  margin-bottom: 0;
}

.mobile-country-item:hover {
  background: linear-gradient(90deg, rgba(75, 49, 94, 0.05), transparent);
  border-color: var(--secondary-color);
  transform: translateX(-4px);
}

.mobile-country-item.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.3);
}

.country-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.country-flag-item {
  font-size: 1.8rem;
  line-height: 1;
}

.country-name-item {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.mobile-country-item.active .country-name-item {
  color: white;
}

.check-icon {
  color: white;
  font-size: 1.1rem;
  animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3);
  }
}

/* Scrollbar for country list */
.country-list-wrapper::-webkit-scrollbar {
  width: 6px;
}

.country-list-wrapper::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 10px;
}

.country-list-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

.country-list-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Loading state for country change */
.mobile-country-item.loading {
  pointer-events: none;
  opacity: 0.6;
}

.mobile-country-item.loading .country-content::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Legacy mobile country selector styles */
.mobile-country-selector .list-group-item {
  background: var(--bg-secondary);
  border: none;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.mobile-country-selector .list-group-item:hover {
  background: var(--bg-primary);
  color: var(--primary-color);
}

.mobile-country-selector .list-group-item.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  color: #fff;
}

.mobile-country-selector .list-group-item.active .country-name {
  color: #fff;
}

.mobile-country-selector .list-group-item:last-child {
  border-bottom: none;
}

.mobile-country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-country-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px 10px;
  background: var(--bg-secondary);
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-country-btn .country-flag {
  font-size: 2rem;
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-country-btn .country-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  opacity: 1 !important;
  visibility: visible !important;
}

.mobile-country-btn:hover {
  background: var(--bg-primary);
  border-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-sm);
}

.mobile-country-btn.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  border-color: var(--primary-color);
}

.mobile-country-btn.active .country-name {
  color: white;
}

/* Backdrop overlay */
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none; /* disable click when hidden */
  transition: opacity 0.3s ease;
  z-index: 1000; /* below menu */
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* Mobile navigation theme toggle */
.mobile-nav #mobileThemeToggle {
  display: flex !important; /* Ensure it's always visible within the mobile nav */
  margin: 1.5rem auto 1rem auto; /* Center it with some vertical spacing */
  width: 50px; /* Adjust size for mobile */
  height: 50px;
  border-radius: 50%; /* Make it round */
  font-size: 1.5rem; /* Larger icon */
  color: var(--primary-color); /* Use primary color for visibility */
  border: 2px solid var(--primary-color);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
}

.mobile-nav #mobileThemeToggle:hover {
  background: var(--primary-color);
  color: var(--white-color);
  transform: scale(1.1);
}

[data-theme='dark'] .mobile-nav #mobileThemeToggle {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* ============================= */
/* HERO SECTION */
/* ============================= */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  padding: 55px 0 70px;
  color: var(--white-color);
  position: relative;
  overflow: hidden;
}

[data-theme='dark'] .hero-section {
  background: linear-gradient(135deg, #3a2449 0%, #4b315e 100%);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23FF6001" fill-opacity="0.2" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,96C1248,75,1344,53,1392,42.7L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat;
  background-size: cover;
  background-position: bottom;
  animation: waveAnimation 15s ease-in-out infinite;
}

@keyframes waveAnimation {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(30px);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0.95;
  line-height: 1.8;
}

.btn-hero {
  padding: 10px 25px;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 5px 20px var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.btn-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
}

.btn-hero:hover::before {
  width: 400px;
  height: 400px;
}

.btn-hero:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 35px var(--shadow-lg);
}

/* ============================= */
/* CATEGORIES SECTION */
/* ============================= */
.categories-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

[data-theme='dark'] .categories-section {
  background: var(--bg-secondary);
}

.section-title {
  font-size: clamp(1.15rem, 1rem + 1.5vw, 2.5rem);
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: clamp(1.25rem, 1rem + 2vw, 3rem);
  text-align: center;
  position: relative;
  padding-bottom: clamp(12px, 1.5vw, 20px);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: clamp(60px, 8vw, 100px);
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 2px;
  animation: pulse 2s ease-in-out infinite;
}

/* Dark mode for section title */
[data-theme='dark'] .section-title,
[data-bs-theme="dark"] .section-title {
  color: #e9ecef !important;
}

@keyframes pulse {
  0%,
  100% {
    transform: translateX(50%) scaleX(1);
  }
  50% {
    transform: translateX(50%) scaleX(1.2);
  }
}

/* Additional Animations */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px var(--secondary-color);
  }
  50% {
    box-shadow:
      0 0 20px var(--secondary-color),
      0 0 30px var(--secondary-color);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px var(--secondary-color);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      0 0 20px var(--secondary-color),
      0 0 30px var(--secondary-color);
  }
}

.animate-on-scroll {
  animation: slideInUp 0.8s ease forwards;
}

.category-card {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
  height: 100%;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 96, 1, 0.1), transparent);
  transition: left 0.5s ease;
}

.category-card:hover::before {
  left: 100%;
}

.category-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: var(--shadow-card-hover), var(--shadow-glow);
  border-color: var(--secondary-color);
  animation: float 3s ease-in-out infinite;
}

.category-card-icon {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  transition: all 0.4s ease;
}

.category-card:hover .category-card-icon {
  transform: scale(1.3) rotate(15deg);
  animation: glow 2s ease-in-out infinite;
}

/* Interactive Category Card Styles */
.interactive-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.interactive-card .category-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  height: 80px;
}

.interactive-card .category-icon {
  font-size: 4rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.interactive-card .category-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.interactive-card .category-info {
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
}

.interactive-card:hover .category-icon {
  transform: scale(1.1);
}

.interactive-card:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

.interactive-card .explore-btn {
  pointer-events: none;
  display: inline-block;
  text-decoration: none;
}

/* Animation for category info reveal */
@keyframes categoryInfoReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.category-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ============================= */
/* SUBCATEGORIES STYLING */
/* ============================= */
.section-subtitle {
  font-size: clamp(0.82rem, 0.7rem + 0.9vw, 1.5rem);
  color: var(--text-primary);
  margin-bottom: clamp(18px, 2vw, 30px);
  font-weight: 600;
  text-align: center;
  position: relative;
}

.section-subtitle::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(40px, 5vw, 60px);
  height: 3px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* Dark mode for section subtitle */
[data-theme='dark'] .section-subtitle,
[data-bs-theme="dark"] .section-subtitle {
  color: #adb5bd !important;
}

.subcategories-list {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.subcategories-title {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 600;
}

.subcategories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subcategories li {
  margin: 0;
}

.subcategory-link {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.subcategory-link:hover {
  background: var(--primary-color);
  color: var(--white-color);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(75, 49, 94, 0.2);
}

.section-group {
  position: relative;
}

.section-group::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.section-group:last-child::after {
  display: none;
}

/* Dark theme adjustments for subcategories */
[data-theme='dark'] .subcategory-link {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme='dark'] .subcategory-link:hover {
  background: var(--secondary-color);
  color: var(--white-color);
  box-shadow: 0 4px 8px rgba(255, 96, 1, 0.2);
}

/* ============================= */
/* ABOUT & CONTACT PAGES STYLING */
/* ============================= */

/* Page Hero Section */
.page-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  padding: 120px 0 80px;
  color: var(--white-color);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.hero-content-center {
  position: relative;
  z-index: 2;
}

.page-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-tagline {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.page-subtitle {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

[data-theme='dark'] .about-section {
  background: var(--bg-primary);
}

.about-text-block {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  animation: fadeInUp 0.8s ease-out backwards;
}

.about-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.about-description p {
  animation: fadeInUp 0.6s ease-out backwards;
  transition: transform 0.3s ease;
}

.about-description p:nth-child(1) {
  animation-delay: 0.2s;
}

.about-description p:nth-child(2) {
  animation-delay: 0.4s;
}

.about-description p:nth-child(3) {
  animation-delay: 0.6s;
}

.about-description p:hover {
  transform: translateX(5px);
}

/* Vision & Mission Section */
.vision-mission-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

[data-theme='dark'] .vision-mission-section {
  background: var(--bg-primary);
}

.vm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}

.vm-card {
  background: var(--bg-primary);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  animation: fadeInUp 0.8s ease-out backwards;
}

[data-theme='dark'] .vm-card {
  background: var(--bg-secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--border-color);
}

.vm-card:nth-child(1) {
  animation-delay: 0.3s;
}

.vm-card:nth-child(2) {
  animation-delay: 0.5s;
}

.vm-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  border-radius: 20px;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.vm-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 50px rgba(75, 49, 94, 0.2);
  border-color: var(--primary-color);
}

.vm-card:hover::before {
  opacity: 0.05;
}

.vm-icon {
  color: var(--primary-color);
  margin-bottom: 20px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.1), rgba(255, 96, 1, 0.1));
  border-radius: 50%;
  position: relative;
}

.vm-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.vm-icon svg {
  position: relative;
  z-index: 1;
  transition: all 0.4s ease;
}

.vm-card:hover .vm-icon {
  transform: scale(1.15) rotate(10deg);
}

.vm-card:hover .vm-icon::after {
  opacity: 0.2;
}

.vm-card:hover .vm-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 5px 10px rgba(75, 49, 94, 0.3));
}

.vm-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.vm-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Values Section */
.values-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

[data-theme='dark'] .values-section {
  background: var(--bg-primary);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.value-card {
  background: var(--bg-secondary);
  padding: 30px 20px;
  border-radius: 15px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
}

[data-theme='dark'] .value-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.value-card:nth-child(1) {
  animation-delay: 0.2s;
}

.value-card:nth-child(2) {
  animation-delay: 0.4s;
}

.value-card:nth-child(3) {
  animation-delay: 0.6s;
}

.value-card:nth-child(4) {
  animation-delay: 0.8s;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 96, 1, 0.1), transparent);
  transition: left 0.5s ease;
}

.value-card:hover::before {
  left: 100%;
}

.value-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 35px rgba(75, 49, 94, 0.15);
}

.value-icon {
  color: var(--secondary-color);
  margin-bottom: 15px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(255, 96, 1, 0.1), rgba(75, 49, 94, 0.1));
  border-radius: 50%;
}

.value-icon svg {
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  transform: scale(1.2) rotate(-10deg);
  background: linear-gradient(135deg, rgba(255, 96, 1, 0.2), rgba(75, 49, 94, 0.2));
}

.value-card:hover .value-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(255, 96, 1, 0.3));
}

.value-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.value-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Offerings Section */
.offerings-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

[data-theme='dark'] .offerings-section {
  background: var(--bg-primary);
}

.offerings-tabs {
  max-width: 800px;
  margin: 50px auto 0;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  gap: 20px;
}

.tab-btn {
  padding: 12px 30px;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 25px;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

[data-theme='dark'] .tab-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary-color);
  color: var(--white-color);
  border-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Center content inside tab panels */
.tab-content .section-group {
  text-align: center;
}

.tab-content .section-group .row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem 1.5rem;
  align-items: start;
}

.tab-content .category-card {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

/* Make cards less tall inside tab panels */
.tab-content .category-card {
  padding: 28px 22px;
}

/* Reduce icon size inside tab panels to save vertical space */
.tab-content .category-card .category-icon {
  font-size: 3.2rem;
  margin-bottom: 1rem;
}

/* Remove the default Bootstrap column side padding so grid column sizing is accurate */
.tab-content .section-group .row > [class*='col-'] {
  padding-left: 0;
  padding-right: 0;
}

/* Increase column density on very wide screens */
@media (min-width: 1400px) {
  .tab-content .section-group .row {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .tab-content .category-card {
    max-width: 380px;
  }
}

/* Ensure Bootstrap column helpers don't force narrow/wide widths inside our grid */
.tab-content .section-group .row > [class*='col-'] {
  width: auto; /* allow grid to control sizing */
  flex: none !important;
}

/* Prevent cards from stretching to fill row height */
.tab-content .section-group .row .category-card,
.tab-content .category-card {
  height: auto !important;
  align-self: start;
}

.offerings-list {
  display: grid;
  gap: 20px;
}

.offering-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  animation: fadeInUp 0.5s ease-out backwards;
}

.offering-item:nth-child(1) { animation-delay: 0.1s; }
.offering-item:nth-child(2) { animation-delay: 0.2s; }
.offering-item:nth-child(3) { animation-delay: 0.3s; }
.offering-item:nth-child(4) { animation-delay: 0.4s; }
.offering-item:nth-child(5) { animation-delay: 0.5s; }

.offering-item:hover {
  transform: translateX(10px);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(75, 49, 94, 0.15);
}

.offering-item p {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.offering-icon {
  font-size: 2rem;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.offering-item:hover .offering-icon {
  transform: scale(1.2) rotate(5deg);
}

/* Tab pane transitions */
.tab-pane {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Light theme specific adjustments */
[data-theme='light'] .tab-btn {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
}

[data-theme='light'] .tab-btn.active,
[data-theme='light'] .tab-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

[data-theme='light'] .offering-item {
  background: white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .offering-item:hover {
  box-shadow: 0 8px 25px rgba(75, 49, 94, 0.12);
}

[data-theme='light'] .vm-card {
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .vm-card:hover {
  box-shadow: 0 20px 50px rgba(75, 49, 94, 0.15);
}

[data-theme='light'] .value-card {
  background: #f8f9fa;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .value-card:hover {
  box-shadow: 0 15px 35px rgba(75, 49, 94, 0.12);
}

.offering-icon {
  color: var(--secondary-color);
  font-size: 1.2rem;
  font-weight: bold;
}

/* Statistics Section */
.stats-section {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.08), rgba(255, 96, 1, 0.08));
  position: relative;
}

/* Utility: py-5 (vertical padding) */
.stats-section.py-5 {
  padding-top: 3rem; /* ~48px */
  padding-bottom: 3rem;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.08), rgba(255, 96, 1, 0.08));
}

/* Dark theme override */
[data-theme='dark'] .stats-section.py-5,
[data-bs-theme="dark"] .stats-section.py-5 {
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.4) 0%, rgba(26, 26, 26, 0.95) 50%, rgba(255, 96, 1, 0.25) 100%) !important;
  color: #ffffff;
}

[data-theme='dark'] .stats-section,
[data-bs-theme="dark"] .stats-section {
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.35) 0%, rgba(26, 26, 26, 0.95) 50%, rgba(255, 96, 1, 0.2) 100%) !important;
  color: #ffffff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 930px;
  margin: 0 auto;
}

.stat-card {
  text-align: center;
}

.stats-section.py-5 .stat-card {
  background: transparent;
  box-shadow: none;
  color: var(--white-color);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  display: block;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

.stat-box {
  padding: 2rem 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  border: 1px solid rgba(75, 49, 94, 0.1);
  height: 100%;
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(75, 49, 94, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

[data-theme='dark'] .stat-box {
  background: rgba(42, 26, 58, 0.7);
  border: 1px solid rgba(107, 76, 122, 0.4);
}

[data-theme='dark'] .stat-box:hover {
  background: rgba(42, 26, 58, 0.9);
  box-shadow: 0 10px 30px rgba(107, 76, 122, 0.3);
}

.stat-box .stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-box .stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
  color: var(--text-primary);
}

.stat-box .stat-sublabel {
  font-size: 0.9rem;
  opacity: 0.7;
  color: var(--text-primary);
  margin-top: 0.25rem;
}

[data-theme='dark'] .stat-box .stat-number {
  color: var(--secondary-color);
}

/* Stats Section - Mobile: 2×2 grid with modern compact cards */
@media (max-width: 575px) {
  .stats-section {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .stats-section .stat-box {
    padding: 1rem 0.75rem;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: auto;
    height: 100%;
  }

  .stats-section .stat-box i {
    font-size: 1.6rem !important;
    margin-bottom: 0 !important;
  }

  .stats-section .stat-box .stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0;
    line-height: 1.1;
  }

  .stats-section .stat-box .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.9;
    margin: 0;
  }

  /* Hide sublabel on mobile - too cramped */
  .stats-section .stat-box .stat-sublabel {
    display: none;
  }

  .stats-section .stat-box:hover {
    transform: none;
  }
}

/* Stats Section - Small tablet: 4 in a row, compact */
@media (min-width: 576px) and (max-width: 767px) {
  .stats-section .stat-box {
    padding: 0.75rem 0.4rem;
  }

  .stats-section .stat-box i {
    font-size: 1.4rem !important;
    margin-bottom: 0.3rem !important;
  }

  .stats-section .stat-box .stat-number {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
  }

  .stats-section .stat-box .stat-label {
    font-size: 0.65rem;
    line-height: 1.3;
  }

  .stats-section .stat-box .stat-sublabel {
    font-size: 0.6rem;
    margin-top: 0.1rem;
  }

  .stats-section .stat-box:hover {
    transform: none;
  }
}

/* CTA Section */
.cta-section {
  padding: 80px 0;
  background: var(--bg-primary);
  text-align: center;
}

[data-theme='dark'] .cta-section {
  background: var(--bg-primary);
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.cta-text {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.cta-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.vendor-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

/* Removed duplicate .btn-primary - now defined in BOOTSTRAP BUTTON OVERRIDES section */

.btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--white-color);
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

[data-theme='dark'] .contact-section {
  background: var(--bg-primary);
}

.contact-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}

.contact-info-card {
  width: 355px;
  background: var(--bg-secondary);
  padding: 30px 20px;
  border-radius: 20px;
  text-align: center;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s ease,
    background 0.3s ease;
  height: fit-content;
  min-height: 233px;
  max-height: 233px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 2px solid transparent;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.6s ease-out backwards;
}

.contact-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  border-radius: 20px;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.contact-info-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(75, 49, 94, 0.2);
  border-color: var(--primary-color);
}

.contact-info-card:hover::before {
  opacity: 0.05;
}

/* Stagger animation for cards */
.contact-info-card:nth-child(1) {
  animation-delay: 0.1s;
}

.contact-info-card:nth-child(2) {
  animation-delay: 0.2s;
}

.contact-info-card:nth-child(3) {
  animation-delay: 0.3s;
}

.contact-info-card:nth-child(4) {
  animation-delay: 0.4s;
}

.contact-info-card:nth-child(5) {
  animation-delay: 0.5s;
}

.contact-icon {
  color: var(--primary-color);
  margin-bottom: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.1), rgba(255, 96, 1, 0.1));
  border-radius: 50%;
  position: relative;
}

.contact-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-icon svg {
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.contact-info-card:hover .contact-icon {
  transform: scale(1.1) rotate(5deg);
}

.contact-info-card:hover .contact-icon::after {
  opacity: 0.15;
}

.contact-info-card:hover .contact-icon svg {
  transform: scale(1.1);
  filter: drop-shadow(0 4px 8px rgba(75, 49, 94, 0.3));
}

.contact-info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.contact-info-card:hover h3 {
  color: var(--primary-color);
}

.contact-info-card p {
  transition: transform 0.3s ease;
  margin: 0;
}

.contact-info-card:hover p {
  transform: translateY(-2px);
}

.contact-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

[data-theme='light'] .contact-link {
  color: var(--primary-color);
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.contact-link:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}

[data-theme='light'] .contact-link:hover {
  color: var(--secondary-color);
}

.contact-link:hover::after {
  width: 100%;
}

/* WhatsApp specific styling */
.contact-link[href*='wa.me'] {
  color: white !important;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #25D366, #128C7E);
}

[data-theme='light'] .contact-link[href*='wa.me'] {
  color: white !important;
}

.contact-link[href*='wa.me']:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  text-decoration: none !important;
}

/* Map link specific styling */
.contact-link[href*='maps.app.goo.gl'] {
  color: white !important;
  padding: 6px 12px;
  border-radius: 15px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #4285F4, #34A853);
}

[data-theme='light'] .contact-link[href*='maps.app.goo.gl'] {
  color: white !important;
}

.contact-link[href*='maps.app.goo.gl']:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(66, 133, 244, 0.3);
  text-decoration: none !important;
}

/* Contact Form */
.contact-form-wrapper {
  max-width: 800px;
  margin: 0 auto;
  width: -webkit-fill-available;
  background: var(--bg-secondary);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.8s ease-out backwards;
  animation-delay: 0.3s;
}

.contact-form-wrapper:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Fade in up animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contact layout: single column stacked layout */
.contact-info-row {
  margin-bottom: 60px;
}

/* Contact cards in horizontal row */
.contact-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.contact-info-card {
  height: fit-content;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 25px 20px;
  background: var(--bg-secondary);
  border-radius: 20px;
  text-align: center;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  border: 1px solid transparent;
}

/* Card hover effect */
.contact-info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

[data-theme='dark'] .contact-info-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='dark'] .contact-info-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.contact-icon svg {
  width: 28px;
  height: 28px;
  color: var(--primary-color);
}

.contact-info-card h3 {
  margin-top: 8px;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.contact-info-card p,
.contact-info-card .contact-link {
  font-size: 0.85rem;
}

.contact-info-grid .contact-info-card + .contact-info-card {
  margin-top: 0;
}

/* Contact form section */
.contact-form-section {
  margin-bottom: 60px;
}

.contact-form-wrapper {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  max-width: 900px;
  margin: 0 auto;
}

[data-theme='dark'] .contact-form-wrapper {
  background: var(--bg-secondary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.contact-form-wrapper .form-header {
  margin-bottom: 30px;
  text-align: center;
}

.contact-form-wrapper .form-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.contact-form-wrapper .form-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .contact-info-card {
    align-items: center;
    text-align: center;
    height: auto;
  }

  .contact-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }
}

/* Old duplicate - remove */
.contact-form-wrapper {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 28px 26px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.contact-form-wrapper .form-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.contact-form-wrapper .form-label {
  font-size: 0.95rem;
}

.contact-form .form-control {
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
  padding: 12px 16px;
}

.contact-form .form-control:focus {
  box-shadow: 0 6px 20px rgba(75, 49, 94, 0.08);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  background: var(--bg-primary);
}

.contact-form .form-control:hover {
  border-color: var(--primary-color);
}

.btn-primary.vendor-btn {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

/* Contact submit button: rounded and responsive (similar to about page buttons) */
/* ===== SENDER INFO CARD ===== */
.sender-info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.07), rgba(255, 96, 1, 0.07));
  border: 1.5px solid rgba(75, 49, 94, 0.15);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

[data-theme='dark'] .sender-info-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255, 96, 1, 0.05));
  border-color: rgba(255,255,255,0.1);
}

.sender-avatar {
  flex-shrink: 0;
}

.sender-avatar-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.sender-avatar-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.sender-details {
  flex: 1;
}

.sender-label {
  font-size: 0.78rem;
  color: var(--text-muted, #888);
  margin: 0 0 3px;
  font-weight: 500;
}

.sender-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.sender-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sender-meta-item {
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  display: flex;
  align-items: center;
  gap: 5px;
}

.sender-meta-item i {
  color: var(--secondary-color);
  font-size: 0.75rem;
}

.contact-submit {
  padding: 14px 28px;
  border-radius: 28px;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: white;
}

.contact-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.contact-submit:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(75, 49, 94, 0.3);
}

.contact-submit:hover::before {
  left: 100%;
}

.contact-submit:active {
  transform: translateY(-1px) scale(1.02);
}

.contact-submit svg {
  transition: transform 0.3s ease;
}

.contact-submit:hover svg {
  transform: translateX(3px) rotate(15deg);
}

@media (min-width: 768px) {
  .contact-submit {
    width: auto;
    margin: 0;
  }
}

.form-error {
  color: #ff6b6b;
}

/* Accessibility & focus ring */
.contact-form .form-control:focus-visible {
  outline: 3px solid rgba(107, 76, 122, 0.16);
  outline-offset: 2px;
}

/* Responsive: stack columns on smaller screens */
@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact card responsive sizing */
@media (max-width: 768px) {
  .contact-info-card {
    padding: 20px 15px;
    min-height: 160px;
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }
}

@media (max-width: 992px) {
  .contact-info-card {
    width: 290px;
  }
  .contact-info-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .contact-info-card {
    width: 100%;
    max-width: none;
    min-height: 200px;
    border-radius: 20px;
    padding: 25px 18px;
  }

  .contact-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 12px;
  }

  .contact-info-card h3 {
    font-size: 1rem;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }

  .contact-submit {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .contact-info-card {
    min-height: 180px;
    padding: 20px 15px;
  }

  .contact-icon {
    width: 55px;
    height: 55px;
  }

  .contact-info-card h3 {
    font-size: 0.95rem;
  }

  .contact-form-wrapper {
    padding: 25px 15px;
  }
}

/* Dark theme adjustments for contact */
[data-theme='dark'] .contact-info-card,
[data-theme='dark'] .contact-form-wrapper {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

[data-theme='dark'] .contact-icon svg {
  color: var(--secondary-color);
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInUp 0.6s ease-out backwards;
  animation-delay: 0.4s;
}

.form-header .form-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.form-header .form-description {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Form groups with stagger animation */
.form-group {
  animation: fadeInUp 0.5s ease-out backwards;
}

.form-row:nth-child(1) .form-group:nth-child(1) {
  animation-delay: 0.5s;
}

.form-row:nth-child(1) .form-group:nth-child(2) {
  animation-delay: 0.6s;
}

.form-row:nth-child(2) .form-group:nth-child(1) {
  animation-delay: 0.7s;
}

.form-row:nth-child(2) .form-group:nth-child(2) {
  animation-delay: 0.8s;
}

.form-group:last-of-type {
  animation-delay: 0.9s;
}

/* Pulse animation for icon */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.contact-info-card:hover .contact-icon {
  animation: pulse 1s ease-in-out infinite;
}

.form-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.form-description {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.contact-form {
  display: grid;
  gap: 25px;
}

/* ============================= */
/* SOCIAL MEDIA PAGE STYLES */
/* ============================= */

.social-media-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

[data-theme='dark'] .social-media-section {
  background: var(--bg-primary);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.social-card {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px 30px;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(30px);
}

[data-theme='dark'] .social-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.social-card.animate-in {
  opacity: 1;
  transform: translateY(0);
  animation: fadeInUp 0.6s ease-out forwards;
}

.social-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  border-radius: 20px;
}

.social-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.social-card:hover::before {
  opacity: 1;
}

.social-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.social-card:hover .social-icon {
  transform: scale(1.2) rotate(10deg);
}

.social-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.social-description {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.social-stats {
  margin-bottom: 25px;
  position: relative;
  z-index: 1;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.social-card:hover .stat-item {
  background: rgba(255, 255, 255, 0.2);
}

.social-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 25px;
  background: var(--bg-primary);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.social-card:hover .social-cta {
  background: white;
  transform: translateX(-5px);
}

.social-cta i {
  transition: transform 0.3s ease;
}

.social-card:hover .social-cta i {
  transform: translateX(-5px);
}

/* Facebook Card */
.facebook-card::before {
  background: linear-gradient(135deg, #1877f2, #4267B2);
}

.facebook-card .social-icon {
  background: linear-gradient(135deg, #1877f2, #4267B2);
}

.facebook-card:hover {
  border-color: #1877f2;
}

.facebook-card:hover .social-title {
  color: #1877f2;
}

/* Twitter Card */
.twitter-card::before {
  background: linear-gradient(135deg, #1DA1F2, #14171A);
}

.twitter-card .social-icon {
  background: linear-gradient(135deg, #1DA1F2, #14171A);
}

.twitter-card:hover {
  border-color: #1DA1F2;
}

.twitter-card:hover .social-title {
  color: #1DA1F2;
}

/* Instagram Card */
.instagram-card::before {
  background: linear-gradient(135deg, #E1306C, #C13584, #833AB4, #5851DB);
}

.instagram-card .social-icon {
  background: linear-gradient(135deg, #E1306C, #C13584, #833AB4, #5851DB);
}

.instagram-card:hover {
  border-color: #E1306C;
}

.instagram-card:hover .social-title {
  background: linear-gradient(135deg, #E1306C, #C13584, #833AB4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* LinkedIn Card */
.linkedin-card::before {
  background: linear-gradient(135deg, #0077B5, #00A0DC);
}

.linkedin-card .social-icon {
  background: linear-gradient(135deg, #0077B5, #00A0DC);
}

.linkedin-card:hover {
  border-color: #0077B5;
}

.linkedin-card:hover .social-title {
  color: #0077B5;
}

/* WhatsApp Card */
.whatsapp-card::before {
  background: linear-gradient(135deg, #25D366, #128C7E);
}

.whatsapp-card .social-icon {
  background: linear-gradient(135deg, #25D366, #128C7E);
}

.whatsapp-card:hover {
  border-color: #25D366;
}

.whatsapp-card:hover .social-title {
  color: #25D366;
}

/* YouTube Card */
.youtube-card::before {
  background: linear-gradient(135deg, #FF0000, #CC0000);
}

.youtube-card .social-icon {
  background: linear-gradient(135deg, #FF0000, #CC0000);
}

.youtube-card:hover {
  border-color: #FF0000;
}

.youtube-card:hover .social-title {
  color: #FF0000;
}

/* Newsletter Social Section */
.newsletter-social-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  text-align: center;
}

[data-theme='dark'] .newsletter-social-section {
  background: linear-gradient(135deg, #2a1a3a, #3a2449);
}

.newsletter-content {
  max-width: 700px;
  margin: 0 auto;
}

.newsletter-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  font-size: 2.5rem;
  animation: pulse 2s ease-in-out infinite;
}

.newsletter-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.newsletter-desc {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.newsletter-form-inline {
  display: flex;
  gap: 15px;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.newsletter-form-inline .form-control {
  flex: 1;
  min-width: 250px;
  padding: 14px 20px;
  border-radius: 30px;
  border: 2px solid white;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-form-inline .form-control:focus {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.newsletter-form-inline .btn-primary {
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: white;
  color: var(--primary-color);
  border: none;
  transition: all 0.3s ease;
}

.newsletter-form-inline .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .social-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form-inline {
    flex-direction: column;
  }

  .newsletter-form-inline .form-control {
    min-width: 100%;
  }

  .newsletter-form-inline .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ============================= */
/* POLICY PAGES (PRIVACY & TERMS) */
/* ============================= */

.policy-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

[data-theme='dark'] .policy-section {
  background: var(--bg-primary);
}

.policy-content {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-secondary);
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  animation: fadeInUp 0.6s ease-out;
}

[data-theme='dark'] .policy-content {
  background: var(--bg-secondary);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}

.policy-block {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid var(--border-color);
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.policy-block:nth-child(1) { animation-delay: 0.1s; }
.policy-block:nth-child(2) { animation-delay: 0.15s; }
.policy-block:nth-child(3) { animation-delay: 0.2s; }
.policy-block:nth-child(4) { animation-delay: 0.25s; }
.policy-block:nth-child(5) { animation-delay: 0.3s; }
.policy-block:nth-child(6) { animation-delay: 0.35s; }
.policy-block:nth-child(7) { animation-delay: 0.4s; }
.policy-block:nth-child(8) { animation-delay: 0.45s; }
.policy-block:nth-child(9) { animation-delay: 0.5s; }
.policy-block:nth-child(10) { animation-delay: 0.55s; }

.policy-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.policy-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}

.policy-title::before {
  content: '';
  width: 6px;
  height: 30px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  transition: all 0.3s ease;
}

.policy-block:hover .policy-title::before {
  height: 40px;
  transform: translateY(-2px);
}

.policy-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 15px;
  margin-top: 20px;
}

.policy-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 15px;
  text-align: justify;
}

.policy-text a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
}

.policy-text a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.policy-text a:hover::after {
  width: 100%;
}

.policy-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.policy-list li {
  position: relative;
  padding: 12px 0 12px 35px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.policy-list li::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: all 0.3s ease;
}

.policy-list li:hover {
  transform: translateX(-5px);
  color: var(--text-primary);
}

.policy-list li:hover::before {
  transform: rotate(360deg) scale(1.1);
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.3);
}

/* Contact Info List */
.policy-list.contact-info li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  background: var(--bg-primary);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
}

.policy-list.contact-info li::before {
  display: none;
}

.policy-list.contact-info li i {
  font-size: 1.3rem;
  color: var(--primary-color);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.1), rgba(161, 98, 184, 0.1));
  border-radius: 50%;
  transition: all 0.3s ease;
}

.policy-list.contact-info li:hover {
  transform: translateX(-5px);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.policy-list.contact-info li:hover i {
  transform: rotate(10deg) scale(1.1);
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.policy-list.contact-info li strong {
  color: var(--text-primary);
  font-weight: 600;
  margin-left: 8px;
}

.policy-list.contact-info li a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.policy-list.contact-info li a:hover {
  color: var(--secondary-color);
}

.policy-footer {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid var(--border-color);
  text-align: center;
}

.policy-footer .text-muted {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .policy-content {
    padding: 30px 25px;
  }

  .policy-title {
    font-size: 1.5rem;
  }

  .policy-subtitle {
    font-size: 1.15rem;
  }

  .policy-text,
  .policy-list li {
    font-size: 1rem;
  }

  .policy-list li {
    padding-left: 30px;
  }

  .policy-list.contact-info li {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .policy-content {
    padding: 25px 20px;
    border-radius: 15px;
  }

  .policy-title {
    font-size: 1.3rem;
  }

  .policy-title::before {
    width: 4px;
    height: 24px;
  }
}

/* Dark Theme */
[data-theme='dark'] .policy-content {
  background: var(--bg-secondary);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .policy-list.contact-info li {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] .policy-list.contact-info li:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Dark Theme */
[data-theme='dark'] .social-card {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='dark'] .social-card .social-cta {
  background: var(--bg-primary);
}

[data-theme='dark'] .social-card:hover .social-cta {
  background: rgba(255, 255, 255, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.required {
  color: var(--secondary-color);
}

.form-control {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(75, 49, 94, 0.1);
}

/* Form Select Styling */
.form-select {
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  background-size: 16px 12px;
  appearance: none;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(75, 49, 94, 0.1);
}

.form-select option {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 10px;
}

/* Dark Theme Support for Select */
[data-theme='dark'] .form-select {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23f7fafc' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

[data-theme='dark'] .form-select:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(167, 139, 189, 0.25);
}

[data-theme='dark'] .form-select option {
  background-color: #2d3748;
  color: var(--text-primary);
}

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-title {
    font-size: 2.5rem;
  }

  .page-tagline {
    font-size: 1.4rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .tab-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    max-width: 100%;
    padding: 0 15px;
  }

  .vm-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 2rem;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
    max-width: 100%;
    padding: 0 10px;
  }

  .contact-form-wrapper {
    padding: 30px 20px;
  }
}

/* Dark theme adjustments */
[data-theme='dark'] .vm-card,
[data-theme='dark'] .value-card,
[data-theme='dark'] .contact-info-card,
[data-theme='dark'] .contact-form-wrapper,
[data-theme='dark'] .offering-item,
[data-theme='dark'] .tab-btn {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='dark'] .form-control {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .form-control:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(167, 139, 189, 0.25);
}

/* ============================= */
/* SWIPER SECTION */
/* ============================= */
.swiper-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.latest-ads-section {
  background: var(--bg-primary);
}

[data-theme='dark'] .swiper-section,
[data-theme='dark'] .latest-ads-section,
[data-bs-theme="dark"] .swiper-section,
[data-bs-theme="dark"] .latest-ads-section {
  background: #1a1a1a !important;
}

.swiper {
  width: 100%;
  height: 100%;
  padding-bottom: 50px;
}

.swiper-slide {
  background: transparent;
  border-radius: 0;
  padding: 0;
  text-align: left;
  transition: none;
  box-shadow: none;
  width: auto;
  height: auto;
}

/* Specific styles for ad card slides */
.idrisiMartFeaturedSwiper .swiper-slide,
.idrisiMartLatestSwiper .swiper-slide {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  height: auto;
}

/* Remove hover effect from slide itself, let card handle it */
.idrisiMartFeaturedSwiper .swiper-slide:hover,
.idrisiMartLatestSwiper .swiper-slide:hover {
  transform: none;
}

/* For testimonial or other swiper slides that need the old style */
.swiper-slide.testimonial-slide {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 5px 20px var(--shadow-sm);
}

.swiper-slide.testimonial-slide:hover {
  transform: scale(1.05);
}

.swiper-slide img:not(.ad-card img) {
  width: 100%;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.swiper-slide:hover img:not(.ad-card img) {
  transform: scale(1.1);
}

.swiper-pagination-bullet {
  background: #ff8534;
  width: 12px;
  height: 12px;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: #ff8534;
  width: 30px;
  border-radius: 10px;
}

/* Blog Swiper Pagination */
.home-blogs-pagination {
  margin-top: 25px !important;
  position: relative !important;
}

.home-blogs-pagination .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  background: #ff8534;
  opacity: 0.5;
  transition: all 0.3s ease;
  margin: 0 6px !important;
}

.home-blogs-pagination .swiper-pagination-bullet-active {
  background: #ff8534;
  opacity: 1;
  transform: scale(1.3);
  width: 14px;
  height: 14px;
}

/* Latest Blogs Section */
.latest-blogs-section {
  background-color: var(--bg-secondary);
}

[data-theme='dark'] .latest-blogs-section,
[data-bs-theme="dark"] .latest-blogs-section {
  background-color: #2a2a2a !important;
}

.latest-blogs-section .section-title,
.latest-blogs-section .section-subtitle {
  color: var(--text-primary);
}

[data-theme='dark'] .latest-blogs-section .section-title,
[data-bs-theme="dark"] .latest-blogs-section .section-title {
  color: #e9ecef !important;
}

[data-theme='dark'] .latest-blogs-section .section-subtitle,
[data-bs-theme="dark"] .latest-blogs-section .section-subtitle {
  color: #adb5bd !important;
}

.home-blogs-swiper {
  padding-bottom: 50px;
  direction: inherit; /* Inherit direction from parent */
}

/* RTL Support for Blog Cards Alignment */
[dir="rtl"] .home-blogs-swiper .swiper-wrapper {
  direction: rtl;
  text-align: right;
}

[dir="ltr"] .home-blogs-swiper .swiper-wrapper {
  direction: ltr;
  text-align: left;
}

/* Ensure blog cards content follows language direction */
.home-blogs-swiper .blog-post-card {
  direction: inherit;
  text-align: inherit;
}

.home-blogs-pagination {
  bottom: 0 !important;
}

/* ============================= */
/* FEATURES SECTION */
/* ============================= */
.features-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  color: var(--white-color);
  position: relative;
}

[data-theme='dark'] .features-section,
[data-bs-theme="dark"] .features-section {
  background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%) !important;
}

.feature-box {
  text-align: center;
  padding: 30px;
  transition: transform 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.feature-box:hover .feature-icon {
  transform: scale(1.2) rotate(10deg);
}

.feature-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--white-color);
}

.feature-box p {
  color: var(--white-color);
  opacity: 0.9;
}

/* ── Feature Box Card ── */
.fbc {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255,255,255,0.28);
  border-radius: 18px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.fbc:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.22);
  box-shadow: 0 14px 36px rgba(0,0,0,0.22);
}

.fbc-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.38);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: #ffffff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.fbc:hover .fbc-icon-wrap {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  transform: scale(1.1) rotate(8deg);
}

.fbc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.fbc-desc {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.82);
  margin: 0;
  line-height: 1.65;
}

/* mobile */
@media (max-width: 575.98px) {
  .fbc {
    padding: 1.15rem 0.85rem;
    gap: 0.65rem;
    border-radius: 14px;
  }
  .fbc-icon-wrap {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
  .fbc-title { font-size: 0.88rem; }
  .fbc-desc  { font-size: 0.76rem; line-height: 1.5; }
  .fbc:hover { transform: none; }
}

/* tablet */
@media (min-width: 576px) and (max-width: 991.98px) {
  .fbc { padding: 1.4rem 1rem; }
  .fbc-icon-wrap { width: 56px; height: 56px; font-size: 1.45rem; }
  .fbc-title { font-size: 0.95rem; }
  .fbc-desc  { font-size: 0.82rem; }
}


/* ============================= */
/* FOOTER — REDESIGN             */
/* ============================= */

/* ── Wave SVG divider ── */
.ft-wave {
  color: var(--bg-primary, #f5f7fa);
  line-height: 0;
  margin-bottom: -2px;
}
[data-theme="dark"] .ft-wave { color: #0f1523; }
.ft-wave svg { display: block; width: 100%; height: 56px; }

/* ── Main footer shell ── */
.ft {
  background: linear-gradient(160deg, var(--primary-color) 0%, #2a1640 55%, #1a0a2a 100%);
  color: #fff;
  padding: 3.5rem 0 0;
  position: relative;
  overflow: hidden;
}
.ft::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 90% 10%, rgba(255,96,1,.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 5%  85%, rgba(107,76,122,.2) 0%, transparent 55%);
  pointer-events: none;
}
[data-theme="dark"] .ft {
  background: linear-gradient(160deg, #1a0a2a 0%, #0f0820 60%, #080514 100%);
}

/* ── Grid layout ── */
.ft-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 991px) {
  .ft-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  /* Brand spans full width, links + contact side by side */
  .ft-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 1rem;
    padding-bottom: 1.2rem;
  }
  .ft-brand-col {
    grid-column: 1 / -1;
  }
}

/* ── Brand column ── */
.ft-logo { height: 70px; width: auto; filter: brightness(1.15); transition: transform .3s; }
.ft-logo:hover { transform: scale(1.05); }
.ft-logo.light-theme-logo { display: block; }
.ft-logo.dark-theme-logo  { display: none;  }
[data-theme="dark"] .ft-logo.light-theme-logo { display: none;  }
[data-theme="dark"] .ft-logo.dark-theme-logo  { display: block; }
.ft-logo-link { display: inline-block; margin-bottom: 1.1rem; }

/* Wrapper that constrains the description to exactly the logo's width */
.ft-logo-desc {
  width: min-content;
  min-width: 0;
}

.ft-desc {
  color: rgba(255,255,255,.72);
  font-size: .9rem;
  line-height: 1.75;
  margin-bottom: 1.4rem;
  width: 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ── Social icons ── */
.ft-socials { display: flex; flex-wrap: wrap; gap: .5rem; }
.ft-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; font-size: .9rem;
  text-decoration: none;
  transition: all .28s cubic-bezier(.4,0,.2,1);
}
.ft-social:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(255,96,1,.35);
}
.ft-social--wa:hover {
  background: #25d366;
  border-color: #25d366;
  box-shadow: 0 6px 18px rgba(37,211,102,.35);
}

/* ── Column headings ── */
.ft-col { }
.ft-heading {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1rem; font-weight: 800;
  color: #fff; margin-bottom: 1.3rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.ft-heading-bar {
  display: block; width: 4px; height: 20px;
  background: var(--secondary-color);
  border-radius: 4px; flex-shrink: 0;
}

/* ── Link list ── */
.ft-list { list-style: none; padding: 0; margin: 0; }
.ft-list li { margin-bottom: .55rem; }
.ft-link {
  display: inline-flex; align-items: center; gap: .45rem;
  color: rgba(255,255,255,.72); font-size: .88rem;
  text-decoration: none;
  transition: color .2s, gap .2s;
}
.ft-link:hover { color: var(--secondary-color); gap: .7rem; }
.ft-arrow {
  font-size: .65rem; color: var(--secondary-color);
  opacity: .7; transition: transform .2s;
}
.ft-link:hover .ft-arrow { transform: translateX(-3px); opacity: 1; }

/* ── Contact list ── */
.ft-contact-list { list-style: none; padding: 0; margin: 0; }
.ft-contact-item {
  display: flex; align-items: flex-start; gap: .85rem;
  margin-bottom: .9rem;
  color: rgba(255,255,255,.75); font-size: .88rem;
}
.ft-contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: var(--secondary-color); font-size: .85rem;
  flex-shrink: 0;
}
.ft-contact-link {
  color: rgba(255,255,255,.8); text-decoration: none;
  transition: color .2s;
}
.ft-contact-link:hover { color: var(--secondary-color); }

/* ── Newsletter ── */
.ft-newsletter {
  margin: 2.5rem 0;
}
.ft-nl-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem 2rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 1.5rem 2rem;
}
@media (max-width: 767px) {
  .ft-nl-inner { grid-template-columns: auto 1fr; grid-template-rows: auto auto; }
  .ft-nl-form  { grid-column: 1 / -1; }
}
@media (max-width: 479px) {
  .ft-nl-inner { grid-template-columns: 1fr; text-align: center; }
  .ft-nl-icon  { margin: 0 auto; }
}

/* ── Footer Mobile Compact Overrides ── */
@media (max-width: 575px) {
  .ft {
    padding: 1.8rem 0 0;
  }

  /* Brand column — centered on mobile (logo, description, social icons) */
  .ft-brand-col { text-align: center; }
  .ft-logo-desc {
    /* Full column width instead of shrink-wrapping to the logo's width,
       so the description text uses the available space instead of
       wrapping narrowly. */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .ft-logo { height: 48px; }
  .ft-logo-link { margin-bottom: 0.6rem; }
  .ft-desc {
    font-size: .78rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    /* Show only 2 lines on mobile */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ft-socials { gap: .35rem; justify-content: center; }
  .ft-social {
    width: 32px; height: 32px; font-size: .75rem;
  }

  /* Column headings */
  .ft-heading {
    font-size: .8rem;
    margin-bottom: 0.8rem;
    letter-spacing: .02em;
  }
  .ft-heading-bar { width: 3px; height: 14px; }

  /* Link list */
  .ft-list li { margin-bottom: .35rem; }
  .ft-link { font-size: .78rem; gap: .3rem; }
  .ft-arrow { font-size: .6rem; }

  /* Contact list */
  .ft-contact-item {
    gap: .55rem;
    margin-bottom: .6rem;
    font-size: .78rem;
  }
  .ft-contact-icon {
    width: 26px; height: 26px;
    border-radius: 7px; font-size: .7rem;
  }

  /* Newsletter */
  .ft-newsletter { margin: 1.2rem 0; }
  .ft-nl-inner {
    padding: 1rem 1.1rem;
    gap: .8rem 1rem;
    border-radius: 14px;
  }
  .ft-nl-icon {
    width: 38px; height: 38px; font-size: .95rem;
  }
  .ft-nl-title { font-size: .88rem; }
  .ft-nl-desc { font-size: .73rem; }
  .ft-nl-input { font-size: .8rem; padding: .5rem .9rem; min-width: 120px; }
  .ft-nl-btn { font-size: .8rem; padding: .5rem 1rem; }

  /* Bottom bar */
  .ft-bottom {
    padding: .9rem 0 1.1rem;
    gap: .5rem 1rem;
    font-size: .72rem;
  }
  .ft-copy { font-size: .72rem; }
  .ft-legal-link { font-size: .72rem; }
  .ft-pay-icon { font-size: 1.1rem; }
  .ft-paymob-logo { height: 11px; }
}
.ft-nl-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--secondary-color);
  color: #fff; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(255,96,1,.4);
}
.ft-nl-title {
  font-size: 1.05rem; font-weight: 800; color: #fff;
  margin: 0 0 .2rem;
}
.ft-nl-desc {
  color: rgba(255,255,255,.65); font-size: .83rem; margin: 0;
}
.ft-nl-row {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.ft-nl-input {
  flex: 1; min-width: 180px;
  padding: .65rem 1.1rem;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.92);
  font-size: .88rem; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.ft-nl-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(255,96,1,.2);
}
.ft-nl-btn {
  padding: .65rem 1.4rem;
  background: var(--secondary-color);
  color: #fff; border: none; border-radius: 50px;
  font-weight: 700; font-size: .88rem; cursor: pointer;
  transition: all .25s; white-space: nowrap;
}
.ft-nl-btn:hover {
  background: #d94e00;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,96,1,.35);
}
.ft-nl-msg { font-size: .83rem; margin-top: .5rem; }

/* ── Bottom bar ── */
.ft-bottom {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: .75rem 1.5rem;
  justify-content: space-between;
  padding: 1.2rem 0 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 767px) {
  .ft-bottom { justify-content: center; text-align: center; }
}
.ft-copy { color: rgba(255,255,255,.55); font-size: .8rem; margin: 0; }

.ft-pay {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  justify-content: center;
}
.ft-pay-label { color: rgba(255,255,255,.45); font-size: .75rem; }
.ft-pay-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: rgba(255,255,255,.8);
  transition: color .2s;
}
.ft-pay-icon:hover { color: #fff; }
.ft-paymob-logo {
  height: 14px; width: auto;
  filter: brightness(0) invert(1); opacity: .8;
  vertical-align: middle;
  transition: opacity .2s;
}
.ft-pay-icon--img:hover .ft-paymob-logo { opacity: 1; }

.ft-legal {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  justify-content: center;
}
.ft-legal-link {
  color: rgba(255,255,255,.6); font-size: .8rem;
  text-decoration: none; transition: color .2s;
}
.ft-legal-link:hover { color: var(--secondary-color); }
.ft-sep { color: rgba(255,255,255,.25); font-size: .75rem; }


/* ============================= */
/* BACK TO TOP BUTTON */
/* ============================= */
.back-to-top {
  position: fixed;
  bottom: 100px;
  left: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--white-color);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 998;
  box-shadow: 0 4px 15px var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px var(--shadow-lg);
}

/* Adjust back-to-top position on mobile to avoid overlap */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 95px;
    left: 20px;
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}

/* ============================= */
/* COMPARE WIDGET */
/* ============================= */
.compare-widget {
  position: fixed;
  bottom: 30px;
  left: 30px;
  z-index: 1050;
  font-family: 'Cairo', sans-serif;
}

.compare-toggle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(107, 76, 122, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.compare-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(107, 76, 122, 0.4);
}

.compare-toggle i {
  font-size: 1.5rem;
}

.compare-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid white;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.compare-badge.show {
  opacity: 1;
  transform: scale(1);
}

.compare-panel {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 350px;
  background: var(--bg-primary);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  border: 1px solid var(--border-color);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s ease;
  max-height: 400px;
  overflow: hidden;
}

.compare-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.compare-panel-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
  color: white;
  border-radius: 20px 20px 0 0;
}

.compare-panel-header h6 {
  margin: 0;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.compare-panel-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.compare-panel-close:hover {
  background: rgba(255,255,255,0.2);
}

.compare-items-list {
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.compare-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

.compare-item:hover {
  transform: translateX(-2px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.compare-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 1rem;
}

.compare-item-info {
  flex: 1;
}

.compare-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.compare-item-remove {
  background: #ff4757;
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.compare-item-remove:hover {
  background: #ff3742;
  transform: scale(1.1);
}

.compare-panel-actions {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
}

.compare-panel-actions .btn {
  flex: 1;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.compare-panel-actions .btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange));
  border: none;
}

.compare-panel-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(107, 76, 122, 0.3);
}

.compare-panel-actions .btn-primary:disabled {
  background: var(--text-muted);
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.compare-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.compare-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Compare Button Active State */
.compare-btn.active {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-orange)) !important;
  color: white !important;
  transform: scale(1.1);
}

.compare-btn.active i {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Wishlist Button Styling */
.ad-wishlist-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ad-wishlist-btn:hover {
  background: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.ad-wishlist-btn.active {
  background: #ff4757;
  color: white;
}

.ad-wishlist-btn.active:hover {
  background: #ff3742;
}

.ad-wishlist-btn i {
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.ad-wishlist-btn-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .compare-widget {
    bottom: 90px; /* Stack above chatbot button (60px) + gap */
    right: 20px; /* Move to right side to avoid conflict */
    left: auto; /* Remove left positioning */
  }

  .compare-toggle {
    width: 50px;
    height: 50px;
  }

  .compare-toggle i {
    font-size: 1.3rem;
  }

  .compare-panel {
    width: 300px;
    right: 0; /* Open from right side */
    left: auto; /* Remove left positioning */
  }

  .compare-panel-header {
    padding: 0.75rem 1rem;
  }

  .compare-items-list {
    padding: 0.75rem;
  }

  .compare-panel-actions {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .compare-widget {
    bottom: 90px; /* Stack above chatbot button (60px) + gap */
    right: 15px; /* Move to right side */
    left: auto; /* Remove left positioning */
  }

  .compare-toggle {
    width: 48px;
    height: 48px;
  }

  .compare-toggle i {
    font-size: 1.2rem;
  }

  .compare-badge {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .compare-panel {
    width: 280px;
  }
}

/* ============================= */
/* ANIMATIONS */
/* ============================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ============================= */
/* RESPONSIVE DESIGN */
/* ============================= */

/* Large Devices (≥1200px) */
@media (min-width: 1200px) {
  .hero-title {
    font-size: 2.5rem;
  }
}

/* Medium Devices (≥992px and <1200px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .section-title {
    font-size: 2rem;
  }
  .newsletter-box {
    padding: 2rem;
  }
}

/* Tablets (≥768px and <992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    padding: 80px 0 60px;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
  }
  .btn-hero {
    padding: 12px 30px;
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .category-card {
    margin-bottom: 30px;
  }
  .category-icon {
    font-size: 3rem;
  }
  .navbar-brand {
    font-size: 1.4rem;
  }
  .navbar-brand img {
    height: 35px;
  }
  .theme-toggle {
    width: 40px;
    height: 40px;
    margin: 10px 0;
  }
  .badge-count,
  .enhanced-badge {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
  .footer {
    padding: 40px 0 0;
  }
  .footer-col {
    margin-bottom: 2rem;
    text-align: center;
  }
  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer-title {
    font-size: 1.2rem;
    justify-content: center;
  }
  .footer-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .footer-link {
    text-align: center;
    padding: 0.5rem 0;
  }
  .footer-contact {
    text-align: center;
  }
  .contact-item {
    justify-content: center;
    flex-wrap: wrap;
  }
  .social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }
  .social-link {
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin: 5px;
  }
  .newsletter-box {
    padding: 1.5rem;
  }
  .newsletter-title {
    font-size: 1.2rem;
  }
  .newsletter-input,
  .newsletter-btn {
    padding: 12px 20px;
  }
  .footer-bottom {
    padding: 1.5rem 0;
  }
  .footer-bottom-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  .separator {
    display: none;
  }
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 80px;
    left: 20px;
  }
}

/* Small Phones (≥576px and <768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-title {
    font-size: 1.3rem;
  }
  .section-title {
    font-size: 1.5rem;
  }
  .feature-icon {
    font-size: 2.5rem;
  }
  .newsletter-form .input-group {
    flex-direction: column;
  }
  .newsletter-input {
    width: 100% !important;
  }
  .newsletter-input,
  .newsletter-btn {
    border-radius: 18px !important;
    margin-bottom: 0.5rem;
  }
}

/* Mobile Menu (≤991px) */
@media (max-width: 991px) {
  .hamburger {
    display: flex;
  }
  .navbar .navbar-collapse {
    display: none !important;
  }
  .enhanced-badge {
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
}

/* Very Small Devices (≤480px) */
@media (max-width: 480px) {
  .mobile-nav {
    width: 280px;
  }
  .mobile-nav-link {
    padding: 12px 15px;
    font-size: 0.95rem;
  }
  .mobile-country-grid {
    grid-template-columns: 1fr;
  }
  .mobile-country-toggle {
    padding: 14px 16px;
  }
  .country-flag-large {
    font-size: 1.6rem;
  }
  .country-name-large {
    font-size: 0.9rem;
  }
  .country-flag-item {
    font-size: 1.5rem;
  }
  .country-name-item {
    font-size: 0.85rem;
  }
}

/* Extra small devices (≤380px) */
@media (max-width: 380px) {
  .mobile-nav {
    width: 260px;
  }
  .hero-title {
    font-size: 1.2rem;
  }
  .section-title {
    font-size: 1.3rem;
  }
}

/* ============================= */
/* ACCESSIBILITY */
/* ============================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

*:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

.mobile-country-toggle:focus,
.mobile-country-item:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* ============================= */
/* DARK MODE SPECIFIC */
/* ============================= */
[data-theme='dark'] .mobile-country-toggle {
  background: #2a2a2a;
  border-color: #404040;
}

[data-theme='dark'] .mobile-country-toggle:hover {
  background: #333;
  border-color: var(--primary-color);
}

[data-theme='dark'] .country-list-wrapper {
  background: #2a2a2a;
}

[data-theme='dark'] .mobile-country-item {
  background: #1a1a1a;
}

[data-theme='dark'] .mobile-country-item:hover {
  background: linear-gradient(90deg, rgba(75, 49, 94, 0.15), transparent);
}

/* ============================= */
/* SMOOTH COLLAPSE ANIMATION */
/* ============================= */
.collapse {
  transition: height 0.35s ease;
}

.collapsing {
  transition: height 0.35s ease;
}

/* ============================= */
/* PRINT STYLES */
/* ============================= */
@media print {
  .navbar,
  .mobile-nav,
  .hamburger,
  .back-to-top,
  .mobile-nav-backdrop {
    display: none !important;
  }
}

/* ============================= */
/* REDUCE MOTION */
/* ============================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================= */
/* SCROLLBAR STYLING */
/* ============================= */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--bg-secondary);
}
/* ============================= */
/* AUTHENTICATION PAGES - COMPLETE CSS */
/* Login & Register Styles */
/* ============================= */

/* ============================= */
/* AUTH CONTAINER & CARD */
/* ============================= */
.auth-container {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  position: relative;
  overflow: hidden;
}

[data-theme='dark'] .auth-container {
  background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%);
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23FF6001" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,96C1248,75,1344,53,1392,42.7L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>')
    no-repeat;
  background-size: cover;
  background-position: bottom;
  animation: waveAnimation 15s ease-in-out infinite;
}

@keyframes waveAnimation {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(30px);
  }
}

.auth-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  max-width: 440px;
  width: 100%;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease;
  overflow: hidden;
}

.auth-card::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--primary-color), var(--accent-purple));
}

.auth-card.register-card {
  max-width: 640px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* AUTH HEADER */
/* ============================= */
.auth-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: start;
  margin-bottom: 18px;
}

.auth-logo-badge {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(75, 49, 94, 0.1), rgba(255, 96, 1, 0.12));
  border: 1px solid rgba(75, 49, 94, 0.12);
}

.auth-heading-copy { min-width: 0; }

.auth-body { min-width: 0; }

.auth-eyebrow,
.auth-hero-title,
.auth-hero-art,
.auth-form-heading { display: none; }

.auth-logo {
  width: auto;
  max-width: 38px;
  height: 38px;
  margin: 0;
  display: block;
  object-fit: contain;
}

.auth-logo.light-theme-logo { display: block; }
.auth-logo.dark-theme-logo  { display: none;  }
[data-theme='dark'] .auth-logo.light-theme-logo { display: none;  }
[data-theme='dark'] .auth-logo.dark-theme-logo  { display: block; }

/* ============================= */
/* PAGE PRELOADER */
/* Cheap (opacity/transform only) so it never blocks paint or adds jank. */
/* Hidden by inline JS on DOMContentLoaded — see base.html. */
/* White page background in light theme, dark in dark theme; the logo always */
/* sits on its own purple badge so it keeps contrast either way. */
/* ============================= */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  opacity: 1;
  transition: opacity 0.25s ease;
}

[data-theme='dark'] #preloader {
  background: var(--bg-primary);
}

#preloader.preloader-hidden {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo-ring {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--primary-color) 100%);
  box-shadow: 0 8px 30px rgba(75, 49, 94, 0.3), 0 0 0 6px rgba(107, 76, 122, 0.08);
}

[data-theme='dark'] .preloader-logo-ring {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(107, 76, 122, 0.18);
}

.preloader-logo-ring::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--primary-color);
  border-right-color: var(--secondary-color);
  animation: preloader-spin 0.8s linear infinite;
}

.preloader-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 50%;
  animation: preloader-pulse 1.6s ease-in-out infinite;
}

@keyframes preloader-spin {
  to { transform: rotate(360deg); }
}

@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.92); opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-logo-ring::before,
  .preloader-logo {
    animation: none;
  }
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

/* ============================= */
/* AUTH FORM DENSITY */
/* .form-group / .form-label / .form-control / .divider / .social-login are */
/* shared with the rest of the site, so the tighter auth spacing is scoped  */
/* to .auth-card here instead of touching those base rules.                */
/* ============================= */
.auth-card .form-group {
  margin-bottom: 14px;
}

.auth-card .form-label {
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.auth-card .form-control {
  padding: 11px 16px 11px 44px;
  padding-inline: 44px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.auth-card .form-control-wrapper > i {
  left: auto;
  inset-inline-start: 15px;
}

.auth-card .form-control-wrapper:has(.password-toggle) .form-control {
  padding-inline-end: 44px;
}

.auth-card .password-toggle {
  left: auto;
  inset-inline-end: 8px;
}

.auth-card .form-text,
.auth-card .form-helper {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
  line-height: 1.4;
}

.auth-card .divider {
  margin: 16px 0;
}

.auth-card .social-login {
  margin-bottom: 16px;
  gap: 10px;
}

/* Wide screens use the same horizontal, two-panel pattern for login/register. */
@media (min-width: 992px) {
  .auth-container {
    padding: clamp(32px, 5vw, 72px);
    background:
      radial-gradient(circle at 20% 10%, rgba(255, 96, 1, 0.15), transparent 30%),
      radial-gradient(circle at 80% 90%, rgba(75, 49, 94, 0.18), transparent 34%),
      #ebe9e7;
  }

  .auth-card {
    direction: ltr;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(460px, 1fr);
    align-items: stretch;
    max-width: 1180px;
    min-height: 650px;
    padding: 0;
    border: 0;
    border-radius: 46px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(32, 26, 24, 0.24);
  }

  .auth-card.register-card {
    grid-template-columns: minmax(360px, 0.9fr) minmax(540px, 1.25fr);
    max-width: 1240px;
  }

  .auth-card .auth-header {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 28px;
    margin: 0;
    padding: 54px 56px;
    color: #fff;
    background:
      radial-gradient(circle at 50% 54%, transparent 0 92px, rgba(255, 255, 255, 0.06) 93px 94px, transparent 95px 132px, rgba(255, 255, 255, 0.05) 133px 134px, transparent 135px),
      linear-gradient(145deg, #211d1b, #2d2522);
    border-radius: 46px 0 0 46px;
    overflow: hidden;
  }

  .auth-card .auth-header::after { display: none; }

  .auth-card .auth-logo-badge {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
  }

  .auth-card .auth-logo { height: 46px; max-width: 46px; }
  .auth-card .auth-heading-copy { width: 100%; }
  .auth-card .auth-title,
  .auth-card .auth-subtitle { display: none; }
  .auth-card .auth-eyebrow {
    display: block;
    margin-bottom: 88px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
  }
  .auth-card .auth-hero-title {
    position: relative;
    z-index: 1;
    display: block;
    max-width: 330px;
    margin: 0;
    color: #fff;
    font-size: clamp(2.15rem, 3vw, 3.4rem);
    font-weight: 300;
    line-height: 1.05;
  }
  .auth-card .auth-hero-title strong { display: block; font-weight: 800; }
  .auth-card .auth-hero-art {
    position: absolute;
    inset-inline: 0;
    bottom: 46px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 124px;
    height: 124px;
    margin: auto;
    color: #fff;
    font-size: 3.2rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(255, 96, 1, 0.9), rgba(113, 55, 95, 0.92));
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
    transform: rotate(-7deg);
  }
  .auth-card .auth-body {
    direction: rtl;
    padding: 58px clamp(46px, 5vw, 78px) 40px;
    border-radius: 0 46px 46px 0;
    background: var(--bg-primary);
  }
  [dir='ltr'] .auth-card .auth-body { direction: ltr; }

  .auth-card .auth-form-heading {
    display: block;
    margin-bottom: 30px;
  }
  .auth-card .auth-form-heading span {
    color: var(--text-muted);
    font-size: 0.8rem;
  }
  .auth-card .auth-form-heading h2 {
    margin: 5px 0 0;
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 700;
  }

  .auth-card.login-card .auth-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-card .form-control {
    min-height: 52px;
    border-width: 1px;
    border-radius: 999px;
    background: transparent;
  }
  .auth-card .btn-auth { min-height: 54px; border-radius: 999px; }

  .auth-card::after { display: none; }
}

/* ============================= */
/* PROFILE TYPE SELECTOR (REGISTER) */
/* ============================= */
.profile-type-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 30px;
}

.profile-type-card {
  position: relative;
}

.profile-type-card input[type='radio'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.profile-type-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border: 2px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.profile-type-label:hover {
  border-color: var(--primary-color);
  background: var(--bg-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px var(--shadow-sm);
}

.profile-type-card input[type='radio']:checked + .profile-type-label {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.1), rgba(107, 76, 122, 0.05));
  box-shadow: 0 4px 12px rgba(75, 49, 94, 0.2);
}

.profile-type-icon {
  font-size: 2rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.profile-type-card input[type='radio']:checked + .profile-type-label .profile-type-icon {
  transform: scale(1.2);
  color: var(--secondary-color);
  animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
  0%,
  100% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1.4);
  }
}

.profile-type-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin: 0;
}

.profile-type-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================= */
/* FORM ELEMENTS */
/* ============================= */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.form-label .required {
  color: var(--secondary-color);
  margin-left: 3px;
}

.form-control-wrapper {
  position: relative;
}

.form-control-wrapper i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  transition: color 0.3s ease;
  z-index: 1;
}

.form-control {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border: 2px solid var(--border-color);
  border-radius: 14px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: inherit;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(75, 49, 94, 0.1);
}

.form-control:focus ~ i {
  color: var(--primary-color);
}

.form-control:disabled {
  background: var(--bg-secondary);
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================= */
/* PASSWORD TOGGLE */
/* ============================= */
.password-toggle {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 8px 10px;
  transition: color 0.3s ease;
  z-index: 3;
  pointer-events: auto;
  width: auto;
  height: auto;
}

.password-toggle:hover {
  color: var(--primary-color);
}

.password-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

.password-toggle i {
  pointer-events: none;
}

/* ============================= */
/* PASSWORD STRENGTH INDICATOR */
/* ============================= */
.password-strength {
  margin-top: 6px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.password-strength-bar {
  height: 100%;
  width: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.password-strength-bar.weak {
  width: 33.33%;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.password-strength-bar.medium {
  width: 66.66%;
  background: linear-gradient(90deg, #f39c12, #e67e22);
}

.password-strength-bar.strong {
  width: 100%;
  background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.password-strength-text {
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 600;
}

.password-strength-text.weak {
  color: #e74c3c;
}

.password-strength-text.medium {
  color: #f39c12;
}

.password-strength-text.strong {
  color: #2ecc71;
}

/* ============================= */
/* FORM OPTIONS */
/* ============================= */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper input[type='checkbox'] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-wrapper label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

/* ============================= */
/* CHECKBOX GROUP (TERMS) */
/* ============================= */
.checkbox-group {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-bottom: 24px;
}

.checkbox-group input[type='checkbox'] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--primary-color);
}

.checkbox-group label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin: 0;
  line-height: 1.6;
}

.checkbox-group a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.checkbox-group a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ============================= */
/* FORGOT PASSWORD LINK */
/* ============================= */
.forgot-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.forgot-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ============================= */
/* AUTH BUTTONS */
/* ============================= */
.btn-auth {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-auth-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.3);
}

.btn-auth-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
}

.btn-auth-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(75, 49, 94, 0.4);
}

.btn-auth-primary:hover:not(:disabled)::before {
  width: 300px;
  height: 300px;
}

.btn-auth-primary:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.3);
}

/* ============================= */
/* DIVIDER */
/* ============================= */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 30px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider span {
  padding: 0 15px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================= */
/* SOCIAL LOGIN BUTTONS */
/* ============================= */
.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.btn-social {
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-social:hover {
  border-color: var(--primary-color);
  background: var(--bg-secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-sm);
}

.btn-social:active {
  transform: translateY(0);
}

.btn-social i {
  font-size: 1.2rem;
}

.btn-social.google:hover {
  border-color: #4285f4;
  color: #4285f4;
}

.btn-social.facebook:hover {
  border-color: #1877f2;
  color: #1877f2;
}

.btn-social.apple:hover {
  border-color: #000000;
  color: #000000;
}

[data-theme='dark'] .btn-social.apple:hover {
  border-color: #ffffff;
  color: #ffffff;
}

/* ============================= */
/* AUTH FOOTER */
/* ============================= */
.auth-footer {
  text-align: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.auth-footer a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ============================= */
/* ALERT MESSAGES */
/* ============================= */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideDown 0.3s ease;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.alert-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #c0392b;
}

.alert-success {
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #27ae60;
}

.alert-warning {
  background: rgba(243, 156, 18, 0.1);
  border: 1px solid rgba(243, 156, 18, 0.3);
  color: #d68910;
}

.alert-info {
  background: rgba(52, 152, 219, 0.1);
  border: 1px solid rgba(52, 152, 219, 0.3);
  color: #2980b9;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toast notifications - higher z-index than preloader */
.toast-notification {
  z-index: 100000 !important;
}

/* ============================= */
/* LOADING STATE */
/* ============================= */
.btn-auth.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-auth.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================= */
/* HELPER TEXT */
/* ============================= */
.form-helper {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

.form-helper.error {
  color: #e74c3c;
}

.form-helper.success {
  color: #2ecc71;
}

/* ============================= */
/* VALIDATION STATES */
/* ============================= */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #e74c3c;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
}

.form-control.is-valid,
.form-select.is-valid {
  border-color: #2ecc71;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
  box-shadow: 0 0 0 4px rgba(46, 204, 113, 0.1);
}

.invalid-feedback,
.valid-feedback {
  display: block;
  font-size: 0.85rem;
  margin-top: 6px;
}

.invalid-feedback {
  color: #e74c3c;
}

.valid-feedback {
  color: #2ecc71;
}

/* ============================= */
/* DARK MODE SPECIFIC STYLES */
/* ============================= */
[data-theme='dark'] .auth-card {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme='dark'] .form-control,
[data-theme='dark'] .form-select {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .form-control:focus,
[data-theme='dark'] .form-select:focus {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(167, 139, 189, 0.25);
}

[data-theme='dark'] .form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

[data-theme='dark'] .form-select option {
  background-color: #2d3748;
  color: var(--text-primary);
}

[data-theme='dark'] .profile-type-label {
  background: #2a2a2a;
}

[data-theme='dark'] .profile-type-label:hover {
  background: #333;
}

[data-theme='dark'] .profile-type-card input[type='radio']:checked + .profile-type-label {
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.2), rgba(107, 76, 122, 0.1));
}

[data-theme='dark'] .btn-social {
  background: #2a2a2a;
  border-color: #404040;
}

[data-theme='dark'] .btn-social:hover {
  background: #333;
}

[data-theme='dark'] .alert-error,
[data-theme='dark'] .alert-danger {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.4);
  color: #ff6b6b;
}

[data-theme='dark'] .alert-success {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.4);
  color: #51cf66;
}

[data-theme='dark'] .alert-warning {
  background: rgba(243, 156, 18, 0.15);
  border-color: rgba(243, 156, 18, 0.4);
  color: #ffa94d;
}

[data-theme='dark'] .alert-info {
  background: rgba(52, 152, 219, 0.15);
  border-color: rgba(52, 152, 219, 0.4);
  color: #74c0fc;
}

/* ============================= */
/* RESPONSIVE DESIGN */
/* ============================= */

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .auth-card {
    padding: 28px 28px;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  .profile-type-selector {
    gap: 10px;
  }

  .profile-type-label {
    padding: 16px 12px;
  }

  .profile-type-icon {
    font-size: 1.8rem;
  }
}

/* Mobile (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .auth-card {
    padding: 24px 24px;
  }

  .auth-title {
    font-size: 1.3rem;
  }

  .profile-type-selector {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .social-login {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile (≤575px) */
@media (max-width: 575px) {
  .auth-container {
    padding: 16px 12px;
  }

  .auth-card {
    padding: 20px 18px;
    border-radius: 16px;
  }

  .auth-card.register-card {
    max-width: 100%;
  }

  .auth-logo {
    width: auto;
    height: 34px;
    margin: 0;
  }

  .auth-logo-badge {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
    border-radius: 14px;
  }

  .auth-header {
    gap: 10px;
    margin-bottom: 15px;
  }

  .auth-title {
    font-size: 1.25rem;
  }

  .auth-subtitle {
    font-size: 0.8rem;
  }

  .profile-type-selector {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-type-label {
    padding: 16px 14px;
  }

  .profile-type-icon {
    font-size: 1.8rem;
  }

  .profile-type-name {
    font-size: 0.9rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-card .form-group { margin-bottom: 12px; }

  .auth-card .form-control { padding-block: 10px; }

  .form-control-wrapper i {
    left: 14px;
    font-size: 1rem;
  }

  .password-toggle {
    left: 14px;
  }

  .btn-auth {
    padding: 12px;
    font-size: 0.9rem;
  }

  .social-login {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn-social {
    padding: 10px;
    font-size: 0.85rem;
  }

  .auth-card .form-options {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
  }

  .divider {
    margin: 24px 0;
  }

  .divider span {
    font-size: 0.85rem;
  }

  .auth-footer {
    margin-top: 13px;
    padding-top: 13px;
  }

  .auth-footer p {
    font-size: 0.9rem;
  }
}

/* Extra Small (≤380px) */
@media (max-width: 380px) {
  .auth-card {
    padding: 20px 16px;
  }

  .auth-title {
    font-size: 1.15rem;
  }

  .profile-type-label {
    padding: 14px 12px;
  }

  .form-control {
    padding: 12px 12px 12px 40px;
  }
}

/* ============================= */
/* PRINT STYLES */
/* ============================= */
@media print {
  .auth-container::before {
    display: none;
  }

  .auth-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .btn-social,
  .divider {
    display: none;
  }
}

/* ============================= */
/* ACCESSIBILITY */
/* ============================= */
.form-control:focus-visible,
.btn-auth:focus-visible,
.btn-social:focus-visible,
.checkbox-wrapper input:focus-visible,
.checkbox-group input:focus-visible,
.profile-type-card input:focus-visible + .profile-type-label {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .auth-container::before {
    animation: none;
  }
}

/* ============================= */
/* HIGH CONTRAST MODE */
/* ============================= */
@media (prefers-contrast: high) {
  .form-control {
    border-width: 3px;
  }

  .btn-auth-primary {
    background: var(--primary-color);
  }

  .profile-type-card input[type='radio']:checked + .profile-type-label {
    border-width: 3px;
  }
}

/* ============================= */
/* END OF AUTHENTICATION CSS */
/* ============================= */
.mobile-lang-selector {
  padding: 1rem;
  border-top: 1px solid #ddd;
}
.mobile-lang-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0;
  font-size: 1rem;
  color: #333;
}
.mobile-lang-item.active {
  font-weight: bold;
}
/* Mobile language selector */
.mobile-lang-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-lang-toggle:hover {
  border-color: var(--primary-color);
}

.mobile-lang-toggle .current-selection {
  font-size: 1rem;
  font-weight: 500;
}

.mobile-lang-toggle .toggle-icon {
  transition: transform 0.3s ease;
}

.mobile-lang-toggle[aria-expanded='true'] .toggle-icon {
  transform: rotate(180deg);
}

.language-list-wrapper {
  margin-top: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.mobile-lang-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  color: var(--text-primary);
}

.mobile-lang-item:hover {
  background: var(--bg-primary);
}

.mobile-lang-item.active {
  font-weight: 700;
  background: var(--primary-color);
  color: var(--white-color);
}

.mobile-lang-item i {
  font-size: 1rem;
  color: var(--white-color);
}

/* Dark mode overrides */
[data-theme='dark'] .mobile-lang-toggle {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme='dark'] .language-list-wrapper {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

[data-theme='dark'] .mobile-lang-item:hover {
  background: var(--bg-primary);
}

[data-theme='dark'] .mobile-lang-item.active i {
  color: var(--white-color);
}
/* Theme Switcher Button */
.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* space between icon and optional text */
  width: 45px;
  height: 45px;
  border-radius: 12px;
  border: 2px solid var(--primary-color);
  background: none;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-weight: 500;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.theme-switcher:hover {
  background: var(--theme-toggle-hover-bg, rgba(255, 255, 255, 0.2));
  border-color: var(--theme-toggle-hover-border, rgba(255, 255, 255, 0.5));
  transform: scale(1.05);
}

/* Icon inside theme switcher */
.theme-switcher i {
  position: absolute;
  font-size: 20px;
  transition: all 0.4s ease;
}

/* Show correct icon based on theme */
[data-theme='light'] .theme-switcher .theme-icon-light {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

[data-theme='light'] .theme-switcher .theme-icon-dark {
  opacity: 0;
  transform: rotate(90deg) scale(0.8);
}

[data-theme='dark'] .theme-switcher .theme-icon-light {
  opacity: 0;
  transform: rotate(-90deg) scale(0.8);
}

[data-theme='dark'] .theme-switcher .theme-icon-dark {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Optional: click animation */
.theme-switcher:active {
  transform: scale(0.95);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
  .theme-switcher {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    gap: 6px;
  }
}

/* ============================= */
/* RESPONSIVE DESIGN IMPROVEMENTS */
/* Enhanced for Surveying Engineering Platform */
/* ============================= */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .page-title {
    font-size: 4rem;
  }

  .category-card {
    padding: 50px 40px;
  }

  .category-icon {
    font-size: 5rem;
  }

  .section-title {
    font-size: 3rem;
  }
}

/* Large Screens (1200px-1399px) */
@media (min-width: 1200px) and (max-width: 1399px) {
  .hero-title {
    font-size: 3rem;
  }

  .page-title {
    font-size: 3.5rem;
  }

  .category-card {
    padding: 45px 35px;
  }
}

/* Medium Screens (992px-1199px) - Tablets Landscape */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .page-title {
    font-size: 3rem;
  }

  .page-tagline {
    font-size: 1.6rem;
  }

  .category-card {
    padding: 40px 30px;
  }

  .category-icon {
    font-size: 3.5rem;
  }

  .navbar-brand {
    font-size: 1.6rem;
  }

  .navbar-brand img {
    height: 38px;
  }
}

/* Small Screens (768px-991px) - Tablets Portrait */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-section {
    padding: 40px 0 50px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .page-title {
    font-size: 2.8rem;
  }

  .page-tagline {
    font-size: 1.4rem;
  }

  .page-subtitle {
    font-size: 1.1rem;
  }

  .category-card {
    padding: 35px 25px;
    margin-bottom: 20px;
  }

  .category-icon {
    font-size: 3rem;
  }

  .category-title {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .navbar-brand {
    font-size: 1.5rem;
  }

  .navbar-brand img {
    height: 35px;
  }

  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }

  /* Hide desktop navigation */
  .navbar-nav {
    display: none;
  }

  .navbar-toggler {
    display: block;
  }

  /* Adjust about/contact page elements */
  .about-section {
    padding: 60px 0;
  }

  .contact-section {
    padding: 60px 0;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .vm-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* Extra Small Screens (576px-767px) - Mobile Landscape */
@media (min-width: 576px) and (max-width: 767px) {
  .hero-section {
    padding: 30px 0 40px;
  }

  .hero-title {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .page-hero {
    padding: 80px 0 60px;
  }

  .page-title {
    font-size: 2.5rem;
    line-height: 1.2;
  }

  .page-tagline {
    font-size: 1.3rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

  .categories-section {
    padding: 60px 0;
  }

  .category-card {
    padding: 30px 20px;
    margin-bottom: 15px;
  }

  .category-icon {
    font-size: 2.5rem;
  }

  .category-title {
    font-size: 1.2rem;
  }

  .category-desc {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .navbar {
    padding: 0.8rem 0;
  }

  .navbar-brand {
    font-size: 1.4rem;
  }

  .navbar-brand img {
    height: 32px;
  }

  /* Mobile navigation adjustments */
  .hamburger {
    display: flex;
    width: 35px;
    height: 35px;
  }

  .navbar-nav {
    display: none;
  }

  /* About/Contact page adjustments */
  .about-section {
    padding: 50px 0;
  }

  .contact-section {
    padding: 50px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .vm-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .contact-info-card {
    padding: 25px 20px;
  }

  .contact-form-wrapper {
    padding: 30px 25px;
  }
}

/* Small Mobile Screens (up to 575px) - Mobile Portrait */
@media (max-width: 575px) {
  .hero-section {
    padding: 25px 0 35px;
  }

  .hero-title {
    font-size: 1.8rem;
    line-height: 1.1;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
  }

  .btn-hero {
    padding: 8px 20px;
    font-size: 1rem;
  }

  .page-hero {
    padding: 70px 0 50px;
  }

  .page-title {
    font-size: 2.2rem;
    line-height: 1.1;
    margin-bottom: 15px;
  }

  .page-tagline {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .page-subtitle {
    font-size: 0.95rem;
  }

  .categories-section {
    padding: 50px 0;
  }

  .category-card {
    padding: 25px 15px;
    margin-bottom: 12px;
  }

  .category-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }

  .category-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .category-desc {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .section-subtitle {
    font-size: 1.3rem;
  }

  .navbar {
    padding: 0.6rem 0;
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  .navbar-brand img {
    height: 30px;
  }

  /* Mobile navigation */
  .hamburger {
    display: flex;
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  .mobile-nav {
    width: 100%;
    padding: 15px;
  }

  .navbar-nav {
    display: none;
  }

  /* About/Contact page mobile adjustments */
  .about-section {
    padding: 40px 0;
  }

  .contact-section {
    padding: 40px 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .vm-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .value-card {
    padding: 20px 15px;
  }

  .vm-card {
    padding: 20px 15px;
  }

  .contact-info-card {
    padding: 20px 15px;
    margin-bottom: 15px;
  }

  .contact-form-wrapper {
    padding: 25px 20px;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .btn-custom {
    font-size: 0.8rem;
  }

  /* Subcategories mobile adjustments */
  .subcategories {
    gap: 6px;
  }

  .subcategory-link {
    padding: 3px 10px;
    font-size: 0.75rem;
    border-radius: 12px;
  }

  .subcategories-title {
    font-size: 0.85rem;
  }
}

/* Ultra Small Screens (up to 380px) - Compact Mobile */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .page-title {
    font-size: 2rem;
  }

  .page-tagline {
    font-size: 1.1rem;
  }

  .category-card {
    padding: 20px 12px;
  }

  .category-icon {
    font-size: 2rem;
  }

  .category-title {
    font-size: 1rem;
  }

  .category-desc {
    font-size: 0.8rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .navbar-brand {
    font-size: 1.2rem;
  }

  .navbar-brand img {
    height: 26px;
  }

  .hamburger {
    width: 28px;
    height: 28px;
    padding: 4px;
  }

  .mobile-nav {
    padding: 12px;
  }

  .mobile-nav-link {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .contact-info-card {
    padding: 15px 12px;
  }

  .contact-form-wrapper {
    padding: 20px 15px;
  }

  .value-card {
    padding: 15px 12px;
  }

  .vm-card {
    padding: 15px 12px;
  }
}

/* ============================= */
/* STATS GRID COMPREHENSIVE RESPONSIVE DESIGN */
/* ============================= */

/* Large Screens (1200px+) */
@media (min-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 930px;
  }
}

/* Medium Screens (992px-1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 35px;
    max-width: 100%;
    padding: 0 20px;
  }
}

/* Small Screens (768px-991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 100%;
    padding: 0 20px;
  }
}

/* Extra Small Screens (576px-767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 100%;
    padding: 0 15px;
  }
}

/* Mobile Screens (≤575px) */
@media (max-width: 575px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    max-width: 100%;
    padding: 0 15px;
  }
}

/* Ultra Small Screens (≤380px) */
@media (max-width: 380px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 100%;
    padding: 0 10px;
  }

  .stat-card {
    min-height: 120px;
  }
}

/* ============================= */
/* END STATS GRID RESPONSIVE DESIGN */
/* ============================= */

/* Technical content readability improvements */
@media (max-width: 991px) {
  .offering-item {
    padding: 20px;
    margin-bottom: 15px;
  }

  .offering-item h4 {
    font-size: 1.1rem;
  }

  .offering-item p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .value-card {
    padding: 25px 20px;
    margin-bottom: 20px;
  }

  .value-title {
    font-size: 1.2rem;
  }

  .value-text {
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .offering-item {
    padding: 15px;
    margin-bottom: 12px;
  }

  .offering-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .offering-item p {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .value-card {
    padding: 20px 15px;
    margin-bottom: 15px;
  }

  .value-title {
    font-size: 1.1rem;
  }

  .value-text {
    font-size: 0.85rem;
    line-height: 1.5;
  }

  .value-icon svg {
    width: 32px;
    height: 32px;
  }
}

/* Enhanced form styling for surveying inquiries */
@media (max-width: 767px) {
  .contact-form-wrapper {
    height: auto; /* stacked layout: cards fit content */
  }

  .form-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
  }

  .form-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }

  .form-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  .contact-info-card h3 {
    font-size: 1rem;
  }

  .contact-info-card p {
    font-size: 0.85rem;
  }
}

@media (max-width: 575px) {
  .contact-form-wrapper {
    padding: 20px 15px;
  }

  .form-title {
    font-size: 1.2rem;
  }

  .form-description {
    font-size: 0.85rem;
  }

  .contact-info-card {
    padding: 15px 12px;
    margin-bottom: 15px;
  }

  .contact-info-card h3 {
    font-size: 0.95rem;
  }

  .contact-info-card p {
    font-size: 0.8rem;
  }

  .contact-icon svg {
    width: 24px;
    height: 24px;
  }
}

/* Stats display for surveying metrics */
@media (max-width: 767px) {
  .stat-card {
    padding: 20px 15px;
    text-align: center;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.9rem;
  }
}

@media (max-width: 575px) {
  .stat-card {
    padding: 15px 10px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }
}

/* Mission and values responsive layout */
@media (max-width: 991px) {
  .mission-section {
    padding: 50px 0;
  }

  .mission-content {
    padding: 30px 25px;
  }

  .vm-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vm-card {
    padding: 30px 25px;
  }

  .vm-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 575px) {
  .mission-section {
    padding: 40px 0;
  }

  .mission-content {
    padding: 25px 20px;
  }

  .mission-title {
    font-size: 1.5rem;
  }

  .mission-text {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .vm-card {
    padding: 25px 20px;
  }

  .vm-title {
    font-size: 1.2rem;
  }

  .vm-text {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .vm-icon svg {
    width: 40px;
    height: 40px;
  }
}

/* Contact form enhancements for surveying inquiries */
@media (max-width: 767px) {
  .contact-methods {
    flex-direction: column;
    gap: 15px;
  }

  .contact-method {
    padding: 15px;
  }

  .contact-method h5 {
    font-size: 1rem;
  }

  .contact-method p {
    font-size: 0.85rem;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 575px) {
  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Tab functionality responsive improvements */
@media (max-width: 767px) {
  .tab-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .tab-btn {
    width: 100%;
    max-width: 300px;
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .offerings-list {
    margin-top: 20px;
  }
}

@media (max-width: 575px) {
  .tab-btn {
    padding: 10px 15px;
    font-size: 0.85rem;
  }

  .offerings-section {
    padding: 40px 0;
  }

  .values-section {
    padding: 40px 0;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

/* CTA section responsive improvements for surveying focus */
@media (max-width: 767px) {
  .cta-section {
    padding: 50px 0;
  }

  .cta-title {
    font-size: 1.8rem;
  }

  .cta-text {
    font-size: 0.9rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .vendor-btn {
    width: 100%;
    max-width: 280px;
  }
}

@media (max-width: 575px) {
  .cta-section {
    padding: 40px 0;
  }

  .cta-title {
    font-size: 1.6rem;
  }

  .cta-text {
    font-size: 0.85rem;
  }

  .cta-tagline {
    font-size: 0.9rem;
  }

  .vendor-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }
}

/* Enhanced map responsiveness */
@media (max-width: 767px) {
  .products-card iframe {
    height: 350px;
  }
}

@media (max-width: 575px) {
  .products-card iframe {
    height: 300px;
  }
}

/* ============================= */
/* SURVEYING ENGINEERING ICON IMPROVEMENTS */
/* ============================= */

/* Ensure icons scale properly on all devices */
@media (max-width: 991px) {
  .contact-icon svg,
  .value-icon svg,
  .vm-icon svg {
    transition: transform 0.3s ease;
  }

  .contact-info-card:hover .contact-icon svg,
  .value-card:hover .value-icon svg,
  .vm-card:hover .vm-icon svg {
    transform: scale(1.1);
  }
}

@media (max-width: 575px) {
  .contact-icon svg {
    width: 28px;
    height: 28px;
  }

  .value-icon svg {
    width: 32px;
    height: 32px;
  }

  .vm-icon svg {
    width: 40px;
    height: 40px;
  }
}

/* ============================= */
/* SURVEYING ENGINEERING CONTENT GRID FIXES */
/* ============================= */

/* Ensure grid layouts work properly on all devices */
@media (max-width: 991px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .contact-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 575px) {
  .values-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

@media (max-width: 380px) {
  .values-grid,
  .contact-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .value-card,
  .stat-card,
  .contact-info-card {
    padding: 15px 12px;
  }
}

/* ============================= */
/* ACCESSIBILITY IMPROVEMENTS */
/* ============================= */

/* Focus indicators for better navigation */
@media (max-width: 991px) {
  .btn-custom:focus,
  .nav-link:focus,
  .mobile-nav-link:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
  }

  .form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
  }
}

/* Touch-friendly sizing for mobile */
@media (max-width: 767px) {
  .btn-custom {
    min-height: 44px;
    min-width: 44px;
  }

  .nav-link {
    min-height: 44px;
    padding: 12px 16px !important;
  }

  .mobile-nav-link {
    min-height: 48px;
    padding: 15px 20px;
  }

  .form-control {
    min-height: 44px;
  }
}

/* ============================= */
/* PRINT STYLES */
/* ============================= */
@media print {
  .navbar,
  .mobile-nav,
  .mobile-nav-backdrop,
  .theme-toggle,
  .btn-hero,
  .btn-custom {
    display: none !important;
  }

  .page-hero {
    background: none !important;
    color: #000 !important;
    padding: 20px 0 !important;
  }

  .page-title,
  .hero-title {
    color: #000 !important;
    font-size: 1.5rem !important;
  }

  .category-card,
  .value-card,
  .vm-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    color: #000 !important;
    break-inside: avoid;
    margin-bottom: 10px;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }
}

/* ============================= */
/* HIGH CONTRAST MEDIA QUERIES */
/* ============================= */
@media (prefers-contrast: high) {
  .category-card,
  .value-card,
  .vm-card {
    border: 3px solid var(--primary-color) !important;
  }

  .btn-custom {
    border: 3px solid currentColor !important;
  }

  .nav-link {
    border: 2px solid transparent !important;
  }

  .nav-link:focus {
    border-color: var(--secondary-color) !important;
  }
}

/* ============================= */
/* REDUCED MOTION PREFERENCES */
/* ============================= */
@media (prefers-reduced-motion: reduce) {
  .category-card:hover,
  .btn-custom:hover,
  .nav-link:hover {
    transform: none !important;
  }

  .hero-section::before {
    animation: none !important;
  }

  .category-icon {
    transition: none !important;
  }

  .navbar-brand:hover img {
    transform: none !important;
  }
}

/* ============================= */
/* YOJAD-STYLE HEADER DESIGN */
/* Consolidated from yojad-header.css */
/* ============================= */

/* Ensure Font Awesome icons display properly */
/* Force Font Awesome for all icon elements */
.yojad-header i[class^="fa"],
.yojad-header i[class*=" fa"],
.categories-nav-bar i[class^="fa"],
.categories-nav-bar i[class*=" fa"],
.categories-tabs i[class^="fa"],
.categories-tabs i[class*=" fa"] {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}

/* Specific icon classes */
.yojad-header .fas,
.yojad-header .fa-solid,
.categories-nav-bar .fas,
.categories-nav-bar .fa-solid,
.categories-tabs .fas,
.categories-tabs .fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.yojad-header .far,
.yojad-header .fa-regular,
.categories-nav-bar .far,
.categories-nav-bar .fa-regular,
.categories-tabs .far,
.categories-tabs .fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.yojad-header .fab,
.yojad-header .fa-brands,
.categories-nav-bar .fab,
.categories-nav-bar .fa-brands,
.categories-tabs .fab,
.categories-tabs .fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Top Navigation Bar Styles */
.yojad-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple, #6B4C7A) 100%);
    box-shadow: 0 4px 20px var(--shadow-md);
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 2px solid var(--secondary-color);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
}

body.has-fixed-header {
    padding-top: var(--fixed-header-height, 132px);
}

[data-theme="dark"] .yojad-header {
    background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%);
    box-shadow: 0 4px 20px var(--shadow-md);
    border-bottom: 2px solid var(--secondary-color);
}

.top-nav-bar {
    padding: 0;
    background: transparent;
    border-bottom: none;
}

[data-theme="dark"] .top-nav-bar {
    background: transparent;
    border-bottom: none;
}

/* Logo Section - Surveying Engineering Theme */
.header-logo-section .header-main-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.header-logo-section .navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
}

/* Logo Container with Surveying Elements */
.logo-container {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-circle {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

/* Precision Grid Background */
.precision-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:
        linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 10px 10px;
    border-radius: 50%;
    opacity: 0.4;
    animation: grid-shimmer 4s ease-in-out infinite;
}

@keyframes grid-shimmer {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Rotating Compass Ring */
.header-compass-ring {
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: compass-rotate 20s linear infinite;
    z-index: 1;
}

@keyframes compass-rotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* GPS Signal Indicator */
.header-gps-signal {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.signal-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: signal-pulse 3s ease-out infinite;
}

.signal-pulse.pulse-1 { animation-delay: 0s; }
.signal-pulse.pulse-2 { animation-delay: 1.5s; }

@keyframes signal-pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* Measurement Crosshair */
.measurement-crosshair {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.3;
}

.crosshair-h,
.crosshair-v {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    animation: crosshair-scan 3s ease-in-out infinite;
}

.crosshair-h {
    width: 60%;
    height: 1px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.crosshair-v {
    width: 1px;
    height: 60%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes crosshair-scan {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.6; }
}

/* Logo Hover Effects - Surveying Precision */
.logo-container:hover .logo-circle {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.logo-container:hover .header-compass-ring {
    animation-duration: 10s;
    border-color: rgba(255, 255, 255, 0.5);
}

.logo-container:hover .precision-grid {
    opacity: 0.8;
}

.logo-container:hover .measurement-crosshair {
    opacity: 0.5;
}

/* ============================= */
/* HEADER LOGO MOBILE RESPONSIVE */
/* ============================= */
@media (max-width: 768px) {
    .logo-container {
        width: 75px;
        height: 75px;
    }

    .logo-circle {
        width: 58px;
        height: 58px;
    }

    .header-main-logo {
        height: 55px !important;
    }

    .header-compass-ring {
        width: 62px;
        height: 62px;
        border-width: 1.5px;
    }

    .precision-grid {
        background-size: 8px 8px;
    }

    .crosshair-h {
        width: 55%;
    }

    .crosshair-v {
        height: 55%;
    }
}

@media (max-width: 480px) {
    .logo-container {
        width: 70px;
        height: 70px;
    }

    .logo-circle {
        width: 54px;
        height: 54px;
    }

    .header-main-logo {
        height: 52px !important;
    }

    .header-compass-ring {
        width: 56px;
        height: 56px;
        border-width: 1px;
    }

    .precision-grid {
        background-size: 6px 6px;
        opacity: 0.3;
    }

    .crosshair-h {
        width: 50%;
    }

    .crosshair-v {
        height: 50%;
    }

    .signal-pulse {
        border-width: 0.5px;
    }
}

/* Search Bar */
.header-search-section {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-wrapper {
    position: relative;
    width: 100%;
}

.search-wrapper .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
    pointer-events: none;
}

.header-search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    direction: rtl;
    color: var(--text-primary);
}

.header-search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.header-search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(255, 96, 1, 0.2);
    background: var(--white-color, #fff);
}

[data-theme="dark"] .header-search-input {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white-color, #fff);
}

[data-theme="dark"] .header-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .header-search-input:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--secondary-color);
}

/* Header Actions */
.header-actions-section {
    display: flex;
    align-items: center;
}

.header-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border:none !important; /* Default transparent border */
    color: var(--white-color, #fff);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    font-weight: 600;
    text-decoration-line: none;
}

.header-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color); /* Border appears on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-md);
    color: var(--white-color, #fff);
}

[data-theme="dark"] .header-action-btn {
    background: rgba(0, 0, 0, 0.2);
    color: var(--white-color, #fff);
}

[data-theme="dark"] .header-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color); /* Border appears on hover */
}

/* Theme Toggle in Header */
/* Specific styles for icon-only buttons in header actions */
.header-actions-section .header-icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%; /* Round shape for icons */
    padding: 0; /* Remove padding for icon-only */
    justify-content: center; /* Center the icon */
    flex-shrink: 0; /* Prevent shrinking */
}

/* Theme Toggle in Header (inherits from .header-action-btn and .header-icon-btn) */
/* Only specific icon visibility logic remains here */
.header-theme-toggle { /* Keep this selector for icon visibility logic */
    position: relative;
    overflow: hidden;
}

.header-theme-toggle .theme-icon-light,
.header-theme-toggle .theme-icon-dark {
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: absolute;
}

/* Light theme: show moon (to toggle TO dark) */
[data-theme="light"] .header-theme-toggle .theme-icon-light {
    display: none !important;
}

[data-theme="light"] .header-theme-toggle .theme-icon-dark {
    display: block !important;
    animation: iconRotateIn 0.4s ease;
}

/* Dark theme: show sun (to toggle TO light) */
[data-theme="dark"] .header-theme-toggle .theme-icon-light {
    display: block !important;
    animation: iconRotateIn 0.4s ease;
}

[data-theme="dark"] .header-theme-toggle .theme-icon-dark {
    display: none !important;
}

@keyframes iconRotateIn {
    from {
        transform: rotate(-180deg) scale(0);
        opacity: 0;
    }
    to {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

/* Mobile Theme Toggle Button Styling */
.mobile-theme-toggle-btn {
    width: auto;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-theme-toggle-btn .theme-toggle-icons {
    position: relative;
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.mobile-theme-toggle-btn .theme-toggle-icons i {
    font-size: 1.2rem;
    position: absolute;
    transition: all 0.4s ease;
    color: #4b315e !important;
}

/* Light Mode - Show Moon Icon */
[data-theme='light'] .mobile-theme-toggle-btn .theme-icon-light {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
    visibility: hidden;
}

[data-theme='light'] .mobile-theme-toggle-btn .theme-icon-dark {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    visibility: visible;
}

/* Dark Mode - Show Sun Icon */
[data-theme='dark'] .mobile-theme-toggle-btn .theme-icon-light {
    opacity: 1;
    transform: rotate(0deg) scale(1);
    visibility: visible;
}

[data-theme='dark'] .mobile-theme-toggle-btn .theme-icon-dark {
    opacity: 0;
    transform: rotate(180deg) scale(0);
    visibility: hidden;
}

/* Hover Effect for Mobile Theme Toggle */
/* Light Mode - Black background on hover */
[data-theme='light'] .mobile-theme-toggle-btn:hover .theme-toggle-icons {
    background: #000000;
    border-color: #4b315e;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(75, 49, 94, 0.3);
}

[data-theme='light'] .mobile-theme-toggle-btn:hover .theme-toggle-icons i {
    color: #4b315e !important;
    transform: rotate(0deg) scale(1.1);
}

/* Dark Mode - White background on hover */
[data-theme='dark'] .mobile-theme-toggle-btn:hover .theme-toggle-icons {
    background: #ffffff;
    border-color: #4b315e;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

[data-theme='dark'] .mobile-theme-toggle-btn:hover .theme-toggle-icons i {
    color: #4b315e !important;
    transform: rotate(0deg) scale(1.1);
}

/* Active/Click Effect */
.mobile-theme-toggle-btn:active .theme-toggle-icons {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(75, 49, 94, 0.15);
}

.country-text {
    font-size: 0.85rem;
}

/* Notification Badge - matches chatbot badge style */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #f44336;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
    transition: transform 0.2s ease;
}

/* Post Ad Button */
.btn-post-ad {
    background: linear-gradient(135deg, #4B315E 0%, #6B4C7A 100%);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(75, 49, 94, 0.2);
}

.btn-post-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(75, 49, 94, 0.3);
    color: white;
}

/* Categories Navigation Bar */
.categories-nav-bar {
    background: linear-gradient(135deg, var(--header-brand, #ff6001) 0%, var(--accent-purple, #6B4C7A) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
}

[data-theme="dark"] .categories-nav-bar {
    background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.categories-scroll-wrapper {
    position: relative;
    overflow: hidden;
    background: transparent;
}

/* Categories Swiper Styling */
.categories-swiper {
    width: 100%;
    overflow: hidden;
    background: transparent;
    padding: 0;
    margin: 0;
}

.categories-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.categories-nav-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    /* "safe" avoids clipping the first/last icon when the list overflows
       and needs horizontal scrolling (see templates/partials/_header.html). */
    justify-content: safe center;
    background: transparent;
}

/* Categories Swiper Navigation Arrows */
.categories-swiper-next,
.categories-swiper-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, rgba(75, 49, 94, 0.95) 0%, rgba(75, 49, 94, 0.85) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.categories-swiper-next::after,
.categories-swiper-prev::after {
    font-size: 18px;
    color: #fff;
    font-weight: 900;
    transition: all 0.3s ease;
}

.categories-swiper-next {
    right: 15px;
}

.categories-swiper-prev {
    left: 15px;
}

/* Show arrows on hover of entire categories nav bar */
.categories-nav-bar:hover .categories-swiper-next,
.categories-nav-bar:hover .categories-swiper-prev {
    opacity: 1;
    visibility: visible;
}

.categories-swiper:hover .categories-swiper-next,
.categories-swiper:hover .categories-swiper-prev {
    opacity: 1;
    visibility: visible;
}

/* Enhanced hover effect for arrows */
.categories-swiper-next:hover,
.categories-swiper-prev:hover {
    background: linear-gradient(135deg, rgba(75, 49, 94, 1) 0%, rgba(75, 49, 94, 0.95) 100%);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(75, 49, 94, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.categories-swiper-next:hover::after,
.categories-swiper-prev:hover::after {
    transform: scale(1.1);
}

/* Pulse animation on hover */
.categories-swiper-next:active,
.categories-swiper-prev:active {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 2px 10px rgba(75, 49, 94, 0.4);
}

/* Hide disabled arrows */
.categories-swiper-next.swiper-button-disabled,
.categories-swiper-prev.swiper-button-disabled {
    opacity: 0 !important;
    visibility: hidden !important;
    cursor: default;
    pointer-events: none;
}

/* Dark theme navigation arrows */
[data-theme='dark'] .categories-swiper-next,
[data-theme='dark'] .categories-swiper-prev {
    background: linear-gradient(135deg, rgba(255, 96, 1, 0.95) 0%, rgba(255, 96, 1, 0.85) 100%);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme='dark'] .categories-swiper-next:hover,
[data-theme='dark'] .categories-swiper-prev:hover {
    background: linear-gradient(135deg, rgba(255, 96, 1, 1) 0%, rgba(255, 96, 1, 0.95) 100%);
    box-shadow: 0 6px 25px rgba(255, 96, 1, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments for arrows */
@media (max-width: 768px) {
    .categories-swiper-next,
    .categories-swiper-prev {
        width: 38px;
        height: 38px;
    }

    .categories-swiper-next::after,
    .categories-swiper-prev::after {
        font-size: 16px;
    }

    .categories-swiper-next {
        right: 8px;
    }

    .categories-swiper-prev {
        left: 8px;
    }
}

/* Desktop: Show more items */
@media (min-width: 1200px) {
    .categories-swiper .swiper-slide {
        width: auto !important;
    }
}

/* Mobile/Tablet: Controlled width */
@media (max-width: 1199px) {
    .categories-swiper .swiper-slide {
        width: auto !important;
    }
}

.category-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    transition: all 0.3s ease;
    min-width: 90px;
    text-align: center;
    animation: slideIn 0.3s ease forwards;
}

.category-nav-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.category-nav-item:nth-child(1) { animation-delay: 0.05s; }
.category-nav-item:nth-child(2) { animation-delay: 0.1s; }
.category-nav-item:nth-child(3) { animation-delay: 0.15s; }
.category-nav-item:nth-child(4) { animation-delay: 0.2s; }
.category-nav-item:nth-child(5) { animation-delay: 0.25s; }
.category-nav-item:nth-child(6) { animation-delay: 0.3s; }
.category-nav-item:nth-child(7) { animation-delay: 0.35s; }
.category-nav-item:nth-child(8) { animation-delay: 0.4s; }
.category-nav-item:nth-child(9) { animation-delay: 0.45s; }
.category-nav-item:nth-child(10) { animation-delay: 0.5s; }
.category-nav-item:nth-child(11) { animation-delay: 0.55s; }

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

@media (max-width: 768px) {
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

.category-icon i,
.category-icon .fas,
.category-icon .fa,
.category-icon [class^="fa-"],
.category-icon [class*=" fa-"] {
    color: #fff !important;
    font-size: 1.5rem !important;
    line-height: 1 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    position: relative;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
}

.category-nav-item:hover .category-icon {
    transform: scale(1.1);
}

.category-name {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.95);
}

/* All header category icons share one brand color, instead of an
   arbitrary rainbow cycled by DOM position (previous behaviour), so the
   nav bar reads as one consistent set rather than a random assortment. */
.category-nav-item[data-category-color="brand"] .category-icon {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3a2449 100%);
}

/* Category-specific colors - Dynamic based on position */
.category-nav-item[data-category-color="category-1"] .category-icon {
    background: linear-gradient(135deg, #00b894 0%, #00a381 100%);
}

.category-nav-item[data-category-color="category-2"] .category-icon {
    background: linear-gradient(135deg, #0984e3 0%, #0770c4 100%);
}

.category-nav-item[data-category-color="category-3"] .category-icon {
    background: linear-gradient(135deg, #a29bfe 0%, #8b83e8 100%);
}

.category-nav-item[data-category-color="category-4"] .category-icon {
    background: linear-gradient(135deg, #ff3838 0%, #e01e1e 100%);
}

.category-nav-item[data-category-color="category-5"] .category-icon {
    background: linear-gradient(135deg, #00b894 0%, #008866 100%);
}

.category-nav-item[data-category-color="category-6"] .category-icon {
    background: linear-gradient(135deg, #00cec9 0%, #00b3af 100%);
}

.category-nav-item[data-category-color="category-7"] .category-icon {
    background: linear-gradient(135deg, #fdcb6e 0%, #f0b542 100%);
}

.category-nav-item[data-category-color="category-8"] .category-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

/* Fallback for static categories */
.category-nav-item[data-category-color="green"] .category-icon {
    background: linear-gradient(135deg, #00b894 0%, #00a381 100%);
}

.category-nav-item[data-category-color="blue"] .category-icon {
    background: linear-gradient(135deg, #0984e3 0%, #0770c4 100%);
}

.category-nav-item[data-category-color="purple"] .category-icon {
    background: linear-gradient(135deg, #a29bfe 0%, #8b83e8 100%);
}

.category-nav-item[data-category-color="red"] .category-icon {
    background: linear-gradient(135deg, #ff3838 0%, #e01e1e 100%);
}

.category-nav-item[data-category-color="dark-green"] .category-icon {
    background: linear-gradient(135deg, #00b894 0%, #008866 100%);
}

.category-nav-item[data-category-color="teal"] .category-icon {
    background: linear-gradient(135deg, #00cec9 0%, #00b3af 100%);
}

.category-nav-item[data-category-color="yellow"] .category-icon {
    background: linear-gradient(135deg, #fdcb6e 0%, #f0b542 100%);
}

/* Responsive Design */
@media (max-width: 991px) {
    .header-search-section {
        display: none;
    }

    .header-actions-section {
        display: none;
    }

    .top-nav-bar .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .top-nav-bar .d-flex {
        flex-wrap: nowrap;
        align-items: center;
    }

    .header-logo-section {
        flex: 1;
        max-width: 150px;
    }

    .header-logo-section .header-main-logo {
        height: 40px;
    }

}

@media (max-width: 768px) {
    .category-nav-item {
        min-width: 80px;
        padding: 0.4rem 0.75rem;
    }

    .category-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .category-name {
        font-size: 0.75rem;
    }
}

/* Mobile Responsiveness for Search */
@media (min-width: 992px) and (max-width: 1200px) {
    .header-search-section {
        max-width: 400px;
        margin: 0 1rem;
    }

    .country-text {
        display: none;
    }

    .btn-post-ad {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }
}

/* Sticky Behavior on Scroll */
.yojad-header.scrolled {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.yojad-header.scrolled .header-main-logo {
    height: 40px;
    transition: all 0.3s ease;
}

[data-theme="dark"] .yojad-header.scrolled {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* Theme Toggle for Logo */
/* Light mode: show dark logo, Dark mode: show white logo */
[data-theme="light"] .header-logo-section .light-theme-logo {
    display: none !important;
}

[data-theme="light"] .header-logo-section .dark-theme-logo {
    display: block !important;
}

[data-theme="dark"] .header-logo-section .light-theme-logo {
    display: block !important;
}

[data-theme="dark"] .header-logo-section .dark-theme-logo {
    display: none !important;
}

/* Dropdown Menu Styles */
.header-action-btn.dropdown-toggle::after {
    margin-left: 0.3rem;
    font-size: 0.7rem;
}

/* Animation for Categories */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Styles for Accessibility */
.header-action-btn:focus,
.category-nav-item:focus,
.btn-post-ad:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .yojad-header {
        position: static;
        box-shadow: none;
    }

    .categories-nav-bar {
        display: none;
    }

    .header-actions-section {
        display: none;
    }
}

/* Notification Dropdown Styles */
.notification-dropdown {
    width: 320px;
    padding: 0;
}

.notification-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-header h6 {
    margin: 0;
    font-weight: 600;
}

.notification-item {
    white-space: normal;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-footer {
    text-align: center;
    padding: 0.75rem;
}

/* ============================= */
/* SUBCATEGORIES DROPDOWN */
/* ============================= */

.subcategories-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple, #6B4C7A) 100%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1050;
    display: none;
}

[data-theme="dark"] .subcategories-dropdown {
    background: linear-gradient(135deg, #2a1a3a 0%, #3a2a4a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.subcategories-dropdown.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.subcategories-wrapper {
    padding: 1.5rem 0;
}

.subcategories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.subcategories-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.parent-category-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Subcategories List */
.subcategories-list {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.subcategories-list::-webkit-scrollbar {
    height: 6px;
}

.subcategories-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.subcategories-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.subcategories-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.subcategory-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 90px;
    justify-content: center;
    position: relative;
    backdrop-filter: blur(10px);
    cursor: pointer;
    flex-shrink: 0;
    min-width: 120px;
}

.subcategory-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    text-decoration: none;
}

.subcategory-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.subcategory-icon i {
    font-size: 1.8rem;
}

.subcategory-name {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

.subcategory-arrow {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.7;
}

.subcategories-footer {
    text-align: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.view-all-link {
    color: white;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(10px);
}

.view-all-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Loading and Error States */
.loading-subcategories,
.error-subcategories,
.no-subcategories {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.loading-subcategories i {
    margin-right: 0.5rem;
    animation: fa-spin 1s infinite linear;
}

.error-subcategories {
    color: #ffcccb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .subcategories-wrapper {
        padding: 1rem 0;
    }

    .subcategories-header {
        padding: 0 0.5rem;
        margin-bottom: 0.75rem;
    }

    .subcategories-list {
        padding: 0.5rem 0.5rem;
        gap: 10px;
    }

    .subcategory-item {
        padding: 0.75rem 0.5rem;
        min-height: 80px;
        min-width: 100px;
    }

    .subcategory-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .subcategory-icon i {
        font-size: 1.3rem;
    }

    .subcategory-name {
        font-size: 0.75rem;
        max-width: 80px;
    }

    .subcategories-footer {
        padding: 0 0.5rem;
        margin-top: 0.75rem;
    }
}

/* ============================= */
/* ENHANCED SUBCATEGORY FEATURES */
/* ============================= */

/* Enhanced subcategory dropdown with click functionality */
.subcategories-dropdown {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
}

.subcategories-dropdown.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Enhanced subcategory close button */
.subcategories-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.subcategories-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Enhanced category nav item */
.category-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.category-loading {
    position: absolute;
    top: 5px;
    right: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

/* Subcategory expand indicator */
.subcategory-expand {
    margin-left: auto;
    opacity: 0.6;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.subcategory-item:hover .subcategory-expand {
    opacity: 1;
    transform: translateX(2px);
}

/* Loading states */
.loading-item, .error-item, .empty-item {
    padding: 15px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-style: italic;
}

.error-item {
    color: #ffcccb;
}

/* Mobile enhancements */
@media (max-width: 768px) {
    .subcategories-dropdown {
        position: fixed !important;
        top: 120px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-purple, #6B4C7A) 100%);
        transform: translateY(100%);
        opacity: 0;
        visibility: hidden;
        z-index: 1040 !important;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
        display: none !important;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .subcategories-dropdown.show {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s;
    }

    .subcategories-wrapper {
        height: calc(100vh - 120px);
        overflow-y: auto;
        padding: 15px 20px 20px;
    }

    .subcategories-header {
        position: sticky;
        top: 0;
        background: rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        padding: 12px 15px;
        margin-bottom: 15px;
        border-radius: 12px;
        z-index: 10;
    }

    .subcategory-item {
        min-height: 60px;
        padding: 12px;
    }

    .category-loading {
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
    }
}

/* Tablet and Medium screens (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .subcategory-item {
        min-height: 80px;
    }
}

/* Large Desktop (1025px - 1399px) */
@media (min-width: 1025px) and (max-width: 1399px) {
}

/* Extra Large Desktop (>= 1400px) */
@media (min-width: 1400px) {
}

/* ===================================== */
/* ENHANCED MODERN AD CARD - COMPLETE STYLES */
/* ===================================== */

/* Main Card Container */
.modern-ad-card {
  position: relative;
  width: 100%;
  max-width: 100%;
  max-height: 685px;
  background: var(--bg-primary, #ffffff);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(75, 49, 94, 0.12);
  border: 1px solid rgba(75, 49, 94, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 555px;
}

.modern-ad-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(75, 49, 94, 0.18);
  border-color: var(--primary-color, #4b315e);
}

.modern-ad-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.modern-ad-card:hover::before {
  opacity: 1;
}

/* ===================================== */
/* IMAGE SECTION */
/* ===================================== */
.ad-image-container {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ad-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.ad-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  /* Crop in slightly by default so product photos with a lot of their own
     white background (thin items shot on a plain backdrop) don't leave
     visible empty space around them inside the card. */
  transform: scale(1.15);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.modern-ad-card:hover .ad-image {
  transform: scale(1.22);
  filter: brightness(1.1);
}

.ad-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  color: var(--text-muted, #6c757d);
}

.ad-image-placeholder i {
  font-size: 3rem;
  opacity: 0.4;
}

/* ===================================== */
/* BADGES OVERLAY */
/* ===================================== */
.ad-badges-top {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: flex-start;
  z-index: 3;
  gap: 8px;
}

.ad-badges-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ad-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.urgent-badge {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
}

.pinned-badge {
  background: linear-gradient(135deg, #fa709a, #fee140);
  color: #7c2d12;
}

.highlighted-badge {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: white;
}

/* ===================================== */
/* STATS OVERLAY */
/* ===================================== */
.ad-info-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
}

.ad-stats-container {
  display: flex;
  gap: 8px;
}

.ad-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================================== */
/* CONTENT SECTION */
/* ===================================== */
.ad-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-primary);
}

/* Category Badge (duplicate block — keep in sync with primary above) */
.ad-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  background: rgba(75, 49, 94, 0.08);
  border: 1.5px solid rgba(75, 49, 94, 0.18);
  border-radius: 50px;
  color: var(--primary-color);
  font-size: 0.71rem;
  font-weight: 700;
  align-self: flex-start;
  transition: all 0.2s ease;
  max-width: 100%;
  overflow: hidden;
}

.ad-category-badge i {
  font-size: 0.68rem;
  flex-shrink: 0;
}

.ad-category-badge:hover {
  background: rgba(75, 49, 94, 0.14);
  border-color: rgba(75, 49, 94, 0.3);
  transform: translateY(-1px);
}

/* Title */
.ad-title {
  text-align:start;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ad-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.ad-title a:hover {
  color: var(--primary-color);
}

/* Location */
.ad-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.ad-location i {
  color: var(--primary-color);
  font-size: 0.8rem;
}

/* ===================================== */
/* FEATURES ROW WITH PUBLISHER BADGE */
/* ===================================== */
.ad-features-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  align-items: center;
}

/* Publisher Badge Wrapper */
.publisher-badge-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.publisher-avatar-mini {
  width: 38px !important;
  height: 38px !important;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-color, #4b315e), var(--secondary-color, #ff6001));
}

.publisher-badge-wrapper:hover .publisher-avatar-mini {
  transform: scale(1.1);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Avatar Verified Badge */
.avatar-verified-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #ffffff;
  border: 2px solid #ffffff;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.avatar-verified-badge.person-badge {
  background: linear-gradient(135deg, #1877f2, #0a66d9);
}

.avatar-verified-badge.company-badge {
  background: linear-gradient(135deg, #1877f2, #0a66d9);
}

.publisher-badge-wrapper:hover .avatar-verified-badge {
  transform: scale(1.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.feature-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.3s ease;
  border: 1.5px solid transparent;
}

.feature-tag i {
  font-size: 0.75rem;
}

.delivery-tag {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border-color: #6ee7b7;
}

.delivery-tag:hover {
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.negotiable-tag {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border-color: #93c5fd;
}

.negotiable-tag:hover {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.condition-tag {
  background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
  color: #6b21a8;
  border-color: #d8b4fe;
}

.condition-tag:hover {
  background: linear-gradient(135deg, #e9d5ff, #d8b4fe);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.custom-field-tag {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e3a8a;
  border-color: #93c5fd;
}

.custom-field-tag:hover {
  background: linear-gradient(135deg, #bfdbfe, #93c5fd);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===================================== */
/* PRICE SECTION */
/* ===================================== */
.ad-price-section {
  margin: 0;
  padding-top: 12px;
}

.ad-price-box {
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.03), rgba(255, 96, 1, 0.03));
  border: 2px solid rgba(75, 49, 94, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.ad-price-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-ad-card:hover .ad-price-box {
  border-color: rgba(75, 49, 94, 0.2);
  background: linear-gradient(135deg, rgba(75, 49, 94, 0.06), rgba(255, 96, 1, 0.06));
}

.modern-ad-card:hover .ad-price-box::before {
  opacity: 1;
}

.price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.price-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-label i {
  font-size: 0.8rem;
  color: var(--primary-color);
}

.price-negotiable-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 600;
}

.ad-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-amount {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.price-currency {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===================================== */
/* SIMPLIFIED FOOTER SECTION */
/* ===================================== */
.ad-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(75, 49, 94, 0.1);
  background: linear-gradient(135deg, rgba(248, 249, 250, 0.8), rgba(255, 255, 255, 0.6));
  backdrop-filter: blur(10px);
  margin-top: auto;
}

.ad-footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Time Posted */
.ad-time-posted {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.ad-time-posted i {
  color: var(--primary-color);
  font-size: 0.7rem;
}

/* Views Count */
.ad-views-count {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ad-views-count i {
  color: #3b82f6;
  font-size: 0.75rem;
}

.ad-views-count:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.08));
  transform: translateY(-1px);
}

/* ===================================== */
/* DARK THEME SUPPORT */
/* ===================================== */
[data-theme='dark'] .modern-ad-card {
  background: var(--bg-primary, #1e1e2e);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .modern-ad-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .ad-image-placeholder {
  background: linear-gradient(135deg, #2a2a3e, #3a3a4e);
  color: rgba(255, 255, 255, 0.5);
}

[data-theme='dark'] .ad-footer {
  background: linear-gradient(135deg, rgba(30, 30, 46, 0.8), rgba(40, 40, 60, 0.6));
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .ad-price-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 96, 1, 0.05));
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .modern-ad-card:hover .ad-price-box {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 96, 1, 0.08));
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme='dark'] .ad-views-count {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.08));
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme='dark'] .delivery-tag {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme='dark'] .negotiable-tag {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme='dark'] .condition-tag {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.15));
  color: #d8b4fe;
  border-color: rgba(168, 85, 247, 0.4);
}

[data-theme='dark'] .custom-field-tag {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.4);
}

/* ===================================== */
/* RESPONSIVE DESIGN */
/* ===================================== */

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .modern-ad-card {
    min-height: auto;
  }

  .ad-image-container {
    height: 220px;
  }

  .ad-content {
    padding: 16px 18px;
  }

  .ad-title {
    font-size: 1.05rem;
  }

  .price-amount {
    font-size: 1.3rem;
  }
}

/* Mobile (≤767px) */
@media (max-width: 767px) {
  .modern-ad-card {
    min-height: auto;
    border-radius: 16px;
  }

  .modern-ad-card:hover {
    transform: translateY(-4px);
  }

  .ad-image-container {
    height: 200px;
  }

  .ad-content {
    padding: 14px 16px;
    gap: 6px;
  }

  .ad-category-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

  .ad-title {
    font-size: 0.95rem;
  }

  .ad-location {
    font-size: 0.75rem;
  }

  .ad-features-row {
    gap: 6px;
  }

  .publisher-badge-wrapper {
    width: 40px;
    height: 40px;
  }

  .publisher-avatar-mini {
    width: 32px !important;
    height: 32px !important;
  }

  .avatar-verified-badge {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    top: -2px;
    right: -2px;
  }

  .feature-tag {
    font-size: 0.65rem;
    padding: 5px 10px;
  }

  .ad-price-box {
    padding: 10px 12px;
  }

  .price-amount {
    font-size: 1.25rem;
  }

  .ad-footer {
    padding: 10px 16px;
  }

  .ad-time-posted {
    font-size: 0.7rem;
  }

  .ad-views-count {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .modern-ad-card {
    min-height: auto;
    border-radius: 14px;
  }

  .ad-image-container {
    height: 180px;
  }

  .ad-content {
    padding: 12px 14px;
  }

  .ad-title {
    font-size: 0.9rem;
  }

  .ad-features-row {
    gap: 5px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ad-features-row::-webkit-scrollbar {
    display: none;
  }

  .publisher-badge-wrapper {
    width: 38px;
    height: 38px;
  }

  .publisher-avatar-mini {
    width: 30px !important;
    height: 30px !important;
  }

  .avatar-verified-badge {
    width: 19px;
    height: 19px;
    font-size: 0.65rem;
    top: -2px;
    right: -2px;
  }

  .feature-tag {
    font-size: 0.6rem;
    padding: 4px 8px;
    flex-shrink: 0;
  }

  .ad-price-box {
    padding: 8px 10px;
  }

  .price-amount {
    font-size: 1.15rem;
  }

  .ad-footer {
    padding: 8px 14px;
  }

  .ad-footer-content {
    gap: 8px;
  }

  .ad-time-posted {
    font-size: 0.65rem;
  }

  .ad-views-count {
    font-size: 0.65rem;
    padding: 4px 8px;
  }
}

/* Extra Small (≤360px) */
@media (max-width: 360px) {
  .modern-ad-card {
    min-height: auto;
  }

  .ad-image-container {
    height: 160px;
  }

  .ad-content {
    padding: 10px 12px;
  }

  .ad-title {
    font-size: 0.85rem;
  }

  .price-amount {
    font-size: 1.05rem;
  }

  .publisher-badge-wrapper {
    width: 36px;
    height: 36px;
  }

  .publisher-avatar-mini {
    width: 28px !important;
    height: 28px !important;
  }

  .avatar-verified-badge {
    width: 18px;
    height: 18px;
    font-size: 0.6rem;
    border-width: 1.5px;
    top: -2px;
    right: -2px;
  }
}

/* ============================= */
/* CART & WISHLIST STYLES */
/* ============================= */

/* Badge count styling - matches chatbot badge */
.badge-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
  animation: pulse 2s infinite;
  transition: transform 0.2s ease;
}

.badge-count:hover {
  transform: scale(1.15);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.4);
  }
  50% {
    box-shadow: 0 2px 12px rgba(244, 67, 54, 0.6);
  }
}

/* Header cart and wishlist sections */
.header-cart-section,
.header-wishlist-section {
  display: flex;
  align-items: center;
}

.header-cart-section .header-action-btn,
.header-wishlist-section .header-action-btn {
  position: relative;
  transition: all 0.3s ease;
}

.header-cart-section .header-action-btn:hover,
.header-wishlist-section .header-action-btn:hover {
  transform: translateY(-2px);
}

.header-cart-section .header-action-btn i {
  font-size: 1.2rem;
}

.header-wishlist-section .header-action-btn i {
  font-size: 1.2rem;
  color: #ffffff;
  transition: all 0.3s ease;
}

.header-wishlist-section .header-action-btn:hover i {
  transform: scale(1.1);
  filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.4));
}

/* Wishlist button on ad cards - Enhanced */
.ad-wishlist-btn-container {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
}

.ad-wishlist-btn {
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #e0e0e0;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.ad-wishlist-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 71, 87, 0.2) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.5s ease;
}

.ad-wishlist-btn:hover::before {
  transform: scale(1);
}

.ad-wishlist-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.35);
  border-color: #ff4757;
}

.ad-wishlist-btn i {
  font-size: 1.15rem;
  color: #666;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.ad-wishlist-btn:hover i {
  color: #ff4757;
  animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.1);
  }
}

.ad-wishlist-btn.active {
  background: linear-gradient(135deg, #ff4757, #e84118);
  border-color: #ff4757;
  animation: addToWishlist 0.5s ease;
}

@keyframes addToWishlist {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.3) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.ad-wishlist-btn.active i {
  color: white;
  animation: none;
}

.ad-wishlist-btn.active::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s ease;
}

@keyframes ripple {
  to {
    transform: scale(2);
    opacity: 0;
  }
}

/* Dark mode adjustments */
[data-theme="dark"] .ad-wishlist-btn {
  background: rgba(30, 30, 30, 0.95);
  border-color: #444;
}

[data-theme="dark"] .ad-wishlist-btn:hover {
  border-color: #ff4757;
  background: rgba(40, 40, 40, 0.95);
}

[data-theme="dark"] .ad-wishlist-btn i {
  color: #ccc;
}

[data-theme="dark"] .ad-wishlist-btn.active {
  background: linear-gradient(135deg, #ff4757, #e84118);
}

/* Cart button styles - similar to wishlist */
.ad-cart-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #10b981;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.ad-cart-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.ad-cart-btn:hover::before {
  width: 150%;
  height: 150%;
}

.ad-cart-btn:hover {
  transform: translateY(-3px) scale(1.05);
  border-color: #059669;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.25);
}

.ad-cart-btn i {
  font-size: 1.1rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.ad-cart-btn:hover i {
  transform: scale(1.15);
  color: #059669;
}

/* Active state - item in cart */
.ad-cart-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  border-color: #047857;
  animation: cart-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

.ad-cart-btn.active i {
  color: white;
  animation: cart-icon-bounce 0.6s ease;
}

.ad-cart-btn.active::after {
  content: '✓';
  position: absolute;
  top: -2px;
  right: -2px;
  background: #047857;
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@keyframes cart-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
}

@keyframes cart-icon-bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Dark mode adjustments for cart button */
[data-theme="dark"] .ad-cart-btn {
  background: rgba(30, 30, 30, 0.95);
  border-color: #10b981;
}

[data-theme="dark"] .ad-cart-btn:hover {
  border-color: #059669;
  background: rgba(40, 40, 40, 0.95);
}

[data-theme="dark"] .ad-cart-btn i {
  color: #10b981;
}

[data-theme="dark"] .ad-cart-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Wishlist button in ad detail page */
.wishlist-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.wishlist-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.wishlist-btn:hover::before {
  width: 300px;
  height: 300px;
}

.wishlist-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4) !important;
}

.wishlist-btn.active {
  background: linear-gradient(135deg, #ff4757, #e84118) !important;
  color: white !important;
  border-color: #ff4757 !important;
}

.wishlist-btn.active i {
  color: white !important;
  animation: heartBeat 0.6s ease;
}

/* Add to cart button */
.add-to-cart-btn {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.add-to-cart-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:hover::after {
  width: 300px;
  height: 300px;
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(75, 49, 94, 0.4) !important;
}

.add-to-cart-btn:active {
  transform: translateY(0);
}

/* Loading state for buttons */
.add-to-cart-btn:disabled,
.wishlist-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Mobile header actions (beside hamburger) */
.mobile-header-actions {
  display: none; /* Hidden on desktop */
  align-items: center;
  gap: 8px;
  margin-right: 8px;
}

.mobile-header-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: none; /* Hidden by default on desktop */
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--white-color);
  transition: all 0.3s ease;
  text-decoration: none;
}

.mobile-header-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  color: var(--white-color);
}

.mobile-header-btn i {
  font-size: 1.1rem;
}

.mobile-header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f44336;
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.65rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(244, 67, 54, 0.5);
  animation: pulse 2s infinite;
  transition: transform 0.2s ease;
}

.mobile-header-badge:hover {
  transform: scale(1.15);
}

/* Dark mode adjustments for mobile header buttons */
[data-theme="dark"] .mobile-header-btn {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-header-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Dark mode badge adjustments - maintain visibility */
[data-theme="dark"] .badge-count,
[data-theme="dark"] .notification-badge,
[data-theme="dark"] .mobile-header-badge {
  background: #f44336;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.6);
}

/* Mobile navigation badge */
.mobile-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ff4757, #e84118);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
  animation: pulse 2s infinite;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .badge-count {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    top: -4px;
    right: -4px;
  }

  .ad-wishlist-btn {
    width: 35px;
    height: 35px;
  }

  .ad-wishlist-btn i {
    font-size: 1rem;
  }

  .header-cart-section .header-action-btn i,
  .header-wishlist-section .header-action-btn i {
    font-size: 1.1rem;
  }

  .mobile-badge {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }

  .mobile-header-btn {
    display: flex; /* Show on mobile */
    width: 36px;
    height: 36px;
  }

  .mobile-header-btn i {
    font-size: 1rem;
  }

  .mobile-header-badge {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    top: -3px;
    right: -3px;
  }

  .mobile-header-actions {
    display: flex; /* Show on mobile */
    gap: 6px;
    margin-right: 6px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .badge-count,
  .notification-badge {
    width: 16px;
    height: 16px;
    font-size: 0.6rem;
    top: -3px;
    right: -3px;
  }

  .mobile-header-badge {
    width: 14px;
    height: 14px;
    font-size: 0.55rem;
    top: -3px;
    right: -3px;
  }
}

[data-bs-theme="light"] .nav-link-theme {
    color: #000 !important;
}

/* Dark theme */
[data-bs-theme="dark"] .nav-link-theme {
    color: #fff !important;
}
/* ============================= */
/* SLIDE PANEL COMPONENT */
/* Modern Alternative to Modals */
/* ============================= */

.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide-panel.active {
    display: flex;
    opacity: 1;
}

.slide-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

[data-theme='dark'] .slide-panel-overlay {
    background: rgba(0, 0, 0, 0.8);
}

.slide-panel-content {
    position: absolute;
    top: 0;
    right: -100%;
    bottom: 0;
    width: 90%;
    max-width: 500px;
    background: #ffffff;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10051;
    overflow: hidden;
}

.slide-panel.active .slide-panel-content {
    right: 0;
}

[data-theme='dark'] .slide-panel-content {
    background: #1e1e2e;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.9);
}

.slide-panel-header {
    padding: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    flex-shrink: 0;
}

[data-theme='dark'] .slide-panel-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.slide-panel-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme='dark'] .slide-panel-title {
    color: #e9ecef;
}

.slide-panel-title i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.slide-panel-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.slide-panel-close:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: rotate(90deg);
}

[data-theme='dark'] .slide-panel-close {
    color: #adb5bd;
}

[data-theme='dark'] .slide-panel-close:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

.slide-panel-body {
    flex: 1;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

[data-theme='dark'] .slide-panel-body {
    color: #e9ecef;
}

[data-theme='dark'] .slide-panel-body .form-control,
[data-theme='dark'] .slide-panel-body .form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e9ecef;
}

[data-theme='dark'] .slide-panel-body .form-control:focus,
[data-theme='dark'] .slide-panel-body .form-select:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(108, 117, 125, 0.5);
    color: #e9ecef;
}

[data-theme='dark'] .slide-panel-body .form-label {
    color: #adb5bd;
}

[data-theme='dark'] .slide-panel-body .form-check-label {
    color: #ced4da;
}

.slide-panel-footer {
    padding: 1.5rem;
    border-top: 2px solid #e9ecef;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: #f8f9fa;
    flex-shrink: 0;
    flex-wrap: wrap;
}

[data-theme='dark'] .slide-panel-footer {
    background: rgba(255, 255, 255, 0.03);
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Slide Panel - Responsive Design */
@media (max-width: 768px) {
    .slide-panel-content {
        width: 100%;
        max-width: 100%;
    }

    .slide-panel-header {
        padding: 1rem;
    }

    .slide-panel-title {
        font-size: 1.1rem;
    }

    .slide-panel-body {
        padding: 1.5rem 1rem;
    }

    .slide-panel-footer {
        padding: 1rem;
    }

    .slide-panel-footer .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .slide-panel-header {
        padding: 0.875rem;
    }

    .slide-panel-title {
        font-size: 1rem;
    }

    .slide-panel-body {
        padding: 1rem 0.875rem;
    }

    .slide-panel-footer {
        padding: 0.875rem;
        gap: 0.5rem;
    }

    .slide-panel-close {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}

/* Slide Panel - Scrollbar Styling */
.slide-panel-body::-webkit-scrollbar {
    width: 8px;
}

.slide-panel-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

.slide-panel-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.slide-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .slide-panel-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme='dark'] .slide-panel-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme='dark'] .slide-panel-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   MOBILE RESPONSIVE FIXES
   ============================================ */

@media (max-width: 768px) {
    /* Container fixes */
    .container, .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Card fixes */
    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    /* Table fixes */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 14px;
    }

    /* Form fixes */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Modal fixes */
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-body {
        padding: 20px 15px;
    }

    /* Dashboard fixes */
    .dashboard-card,
    .stats-card {
        margin-bottom: 15px;
    }

    .dashboard-sidebar {
        margin-bottom: 20px;
    }

    /* Ad card fixes */
    .ad-card,
    .classified-card {
        margin-bottom: 15px;
    }

    .ad-card img,
    .classified-card img {
        width: 100%;
        height: auto;
    }

    /* Grid fixes */
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .row > * {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Breadcrumb fixes */
    .breadcrumb {
        font-size: 13px;
        padding: 8px 0;
    }

    /* Pagination fixes */
    .pagination {
        justify-content: center;
    }

    .page-link {
        padding: 6px 12px;
        font-size: 14px;
    }

    /* Filter section fixes */
    .filter-section,
    .search-filters {
        padding: 15px;
        margin-bottom: 15px;
    }

    /* Action buttons fixes */
    .action-buttons,
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    .action-buttons .btn,
    .btn-group .btn {
        width: 100%;
    }

    /* Header text fixes */
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    h4 {
        font-size: 16px;
    }

    /* List group fixes */
    .list-group-item {
        padding: 12px 15px;
    }

    /* Badge fixes */
    .badge {
        font-size: 12px;
        padding: 4px 8px;
    }

    /* Alert fixes */
    .alert {
        font-size: 14px;
        padding: 12px 15px;
    }

    /* Dropdown fixes */
    .dropdown-menu {
        font-size: 14px;
    }

    /* Image gallery fixes */
    .image-gallery,
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    /* Chat fixes */
    .chat-container {
        height: calc(100vh - 150px);
    }

    .chat-message {
        max-width: 85%;
    }

    /* Footer fixes */
    footer {
        padding: 20px 15px;
    }

    footer .col-md-3,
    footer .col-md-4 {
        margin-bottom: 20px;
    }

    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }

    /* Show mobile elements */
    .mobile-only {
        display: block !important;
    }

    /* Text overflow fixes */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Spacing utilities */
    .mb-mobile {
        margin-bottom: 15px;
    }

    .mt-mobile {
        margin-top: 15px;
    }

    /* Profile section fixes */
    .profile-header,
    .user-profile-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        margin-bottom: 15px;
    }

    /* Stats section fixes */
    .stats-row {
        flex-direction: column;
    }

    .stat-item {
        margin-bottom: 10px;
    }
}

/* Small mobile devices (iPhone SE, etc.) */
@media (max-width: 375px) {
    .container, .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .card-body {
        padding: 12px;
    }

    .modal-body {
        padding: 15px 10px;
    }
}

/* ============================= */
/* Z-INDEX HIERARCHY REFERENCE */
/* ============================= */
/*
 * CRITICAL: Follow this hierarchy to prevent layering issues
 *
 * Layer 1 - Base Content (z-index: 0-10)
 * - Default page content: 0-5
 * - Card overlays, badges: 5-10
 *
 * Layer 2 - Sticky Elements (z-index: 1020-1040)
 * - Categories nav: 1020
 * - Sticky headers: 1030-1035
 * - Navigation bars: 1035-1040
 *
 * Layer 3 - Dropdowns & Popovers (z-index: 8999-9100)
 * - Dropdown containers: 8999
 * - Navigation dropdowns: 9000
 * - Subcategories dropdown: 9100
 *
 * Layer 4 - Modals & Overlays (z-index: 9500-10000)
 * - Modal backdrops: 9998
 * - Modal content: 9999
 * - Nested modals: 10000+
 *
 * Layer 5 - Critical UI (z-index: 10050+)
 * - Notifications/toasts: 10050
 * - Slide panels: 10051
 * - Loading overlays: 99999
 *
 * DO NOT use z-index values that conflict with this hierarchy
 */

/* ============================= */
/* GLOBAL DROPDOWN FIX */
/* ============================= */
/* Ensure all Bootstrap dropdowns appear above everything */
.dropdown-menu {
    z-index: 9000 !important;
}

.dropdown.show {
    z-index: 8999 !important;
}

/* ============================= */
/* HOME TUBE SECTION */
/* ============================= */
.home-tube-section {
    background:
        radial-gradient(circle at 88% 12%, rgba(230, 57, 70, 0.12), transparent 28rem),
        linear-gradient(180deg, #ffffff 0%, #f6f7fb 100%);
    border-top: 1px solid rgba(75, 49, 94, 0.08);
    border-bottom: 1px solid rgba(75, 49, 94, 0.08);
    color: var(--text-primary);
    transition: background .3s ease, border-color .3s ease, color .3s ease;
}

.home-tube-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e63946;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(230, 57, 70, 0.36);
}

.home-tube-title {
    color: var(--text-primary);
    font-size: 1.55rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
}

.home-tube-subtitle {
    color: var(--text-muted) !important;
    margin: 0;
}

.home-tube-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(230, 57, 70, 0.1);
    border: 1px solid rgba(230, 57, 70, 0.28);
    color: #d62839;
    border-radius: 50px;
    padding: 0.4rem 1.1rem;
    font-size: 0.83rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.home-tube-link:hover {
    background: #e63946;
    border-color: #e63946;
    color: #ffffff;
    transform: translateY(-1px);
}

[data-theme='dark'] .home-tube-section,
[data-bs-theme='dark'] .home-tube-section {
    background:
        radial-gradient(circle at 88% 12%, rgba(230, 57, 70, 0.16), transparent 30rem),
        linear-gradient(180deg, #0d0d1a 0%, #1a1a2e 100%) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

[data-theme='dark'] .home-tube-title,
[data-bs-theme='dark'] .home-tube-title {
    color: #ffffff;
}

[data-theme='dark'] .home-tube-subtitle,
[data-bs-theme='dark'] .home-tube-subtitle {
    color: rgba(255, 255, 255, 0.72) !important;
}

[data-theme='dark'] .home-tube-link,
[data-bs-theme='dark'] .home-tube-link {
    background: rgba(230, 57, 70, 0.15);
    border-color: rgba(230, 57, 70, 0.4);
    color: #ff4d5e;
}

[data-theme='dark'] .home-tube-link:hover,
[data-bs-theme='dark'] .home-tube-link:hover {
    color: #ffffff;
}

/* ============================= */
/* INLINE SECTION HEADER (shared by all home sections) */
/* ============================= */
.section-inline-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
    margin-inline-end: 1rem !important;
}
.section-inline-icon.icon-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 16px rgba(75, 49, 94, 0.36);
}
.section-inline-icon.icon-secondary {
    background: var(--secondary-color);
    box-shadow: 0 4px 16px rgba(255, 96, 1, 0.36);
}

.section-inline-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
}
.section-inline-subtitle {
    color: var(--text-muted) !important;
    font-size: 0.88rem;
    margin: 0;
    font-weight: 400;
}

.section-view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 50px;
    padding: 0.4rem 1.1rem;
    font-size: 0.83rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.section-view-all-link.link-primary {
    background: rgba(75, 49, 94, 0.1);
    border: 1px solid rgba(75, 49, 94, 0.28);
    color: var(--primary-color);
}
.section-view-all-link.link-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-1px);
}
.section-view-all-link.link-secondary {
    background: rgba(255, 96, 1, 0.1);
    border: 1px solid rgba(255, 96, 1, 0.28);
    color: var(--secondary-color);
}
.section-view-all-link.link-secondary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* dark mode */
[data-theme='dark'] .section-inline-title,
[data-bs-theme='dark'] .section-inline-title { color: #ffffff; }
[data-theme='dark'] .section-inline-subtitle,
[data-bs-theme='dark'] .section-inline-subtitle { color: rgba(255,255,255,.65) !important; }
[data-theme='dark'] .section-view-all-link.link-primary,
[data-bs-theme='dark'] .section-view-all-link.link-primary {
    background: rgba(75, 49, 94, 0.2);
    border-color: rgba(75, 49, 94, 0.45);
    color: #c89de0;
}
[data-theme='dark'] .section-view-all-link.link-primary:hover,
[data-bs-theme='dark'] .section-view-all-link.link-primary:hover {
    color: #ffffff !important;
}
[data-theme='dark'] .section-view-all-link.link-secondary,
[data-bs-theme='dark'] .section-view-all-link.link-secondary {
    background: rgba(255, 96, 1, 0.15);
    border-color: rgba(255, 96, 1, 0.4);
    color: #ff8c42;
}
[data-theme='dark'] .section-view-all-link.link-secondary:hover,
[data-bs-theme='dark'] .section-view-all-link.link-secondary:hover {
    color: #ffffff !important;
}

/* INLINE SECTION HEADER — RESPONSIVE */
@media (max-width: 575.98px) {
    .section-inline-icon { width: 34px; height: 34px; }
    .section-inline-title { font-size: 1rem; }
    .section-inline-subtitle { font-size: 0.65rem; }
    .section-view-all-link { font-size: 0.75rem; padding: 0.3rem 0.75rem; gap: 0.3rem; }
    .section-inline-icon + div { min-width: 0; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
    .section-inline-icon { width: 40px; height: 40px; }
    .section-inline-title { font-size: 1.25rem; }
    .section-view-all-link { font-size: 0.8rem; padding: 0.38rem 1rem; }
}
@media (min-width: 992px) {
    .section-inline-icon { width: 52px; height: 52px; }
    .section-inline-title { font-size: 1.75rem; }
    .section-view-all-link { font-size: 0.88rem; padding: 0.45rem 1.25rem; }
}

/* HOME TUBE HEADER — RESPONSIVE */
@media (max-width: 575.98px) {
    .home-tube-icon {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }
    .home-tube-title {
        font-size: 1.05rem;
    }
    .home-tube-subtitle {
        font-size: 0.78rem;
    }
    .home-tube-link {
        font-size: 0.78rem;
        padding: 0.35rem 0.85rem;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .home-tube-icon {
        width: 40px;
        height: 40px;
    }
    .home-tube-title {
        font-size: 1.25rem;
    }
    .home-tube-link {
        font-size: 0.8rem;
        padding: 0.38rem 1rem;
    }
}

@media (min-width: 992px) {
    .home-tube-icon {
        width: 52px;
        height: 52px;
    }
    .home-tube-title {
        font-size: 1.75rem;
    }
    .home-tube-link {
        font-size: 0.88rem;
        padding: 0.45rem 1.25rem;
    }
}

/* Fix for dropdowns in navigation */
.nav .dropdown-menu,
.navbar .dropdown-menu,
.publisher-nav .dropdown-menu,
.admin-nav .dropdown-menu {
    z-index: 9000 !important;
    position: absolute !important;
}

/* Ensure parent containers don't clip dropdowns */
.nav,
.navbar,
.publisher-nav,
.admin-nav,
.publisher-nav-links,
.admin-nav-links {
    overflow: visible !important;
}

/* ============================= */
/* HOME SWIPER AD CARD - MOBILE RESPONSIVE */
/* ============================= */
@media (max-width: 767px) {
  .idrisiMartLatestSwiper .ad-image-container,
  .idrisiMartFeaturedSwiper .ad-image-container {
    height: 140px;
  }

  .idrisiMartLatestSwiper .ad-title,
  .idrisiMartFeaturedSwiper .ad-title {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
  }

  .idrisiMartLatestSwiper .ad-title a,
  .idrisiMartFeaturedSwiper .ad-title a {
    font-size: 0.85rem;
  }

  .idrisiMartLatestSwiper .ad-category-badge,
  .idrisiMartFeaturedSwiper .ad-category-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }

  .idrisiMartLatestSwiper .ad-category-badge i,
  .idrisiMartFeaturedSwiper .ad-category-badge i {
    font-size: 0.55rem;
  }

  /* Quote / price-on-request box — stack vertically in narrow swiper cards */
  .idrisiMartLatestSwiper .ad-quote-box,
  .idrisiMartFeaturedSwiper .ad-quote-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 10px 8px;
  }

  .idrisiMartLatestSwiper .ad-quote-box::after,
  .idrisiMartFeaturedSwiper .ad-quote-box::after {
    display: none;
  }

  .idrisiMartLatestSwiper .quote-icon,
  .idrisiMartFeaturedSwiper .quote-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    font-size: 0.85rem;
  }

  .idrisiMartLatestSwiper .quote-content,
  .idrisiMartFeaturedSwiper .quote-content {
    align-items: center;
    gap: 5px;
  }

  .idrisiMartLatestSwiper .quote-text,
  .idrisiMartFeaturedSwiper .quote-text {
    font-size: 0.72rem;
    text-align: center;
  }

  .idrisiMartLatestSwiper .btn-get-quote,
  .idrisiMartFeaturedSwiper .btn-get-quote {
    font-size: 0.65rem;
    padding: 4px 10px;
    gap: 4px;
    align-self: center;
  }

  .idrisiMartLatestSwiper .btn-get-quote i,
  .idrisiMartFeaturedSwiper .btn-get-quote i {
    font-size: 0.6rem;
  }

  /* Regular price box */
  .idrisiMartLatestSwiper .price-amount,
  .idrisiMartFeaturedSwiper .price-amount {
    font-size: 0.9rem;
  }

  .idrisiMartLatestSwiper .price-currency,
  .idrisiMartFeaturedSwiper .price-currency {
    font-size: 0.75rem;
  }

  /* Location & meta */
  .idrisiMartLatestSwiper .ad-location,
  .idrisiMartFeaturedSwiper .ad-location {
    font-size: 0.7rem;
  }

  .idrisiMartLatestSwiper .ad-location i,
  .idrisiMartFeaturedSwiper .ad-location i {
    font-size: 0.65rem;
  }

  .idrisiMartLatestSwiper .ad-meta-inline,
  .idrisiMartFeaturedSwiper .ad-meta-inline {
    font-size: 0.65rem;
  }

  .idrisiMartLatestSwiper .meta-item i,
  .idrisiMartFeaturedSwiper .meta-item i {
    font-size: 0.6rem;
  }

  /* Feature tags */
  .idrisiMartLatestSwiper .feature-tag,
  .idrisiMartFeaturedSwiper .feature-tag {
    font-size: 0.6rem;
  }

  .idrisiMartLatestSwiper .feature-tag i,
  .idrisiMartFeaturedSwiper .feature-tag i {
    font-size: 0.65rem;
  }

  /* Quick action buttons */
  .idrisiMartLatestSwiper .quick-action-btn,
  .idrisiMartFeaturedSwiper .quick-action-btn {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  /* Publisher avatar */
  .idrisiMartLatestSwiper .publisher-avatar-mini,
  .idrisiMartFeaturedSwiper .publisher-avatar-mini {
    width: 26px;
    height: 26px;
  }
}

/* ============================= */
/* HOME PAGE — SECTION SPACING   */
/* ============================= */
.featured-categories-section,
.swiper-section,
.latest-ads-section,
.stats-section,
.home-tube-section,
.latest-blogs-section {
    padding-bottom: 2.5rem;
}

.features-section {
    padding-bottom: 3rem;
}

@media (max-width: 575.98px) {
    .featured-categories-section,
    .swiper-section,
    .latest-ads-section,
    .stats-section,
    .home-tube-section,
    .latest-blogs-section {
        padding-bottom: 1.75rem;
    }

    .features-section {
        padding-bottom: 2rem;
    }
}

/* ============================= */
/* END OF CONSOLIDATED STYLESHEET */
/* Version: 3.4 - Dropdown Fix Edition */
