/* Medzone Clinical Premium Design Stylesheet */

:root {
    /* Color Palette */
    --primary-h: 224;
    --primary-s: 85%;
    --primary-l: 45%; /* #1d4ed8 - Premium Clinical Royal Blue */
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 95%);
    --primary-medium: hsl(var(--primary-h), var(--primary-s), 75%);
    --primary-dark: hsl(var(--primary-h), var(--primary-s), 25%);

    --accent: #10b981; /* Success / Emerald green for WhatsApp & Checkout */
    --accent-hover: #059669;
    --danger: #ef4444; /* Cancel / Delete */
    --danger-hover: #dc2626;

    --bg-dark: #0f172a; /* Slate 900 - Premium Dark backgrounds */
    --bg-light: #f8fafc; /* Slate 50 - Store clean background */
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --border: #e2e8f0;
    
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --text-white: #ffffff;

    /* Shadows & Radii */
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ar);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
    outline: none;
}

/* Loading Bar */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 100%;
    z-index: 9999;
    width: 0;
    transition: width 0.4s ease;
}
.loading-bar.active {
    width: 100%;
    animation: loadingGlow 1.5s infinite linear;
}

@keyframes loadingGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* App Header Styling */
.app-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

/* Categories Navigation Sub-Header Strip */
.categories-nav-strip {
    background-color: var(--primary); /* Solid teal medical color matching the Medzone brand */
    width: 100%;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.categories-nav-strip::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}
.category-nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0 1.5rem;
    height: 100%;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
    outline: none;
}
.category-nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}
.category-nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}


.header-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--bg-dark);
}
.logo-icon {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: var(--text-white);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3);
}
.logo-text span {
    color: var(--primary);
}

/* Global Search Box */
.search-wrapper {
    flex: 1;
    max-width: 550px;
}
.search-box {
    position: relative;
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 48px;
    transition: var(--transition);
}
.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    background-color: var(--surface);
}
.search-icon {
    color: var(--text-muted);
}
.search-box input {
    border: none;
    background: none;
    width: 100%;
    height: 100%;
    color: var(--text-main);
    font-weight: 500;
}
.search-clear-btn {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.search-clear-btn:hover {
    background-color: var(--surface-hover);
    color: var(--text-main);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Navigation Links */
.main-nav {
    display: flex;
    gap: 1.5rem;
}
.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    border: 1px solid var(--border);
    background-color: var(--surface);
    color: var(--text-main);
    padding: 0.7rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}
.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-2px);
}
.action-btn.cart-trigger {
    width: 48px;
    height: 48px;
}
.action-btn i {
    font-size: 1.25rem;
}
.action-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger);
    color: var(--text-white);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    border: 2px solid var(--surface);
}

.login-trigger {
    padding: 0.7rem 1.2rem;
}

/* User Account Badge */
.user-menu-wrapper {
    position: relative;
}
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1rem 0.4rem 0.5rem;
    border-radius: var(--radius-md);
    background-color: var(--surface-hover);
    border: 1px solid var(--border);
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}
.user-profile-badge:hover {
    border-color: var(--primary);
    background-color: var(--primary-light);
}
.user-profile-badge .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.user-profile-badge .user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}
.user-profile-badge .user-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-profile-badge .user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}
.dropdown-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 0.5rem;
    transition: var(--transition);
}
.user-profile-badge:hover .dropdown-arrow {
    color: var(--primary);
}

/* Profile Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 250px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1010;
}
.profile-dropdown.active {
    display: flex;
}

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

.dropdown-header {
    padding: 1rem;
    background-color: var(--surface-hover);
}
.dropdown-header h4 {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
}
.dropdown-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.dropdown-divider {
    height: 1px;
    background-color: var(--border);
}
.dropdown-item {
    padding: 0.8rem 1.2rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}
.dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary);
}
.dropdown-item i {
    width: 20px;
    text-align: center;
}
.dropdown-item.logout-btn {
    color: var(--danger);
}
.dropdown-item.logout-btn:hover {
    background-color: #fee2e2;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    border: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Main Content Views Layout */
.main-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 350px);
}

.app-view {
    display: none;
}
.app-view.active-view {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Common Section Titles */
.section-title {
    text-align: center;
    margin: 3.5rem 0 2rem 0;
}
.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--bg-dark);
}
.section-title p {
    color: var(--text-muted);
    font-weight: 600;
}

/* Button UI Components */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: var(--transition);
    border: 2px solid transparent;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0ea5e9);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
    transform: translateY(-2px);
}
.btn-outline {
    background-color: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}
.btn-success {
    background-color: var(--accent);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.btn-success:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}
.btn-danger {
    background-color: var(--danger);
    color: var(--text-white);
}
.btn-danger:hover {
    background-color: var(--danger-hover);
}
.btn-block {
    display: flex;
    width: 100%;
}
.btn-lg {
    padding: 1rem 2.2rem;
    font-size: 1.1rem;
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* View: Home -> Grid Hero Section (Harmonious Balanced Layout) */
.hero-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 0.75fr);
    gap: 1.25rem;
    max-width: 1200px;
    margin: 0 auto 2.5rem auto;
    align-items: stretch;
}

/* Left: Slider Advertising Banner */
.hero-slider-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 350px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    background-color: var(--surface);
}
.hero-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: var(--surface);
    z-index: 1;
}
.hero-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    width: 100%;
    height: 100%;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    align-items: center;
    padding: 2rem 2.5rem;
    color: #ffffff;
    gap: 1.5rem;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
    box-sizing: border-box;
}
.hero-slide.active-slide {
    display: grid;
    opacity: 1;
}
.slide-content {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    align-items: flex-start;
    z-index: 2;
    text-align: right;
    overflow: hidden;
}
.slide-badge {
    background-color: var(--accent);
    color: var(--text-main);
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.78rem;
    box-shadow: var(--shadow-sm);
}
.slide-content h2 {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.3;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.slide-content p {
    font-size: 0.88rem;
    line-height: 1.5;
    opacity: 0.92;
    font-weight: 500;
    margin: 0;
    max-width: 480px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.slide-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    flex-shrink: 0;
}
.slide-image img {
    width: 200px;
    height: 200px;
    max-width: 100%;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.12));
    animation: floatAnim 6s ease-in-out infinite;
}

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

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 20;
    font-size: 1.1rem;
}
.slider-arrow:hover {
    background-color: #ffffff;
    color: var(--text-main);
    box-shadow: var(--shadow-md);
}
.slider-arrow.prev {
    right: 20px;
}
.slider-arrow.next {
    left: 20px;
}
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.indicator.active {
    background-color: #ffffff;
    width: 26px;
    border-radius: 5px;
}
.btn-white {
    background-color: #ffffff;
    color: var(--primary);
    font-weight: 700;
    border: none;
    padding: 0.75rem 1.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-sm);
}
.btn-white:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Right: Contact Sidebar (Harmonized) */
.hero-contact-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.contact-header {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.contact-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.contact-info .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 800;
}
.contact-info .value {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 700;
}


/* Category Ribbon (Horizontal Strip) */
.category-ribbon {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem;
    margin: 1.5rem 0;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}
@media (min-width: 769px) {
    .category-ribbon {
        justify-content: center;
    }
}
.category-ribbon::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari/Opera */
}
.ribbon-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1.4rem;
    border: 1px solid var(--border);
    background-color: var(--surface);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}
.ribbon-btn i {
    font-size: 1rem;
    color: var(--primary);
    transition: var(--transition);
}
.ribbon-btn:hover {
    border-color: var(--primary-medium);
    background-color: var(--surface-hover);
    transform: translateY(-2px);
}
.ribbon-btn.active {
    background-color: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}
.ribbon-btn.active i {
    color: #ffffff;
}

/* Products Catalogs Common layout */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* Home Page Grouped Categories & Horizontal Product Rows */
.home-sections-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2.5rem;
    width: 100%;
}
.home-category-section {
    width: 100%;
}
.section-title-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}
.section-title-horizontal h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
}
.section-title-horizontal .btn-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}
.section-title-horizontal .btn-link:hover {
    color: var(--primary-dark);
    transform: translateX(-4px);
}
.category-products-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.2rem 0.25rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-medium) transparent;
}
.category-products-scroll::-webkit-scrollbar {
    height: 6px;
}
.category-products-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.category-products-scroll::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 10px;
}
.category-products-scroll:hover::-webkit-scrollbar-thumb {
    background-color: var(--primary-medium);
}
.category-products-scroll .product-card {
    min-width: 285px;
    max-width: 285px;
    flex-shrink: 0;
}

/* Product Card Styling */
.product-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-medium);
}

.product-image-container {
    width: 100%;
    height: 200px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-image-container img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
    transition: var(--transition);
}
.product-card:hover .product-image-container img {
    transform: scale(1.08);
}
.product-card .sku-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-en);
    z-index: 2;
    box-shadow: var(--shadow-sm);
}
.product-card .category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.product-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.6rem;
}
.product-card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}
.product-card-body h3:hover {
    color: var(--primary);
}
.product-card-body .desc-snippet {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: auto;
}
.product-price-wrapper .price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
}
.product-price-wrapper .currency {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.product-card-actions {
    padding: 0 1.25rem 1.25rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
}
.view-details-icon-btn {
    border: 1px solid var(--border);
    background-color: var(--surface-hover);
    color: var(--text-muted);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.view-details-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}

.view-all-wrapper {
    text-align: center;
    margin-top: 3rem;
}

/* View: Products (Page Catalog with Sidebar Filter) */
.products-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.catalog-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.2rem 1.8rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}
.catalog-controls-bar .control-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.catalog-controls-bar label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main);
}
.catalog-controls-bar select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-main);
    background-color: var(--surface);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}
.catalog-controls-bar select:focus {
    border-color: var(--primary);
}
.price-slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
}
.price-slider-container input[type="range"] {
    flex-grow: 1;
    accent-color: var(--primary);
    cursor: pointer;
}
#price-range-val {
    font-weight: 700;
    color: var(--primary);
    min-width: 65px;
    display: inline-block;
}

.products-display {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.display-header {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}
.search-results-info {
    font-weight: 700;
    color: var(--text-main);
}
.search-results-info span {
    color: var(--primary);
}
.sort-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.sort-selector select {
    border: 1px solid var(--border);
    background-color: var(--surface);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
}

.active-filters-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.badge-item {
    background-color: var(--surface);
    border: 1px solid var(--primary-medium);
    color: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}
.badge-item:hover {
    background-color: #fee2e2;
    border-color: var(--danger);
    color: var(--danger);
}

.no-products-state {
    background-color: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}
.no-products-state i {
    font-size: 4rem;
    color: var(--text-muted);
}
.no-products-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
}
.no-products-state p {
    color: var(--text-muted);
    font-weight: 500;
    max-width: 400px;
    margin-bottom: 1rem;
}

/* Modals Backdrops Styles */
.modal-backdrop, .cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: modalBgFade 0.25s ease-out;
}
.modal-backdrop.active, .cart-backdrop.active {
    display: flex;
}

@keyframes modalBgFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background-color: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    position: relative;
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-card.modal-lg {
    max-width: 800px;
}

@keyframes modalPop {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.modal-close-btn:hover {
    background-color: var(--surface-hover);
    color: var(--text-main);
}

/* Authentication Tab Headers */
.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}
.auth-tab {
    background: none;
    border: none;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-muted);
    padding: 0.8rem 0;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    position: relative;
}
.auth-tab.active {
    color: var(--primary);
}
.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    left: 0;
    height: 2px;
    background-color: var(--primary);
}

.auth-form-pane {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}
.auth-form-pane.active-pane {
    display: flex;
}

/* Forms Elements Styling */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.form-fullwidth {
    grid-column: span 2;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.form-group label {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
}
.input-with-icon {
    position: relative;
}
.input-with-icon i {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.input-with-icon input, 
.input-with-icon select,
.input-with-icon textarea,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-weight: 600;
    background-color: var(--surface);
    transition: var(--transition);
}
.input-with-icon input, 
.input-with-icon select,
.input-with-icon textarea {
    padding-right: 2.5rem;
}
.input-with-icon .password-toggle {
    position: absolute;
    top: 50%;
    left: 14px;
    right: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}
.input-with-icon .password-toggle:hover {
    color: var(--primary);
}
.input-with-icon.has-toggle input {
    padding-left: 2.5rem;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.input-with-icon input:focus,
.input-with-icon select:focus,
.input-with-icon textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.form-footer-options {
    display: flex;
    justify-content: flex-end;
}
.forgot-pass-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}
.forgot-pass-link:hover {
    text-decoration: underline;
}

.error-msg {
    color: var(--danger);
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    display: none;
}

/* Slide-out Shopping Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -420px; /* Initially hidden off screen to the left in RTL, wait: left vs right */
    width: 400px;
    background-color: var(--surface);
    box-shadow: var(--shadow-lg);
    z-index: 2100;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[dir="rtl"] .cart-sidebar {
    left: auto;
    right: -420px;
}
.cart-sidebar.active {
    transform: translateX(420px);
}
[dir="rtl"] .cart-sidebar.active {
    transform: translateX(-420px);
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-header h3 {
    font-weight: 800;
    color: var(--bg-dark);
}
.close-cart-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}
.close-cart-btn:hover {
    background-color: var(--surface-hover);
    color: var(--text-main);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.empty-cart-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    height: 100%;
    color: var(--text-muted);
    text-align: center;
}
.empty-cart-state i {
    font-size: 3.5rem;
}
.empty-cart-state p {
    font-weight: 600;
}

/* Cart Item Card */
.cart-item {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.25rem;
    align-items: center;
}
.cart-item-img {
    width: 65px;
    height: 65px;
    background-color: var(--surface-hover);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-img img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.cart-item-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cart-item-info .sku {
    font-family: var(--font-en);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}
.cart-item-info .price {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
}
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}
.btn-remove-item {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.btn-remove-item:hover {
    color: var(--danger);
}
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    background-color: var(--bg-light);
}
.qty-btn {
    border: none;
    background: none;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.qty-btn:hover {
    background-color: var(--border);
}
.qty-val {
    width: 30px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background-color: var(--surface-hover);
}
.cart-totals {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}
.total-row.grand-total {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
    margin-top: 0.3rem;
}
.total-row.grand-total span:last-child {
    color: var(--primary);
}
.delivery-badge {
    background-color: #e6f4ea;
    color: #137333;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Checkout Form Inside Cart Sidebar */
.checkout-address-section {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 1rem;
}
.checkout-address-section h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--bg-dark);
    margin-bottom: 0.8rem;
}
.user-guest-checkout-warning {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 0.8rem;
    border-radius: var(--radius-sm);
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.address-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.radio-container {
    display: block;
    position: relative;
    padding-right: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    user-select: none;
}
.radio-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkmark {
    position: absolute;
    top: 2px;
    right: 0;
    height: 18px;
    width: 18px;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
}
.radio-container:hover input ~ .checkmark {
    border-color: var(--primary);
}
.radio-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.radio-container input:checked ~ .checkmark:after {
    display: block;
}
.radio-container .checkmark:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.address-preview-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}
.address-preview-card .institution-title {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary);
}
.address-preview-card .specialty {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.address-preview-card .address-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.payment-method-badge {
    background-color: #ecfdf5;
    color: var(--accent-hover);
    border: 1px dashed var(--accent);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 1rem 1.8rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 3000;
    transform: translateY(150px);
    opacity: 0;
    transition: var(--transition);
    border-right: 4px solid var(--accent);
}
.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
}
.toast-notification.error {
    border-right-color: var(--danger);
}
.toast-notification.error i {
    color: var(--danger);
}
.toast-notification.active i {
    color: var(--accent);
}

/* Modal details content */
.details-modal-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
    padding: 0.5rem;
}
.details-img-wrapper {
    background-color: var(--surface-hover);
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 320px;
}
.details-img-wrapper img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}
.details-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.details-info-wrapper .badges {
    display: flex;
    gap: 0.8rem;
}
.details-info-wrapper h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bg-dark);
}
.details-info-wrapper .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.7;
    white-space: pre-line;
}
.details-price-area {
    background-color: var(--primary-light);
    border: 1px solid rgba(2, 132, 199, 0.1);
    padding: 1.2rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.details-price-area .price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}
.details-price-area .currency {
    font-weight: 700;
    color: var(--text-muted);
}
.details-add-to-cart {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

/* Dashboard Panel Layout */
.admin-dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    border: 1px solid var(--border);
    background-color: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 600px;
    box-shadow: var(--shadow-sm);
}
.admin-sidebar {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.admin-avatar {
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--primary-medium);
}
.admin-meta h3 {
    font-size: 0.95rem;
    font-weight: 700;
}
.role-badge {
    background-color: var(--primary);
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.admin-nav-item {
    background: none;
    border: none;
    color: #94a3b8;
    text-align: right;
    font-weight: 600;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}
.admin-nav-item:hover, .admin-nav-item.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}
.admin-nav-item.active {
    border-right: 4px solid var(--primary);
}

.admin-content-pane {
    padding: 2.2rem;
    overflow-y: auto;
}
.admin-tab-content {
    display: none;
}
.admin-tab-content.active-tab {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}
.tab-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bg-dark);
}

.admin-search-bar {
    margin-bottom: 1.5rem;
}
.admin-search-bar input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-weight: 600;
}
.admin-search-bar input:focus {
    border-color: var(--primary);
}

/* Data Tables */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}
.data-table th {
    background-color: var(--surface-hover);
    padding: 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}
.data-table tbody tr:hover {
    background-color: var(--surface-hover);
}
.table-prod-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background-color: var(--surface-hover);
    border-radius: 4px;
    padding: 0.2rem;
}
.table-actions {
    display: flex;
    gap: 0.5rem;
}
.icon-action-btn {
    border: 1px solid var(--border);
    background-color: var(--surface);
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.icon-action-btn.edit:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: var(--primary-light);
}
.icon-action-btn.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background-color: #fee2e2;
}

/* Admin Hint and Custom Classes */
.uppercase {
    text-transform: uppercase;
}
.admin-credentials-hint {
    background-color: #f1f5f9;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    border-right: 3px solid var(--text-muted);
}

.crud-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

/* Order Table specific styling */
.order-items-summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 250px;
    white-space: normal;
    word-break: break-all;
}

/* Footer Styling */
.app-footer {
    background-color: var(--bg-dark);
    color: #94a3b8;
    padding: 4rem 2rem 1.5rem 2rem;
    border-top: 1px solid var(--border);
}
.footer-container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.footer-brand .logo {
    color: var(--text-white);
}
.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
}
.social-links {
    display: flex;
    gap: 1rem;
}
.social-links a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.07);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}
.social-links a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}
.footer-links h3, .footer-contact h3 {
    color: var(--text-white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.footer-links ul, .footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.footer-links a {
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--primary-medium);
    padding-right: 5px;
}
.footer-contact li {
    display: flex;
    gap: 0.8rem;
    font-size: 0.88rem;
    line-height: 1.6;
}
.footer-contact li i {
    color: var(--primary-medium);
    margin-top: 0.25rem;
    font-size: 1rem;
}

.footer-bottom {
    max-width: 1440px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .hero-section-grid {
        grid-template-columns: 1fr;
        max-width: 700px;
        gap: 1.25rem;
    }
    .hero-slider-wrapper {
        height: 320px;
    }
    .hero-slide {
        display: none;
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        padding: 2rem 1.5rem !important;
        box-sizing: border-box !important;
        cursor: pointer;
    }
    .hero-slide.active-slide {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        opacity: 1 !important;
    }
    .slide-image {
        display: none !important; /* Hide images on smaller screens for layout comfort */
    }
    .slide-content {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.75rem !important;
        z-index: 3 !important;
        overflow: visible !important;
        padding: 0 1rem !important;
        box-sizing: border-box !important;
    }
    .slide-content h2 {
        font-size: 1.35rem !important;
        line-height: 1.35 !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        margin: 0 !important;
        display: block !important;
        white-space: normal !important;
        overflow: visible !important;
        text-align: center !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    }
    .slide-content p {
        font-size: 0.88rem !important;
        line-height: 1.5 !important;
        color: rgba(255, 255, 255, 0.95) !important;
        margin: 0 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-align: center !important;
        max-width: 92% !important;
    }
    .slide-price {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    .slide-badge {
        font-size: 0.78rem !important;
        padding: 0.25rem 0.8rem !important;
    }

    .products-layout {
        grid-template-columns: 1fr;
    }
    .filters-sidebar {
        position: static;
    }
    .admin-dashboard-container {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
        gap: 1rem;
        align-items: center;
    }
    .admin-profile {
        margin-bottom: 0;
    }
    .admin-nav {
        flex-direction: row;
    }
    .admin-nav-item {
        padding: 0.5rem 1rem;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.75rem !important;
    }
    .header-container {
        padding: 0.6rem 0.85rem;
        gap: 0.5rem;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--surface);
        border-bottom: 2px solid var(--border);
        flex-direction: column;
        padding: 1rem 1.25rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-lg);
        z-index: 1001;
    }
    .main-nav.active-mobile {
        display: flex !important;
        animation: dropSlide 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .main-nav .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: var(--radius-sm);
        background-color: var(--surface-hover);
        width: 100%;
        box-sizing: border-box;
    }
    .search-wrapper {
        display: none; /* Rely on category filtering and search views for mobile */
    }
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: var(--radius-sm);
        background-color: var(--surface-hover);
        color: var(--text-main);
    }
    .btn-text {
        display: none; /* Icons only on small mobile devices */
    }

    /* Horizontal Category Strip on Mobile (Prevent Data-loss Cut-off) */
    .categories-nav-strip {
        justify-content: flex-start !important;
        padding: 0 0.75rem !important;
        gap: 0.4rem !important;
        -webkit-overflow-scrolling: touch;
        scroll-padding: 0.75rem;
    }
    .category-nav-link {
        padding: 0 1rem !important;
        font-size: 0.85rem !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    /* Hero Slider on Mobile Devices */
    .hero-slider-wrapper {
        height: 290px !important;
        border-radius: var(--radius-md) !important;
    }
    .hero-slide {
        padding: 1.25rem 0.85rem !important;
    }
    .slide-content h2 {
        font-size: 1.15rem !important;
        line-height: 1.35 !important;
    }
    .slide-content p {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
        max-width: 95% !important;
        -webkit-line-clamp: 2 !important;
    }
    .slide-badge {
        font-size: 0.72rem !important;
        padding: 0.2rem 0.65rem !important;
    }
    .slider-arrow {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.9rem !important;
        background-color: rgba(0, 0, 0, 0.22) !important;
        backdrop-filter: blur(4px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }
    .slider-arrow.prev {
        right: 8px !important;
    }
    .slider-arrow.next {
        left: 8px !important;
    }
    .slider-indicators {
        bottom: 10px !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto !important;
        width: fit-content !important;
        gap: 6px !important;
    }
    .indicator {
        width: 8px !important;
        height: 8px !important;
    }
    .indicator.active {
        width: 22px !important;
    }

    /* Contact Sidebar on Mobile */
    .contact-header {
        padding: 1.25rem 1rem !important;
        gap: 1rem !important;
        border-radius: var(--radius-md) !important;
    }
    .contact-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.15rem !important;
    }
    .contact-info .label {
        font-size: 0.75rem !important;
    }
    .contact-info .value {
        font-size: 0.95rem !important;
    }

    /* Modal and Details Layout */
    .details-modal-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .details-img-wrapper {
        height: 200px;
    }
    .cart-sidebar {
        width: 100%;
        left: -100%;
    }
    [dir="rtl"] .cart-sidebar {
        right: -100%;
    }
}

/* Product Detail View Styling */
.detail-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2rem;
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1.25rem;
    box-shadow: var(--shadow-sm);
}
.detail-breadcrumbs .back-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 800;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}
.detail-breadcrumbs .back-link-btn:hover {
    color: var(--primary-dark);
}
.detail-breadcrumbs .divider {
    color: var(--border);
}
.detail-breadcrumbs .active {
    color: var(--text-main);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 4rem;
}
@media (max-width: 992px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.detail-image-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    box-shadow: var(--shadow-sm);
}
.detail-image-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.detail-info-pane {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.detail-info-pane h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--bg-dark);
    line-height: 1.3;
}
.detail-info-pane .sku-tag {
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: var(--surface-hover);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    align-self: flex-start;
}
.detail-bullet-highlights {
    padding-right: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.detail-bullet-highlights li {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 600;
    list-style-type: disc;
}

/* Premium Price Panel */
.detail-price-panel {
    background-color: var(--primary-light);
    border: 1px solid var(--primary-medium);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.detail-price-panel .price-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.detail-price-panel .current-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--danger); /* Medical red price */
}
.detail-price-panel .original-price {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 700;
}
.detail-price-panel .discount-badge {
    background-color: var(--danger);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
}
.detail-price-panel .tax-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* Delivery status banner */
.delivery-status-banner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background-color: #f0fdf4; /* Light green */
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 700;
}
.delivery-status-banner i {
    font-size: 1.1rem;
    color: var(--accent);
}

/* Add to cart row */
.detail-purchase-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.detail-qty-select {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    height: 48px;
    overflow: hidden;
}
.detail-qty-select button {
    width: 40px;
    height: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    transition: var(--transition);
}
.detail-qty-select button:hover {
    background-color: var(--surface-hover);
}
.detail-qty-select input {
    width: 50px;
    height: 100%;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: center;
    font-weight: 700;
    font-family: var(--font-en);
    font-size: 1rem;
    outline: none;
}
.detail-add-btn {
    flex-grow: 1;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 800;
}

/* Trust badges */
.detail-trust-badges {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}
.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
}
.trust-badge-item i {
    font-size: 1.2rem;
    color: var(--primary);
}

/* Detailed specifications / tabs section */
.detail-specs-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
}
@media (max-width: 768px) {
    .detail-specs-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
.detail-specs-column h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--bg-dark);
    margin-bottom: 1.25rem;
}
.detail-description-box {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.7;
    font-weight: 600;
}
.spec-table-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
}
.spec-table tr {
    border-bottom: 1px solid var(--border);
}
.spec-table tr:last-child {
    border-bottom: none;
}
.spec-table td {
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
}
.spec-table td.label-col {
    width: 40%;
    font-weight: 700;
    color: var(--text-muted);
    background-color: var(--surface-hover);
    border-left: 1px solid var(--border);
}
.spec-table td.val-col {
    font-weight: 700;
    color: var(--text-main);
}

/* Logo MZ Image Styles */
.logo-img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo:hover .logo-img {
    transform: translateY(-2px) rotate(4deg);
    filter: drop-shadow(0 6px 12px rgba(29, 78, 216, 0.18));
}

/* Keep logo spacing aligned */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}


