  * {
      box-sizing: border-box;
  }

  #cart-sidebar {
      position: fixed;
      top: 0;
      left: -320px;
      width: 320px;
      height: var(--vh, 100vh);
      background: #fff;
      box-shadow: 3px 0 10px rgba(0, 0, 0, 0.2);
      transition: left 0.3s ease;
      z-index: 1001;
      direction: rtl;
      display: flex;
      flex-direction: column;
      overflow: hidden;
  }

  #cart-sidebar.active {
      left: 0;
  }

  #cart-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.3s ease;
      z-index: 1000;
  }

  #cart-overlay.active {
      opacity: 1;
      visibility: visible;
  }

  #cart-sidebar h3 {
      padding: 15px;
      margin: 0;
      border-bottom: 1px solid #eee;
      font-size: 1.2rem;
      font-weight: bold;
      text-align: center;
  }

  #cart-items {
      flex: 1;
      overflow-y: auto;
      padding: 10px 15px;
  }

  .cart-item {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      position: relative;
      border-bottom: 1px solid #eee;
      padding: 15px 0;
  }

  .cart-item img {
      width: 70px;
      height: auto;
      border-radius: 8px;
      flex-shrink: 0;
  }

  .item-content {
      flex: 1;
      min-width: 0;
      margin-left: 40px;
  }

  .product-title {
      font-size: 0.9rem;
      font-weight: 600;
      margin-bottom: 6px;
      color: #333;
      line-height: 1.4;
      word-break: break-word;
  }

  .product-price {
      font-size: 0.85rem;
      color: #007bff;
      margin-bottom: 8px;
  }

  .qty-controls {
      display: inline-flex;
      align-items: center;
      border: 1px solid #ccc;
      border-radius: 20px;
      overflow: hidden;
      height: 30px;
  }

  .qty-controls button {
      background: none;
      border: none;
      width: 30px;
      height: 30px;
      font-size: 18px;
      cursor: pointer;
  }

  .qty-controls input {
      width: 35px;
      text-align: center;
      border: none;
      font-size: 14px;
      pointer-events: none;
      font-family: inherit;
  }

  .remove-item {
      position: absolute;
      top: 5px;
      left: 5px;
      font-size: 1.3rem;
      color: #888;
      background: none;
      border: none;
      cursor: pointer;
  }

  #cart-footer {
      border-top: 1px solid #eee;
      padding: 15px;
      background: #fff;
      display: flex;
      flex-direction: column;
      gap: 10px;
  }

  #cart-total {
      font-weight: bold;
      font-size: 1rem;
      color: #000;
      text-align: center;
      margin-bottom: 5px;
  }

  .btn-block {
      display: block;
      text-align: center;
      font-weight: bold;
      padding: 12px;
      border-radius: 8px;
      text-decoration: none;
      font-size: 0.9rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
  }

  .btn-primary {
      background-color: #1b80f2;
      color: white;
  }

  .btn-secondary {
      background-color: #e4e4e4;
      color: #333;
  }

  #cart-close-btn {
      position: absolute;
      top: 10px;
      right: 10px;
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      z-index: 10;
  }

  #cart-sidebar * {
      max-width: 100%;
  }

  @media (max-width: 400px) {
      #cart-sidebar {
          width: 100%;
          left: -100%;
      }

      #cart-sidebar.active {
          left: 0;
      }
  }