:root {
    --primary: #eb2525;
    --primary-hover: #d81d1d;
    --text-secondary: #4b5563;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: rgb(245, 245, 245);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Form Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.form-card {
    max-width: 42rem;
    margin: 0 auto;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
}

.form-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    width: 4rem;
    height: 4rem;
    background: #fef2f2;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.icon-lock {
    width: 2rem;
    height: 2rem;
    color: #ef4444;
}


.form-header h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
    font-weight: 500;
}

.required {
    color: #ef4444;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.75rem 2.75rem 0.75rem 2.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    color: var(--text-primary);
    background-color: white;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group i {
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    color: #666;
}

/* Right icon (main icon) */
.input-group i:first-child {
    right: 1rem;
}

/* Password toggle button */
.toggle-password {
    position: absolute;
    left: 1rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.toggle-password i {
    position: static;
    width: 1.25rem;
    height: 1.25rem;
}

.toggle-password:hover {
    color: var(--primary);
}

.toggle-password:hover i {
    color: inherit;
}

.submit-button {
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-button:hover {
    background-color: var(--primary-hover);
}

.sign-in-link {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.sign-in-link a {
    color: var(--primary);
    text-decoration: none;
    margin-right: 0.25rem;
    font-weight: 500;
}

.sign-in-link a:hover {
    text-decoration: underline;
}

/* Form options styles */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.forgot-password {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4b5563;
    font-size: 0.875rem;
}

.remember-me input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border-color: #d1d5db;
}

/* Responsive Form Adjustments */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 1.5rem;
    }
}

/* Side Menu Styles */
.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 1000;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease-in-out;
}

.side-menu.active {
    transform: translateX(-320px);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.side-menu-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-button:hover {
    background-color: var(--bg-light);
}

.side-menu-content {
    overflow-y: auto;
    height: calc(100% - 60px);

    /* Hide scrollbar for Chrome, Safari and Opera */
    &::-webkit-scrollbar {
        display: none;
    }

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.side-menu-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.side-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.side-menu-item:hover {
    background-color: var(--bg-light);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    backdrop-filter: blur(4px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Toggle Button */
.menu-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 900;
    background: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-toggle i {
    color: var(--text-primary);
}

.menu-toggle svg {
    color: #111 !important; /* sets currentColor for the SVG */
    stroke: currentColor !important; /* Lucide uses stroke=currentColor */
    fill: none; /* keep lines only */
}

.menu-toggle:hover {
    background-color: var(--bg-light);
}

@media (max-width: 768px) {
    .side-menu {
        width: 280px;
        right: -280px;
    }

    .side-menu.active {
        transform: translateX(-280px);
    }
}

/* Footer Styles */
.footer {
    background-color: #f8f9fa;
    padding-top: 3rem;
    margin-top: 4rem;
}

.footer-top {
    padding-bottom: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section {
    padding: 0 1rem;
}

.footer-title {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(-8px);
}

.footer-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

/* Footer Bottom */
.footer-bottom {
    background-color: #fff;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.payment-methods {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.payment-icon {
    height: 30px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.payment-icon:hover {
    opacity: 1;
}

.payment-icon1 {
    height: 60px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.payment-icon1:hover {
    opacity: 1;
}

.company-info {
    text-align: center;
}

.shipping-partners {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.shipping-icon {
    height: 40px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.shipping-icon:hover {
    opacity: 1;
}

.shipping-icon1 {
    height: 90px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.shipping-icon1:hover {
    opacity: 1;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Footer Adjustments */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-section {
        padding: 0 0.5rem;
    }

    .payment-methods,
    .shipping-partners {
        gap: 1rem;
    }

    .payment-icon,
    .shipping-icon {
        height: 25px;
    }

    .payment-icon1,
    .shipping-icon1 {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-section {
        text-align: center;
    }

    .footer-title::after {
        right: 50%;
        transform: translateX(50%);
    }

    .footer-links a {
        justify-content: center;
    }

    .payment-methods,
    .shipping-partners {
        gap: 0.75rem;
    }
}

/* Dropdown Styles */
.dropdown-trigger {
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    color: var(--text-primary);
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.dropdown-trigger:hover {
    background-color: var(--bg-light);
}

.menu-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dropdown-content {
    display: none;
    padding: 0.5rem 0;
    margin-right: 2rem;
}

.dropdown-content.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    transform: translateX(-8px);
}

.brand-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.side-menu-dropdown {
    position: relative;
}

.dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
}

.dropdown-icon {
    margin-right: auto;
    transition: transform 0.3s ease;
}

.dropdown-trigger.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    padding: 0.5rem 0;
    background-color: var(--bg-light);
    border-right: 3px solid var(--primary);
}

.dropdown-content.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 2.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    padding-right: 3rem;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.dropdown-item:hover i {
    color: var(--primary);
}

/* Add these styles at the end of your CSS file */
.side-menu {
    position: fixed;
    top: 0;
    right: -320px;
    /* Start off-screen */
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 2000;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.side-menu.active {
    transform: translateX(-320px);
}

.side-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.side-menu-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.close-button {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(90deg);
}

.side-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.side-menu-section {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.side-menu-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-label {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.side-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.side-menu-item:hover {
    background-color: var(--bg-light);
    padding-right: 1.75rem;
}

.side-menu-item i {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.side-menu-item:hover i {
    color: var(--primary);
}

/* Dropdown styles */
.side-menu-dropdown {
    width: 100%;
}

.dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
}

.dropdown-icon {
    margin-right: auto;
    transition: transform 0.3s ease;
}

.dropdown-trigger.active .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    padding: 0.5rem 0;
    background-color: var(--bg-light);
    border-right: 3px solid var(--primary);
}

.dropdown-content.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 2.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    padding-right: 3rem;
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1999;
    backdrop-filter: blur(4px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 767px) {
    .side-menu {
        width: 280px;
        right: -280px;
    }

    .side-menu.active {
        transform: translateX(-280px);
    }
}

/* ====== إصلاح مشكلة الاهتزاز أو التمدد في الجوال ====== */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden !important; /* يمنع التمرير الأفقي */
  width: 100%;
}

/* يمنع أي عنصر من كسر عرض الشاشة */
* {
  box-sizing: border-box;
  max-width: 100%;
}

/* إصلاح القائمة الجانبية في الوضع المغلق */
.side-menu {
  position: fixed;
  top: 0;
  right: 0; /* تأكدي أن هذا ليس -320px */
  transform: translateX(100%); /* تبقى خارج الشاشة بدون أن تدفع الصفحة */
  width: 320px;
  height: 100vh;
  background: #fff;
  z-index: 2000;
  transition: transform 0.3s ease-in-out;
}

.side-menu.active {
  transform: translateX(0); /* تظهر بشكل طبيعي */
}

/* إصلاح الفوتر والعناصر السفلية */
.footer,
.footer-bottom,
.container {
  max-width: 100%;
  overflow-x: hidden;
}

/* عند الشاشات الصغيرة (مثل الجوالات) */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
  }

  .form-card,
  .footer,
  .container,
  .footer-grid {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
  }

  /* إصلاح خاص للقائمة الجانبية في الجوال */
  .side-menu {
    width: 280px;
    transform: translateX(100%);
  }

  .side-menu.active {
    transform: translateX(0);
  }

  /* يمنع أي تحرك للصفحة يمين ويسار عند السحب */
  body {
    position: relative;
    touch-action: pan-y;
  }
}

