/*======================================
  United Surgical Industries - Modern CSS
  Based on existing Industroz color palette
======================================*/

/* CSS Custom Properties */
:root {
    --primary: #1a5c9e;
    --primary-dark: #0d3b6e;
    --primary-light: #2d7bcb;
    --secondary: #2d3436;
    --accent: #E62229;
    --accent-light: #f0555b;
    --light: #f8f9fa;
    --dark: #1e272e;
    --gray: #636e72;
    --gray-light: #dfe6e9;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--secondary);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin-top: 10px;
}

.text-center .section-title::after {
    margin: 10px auto 0;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    width: 100%;
}

.navbar .container {
    overflow: visible;
    width: 100%;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
}

.navbar-brand img {
    max-height: 45px;
    margin-right: 10px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    padding: 25px 16px;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

/* Top Bar */
.top-bar {
    background: #E62229;
    color: #fff;
    font-size: 0.8rem;
    padding: calc(8px + env(safe-area-inset-top)) 0 8px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #fff;
}

.top-bar a:hover {
    color: rgba(255,255,255,0.8);
}

.top-bar-info {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
}

.top-bar-info i {
    margin-right: 6px;
    color: rgba(255,255,255,0.7);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-accent {
    background: var(--accent);
    color: var(--white);
}

.btn-accent:hover {
    background: #c41a20;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.slider-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(13,59,110,0.85) 0%, rgba(13,59,110,0.4) 40%, rgba(13,59,110,0.1) 60%, transparent 80%);
    z-index: 1;
    pointer-events: none;
}

@media (max-width: 768px) {
    .slide-overlay {
        background: rgba(30, 30, 30, 0.6);
    }
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    z-index: 2;
}

.slide-text {
    max-width: 650px;
    animation: slideUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.slider-slide.active .slide-text {
    animation: slideUp 0.8s ease 0.3s forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-badge {
    display: inline-block;
    background: rgba(225, 112, 85, 0.2);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(225, 112, 85, 0.3);
    margin-bottom: 20px;
}

.slide-text h1 {
    font-size: 3.2rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.15;
    font-weight: 700;
}

.slide-text p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 30px;
    line-height: 1.7;
}

.slide-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--dark);
    border-color: var(--white);
    transform: translateY(-2px);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255,255,255,0.7);
}

/* Slider Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.slider-arrow:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

/* Old hero section kept for reference */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-height: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* Product Card */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 100%;
    box-sizing: border-box;
}

.product-grid > * {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.featured-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 0;
}
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-card-image {
    height: 220px;
    overflow: hidden;
    background: var(--light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card-image-link {
    display: block;
    text-decoration: none;
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-excerpt {
    display: none;
}

.product-card-body {
    padding: 20px;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-excerpt {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .btn {
    width: 100%;
}

.category-name-box {
    background-color: var(--primary);
    padding: 15px;
    text-align: center;
    transition: var(--transition);
}

.category-name-box a {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

.product-card:hover .category-name-box {
    background-color: var(--primary-dark);
}
/* Product grid for products page - 2 columns */
.products-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.category-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary);
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--primary);
    color: var(--white);
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.category-count {
    font-size: 0.85rem;
    color: var(--gray);
}

/* Section Styling */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--light);
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}

.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

/* Features / Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    align-items: center;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-heading);
    word-wrap: break-word;
    text-align: center;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray);
    margin-top: 5px;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.3;
}

.stats-section {
    background: var(--accent);
    padding: 20px 0;
    overflow: hidden;
    width: 100%;
}

.stats-section .container {
    max-width: 100%;
    padding: 0 20px;
    overflow: hidden;
}

.stats-section .stat-number {
    color: #ffc107; /* Bright Orange/Yellow for numbers */
}

.stats-section .stat-label {
    color: rgba(255, 255, 255, 0.9); /* Off-white for labels */
    font-size: 1.1rem;
    font-weight: 700;
}

.stats-section .stat-item {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}
.stats-section .stat-item:last-child { border-right: none; }

/* Footer */
.footer {
    background: var(--dark);
    color: #b2bec3;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

.footer h4 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: #b2bec3;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-contact i {
    color: var(--accent);
    margin-top: 4px;
    min-width: 18px;
}

.footer-bottom {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: var(--white) !important;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
    padding-left: 0 !important;
}

/* Product Detail Page */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 0;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.product-gallery-main {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--white);
    margin-bottom: 15px;
    border: 1px solid var(--gray-light);
    box-shadow: var(--shadow);
    aspect-ratio: 1/1; /* Make the box square */
    padding: 20px; /* Add padding inside the box */
    display: flex; /* Use flexbox to center the image */
    align-items: center;
    justify-content: center;
}

.product-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto; /* Let width adapt to content */
    height: auto; /* Let height adapt to content */
}

.product-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-gallery-thumbs img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.product-gallery-thumbs img:hover,
.product-gallery-thumbs img.active {
    border-color: var(--primary);
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.product-meta {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.product-meta-item {
    font-size: 0.9rem;
    color: var(--gray);
}

.product-meta-item strong {
    color: var(--dark);
    display: block;
}

.product-description {
    line-height: 1.8;
    margin-bottom: 30px;
}

.product-description h3 {
    font-size: 1.2rem;
    margin: 25px 0 10px;
}

.product-description ul {
    list-style: none;
    margin-bottom: 15px;
}

.product-description ul li {
    padding: 6px 0 6px 25px;
    position: relative;
}

.product-description ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free', 'FontAwesome', sans-serif;
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 900;
}

/* Cart / Quote Page */
.cart-page {
    padding: 60px 0;
}

.cart-table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    min-width: 500px;
}

.cart-table th {
    background: var(--light);
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-table td {
    padding: 15px;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
}

.cart-table .product-col {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-table .product-col img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.qty-input {
    width: 70px;
    padding: 8px;
    border: 1px solid var(--gray-light);
    border-radius: 4px;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 92, 158, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.blog-card-image {
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.08);
}

.blog-card-body {
    padding: 25px;
}

.blog-date {
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 15px;
}

/* Admin */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
}

.admin-login-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 400px;
    max-width: 90%;
    box-shadow: var(--shadow-lg);
}

.admin-login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    list-style: none;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-light);
    color: var(--secondary);
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .active span {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Mobile Navigation Icons */
.nav-mobile-wrapper {
    display: none;
}
.nav-cart-icon-mobile {
    position: relative;
    color: var(--dark);
    font-size: 1.2rem;
    padding: 10px;
}
.cart-count-badge {
    position: absolute;
    top: 0px;
    right: -2px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin: 0 auto 2rem;
    }
    
    .product-detail {
        grid-template-columns: 1fr;
    }
    
    .product-gallery {
        position: static;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-grid {
        gap: 20px;
    }

    .stat-item {
        padding: 25px 15px;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mobile Navigation */
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        height: calc(100dvh - 70px);
        background: var(--white);
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        z-index: 9999;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .mobile-toggle {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 10px;
        color: var(--dark);
    }

    .nav-mobile-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .desktop-cart-link {
        display: none;
    }

    .hero-slider {
        height: 500px;
    }
    
    .slide-text h1 {
        font-size: 2.4rem;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .quote-page-layout {
        grid-template-columns: 1fr;
    }
    .quote-summary-box {
        position: static;
        margin-top: 40px;
    }

    .product-page-layout {
        grid-template-columns: 1fr;
    }
    .product-page-layout aside {
        display: none;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .container {
        padding: 0 10px;
        max-width: 100%;
    }

    /* Keep the contact strip readable and inside the viewport on phones. */
    .top-bar {
        padding: calc(7px + env(safe-area-inset-top)) 0 7px;
        font-size: 0.72rem;
    }

    .top-bar .container {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }

    .top-bar-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 12px;
        padding: 0;
    }

    .top-bar-right {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .top-bar-right span {
        margin-right: 10px !important;
    }
    
    .hero-slider {
        height: 450px;
    }
    
    .hero-content h1 { font-size: 2rem; }
    
    .slide-text h1 {
        font-size: 1.8rem;
    }
    
    .slide-text p {
        font-size: 0.95rem;
    }
    
    .slide-badge {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    
    .slider-arrow {
        display: none;
    }
    
    .slider-dots {
        bottom: 15px;
    }
    
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .featured-product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: 1fr !important;
    }
    
    .product-page-layout aside {
        display: none;
    }
    
    .product-page-layout {
        gap: 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        gap: 15px;
    }

    .stat-item {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 2rem !important;
    }

    .stat-label {
        font-size: 0.9rem !important;
    }

    .quote-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: 10px;
    }

    .stat-item {
        padding: 15px 10px;
    }

    .stats-section .stat-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .stats-section .stat-item:last-child {
        border-bottom: none !important;
    }

    .hero-slider {
        height: 400px;
    }
    
    .slide-text h1 {
        font-size: 1.5rem;
    }
    
    .slide-text p {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
    
    .slide-buttons .btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Products Dropdown Menu */
.nav-links li.dropdown {
    position: relative;
}

/* Mobile-only and desktop-only helpers */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 992px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-sub {
        display: block;
    }
    
    .desktop-sub {
        display: none;
    }
    
    .mobile-panel {
        display: block;
    }
    
    .desktop-panel {
        display: none;
    }
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 600px;
    max-height: 500px;
    background: var(--white);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    padding: 0;
}

.nav-links li.dropdown:hover .dropdown-menu,
.nav-links li.dropdown .dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-inner-multilevel {
    display: flex;
    min-height: 300px;
}

.dropdown-col-main {
    width: 250px;
    padding: 20px;
    border-right: 1px solid var(--gray-light);
    overflow-y: auto;
}

.dropdown-col-sub {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.dropdown-parent-item {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.dropdown-parent-item a {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 0 !important;
    font-weight: 500 !important;
    font-size: 0.85rem !important;
    color: var(--secondary) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.dropdown-parent-item a:hover {
    color: var(--primary) !important;
}

.dropdown-parent-item.active {
    background: var(--light);
}

.dropdown-parent {
    display: block !important;
    padding: 8px 0 !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    color: var(--primary) !important;
    text-transform: none !important;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 6px;
    letter-spacing: 0 !important;
    display: none; /* Hide old parent style */
}

.dropdown-sub {
    padding: 0;
}

.dropdown-child {
    display: block !important;
    padding: 6px 0 !important;
    font-size: 0.82rem !important;
    font-weight: 400 !important;
    color: var(--gray) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-bottom: none !important;
}

.dropdown-child:hover {
    color: var(--primary) !important;
}

/* Mobile toggle button - hidden by default on desktop */
.mobile-toggle {
    display: none;
}

/* Utility classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.p-20 { padding: 20px; }
.bg-light { background: var(--light); }

/* Page header */
.page-header {
    position: relative;
    background: linear-gradient(135deg, #1a5c9e, #0d3b6e);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.unisurg.com/wp-content/uploads/2022/07/slide2-1.jpg') center center / cover no-repeat;
    opacity: 0.25;
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--white);
    font-size: 2.5rem;
}

.page-header p {
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 10px auto 0;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 8px;
    list-style: none;
    justify-content: center;
    margin-top: 10px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: rgba(255,255,255,0.5);
}

/* Subscribe form */
.subscribe-form {
    display: flex;
    gap: 0;
    max-width: 500px;
}

.subscribe-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius) 0 0 var(--radius);
    font-family: var(--font-primary);
}

.subscribe-form button {
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* Features section */
.feature-box {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-box:hover {
    background: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.feature-box:hover .feature-icon,
.feature-box:hover h3,
.feature-box:hover p {
    color: var(--white);
    background-color: transparent;
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: rgba(26, 92, 158, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent);
}

.feature-box h3 {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Contact Section */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

/* Admin Dashboard */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--dark);
    color: var(--white);
    padding: 20px 0;
}

.admin-sidebar h3 {
    color: var(--white);
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.admin-main {
    flex: 1;
    padding: 30px;
    background: var(--light);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
}
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.admin-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.admin-card h3 {
    font-size: 1.8rem;
    color: var(--primary);
}

.admin-card p {
    color: var(--gray);
    margin: 0;
    font-size: 0.9rem;
}

.admin-table-container {
    box-shadow: var(--shadow);
}

.admin-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table th {
    background: var(--light);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
}

.admin-table .actions-col {
    width: 120px;
    text-align: right;
}

.admin-table .actions-cell {
    display: inline-flex;
    gap: 5px;
    justify-content: flex-end;
    width: 100%;
}

.btn.btn-danger {
    background-color: #dc3545;
    color: white;
}

/* Main Category Grid (Homepage) */
.main-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px 0;
}

.main-category-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    text-decoration: none;
    color: inherit;
}

.main-category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.main-category-image {
    height: 220px;
    overflow: hidden;
    position: relative;
    background: var(--light);
}

.main-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.main-category-card:hover .main-category-image img {
    transform: scale(1.1);
}

.main-category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.main-category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
    font-size: 3.5rem;
}

.main-category-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 25px;
    z-index: 2;
}

.main-category-info h3 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.main-category-count {
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.main-category-count i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.main-category-card:hover .main-category-count i {
    transform: translateX(4px);
}

/* Make first card (Medical Beds) span 2 columns */
.main-category-card:first-child {
    grid-column: span 2;
}

.main-category-card:first-child .main-category-image {
    height: 260px;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .main-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-category-card:first-child {
        grid-column: span 2;
    }
}

/* Events Page */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.event-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-card-logo {
    height: 200px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.event-card-logo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.event-card-body {
    padding: 25px;
    background: var(--light);
}

.event-date {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-weight: bold;
}

.event-card-body h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.event-details-text p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.event-details-text .venue {
    font-weight: bold;
    color: var(--accent);
}

.stall-info {
    font-weight: bold;
}



@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .contact-section {
        grid-template-columns: 1fr;
    }
    .main-category-grid {
        grid-template-columns: 1fr;
    }
    .main-category-card:first-child {
        grid-column: span 1;
    }
    .main-category-card:first-child .main-category-image {
        height: 220px;
    }
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.8s ease-out;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Home page Who We Are / Events Grid */
.home-about-events-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 992px) {
    .home-about-events-grid {
        grid-template-columns: 1fr;
        gap: 80px;
    }
}

/* Quote Page */
.quote-page-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: start;
}

@media (max-width: 992px) {
    .quote-page-layout {
        grid-template-columns: 1fr;
    }
}
.quote-form-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}
.quote-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .quote-form-grid {
        grid-template-columns: 1fr;
    }
}
.quote-summary-box {
    background: var(--light);
    border-radius: var(--radius);
    padding: 30px;
    position: sticky;
    top: 100px;
}

@media (max-width: 992px) {
    .quote-summary-box {
        position: static;
        margin-top: 40px;
    }
}
.quote-product-list {
    list-style: none;
}
.quote-product-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-light);
}
.quote-product-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.quote-product-title {
    font-weight: 600;
    font-size: 0.9rem;
}
.quote-product-qty {
    font-size: 0.8rem;
    color: var(--gray);
}
.products-main-content {
    align-self: start;
}

/* Product Page Layout */
.product-page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
    max-width: 100%;
    overflow: hidden;
}

.product-page-layout > * {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 992px) {
    .product-page-layout {
        grid-template-columns: 1fr;
    }
    .product-page-layout aside {
        display: none;
    }
}

@media (max-width: 768px) {
    .product-page-layout {
        gap: 0;
    }
}

/* "Why Choose Us" section customization */
.section-dark .feature-box {
    background-color: var(--accent);
    border-radius: var(--radius-lg);
    padding: 30px 20px;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.section-dark .feature-box:hover {
    background: var(--accent-light);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.section-dark .feature-box .feature-icon {
    color: var(--white);
    background-color: rgba(255, 255, 255, 0.15);
}

.section-dark .feature-box h4 {
    color: var(--white);
}

.section-dark .feature-box p {
    color: rgba(255, 255, 255, 0.85);
}

/* Contact Tabs */
.contact-tabs {
    margin-top: 60px;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tabs-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 120px;
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}


/* ===========================
   MOBILE NAVIGATION - FULL FIX
   =========================== */
@media (max-width: 992px) {

    /* ----- Dropdown container ----- */
    .nav-links li.dropdown {
        position: static;
    }

    /* Hide desktop dropdown by default */
    .nav-links li.dropdown .dropdown-menu {
        display: none !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        min-width: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        max-height: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #f0f4f8 !important;
        padding: 0 !important;
        z-index: auto !important;
        overflow: hidden !important;
    }

    /* Show when parent has .open class */
    .nav-links li.dropdown.open .dropdown-menu {
        display: block !important;
    }

    /* Disable desktop hover trigger on mobile */
    .nav-links li.dropdown:hover .dropdown-menu {
        display: none !important;
    }
    .nav-links li.dropdown.open:hover .dropdown-menu {
        display: block !important;
    }

    /* ----- Inner multilevel layout ----- */
    .dropdown-inner-multilevel {
        flex-direction: column !important;
        min-height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .dropdown-col-main {
        width: 100% !important;
        max-width: 100% !important;
        border-right: none !important;
        border-bottom: none !important;
        padding: 0 !important;
        overflow-y: visible !important;
    }

    .dropdown-col-sub {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        overflow-y: visible !important;
    }

    /* Hide desktop sub-column on mobile */
    .dropdown-col-sub.desktop-only {
        display: none !important;
    }

    /* ----- Parent category items ----- */
    .dropdown-parent-item {
        padding: 0 !important;
        border-radius: 0 !important;
        position: relative;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .dropdown-parent-item > a {
        display: flex !important;
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
        border-bottom: 1px solid var(--gray-light);
        justify-content: space-between;
        align-items: center;
        background: #fff !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .dropdown-parent-item > a:hover {
        background: #f8f9fa !important;
    }

    /* ----- Sub-category panels: hidden by default on mobile ----- */
    .dropdown-col-sub.desktop-panel {
        display: none !important;
    }

    .sub-category-panel.mobile-panel {
        display: none !important;
        position: static !important;
        background: #f8f9fa !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Show sub-categories inline with parent on mobile when expanded */
    .dropdown-parent-item.expanded .sub-category-panel.mobile-panel {
        display: block !important;
    }

    .dropdown-child {
        display: block !important;
        padding: 10px 20px 10px 40px !important;
        font-size: 0.85rem !important;
        color: var(--gray) !important;
        border-bottom: 1px solid rgba(0,0,0,0.05) !important;
        background: #f8f9fa !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .dropdown-child:hover {
        background: #e9ecef !important;
        color: var(--primary) !important;
    }

    /* ----- Toggle arrow icon rotation ----- */
    .dropdown-toggle .fa-chevron-down {
        transition: transform 0.3s ease;
    }
    .nav-links li.dropdown.open .dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }

    /* ----- Parent item chevron rotation on mobile ----- */
    .dropdown-parent-item .fa-chevron-right {
        transition: transform 0.3s ease;
    }
    .dropdown-parent-item.expanded .fa-chevron-right {
        transform: rotate(90deg);
    }

    /* ----- Scrollable nav on mobile ----- */
    .nav-links {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    /* ----- Improve mobile nav links spacing ----- */
    .nav-links > li {
        border-bottom: 1px solid var(--gray-light);
        width: 100%;
        max-width: 100%;
    }

    /* Hide desktop hover underline on mobile */
    .nav-links a::after {
        display: none !important;
    }

    .nav-links > li > a {
        padding: 15px 20px !important;
        display: block;
        width: 100%;
        max-width: 100%;
    }

    .nav-links > li:last-child {
        border-bottom: none;
    }
}
