 :root {
       --primary: #ff6b35;
       --secondary: #004e89;
       --dark: #1a1a1a;
       --light: #f8f9fa;
       --success: #28a745;
       --danger: #dc3545;
       --gray: #6c757d;
       --border: #dee2e6;
       --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
       --transition: all 0.3s ease;
       --bg-color: #f8f9fa;
       --text-color: #333;
       --card-bg: #ffffff;
       --header-bg: #1a1a1a;
       --footer-bg: #1a1a1a;
       --input-text-color: #333;
       --input-placeholder-color: #6c757d;
   }

   .dark-mode {
       --bg-color: #1a1a1a;
       --text-color: #f8f9fa;
       --card-bg: #2d2d2d;
       --header-bg: #121212;
       --footer-bg: #121212;
       --border: #444;
       --input-text-color: #f8f9fa;
       --input-placeholder-color: #bbb;
   }

   * {
       margin: 0;
       padding: 0;
       box-sizing: border-box;
   }

   html {
       font-size: 16px;
   }

   body {
       font-family: 'Tajawal', sans-serif;
       background-color: var(--bg-color);
       color: var(--text-color);
       scroll-behavior: smooth;
       line-height: 1.6;
       transition: var(--transition);
       min-height: 100vh;
       display: flex;
       flex-direction: column;
   }

   header {
       background-color: var(--header-bg);
       color: white;
       padding: 1rem 2rem;
       display: flex;
       justify-content: space-between;
       align-items: center;
       flex-wrap: wrap;
       box-shadow: var(--shadow);
       position: sticky;
       top: 0;
       z-index: 1000;
       transition: var(--transition);
   }

   .scrolled {
       padding: 0.8rem 2rem;
       box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
   }

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

   .logo h1 {
       margin: 0;
       font-size: 1.8rem;
       font-weight: 700;
   }

   .logo i {
       color: var(--primary);
       font-size: 1.8rem;
   }

   .menu-toggle {
       display: none;
       background: none;
       border: none;
       color: white;
       font-size: 1.5rem;
       cursor: pointer;
       padding: 0.5rem;
   }

   nav {
       display: flex;
       gap: 1.5rem;
       align-items: center;
   }

   nav a {
       color: white;
       text-decoration: none;
       font-weight: 500;
       transition: var(--transition);
       position: relative;
       padding: 0.5rem 0;
       white-space: nowrap;
   }

   nav a:hover {
       color: var(--primary);
   }

   nav a::after {
       content: '';
       position: absolute;
       bottom: 0;
       left: 0;
       width: 0;
       height: 2px;
       background-color: var(--primary);
       transition: var(--transition);
   }

   nav a:hover::after {
       width: 100%;
   }

   .nav-icons {
       display: flex;
       gap: 1rem;
       margin-left: 1rem;
   }

   .nav-icons a {
       color: white;
       font-size: 1.2rem;
       transition: var(--transition);
       position: relative;
   }

   .nav-icons a:hover {
       color: var(--primary);
       transform: translateY(-3px);
   }

   .cart-count {
       background: var(--primary);
       color: white;
       border-radius: 50%;
       width: 20px;
       height: 20px;
       font-size: 0.7rem;
       display: inline-flex;
       align-items: center;
       justify-content: center;
       position: absolute;
       top: -8px;
       left: 10px;
   }

   .dark-mode-toggle {
       background: none;
       border: none;
       color: white;
       font-size: 1.2rem;
       cursor: pointer;
       transition: var(--transition);
       padding: 0.5rem;
   }

   .dark-mode-toggle:hover {
       color: var(--primary);
       transform: rotate(20deg);
   }

   .checkout-page {
       padding: 5rem 2rem;
       background-color: var(--bg-color);
       min-height: 70vh;
       flex: 1;
   }

   .checkout-container {
       max-width: 1200px;
       margin: 0 auto;
       background: var(--card-bg);
       border-radius: 16px;
       padding: 2.5rem;
       box-shadow: var(--shadow);
   }

   .section-title {
       text-align: center;
       margin-bottom: 3rem;
       position: relative;
   }

   .section-title h2 {
       font-size: 2.5rem;
       color: var(--text-color);
       display: inline-block;
       padding-bottom: 1rem;
   }

   .section-title h2::after {
       content: '';
       position: absolute;
       bottom: 0;
       left: 50%;
       transform: translateX(-50%);
       width: 80px;
       height: 4px;
       background: var(--primary);
       border-radius: 2px;
   }

   .checkout-page table {
       width: 100%;
       border-collapse: collapse;
       margin: 2rem 0;
       background-color: var(--card-bg);
       border-radius: 12px;
       overflow: hidden;
       box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
   }

   .checkout-page th {
       background-color: var(--header-bg);
       color: white;
       padding: 1.2rem;
       text-align: center;
       font-weight: 600;
   }

   .checkout-page td {
       padding: 1.2rem;
       border-bottom: 1px solid var(--border);
       text-align: center;
       vertical-align: middle;
       color: var(--text-color);
   }

   .checkout-page tr:last-child td {
       border-bottom: none;
   }

   .product-cell {
       display: flex;
       align-items: center;
       gap: 15px;
       justify-content: center;
   }

   .product-cell img {
       width: 60px;
       height: 60px;
       object-fit: contain;
       border-radius: 8px;
       background: #f9f9f9;
       padding: 5px;
       border: 1px solid var(--border);
   }

   .quantity-control {
       display: flex;
       align-items: center;
       justify-content: center;
       gap: 10px;
   }

   .quantity-control button {
       width: 32px;
       height: 32px;
       border-radius: 50%;
       background: var(--light);
       border: 1px solid var(--border);
       cursor: pointer;
       display: flex;
       align-items: center;
       justify-content: center;
       transition: var(--transition);
       color: var(--text-color);
   }

   .quantity-control button:hover {
       background: var(--primary);
       color: white;
       border-color: var(--primary);
   }

   .quantity-control span {
       min-width: 30px;
       text-align: center;
       color: var(--text-color);
   }

   .remove-btn {
       background-color: var(--danger);
       color: white;
       border: none;
       padding: 0.5rem 1rem;
       border-radius: 50px;
       cursor: pointer;
       transition: var(--transition);
       font-weight: 600;
       display: inline-flex;
       align-items: center;
       gap: 5px;
   }

   .remove-btn:hover {
       background-color: #c82333;
       transform: translateY(-2px);
   }

   .checkout-summary {
       background: var(--light);
       border-radius: 12px;
       padding: 2rem;
       margin-top: 2rem;
       max-width: 500px;
       margin-left: auto;
   }

   .summary-row {
       display: flex;
       justify-content: space-between;
       padding: 0.8rem 0;
       border-bottom: 1px solid var(--border);
       color: var(--text-color);
   }

   .summary-row.total {
       font-size: 1.3rem;
       font-weight: 700;
       color: var(--primary);
       border-bottom: none;
       padding-top: 1.5rem;
   }

   .checkout-actions {
       display: flex;
       justify-content: flex-end;
       gap: 1.5rem;
       margin-top: 2rem;
       flex-wrap: wrap;
   }

   .checkout-btn {
       background-color: var(--success);
       color: white;
       padding: 0.9rem 2rem;
       border: none;
       border-radius: 50px;
       cursor: pointer;
       font-weight: 700;
       font-size: 1.1rem;
       transition: var(--transition);
       display: inline-flex;
       align-items: center;
       gap: 8px;
       box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
       text-decoration: none;
   }

   .checkout-btn:hover {
       background-color: #218838;
       transform: translateY(-3px);
       box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
   }

   .checkout-btn.clear {
       background-color: var(--card-bg);
       color: var(--danger);
       border: 2px solid var(--danger);
       box-shadow: none;
   }

   .checkout-btn.clear:hover {
       background-color: var(--danger);
       color: white;
   }

   .checkout-btn.back {
       background-color: var(--secondary);
       color: white;
   }

   .checkout-btn.back:hover {
       background-color: #003a6b;
   }

   .empty-cart {
       text-align: center;
       padding: 4rem;
       color: var(--gray);
   }

   .empty-cart i {
       font-size: 5rem;
       margin-bottom: 1.5rem;
       color: #e9ecef;
   }

   .empty-cart p {
       font-size: 1.2rem;
       margin-bottom: 1.5rem;
   }

   .empty-cart .cta-btn {
       background-color: var(--primary);
       color: white;
       padding: 0.8rem 2.5rem;
       text-decoration: none;
       border-radius: 50px;
       display: inline-flex;
       align-items: center;
       gap: 8px;
       margin-top: 1rem;
       transition: var(--transition);
       font-weight: 600;
       font-size: 1.1rem;
       border: 2px solid var(--primary);
       box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
   }

   .empty-cart .cta-btn:hover {
       background-color: var(--primary);
       transform: translateY(-5px);
       box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
   }

   footer {
       background-color: var(--footer-bg);
       color: white;
       padding: 4rem 2rem 2rem;
       margin-top: auto;
   }

   .footer-container {
       max-width: 1200px;
       margin: 0 auto;
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
       gap: 3rem;
   }

   .footer-col h3 {
       font-size: 1.5rem;
       margin-bottom: 1.5rem;
       position: relative;
       padding-bottom: 0.8rem;
   }

   .footer-col h3::after {
       content: '';
       position: absolute;
       bottom: 0;
       left: 0;
       width: 50px;
       height: 3px;
       background: var(--primary);
   }

   .footer-links {
       list-style: none;
   }

   .footer-links li {
       margin-bottom: 0.8rem;
   }

   .footer-links a {
       color: #bbb;
       text-decoration: none;
       transition: var(--transition);
       display: flex;
       align-items: center;
       gap: 8px;
   }

   .footer-links a:hover {
       color: var(--primary);
       transform: translateX(5px);
   }

   .social-links {
       display: flex;
       gap: 1rem;
       margin-top: 1.5rem;
   }

   .social-links a {
       display: flex;
       align-items: center;
       justify-content: center;
       width: 40px;
       height: 40px;
       border-radius: 50%;
       background: rgba(255, 255, 255, 0.1);
       color: white;
       transition: var(--transition);
   }

   .social-links a:hover {
       background: var(--primary);
       transform: translateY(-5px);
   }

   .footer-form {
       margin-top: 1.5rem;
   }

   .form-group {
       position: relative;
       margin-bottom: 1rem;
   }

   .footer-form input[type="email"] {
       width: 100%;
       padding: 0.9rem 1.2rem;
       background-color: rgba(255, 255, 255, 0.1);
       border: 1px solid rgba(255, 255, 255, 0.2);
       border-radius: 50px;
       color: white;
       font-family: 'Tajawal', sans-serif;
       font-size: 1rem;
       transition: var(--transition);
   }

   .footer-form input[type="email"]:focus {
       outline: none;
       border-color: var(--primary);
       background-color: rgba(255, 255, 255, 0.15);
   }

   .footer-form input[type="email"]::placeholder {
       color: rgba(255, 255, 255, 0.6);
   }

   .submit-btn {
       width: 100%;
       padding: 0.9rem 1.5rem;
       background-color: var(--primary);
       color: white;
       border: none;
       border-radius: 50px;
       font-family: 'Tajawal', sans-serif;
       font-weight: 600;
       font-size: 1rem;
       cursor: pointer;
       transition: var(--transition);
       display: flex;
       align-items: center;
       justify-content: center;
       gap: 8px;
   }

   .submit-btn:hover {
       background-color: #ff5722;
       transform: translateY(-3px);
       box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
   }

   .copyright {
       text-align: center;
       padding-top: 3rem;
       margin-top: 3rem;
       border-top: 1px solid rgba(255, 255, 255, 0.1);
       color: #bbb;
   }

   .notification {
       position: fixed;
       top: 20px;
       right: 20px;
       padding: 15px 25px;
       border-radius: 12px;
       color: white;
       font-weight: 600;
       z-index: 10000;
       transform: translateX(120%);
       transition: transform 0.3s ease;
       box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
   }

   .notification.show {
       transform: translateX(0);
   }

   .notification.success {
       background-color: var(--success);
       border-left: 5px solid #218838;
   }

   .notification.error {
       background-color: var(--danger);
       border-left: 5px solid #c82333;
   }

   /* مودال التأكيد */
   .confirm-modal {
       position: fixed;
       top: 0;
       left: 0;
       width: 100%;
       height: 100%;
       background-color: rgba(0, 0, 0, 0.5);
       display: flex;
       justify-content: center;
       align-items: center;
       z-index: 10001;
       opacity: 0;
       visibility: hidden;
       transition: all 0.3s ease;
   }

   .confirm-modal.show {
       opacity: 1;
       visibility: visible;
   }

   .confirm-modal-content {
       background: white;
       border-radius: 15px;
       padding: 2rem;
       max-width: 400px;
       width: 90%;
       text-align: center;
       box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
       transform: scale(0.7);
       transition: transform 0.3s ease;
   }

   .confirm-modal.show .confirm-modal-content {
       transform: scale(1);
   }

   .confirm-modal-icon {
       font-size: 3rem;
       color: var(--primary);
       margin-bottom: 1rem;
   }

   .confirm-modal-title {
       font-size: 1.5rem;
       font-weight: 700;
       color: var(--dark);
       margin-bottom: 1rem;
   }

   .confirm-modal-details {
       background: #f8f9fa;
       padding: 1rem;
       border-radius: 8px;
       margin: 1rem 0;
   }

   .confirm-modal-details p {
       margin: 0.5rem 0;
       font-weight: 600;
   }

   .confirm-modal-buttons {
       display: flex;
       gap: 1rem;
       margin-top: 1.5rem;
   }

   .confirm-modal-btn {
       flex: 1;
       padding: 0.8rem 1.5rem;
       border: none;
       border-radius: 8px;
       font-weight: 600;
       cursor: pointer;
       transition: all 0.3s ease;
   }

   .confirm-modal-btn.confirm {
       background: var(--success);
       color: white;
   }

   .confirm-modal-btn.confirm:hover {
       background: #218838;
       transform: translateY(-2px);
   }

   .confirm-modal-btn.cancel {
       background: var(--gray);
       color: white;
   }

   .confirm-modal-btn.cancel:hover {
       background: #5a6268;
       transform: translateY(-2px);
   }

   @media (max-width: 1024px) {
       .checkout-container {
           padding: 2rem;
       }

       .footer-container {
           gap: 2rem;
       }
   }

   @media (max-width: 768px) {
       html {
           font-size: 15px;
       }

       header {
           padding: 1rem;
       }

       .menu-toggle {
           display: block;
       }

       nav {
           position: fixed;
           top: 70px;
           left: 0;
           width: 100%;
           background-color: var(--header-bg);
           flex-direction: column;
           padding: 2rem;
           gap: 1.5rem;
           box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
           transform: translateY(-100%);
           opacity: 0;
           visibility: hidden;
           transition: var(--transition);
           z-index: 999;
       }

       nav.active {
           transform: translateY(0);
           opacity: 1;
           visibility: visible;
       }

       .nav-icons {
           margin-left: 0;
           margin-top: 1rem;
           flex-direction: row;
       }

       .checkout-page {
           padding: 3rem 1rem;
       }

       .checkout-container {
           padding: 1.5rem;
       }

       .section-title h2 {
           font-size: 2rem;
       }

       .checkout-page table {
           display: block;
           overflow-x: auto;
           white-space: nowrap;
           -webkit-overflow-scrolling: touch;
       }

       .checkout-page th,
       .checkout-page td {
           padding: 0.8rem;
           font-size: 0.9rem;
       }

       .product-cell {
           flex-direction: row;
           justify-content: flex-start;
           min-width: 200px;
       }

       .quantity-control {
           gap: 5px;
       }

       .checkout-actions {
           justify-content: center;
       }

       .checkout-btn {
           padding: 0.7rem 1.5rem;
           font-size: 1rem;
       }

       .checkout-summary {
           max-width: 100%;
           padding: 1.5rem;
       }

       .footer-form input[type="email"] {
           padding: 0.8rem 1rem;
       }

       .submit-btn {
           padding: 0.8rem 1.2rem;
       }
   }

   @media (max-width: 576px) {
       html {
           font-size: 14px;
       }

       .logo h1 {
           font-size: 1.5rem;
       }

       .checkout-page {
           padding: 2rem 0.8rem;
       }

       .checkout-container {
           padding: 1.2rem;
           border-radius: 12px;
       }

       .section-title h2 {
           font-size: 1.7rem;
       }

       .checkout-page th {
           font-size: 0.8rem;
           padding: 0.6rem;
       }

       .checkout-page td {
           font-size: 0.8rem;
           padding: 0.6rem;
       }

       .quantity-control button {
           width: 28px;
           height: 28px;
       }

       .remove-btn {
           padding: 0.4rem 0.8rem;
           font-size: 0.9rem;
       }

       .checkout-actions {
           flex-direction: column;
           gap: 1rem;
       }

       .checkout-btn {
           width: 100%;
           justify-content: center;
       }

       .checkout-summary {
           padding: 1.2rem;
       }

       .summary-row.total {
           font-size: 1.1rem;
       }

       .footer-container {
           grid-template-columns: 1fr;
           text-align: center;
           gap: 2rem;
       }

       .footer-col h3::after {
           left: 50%;
           transform: translateX(-50%);
       }

       .social-links {
           justify-content: center;
       }

       footer {
           padding: 3rem 1.5rem 2rem;
       }

       .footer-form input[type="email"] {
           padding: 0.7rem 1rem;
       }

       .submit-btn {
           padding: 0.7rem 1rem;
       }
   }

   @media (max-width: 400px) {
       html {
           font-size: 13px;
       }

       .logo h1 {
           font-size: 1.3rem;
       }

       .logo i {
           font-size: 1.5rem;
       }

       .checkout-page {
           padding: 1.5rem 0.5rem;
       }

       .checkout-container {
           padding: 1rem;
       }

       .section-title h2 {
           font-size: 1.5rem;
       }

       .product-cell {
           flex-direction: column;
           text-align: center;
           min-width: 150px;
       }

       .product-cell img {
           width: 50px;
           height: 50px;
       }

       .checkout-page th,
       .checkout-page td {
           padding: 0.5rem;
           font-size: 0.75rem;
       }

       .quantity-control button {
           width: 24px;
           height: 24px;
           font-size: 0.8rem;
       }

       .quantity-control span {
           min-width: 25px;
       }

       .remove-btn {
           padding: 0.3rem 0.6rem;
           font-size: 0.8rem;
       }

       .checkout-summary {
           padding: 1rem;
       }

       .summary-row {
           padding: 0.6rem 0;
           font-size: 0.9rem;
       }

       .summary-row.total {
           font-size: 1rem;
           padding-top: 1rem;
       }

       footer {
           padding: 2.5rem 1rem 1.5rem;
       }

       .footer-col h3 {
           font-size: 1.3rem;
           margin-bottom: 1rem;
       }

       .footer-links li {
           margin-bottom: 0.6rem;
       }

       .copyright {
           padding-top: 2rem;
           margin-top: 2rem;
           font-size: 0.9rem;
       }
   }

   @media (max-width: 320px) {
       .logo h1 {
           font-size: 1.2rem;
       }

       .logo i {
           font-size: 1.3rem;
       }

       .section-title h2 {
           font-size: 1.4rem;
       }

       .checkout-btn {
           padding: 0.6rem 1rem;
           font-size: 0.9rem;
       }

       .product-cell {
           min-width: 120px;
       }

       .footer-form input[type="email"] {
           padding: 0.6rem 0.8rem;
           font-size: 0.9rem;
       }

       .submit-btn {
           padding: 0.6rem 0.8rem;
           font-size: 0.9rem;
       }
   }

   @media (min-width: 1400px) {
       .checkout-container {
           max-width: 1300px;
       }

       .footer-container {
           max-width: 1300px;
       }
   }

